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

com.pulumi.azurenative.storage.ManagementPolicyArgs Maven / Gradle / Ivy

There is a newer version: 2.72.0
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.azurenative.storage;

import com.pulumi.azurenative.storage.inputs.ManagementPolicySchemaArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ManagementPolicyArgs Empty = new ManagementPolicyArgs();

    /**
     * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
     * 
     */
    @Import(name="accountName", required=true)
    private Output accountName;

    /**
     * @return The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
     * 
     */
    public Output accountName() {
        return this.accountName;
    }

    /**
     * The name of the Storage Account Management Policy. It should always be 'default'
     * 
     */
    @Import(name="managementPolicyName")
    private @Nullable Output managementPolicyName;

    /**
     * @return The name of the Storage Account Management Policy. It should always be 'default'
     * 
     */
    public Optional> managementPolicyName() {
        return Optional.ofNullable(this.managementPolicyName);
    }

    /**
     * The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
     * 
     */
    @Import(name="policy", required=true)
    private Output policy;

    /**
     * @return The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
     * 
     */
    public Output policy() {
        return this.policy;
    }

    /**
     * The name of the resource group within the user's subscription. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group within the user's subscription. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    private ManagementPolicyArgs() {}

    private ManagementPolicyArgs(ManagementPolicyArgs $) {
        this.accountName = $.accountName;
        this.managementPolicyName = $.managementPolicyName;
        this.policy = $.policy;
        this.resourceGroupName = $.resourceGroupName;
    }

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

    public static final class Builder {
        private ManagementPolicyArgs $;

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

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

        /**
         * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
         * 
         * @return builder
         * 
         */
        public Builder accountName(Output accountName) {
            $.accountName = accountName;
            return this;
        }

        /**
         * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
         * 
         * @return builder
         * 
         */
        public Builder accountName(String accountName) {
            return accountName(Output.of(accountName));
        }

        /**
         * @param managementPolicyName The name of the Storage Account Management Policy. It should always be 'default'
         * 
         * @return builder
         * 
         */
        public Builder managementPolicyName(@Nullable Output managementPolicyName) {
            $.managementPolicyName = managementPolicyName;
            return this;
        }

        /**
         * @param managementPolicyName The name of the Storage Account Management Policy. It should always be 'default'
         * 
         * @return builder
         * 
         */
        public Builder managementPolicyName(String managementPolicyName) {
            return managementPolicyName(Output.of(managementPolicyName));
        }

        /**
         * @param policy The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
         * 
         * @return builder
         * 
         */
        public Builder policy(Output policy) {
            $.policy = policy;
            return this;
        }

        /**
         * @param policy The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
         * 
         * @return builder
         * 
         */
        public Builder policy(ManagementPolicySchemaArgs policy) {
            return policy(Output.of(policy));
        }

        /**
         * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        public ManagementPolicyArgs build() {
            if ($.accountName == null) {
                throw new MissingRequiredPropertyException("ManagementPolicyArgs", "accountName");
            }
            if ($.policy == null) {
                throw new MissingRequiredPropertyException("ManagementPolicyArgs", "policy");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ManagementPolicyArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy