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

com.pulumi.vault.kv.SecretArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing HashiCorp Vault cloud resources.

There is a newer version: 6.6.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.vault.kv;

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 SecretArgs extends com.pulumi.resources.ResourceArgs {

    public static final SecretArgs Empty = new SecretArgs();

    /**
     * JSON-encoded string that will be
     * written as the secret data at the given path.
     * 
     */
    @Import(name="dataJson", required=true)
    private Output dataJson;

    /**
     * @return JSON-encoded string that will be
     * written as the secret data at the given path.
     * 
     */
    public Output dataJson() {
        return this.dataJson;
    }

    /**
     * The namespace to provision the resource in.
     * The value should not contain leading or trailing forward slashes.
     * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     * *Available only for Vault Enterprise*.
     * 
     */
    @Import(name="namespace")
    private @Nullable Output namespace;

    /**
     * @return The namespace to provision the resource in.
     * The value should not contain leading or trailing forward slashes.
     * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     * *Available only for Vault Enterprise*.
     * 
     */
    public Optional> namespace() {
        return Optional.ofNullable(this.namespace);
    }

    /**
     * Full path of the KV-V1 secret.
     * 
     */
    @Import(name="path", required=true)
    private Output path;

    /**
     * @return Full path of the KV-V1 secret.
     * 
     */
    public Output path() {
        return this.path;
    }

    private SecretArgs() {}

    private SecretArgs(SecretArgs $) {
        this.dataJson = $.dataJson;
        this.namespace = $.namespace;
        this.path = $.path;
    }

    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 dataJson JSON-encoded string that will be
         * written as the secret data at the given path.
         * 
         * @return builder
         * 
         */
        public Builder dataJson(Output dataJson) {
            $.dataJson = dataJson;
            return this;
        }

        /**
         * @param dataJson JSON-encoded string that will be
         * written as the secret data at the given path.
         * 
         * @return builder
         * 
         */
        public Builder dataJson(String dataJson) {
            return dataJson(Output.of(dataJson));
        }

        /**
         * @param namespace The namespace to provision the resource in.
         * The value should not contain leading or trailing forward slashes.
         * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
         * *Available only for Vault Enterprise*.
         * 
         * @return builder
         * 
         */
        public Builder namespace(@Nullable Output namespace) {
            $.namespace = namespace;
            return this;
        }

        /**
         * @param namespace The namespace to provision the resource in.
         * The value should not contain leading or trailing forward slashes.
         * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
         * *Available only for Vault Enterprise*.
         * 
         * @return builder
         * 
         */
        public Builder namespace(String namespace) {
            return namespace(Output.of(namespace));
        }

        /**
         * @param path Full path of the KV-V1 secret.
         * 
         * @return builder
         * 
         */
        public Builder path(Output path) {
            $.path = path;
            return this;
        }

        /**
         * @param path Full path of the KV-V1 secret.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy