# io.k8s.api.batch.v1.SuccessPolicy

From **Kubernetes**.

SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.

- Type: `object`

## Properties

### `rules`

- Required: true
- Type: `array`

rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SuccessCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.

## JSON Schema

```json
{"description":"SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.","properties":{"rules":{"description":"rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded \u003e= .spec.completions`. Once any of the rules are met, the \"SuccessCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.","items":{"$ref":"#/components/schemas/io.k8s.api.batch.v1.SuccessPolicyRule"},"type":"array","x-kubernetes-list-type":"atomic"}},"required":["rules"],"type":"object"}
```
