Class ValidationV1Alpha1.Jsii$Proxy
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.plus28.k8s.ValidationV1Alpha1.Jsii$Proxy
-
- All Implemented Interfaces:
ValidationV1Alpha1,software.amazon.jsii.JsiiSerializable
- Enclosing interface:
- ValidationV1Alpha1
@Stability(Stable) @Internal public static final class ValidationV1Alpha1.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ValidationV1Alpha1
An implementation forValidationV1Alpha1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus28.k8s.ValidationV1Alpha1
ValidationV1Alpha1.Builder, ValidationV1Alpha1.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJsii$Proxy(ValidationV1Alpha1.Builder builder)Constructor that initializes the object based on literal property values passed by theValidationV1Alpha1.Builder.protectedJsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)Constructor that initializes the object based on values retrieved from the JsiiObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNode$jsii$toJson()booleanequals(Object o)StringgetExpression()Expression represents the expression which will be evaluated by CEL.StringgetMessage()Message represents the message displayed when validation fails.StringgetMessageExpression()messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.StringgetReason()Reason represents a machine-readable description of why this validation failed.inthashCode()
-
-
-
Constructor Detail
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.- Parameters:
objRef- Reference to the JSII managed object.
-
Jsii$Proxy
protected Jsii$Proxy(ValidationV1Alpha1.Builder builder)
Constructor that initializes the object based on literal property values passed by theValidationV1Alpha1.Builder.
-
-
Method Detail
-
getExpression
public final String getExpression()
Description copied from interface:ValidationV1Alpha1Expression represents the expression which will be evaluated by CEL.ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request(ref). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'.
- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource.
The
apiVersion,kind,metadata.nameandmetadata.generateNameare always accessible from the root of the object. No other metadata properties are accessible.Only property names of the form
[a-zA-Z_.-/][a-zA-Z0-9_.-/]*are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '' escapes to 'underscores' - '.' escapes to 'dot' - '-' escapes to 'dash' - '/' escapes to 'slash' - Property names that exactly match a CEL RESERVED keyword escape to '{keyword}__'. The keywords are: "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", "import", "let", "loop", "package", "namespace", "return". Examples:- Expression accessing a property named "namespace": {"Expression": "object.namespace > 0"}
- Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"}
- Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"}
Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
- 'set':
X + Yperforms a union where the array positions of all elements inXare preserved and non-intersecting elements inYare appended, retaining their partial order. - 'map':
X + Yperforms a merge where the array positions of all keys inXare preserved but the values are overwritten by values inYwhen the key sets ofXandYintersect. Elements inYwith non-intersecting keys are appended, retaining their partial order. Required.
- Specified by:
getExpressionin interfaceValidationV1Alpha1
-
getMessage
public final String getMessage()
Description copied from interface:ValidationV1Alpha1Message represents the message displayed when validation fails.The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is "failed rule: {Rule}". e.g. "must be a URL with the host matching spec.host" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is "failed Expression: {Expression}".
- Specified by:
getMessagein interfaceValidationV1Alpha1
-
getMessageExpression
public final String getMessageExpression()
Description copied from interface:ValidationV1Alpha1messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the
expressionexcept for 'authorizer' and 'authorizer.requestResource'. Example: "object.x must be less than max ("+string(params.max)+")"- Specified by:
getMessageExpressionin interfaceValidationV1Alpha1
-
getReason
public final String getReason()
Description copied from interface:ValidationV1Alpha1Reason represents a machine-readable description of why this validation failed.If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". If not set, StatusReasonInvalid is used in the response to the client.
- Specified by:
getReasonin interfaceValidationV1Alpha1
-
$jsii$toJson
@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
- Specified by:
$jsii$toJsonin interfacesoftware.amazon.jsii.JsiiSerializable
-
-