com.pulumi.kubernetes.admissionregistration.v1.inputs.MatchConditionArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.kubernetes.admissionregistration.v1.inputs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
/**
* MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
*
*/
public final class MatchConditionArgs extends com.pulumi.resources.ResourceArgs {
public static final MatchConditionArgs Empty = new MatchConditionArgs();
/**
* Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL 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 admission request(/pkg/apis/admission/types.go#AdmissionRequest). '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.
* Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
*
* Required.
*
*/
@Import(name="expression", required=true)
private Output expression;
/**
* @return Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL 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 admission request(/pkg/apis/admission/types.go#AdmissionRequest). '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.
* Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
*
* Required.
*
*/
public Output expression() {
return this.expression;
}
/**
* Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')
*
* Required.
*
*/
@Import(name="name", required=true)
private Output name;
/**
* @return Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')
*
* Required.
*
*/
public Output name() {
return this.name;
}
private MatchConditionArgs() {}
private MatchConditionArgs(MatchConditionArgs $) {
this.expression = $.expression;
this.name = $.name;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(MatchConditionArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private MatchConditionArgs $;
public Builder() {
$ = new MatchConditionArgs();
}
public Builder(MatchConditionArgs defaults) {
$ = new MatchConditionArgs(Objects.requireNonNull(defaults));
}
/**
* @param expression Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL 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 admission request(/pkg/apis/admission/types.go#AdmissionRequest). '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.
* Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
*
* Required.
*
* @return builder
*
*/
public Builder expression(Output expression) {
$.expression = expression;
return this;
}
/**
* @param expression Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL 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 admission request(/pkg/apis/admission/types.go#AdmissionRequest). '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.
* Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
*
* Required.
*
* @return builder
*
*/
public Builder expression(String expression) {
return expression(Output.of(expression));
}
/**
* @param name Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')
*
* Required.
*
* @return builder
*
*/
public Builder name(Output name) {
$.name = name;
return this;
}
/**
* @param name Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')
*
* Required.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
public MatchConditionArgs build() {
if ($.expression == null) {
throw new MissingRequiredPropertyException("MatchConditionArgs", "expression");
}
if ($.name == null) {
throw new MissingRequiredPropertyException("MatchConditionArgs", "name");
}
return $;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy