kubernetes_asyncio.client.models.v1_validating_admission_policy_binding_spec module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

The version of the OpenAPI document: v1.34.3 Generated by: https://openapi-generator.tech

class kubernetes_asyncio.client.models.v1_validating_admission_policy_binding_spec.V1ValidatingAdmissionPolicyBindingSpec(match_resources=None, param_ref=None, policy_name=None, validation_actions=None, local_vars_configuration=None)

Bases: object

NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech

Do not edit the class manually.

attribute_map = {'match_resources': 'matchResources', 'param_ref': 'paramRef', 'policy_name': 'policyName', 'validation_actions': 'validationActions'}
property match_resources

Gets the match_resources of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501

Returns:

The match_resources of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501

Return type:

V1MatchResources

openapi_types = {'match_resources': 'V1MatchResources', 'param_ref': 'V1ParamRef', 'policy_name': 'str', 'validation_actions': 'list[str]'}
property param_ref

Gets the param_ref of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501

Returns:

The param_ref of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501

Return type:

V1ParamRef

property policy_name

Gets the policy_name of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501

PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. # noqa: E501

Returns:

The policy_name of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501

Return type:

str

to_dict(serialize=False)

Returns the model properties as a dict

to_str()

Returns the string representation of the model

property validation_actions

Gets the validation_actions of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501

validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy’s FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: “Deny” specifies that a validation failure results in a denied request. “Warn” specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. “Audit” specifies that a validation failure is included in the published audit event for the request. The audit event will contain a validation.policy.admission.k8s.io/validation_failure audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: “validation.policy.admission.k8s.io/validation_failure”: “[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]” Clients should expect to handle additional values by ignoring any values not recognized. “Deny” and “Warn” may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. # noqa: E501

Returns:

The validation_actions of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501

Return type:

list[str]