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

com.pulumi.kubernetes.admissionregistration.v1.inputs.RuleWithOperationsArgs 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.v1.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;


/**
 * RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
 * 
 */
public final class RuleWithOperationsArgs extends com.pulumi.resources.ResourceArgs {

    public static final RuleWithOperationsArgs Empty = new RuleWithOperationsArgs();

    /**
     * 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);
    }

    /**
     * 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 RuleWithOperationsArgs() {}

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

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

    public static final class Builder {
        private RuleWithOperationsArgs $;

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

        public Builder(RuleWithOperationsArgs defaults) {
            $ = new RuleWithOperationsArgs(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 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 RuleWithOperationsArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy