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

com.pulumi.vault.database.SecretBackendStaticRoleArgs Maven / Gradle / Ivy

Go to download

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

There is a newer version: 6.5.0-alpha.1732775348
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.database;

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


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

    public static final SecretBackendStaticRoleArgs Empty = new SecretBackendStaticRoleArgs();

    /**
     * The unique name of the Vault mount to configure.
     * 
     */
    @Import(name="backend", required=true)
    private Output backend;

    /**
     * @return The unique name of the Vault mount to configure.
     * 
     */
    public Output backend() {
        return this.backend;
    }

    /**
     * The unique name of the database connection to use for the static role.
     * 
     */
    @Import(name="dbName", required=true)
    private Output dbName;

    /**
     * @return The unique name of the database connection to use for the static role.
     * 
     */
    public Output dbName() {
        return this.dbName;
    }

    /**
     * A unique name to give the static role.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return A unique name to give the static role.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * 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.
     * *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.
     * *Available only for Vault Enterprise*.
     * 
     */
    public Optional> namespace() {
        return Optional.ofNullable(this.namespace);
    }

    /**
     * The amount of time Vault should wait before rotating the password, in seconds.
     * Mutually exclusive with `rotation_schedule`.
     * 
     */
    @Import(name="rotationPeriod")
    private @Nullable Output rotationPeriod;

    /**
     * @return The amount of time Vault should wait before rotating the password, in seconds.
     * Mutually exclusive with `rotation_schedule`.
     * 
     */
    public Optional> rotationPeriod() {
        return Optional.ofNullable(this.rotationPeriod);
    }

    /**
     * A cron-style string that will define the schedule on which rotations should occur.
     * Mutually exclusive with `rotation_period`.
     * 
     * **Warning**: The `rotation_period` and `rotation_schedule` fields are
     * mutually exclusive. One of them must be set but not both.
     * 
     */
    @Import(name="rotationSchedule")
    private @Nullable Output rotationSchedule;

    /**
     * @return A cron-style string that will define the schedule on which rotations should occur.
     * Mutually exclusive with `rotation_period`.
     * 
     * **Warning**: The `rotation_period` and `rotation_schedule` fields are
     * mutually exclusive. One of them must be set but not both.
     * 
     */
    public Optional> rotationSchedule() {
        return Optional.ofNullable(this.rotationSchedule);
    }

    /**
     * Database statements to execute to rotate the password for the configured database user.
     * 
     */
    @Import(name="rotationStatements")
    private @Nullable Output> rotationStatements;

    /**
     * @return Database statements to execute to rotate the password for the configured database user.
     * 
     */
    public Optional>> rotationStatements() {
        return Optional.ofNullable(this.rotationStatements);
    }

    /**
     * The amount of time, in seconds, in which rotations are allowed to occur starting
     * from a given `rotation_schedule`.
     * 
     */
    @Import(name="rotationWindow")
    private @Nullable Output rotationWindow;

    /**
     * @return The amount of time, in seconds, in which rotations are allowed to occur starting
     * from a given `rotation_schedule`.
     * 
     */
    public Optional> rotationWindow() {
        return Optional.ofNullable(this.rotationWindow);
    }

    /**
     * The password corresponding to the username in the database.
     * Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
     * select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
     * 
     */
    @Import(name="selfManagedPassword")
    private @Nullable Output selfManagedPassword;

    /**
     * @return The password corresponding to the username in the database.
     * Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
     * select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
     * 
     */
    public Optional> selfManagedPassword() {
        return Optional.ofNullable(this.selfManagedPassword);
    }

    /**
     * The database username that this static role corresponds to.
     * 
     */
    @Import(name="username", required=true)
    private Output username;

    /**
     * @return The database username that this static role corresponds to.
     * 
     */
    public Output username() {
        return this.username;
    }

    private SecretBackendStaticRoleArgs() {}

    private SecretBackendStaticRoleArgs(SecretBackendStaticRoleArgs $) {
        this.backend = $.backend;
        this.dbName = $.dbName;
        this.name = $.name;
        this.namespace = $.namespace;
        this.rotationPeriod = $.rotationPeriod;
        this.rotationSchedule = $.rotationSchedule;
        this.rotationStatements = $.rotationStatements;
        this.rotationWindow = $.rotationWindow;
        this.selfManagedPassword = $.selfManagedPassword;
        this.username = $.username;
    }

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

    public static final class Builder {
        private SecretBackendStaticRoleArgs $;

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

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

        /**
         * @param backend The unique name of the Vault mount to configure.
         * 
         * @return builder
         * 
         */
        public Builder backend(Output backend) {
            $.backend = backend;
            return this;
        }

        /**
         * @param backend The unique name of the Vault mount to configure.
         * 
         * @return builder
         * 
         */
        public Builder backend(String backend) {
            return backend(Output.of(backend));
        }

        /**
         * @param dbName The unique name of the database connection to use for the static role.
         * 
         * @return builder
         * 
         */
        public Builder dbName(Output dbName) {
            $.dbName = dbName;
            return this;
        }

        /**
         * @param dbName The unique name of the database connection to use for the static role.
         * 
         * @return builder
         * 
         */
        public Builder dbName(String dbName) {
            return dbName(Output.of(dbName));
        }

        /**
         * @param name A unique name to give the static role.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name A unique name to give the static role.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @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.
         * *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.
         * *Available only for Vault Enterprise*.
         * 
         * @return builder
         * 
         */
        public Builder namespace(String namespace) {
            return namespace(Output.of(namespace));
        }

        /**
         * @param rotationPeriod The amount of time Vault should wait before rotating the password, in seconds.
         * Mutually exclusive with `rotation_schedule`.
         * 
         * @return builder
         * 
         */
        public Builder rotationPeriod(@Nullable Output rotationPeriod) {
            $.rotationPeriod = rotationPeriod;
            return this;
        }

        /**
         * @param rotationPeriod The amount of time Vault should wait before rotating the password, in seconds.
         * Mutually exclusive with `rotation_schedule`.
         * 
         * @return builder
         * 
         */
        public Builder rotationPeriod(Integer rotationPeriod) {
            return rotationPeriod(Output.of(rotationPeriod));
        }

        /**
         * @param rotationSchedule A cron-style string that will define the schedule on which rotations should occur.
         * Mutually exclusive with `rotation_period`.
         * 
         * **Warning**: The `rotation_period` and `rotation_schedule` fields are
         * mutually exclusive. One of them must be set but not both.
         * 
         * @return builder
         * 
         */
        public Builder rotationSchedule(@Nullable Output rotationSchedule) {
            $.rotationSchedule = rotationSchedule;
            return this;
        }

        /**
         * @param rotationSchedule A cron-style string that will define the schedule on which rotations should occur.
         * Mutually exclusive with `rotation_period`.
         * 
         * **Warning**: The `rotation_period` and `rotation_schedule` fields are
         * mutually exclusive. One of them must be set but not both.
         * 
         * @return builder
         * 
         */
        public Builder rotationSchedule(String rotationSchedule) {
            return rotationSchedule(Output.of(rotationSchedule));
        }

        /**
         * @param rotationStatements Database statements to execute to rotate the password for the configured database user.
         * 
         * @return builder
         * 
         */
        public Builder rotationStatements(@Nullable Output> rotationStatements) {
            $.rotationStatements = rotationStatements;
            return this;
        }

        /**
         * @param rotationStatements Database statements to execute to rotate the password for the configured database user.
         * 
         * @return builder
         * 
         */
        public Builder rotationStatements(List rotationStatements) {
            return rotationStatements(Output.of(rotationStatements));
        }

        /**
         * @param rotationStatements Database statements to execute to rotate the password for the configured database user.
         * 
         * @return builder
         * 
         */
        public Builder rotationStatements(String... rotationStatements) {
            return rotationStatements(List.of(rotationStatements));
        }

        /**
         * @param rotationWindow The amount of time, in seconds, in which rotations are allowed to occur starting
         * from a given `rotation_schedule`.
         * 
         * @return builder
         * 
         */
        public Builder rotationWindow(@Nullable Output rotationWindow) {
            $.rotationWindow = rotationWindow;
            return this;
        }

        /**
         * @param rotationWindow The amount of time, in seconds, in which rotations are allowed to occur starting
         * from a given `rotation_schedule`.
         * 
         * @return builder
         * 
         */
        public Builder rotationWindow(Integer rotationWindow) {
            return rotationWindow(Output.of(rotationWindow));
        }

        /**
         * @param selfManagedPassword The password corresponding to the username in the database.
         * Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
         * select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
         * 
         * @return builder
         * 
         */
        public Builder selfManagedPassword(@Nullable Output selfManagedPassword) {
            $.selfManagedPassword = selfManagedPassword;
            return this;
        }

        /**
         * @param selfManagedPassword The password corresponding to the username in the database.
         * Required when using the Rootless Password Rotation workflow for static roles. Only enabled for
         * select DB engines (Postgres). Requires Vault 1.18+ Enterprise.
         * 
         * @return builder
         * 
         */
        public Builder selfManagedPassword(String selfManagedPassword) {
            return selfManagedPassword(Output.of(selfManagedPassword));
        }

        /**
         * @param username The database username that this static role corresponds to.
         * 
         * @return builder
         * 
         */
        public Builder username(Output username) {
            $.username = username;
            return this;
        }

        /**
         * @param username The database username that this static role corresponds to.
         * 
         * @return builder
         * 
         */
        public Builder username(String username) {
            return username(Output.of(username));
        }

        public SecretBackendStaticRoleArgs build() {
            if ($.backend == null) {
                throw new MissingRequiredPropertyException("SecretBackendStaticRoleArgs", "backend");
            }
            if ($.dbName == null) {
                throw new MissingRequiredPropertyException("SecretBackendStaticRoleArgs", "dbName");
            }
            if ($.username == null) {
                throw new MissingRequiredPropertyException("SecretBackendStaticRoleArgs", "username");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy