All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.admissionregistration.v1beta1.inputs.NamedRuleWithOperationsArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
Show newest version
// *** 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.v1beta1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
 * 
 */
public final class NamedRuleWithOperationsArgs extends com.pulumi.resources.ResourceArgs {

    public static final NamedRuleWithOperationsArgs Empty = new NamedRuleWithOperationsArgs();

    /**
     * APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
     * 
     */
    @Import(name="apiGroups")
    private @Nullable Output> apiGroups;

    /**
     * @return APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
     * 
     */
    public Optional>> apiGroups() {
        return Optional.ofNullable(this.apiGroups);
    }

    /**
     * APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
     * 
     */
    @Import(name="apiVersions")
    private @Nullable Output> apiVersions;

    /**
     * @return APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
     * 
     */
    public Optional>> apiVersions() {
        return Optional.ofNullable(this.apiVersions);
    }

    /**
     * Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
     * 
     */
    @Import(name="operations")
    private @Nullable Output> operations;

    /**
     * @return Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
     * 
     */
    public Optional>> operations() {
        return Optional.ofNullable(this.operations);
    }

    /**
     * ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
     * 
     */
    @Import(name="resourceNames")
    private @Nullable Output> resourceNames;

    /**
     * @return ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
     * 
     */
    public Optional>> resourceNames() {
        return Optional.ofNullable(this.resourceNames);
    }

    /**
     * Resources is a list of resources this rule applies to.
     * 
     * For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*{@literal /}scale' means all scale subresources. '*{@literal /}*' means all resources and their subresources.
     * 
     * If wildcard is present, the validation rule will ensure resources do not overlap with each other.
     * 
     * Depending on the enclosing object, subresources might not be allowed. Required.
     * 
     */
    @Import(name="resources")
    private @Nullable Output> resources;

    /**
     * @return Resources is a list of resources this rule applies to.
     * 
     * For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*{@literal /}scale' means all scale subresources. '*{@literal /}*' means all resources and their subresources.
     * 
     * If wildcard is present, the validation rule will ensure resources do not overlap with each other.
     * 
     * Depending on the enclosing object, subresources might not be allowed. Required.
     * 
     */
    public Optional>> resources() {
        return Optional.ofNullable(this.resources);
    }

    /**
     * scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*".
     * 
     */
    @Import(name="scope")
    private @Nullable Output scope;

    /**
     * @return scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*".
     * 
     */
    public Optional> scope() {
        return Optional.ofNullable(this.scope);
    }

    private NamedRuleWithOperationsArgs() {}

    private NamedRuleWithOperationsArgs(NamedRuleWithOperationsArgs $) {
        this.apiGroups = $.apiGroups;
        this.apiVersions = $.apiVersions;
        this.operations = $.operations;
        this.resourceNames = $.resourceNames;
        this.resources = $.resources;
        this.scope = $.scope;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(NamedRuleWithOperationsArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private NamedRuleWithOperationsArgs $;

        public Builder() {
            $ = new NamedRuleWithOperationsArgs();
        }

        public Builder(NamedRuleWithOperationsArgs defaults) {
            $ = new NamedRuleWithOperationsArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param apiGroups APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder apiGroups(@Nullable Output> apiGroups) {
            $.apiGroups = apiGroups;
            return this;
        }

        /**
         * @param apiGroups APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder apiGroups(List apiGroups) {
            return apiGroups(Output.of(apiGroups));
        }

        /**
         * @param apiGroups APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder apiGroups(String... apiGroups) {
            return apiGroups(List.of(apiGroups));
        }

        /**
         * @param apiVersions APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder apiVersions(@Nullable Output> apiVersions) {
            $.apiVersions = apiVersions;
            return this;
        }

        /**
         * @param apiVersions APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder apiVersions(List apiVersions) {
            return apiVersions(Output.of(apiVersions));
        }

        /**
         * @param apiVersions APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder apiVersions(String... apiVersions) {
            return apiVersions(List.of(apiVersions));
        }

        /**
         * @param operations Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder operations(@Nullable Output> operations) {
            $.operations = operations;
            return this;
        }

        /**
         * @param operations Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder operations(List operations) {
            return operations(Output.of(operations));
        }

        /**
         * @param operations Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.
         * 
         * @return builder
         * 
         */
        public Builder operations(String... operations) {
            return operations(List.of(operations));
        }

        /**
         * @param resourceNames ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
         * 
         * @return builder
         * 
         */
        public Builder resourceNames(@Nullable Output> resourceNames) {
            $.resourceNames = resourceNames;
            return this;
        }

        /**
         * @param resourceNames ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
         * 
         * @return builder
         * 
         */
        public Builder resourceNames(List resourceNames) {
            return resourceNames(Output.of(resourceNames));
        }

        /**
         * @param resourceNames ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
         * 
         * @return builder
         * 
         */
        public Builder resourceNames(String... resourceNames) {
            return resourceNames(List.of(resourceNames));
        }

        /**
         * @param resources Resources is a list of resources this rule applies to.
         * 
         * For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*{@literal /}scale' means all scale subresources. '*{@literal /}*' means all resources and their subresources.
         * 
         * If wildcard is present, the validation rule will ensure resources do not overlap with each other.
         * 
         * Depending on the enclosing object, subresources might not be allowed. Required.
         * 
         * @return builder
         * 
         */
        public Builder resources(@Nullable Output> resources) {
            $.resources = resources;
            return this;
        }

        /**
         * @param resources Resources is a list of resources this rule applies to.
         * 
         * For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*{@literal /}scale' means all scale subresources. '*{@literal /}*' means all resources and their subresources.
         * 
         * If wildcard is present, the validation rule will ensure resources do not overlap with each other.
         * 
         * Depending on the enclosing object, subresources might not be allowed. Required.
         * 
         * @return builder
         * 
         */
        public Builder resources(List resources) {
            return resources(Output.of(resources));
        }

        /**
         * @param resources Resources is a list of resources this rule applies to.
         * 
         * For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*{@literal /}scale' means all scale subresources. '*{@literal /}*' means all resources and their subresources.
         * 
         * If wildcard is present, the validation rule will ensure resources do not overlap with each other.
         * 
         * Depending on the enclosing object, subresources might not be allowed. Required.
         * 
         * @return builder
         * 
         */
        public Builder resources(String... resources) {
            return resources(List.of(resources));
        }

        /**
         * @param scope scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*".
         * 
         * @return builder
         * 
         */
        public Builder scope(@Nullable Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*".
         * 
         * @return builder
         * 
         */
        public Builder scope(String scope) {
            return scope(Output.of(scope));
        }

        public NamedRuleWithOperationsArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy