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

com.pulumi.kubernetes.storage.v1beta1.StorageClassArgs 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.storage.v1beta1;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.core.v1.inputs.TopologySelectorTermArgs;
import com.pulumi.kubernetes.meta.v1.inputs.ObjectMetaArgs;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class StorageClassArgs extends com.pulumi.resources.ResourceArgs {

    public static final StorageClassArgs Empty = new StorageClassArgs();

    /**
     * AllowVolumeExpansion shows whether the storage class allow volume expand
     * 
     */
    @Import(name="allowVolumeExpansion")
    private @Nullable Output allowVolumeExpansion;

    /**
     * @return AllowVolumeExpansion shows whether the storage class allow volume expand
     * 
     */
    public Optional> allowVolumeExpansion() {
        return Optional.ofNullable(this.allowVolumeExpansion);
    }

    /**
     * Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
     * 
     */
    @Import(name="allowedTopologies")
    private @Nullable Output> allowedTopologies;

    /**
     * @return Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
     * 
     */
    public Optional>> allowedTopologies() {
        return Optional.ofNullable(this.allowedTopologies);
    }

    /**
     * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
     * 
     */
    @Import(name="apiVersion")
    private @Nullable Output apiVersion;

    /**
     * @return APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
     * 
     */
    public Optional> apiVersion() {
        return Optional.ofNullable(this.apiVersion);
    }

    /**
     * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
     * 
     */
    @Import(name="kind")
    private @Nullable Output kind;

    /**
     * @return Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
     * 
     */
    public Optional> kind() {
        return Optional.ofNullable(this.kind);
    }

    /**
     * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
     * 
     */
    @Import(name="metadata")
    private @Nullable Output metadata;

    /**
     * @return Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
     * 
     */
    public Optional> metadata() {
        return Optional.ofNullable(this.metadata);
    }

    /**
     * Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.
     * 
     */
    @Import(name="mountOptions")
    private @Nullable Output> mountOptions;

    /**
     * @return Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.
     * 
     */
    public Optional>> mountOptions() {
        return Optional.ofNullable(this.mountOptions);
    }

    /**
     * Parameters holds the parameters for the provisioner that should create volumes of this storage class.
     * 
     */
    @Import(name="parameters")
    private @Nullable Output> parameters;

    /**
     * @return Parameters holds the parameters for the provisioner that should create volumes of this storage class.
     * 
     */
    public Optional>> parameters() {
        return Optional.ofNullable(this.parameters);
    }

    /**
     * Provisioner indicates the type of the provisioner.
     * 
     */
    @Import(name="provisioner", required=true)
    private Output provisioner;

    /**
     * @return Provisioner indicates the type of the provisioner.
     * 
     */
    public Output provisioner() {
        return this.provisioner;
    }

    /**
     * Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.
     * 
     */
    @Import(name="reclaimPolicy")
    private @Nullable Output reclaimPolicy;

    /**
     * @return Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.
     * 
     */
    public Optional> reclaimPolicy() {
        return Optional.ofNullable(this.reclaimPolicy);
    }

    /**
     * VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.  When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
     * 
     */
    @Import(name="volumeBindingMode")
    private @Nullable Output volumeBindingMode;

    /**
     * @return VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.  When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
     * 
     */
    public Optional> volumeBindingMode() {
        return Optional.ofNullable(this.volumeBindingMode);
    }

    private StorageClassArgs() {}

    private StorageClassArgs(StorageClassArgs $) {
        this.allowVolumeExpansion = $.allowVolumeExpansion;
        this.allowedTopologies = $.allowedTopologies;
        this.apiVersion = $.apiVersion;
        this.kind = $.kind;
        this.metadata = $.metadata;
        this.mountOptions = $.mountOptions;
        this.parameters = $.parameters;
        this.provisioner = $.provisioner;
        this.reclaimPolicy = $.reclaimPolicy;
        this.volumeBindingMode = $.volumeBindingMode;
    }

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

    public static final class Builder {
        private StorageClassArgs $;

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

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

        /**
         * @param allowVolumeExpansion AllowVolumeExpansion shows whether the storage class allow volume expand
         * 
         * @return builder
         * 
         */
        public Builder allowVolumeExpansion(@Nullable Output allowVolumeExpansion) {
            $.allowVolumeExpansion = allowVolumeExpansion;
            return this;
        }

        /**
         * @param allowVolumeExpansion AllowVolumeExpansion shows whether the storage class allow volume expand
         * 
         * @return builder
         * 
         */
        public Builder allowVolumeExpansion(Boolean allowVolumeExpansion) {
            return allowVolumeExpansion(Output.of(allowVolumeExpansion));
        }

        /**
         * @param allowedTopologies Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
         * 
         * @return builder
         * 
         */
        public Builder allowedTopologies(@Nullable Output> allowedTopologies) {
            $.allowedTopologies = allowedTopologies;
            return this;
        }

        /**
         * @param allowedTopologies Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
         * 
         * @return builder
         * 
         */
        public Builder allowedTopologies(List allowedTopologies) {
            return allowedTopologies(Output.of(allowedTopologies));
        }

        /**
         * @param allowedTopologies Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
         * 
         * @return builder
         * 
         */
        public Builder allowedTopologies(TopologySelectorTermArgs... allowedTopologies) {
            return allowedTopologies(List.of(allowedTopologies));
        }

        /**
         * @param apiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
         * 
         * @return builder
         * 
         */
        public Builder apiVersion(@Nullable Output apiVersion) {
            $.apiVersion = apiVersion;
            return this;
        }

        /**
         * @param apiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
         * 
         * @return builder
         * 
         */
        public Builder apiVersion(String apiVersion) {
            return apiVersion(Output.of(apiVersion));
        }

        /**
         * @param kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
         * 
         * @return builder
         * 
         */
        public Builder kind(@Nullable Output kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param metadata Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         * 
         * @return builder
         * 
         */
        public Builder metadata(@Nullable Output metadata) {
            $.metadata = metadata;
            return this;
        }

        /**
         * @param metadata Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
         * 
         * @return builder
         * 
         */
        public Builder metadata(ObjectMetaArgs metadata) {
            return metadata(Output.of(metadata));
        }

        /**
         * @param mountOptions Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.
         * 
         * @return builder
         * 
         */
        public Builder mountOptions(@Nullable Output> mountOptions) {
            $.mountOptions = mountOptions;
            return this;
        }

        /**
         * @param mountOptions Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.
         * 
         * @return builder
         * 
         */
        public Builder mountOptions(List mountOptions) {
            return mountOptions(Output.of(mountOptions));
        }

        /**
         * @param mountOptions Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.
         * 
         * @return builder
         * 
         */
        public Builder mountOptions(String... mountOptions) {
            return mountOptions(List.of(mountOptions));
        }

        /**
         * @param parameters Parameters holds the parameters for the provisioner that should create volumes of this storage class.
         * 
         * @return builder
         * 
         */
        public Builder parameters(@Nullable Output> parameters) {
            $.parameters = parameters;
            return this;
        }

        /**
         * @param parameters Parameters holds the parameters for the provisioner that should create volumes of this storage class.
         * 
         * @return builder
         * 
         */
        public Builder parameters(Map parameters) {
            return parameters(Output.of(parameters));
        }

        /**
         * @param provisioner Provisioner indicates the type of the provisioner.
         * 
         * @return builder
         * 
         */
        public Builder provisioner(Output provisioner) {
            $.provisioner = provisioner;
            return this;
        }

        /**
         * @param provisioner Provisioner indicates the type of the provisioner.
         * 
         * @return builder
         * 
         */
        public Builder provisioner(String provisioner) {
            return provisioner(Output.of(provisioner));
        }

        /**
         * @param reclaimPolicy Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.
         * 
         * @return builder
         * 
         */
        public Builder reclaimPolicy(@Nullable Output reclaimPolicy) {
            $.reclaimPolicy = reclaimPolicy;
            return this;
        }

        /**
         * @param reclaimPolicy Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.
         * 
         * @return builder
         * 
         */
        public Builder reclaimPolicy(String reclaimPolicy) {
            return reclaimPolicy(Output.of(reclaimPolicy));
        }

        /**
         * @param volumeBindingMode VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.  When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
         * 
         * @return builder
         * 
         */
        public Builder volumeBindingMode(@Nullable Output volumeBindingMode) {
            $.volumeBindingMode = volumeBindingMode;
            return this;
        }

        /**
         * @param volumeBindingMode VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.  When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
         * 
         * @return builder
         * 
         */
        public Builder volumeBindingMode(String volumeBindingMode) {
            return volumeBindingMode(Output.of(volumeBindingMode));
        }

        public StorageClassArgs build() {
            $.apiVersion = Codegen.stringProp("apiVersion").output().arg($.apiVersion).getNullable();
            $.kind = Codegen.stringProp("kind").output().arg($.kind).getNullable();
            if ($.provisioner == null) {
                throw new MissingRequiredPropertyException("StorageClassArgs", "provisioner");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy