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

com.pulumi.azure.keyvault.SecretArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.keyvault;

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


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

    public static final SecretArgs Empty = new SecretArgs();

    /**
     * Specifies the content type for the Key Vault Secret.
     * 
     */
    @Import(name="contentType")
    private @Nullable Output contentType;

    /**
     * @return Specifies the content type for the Key Vault Secret.
     * 
     */
    public Optional> contentType() {
        return Optional.ofNullable(this.contentType);
    }

    /**
     * Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
     * 
     */
    @Import(name="expirationDate")
    private @Nullable Output expirationDate;

    /**
     * @return Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
     * 
     */
    public Optional> expirationDate() {
        return Optional.ofNullable(this.expirationDate);
    }

    /**
     * The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="keyVaultId", required=true)
    private Output keyVaultId;

    /**
     * @return The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output keyVaultId() {
        return this.keyVaultId;
    }

    /**
     * Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
     * 
     */
    @Import(name="notBeforeDate")
    private @Nullable Output notBeforeDate;

    /**
     * @return Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
     * 
     */
    public Optional> notBeforeDate() {
        return Optional.ofNullable(this.notBeforeDate);
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret.
     * 
     * > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("my_secret_file"), "/\n/", "\n")` or `base64encode(file("my_secret_file"))`, respectively.
     * 
     */
    @Import(name="value", required=true)
    private Output value;

    /**
     * @return Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret.
     * 
     * > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("my_secret_file"), "/\n/", "\n")` or `base64encode(file("my_secret_file"))`, respectively.
     * 
     */
    public Output value() {
        return this.value;
    }

    private SecretArgs() {}

    private SecretArgs(SecretArgs $) {
        this.contentType = $.contentType;
        this.expirationDate = $.expirationDate;
        this.keyVaultId = $.keyVaultId;
        this.name = $.name;
        this.notBeforeDate = $.notBeforeDate;
        this.tags = $.tags;
        this.value = $.value;
    }

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

    public static final class Builder {
        private SecretArgs $;

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

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

        /**
         * @param contentType Specifies the content type for the Key Vault Secret.
         * 
         * @return builder
         * 
         */
        public Builder contentType(@Nullable Output contentType) {
            $.contentType = contentType;
            return this;
        }

        /**
         * @param contentType Specifies the content type for the Key Vault Secret.
         * 
         * @return builder
         * 
         */
        public Builder contentType(String contentType) {
            return contentType(Output.of(contentType));
        }

        /**
         * @param expirationDate Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
         * 
         * @return builder
         * 
         */
        public Builder expirationDate(@Nullable Output expirationDate) {
            $.expirationDate = expirationDate;
            return this;
        }

        /**
         * @param expirationDate Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
         * 
         * @return builder
         * 
         */
        public Builder expirationDate(String expirationDate) {
            return expirationDate(Output.of(expirationDate));
        }

        /**
         * @param keyVaultId The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultId(Output keyVaultId) {
            $.keyVaultId = keyVaultId;
            return this;
        }

        /**
         * @param keyVaultId The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultId(String keyVaultId) {
            return keyVaultId(Output.of(keyVaultId));
        }

        /**
         * @param name Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param notBeforeDate Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
         * 
         * @return builder
         * 
         */
        public Builder notBeforeDate(@Nullable Output notBeforeDate) {
            $.notBeforeDate = notBeforeDate;
            return this;
        }

        /**
         * @param notBeforeDate Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
         * 
         * @return builder
         * 
         */
        public Builder notBeforeDate(String notBeforeDate) {
            return notBeforeDate(Output.of(notBeforeDate));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param value Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret.
         * 
         * > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("my_secret_file"), "/\n/", "\n")` or `base64encode(file("my_secret_file"))`, respectively.
         * 
         * @return builder
         * 
         */
        public Builder value(Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret.
         * 
         * > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("my_secret_file"), "/\n/", "\n")` or `base64encode(file("my_secret_file"))`, respectively.
         * 
         * @return builder
         * 
         */
        public Builder value(String value) {
            return value(Output.of(value));
        }

        public SecretArgs build() {
            if ($.keyVaultId == null) {
                throw new MissingRequiredPropertyException("SecretArgs", "keyVaultId");
            }
            if ($.value == null) {
                throw new MissingRequiredPropertyException("SecretArgs", "value");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy