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

com.pulumi.aws.secretsmanager.inputs.SecretRotationState Maven / Gradle / Ivy

// *** 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.aws.secretsmanager.inputs;

import com.pulumi.aws.secretsmanager.inputs.SecretRotationRotationRulesArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SecretRotationState Empty = new SecretRotationState();

    /**
     * Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in `rotation_rules`. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to `true`.
     * 
     */
    @Import(name="rotateImmediately")
    private @Nullable Output rotateImmediately;

    /**
     * @return Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in `rotation_rules`. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to `true`.
     * 
     */
    public Optional> rotateImmediately() {
        return Optional.ofNullable(this.rotateImmediately);
    }

    /**
     * Specifies whether automatic rotation is enabled for this secret.
     * 
     */
    @Import(name="rotationEnabled")
    private @Nullable Output rotationEnabled;

    /**
     * @return Specifies whether automatic rotation is enabled for this secret.
     * 
     */
    public Optional> rotationEnabled() {
        return Optional.ofNullable(this.rotationEnabled);
    }

    /**
     * Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
     * 
     */
    @Import(name="rotationLambdaArn")
    private @Nullable Output rotationLambdaArn;

    /**
     * @return Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
     * 
     */
    public Optional> rotationLambdaArn() {
        return Optional.ofNullable(this.rotationLambdaArn);
    }

    /**
     * A structure that defines the rotation configuration for this secret. Defined below.
     * 
     */
    @Import(name="rotationRules")
    private @Nullable Output rotationRules;

    /**
     * @return A structure that defines the rotation configuration for this secret. Defined below.
     * 
     */
    public Optional> rotationRules() {
        return Optional.ofNullable(this.rotationRules);
    }

    /**
     * Specifies the secret to which you want to add a new version. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. The secret must already exist.
     * 
     */
    @Import(name="secretId")
    private @Nullable Output secretId;

    /**
     * @return Specifies the secret to which you want to add a new version. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. The secret must already exist.
     * 
     */
    public Optional> secretId() {
        return Optional.ofNullable(this.secretId);
    }

    private SecretRotationState() {}

    private SecretRotationState(SecretRotationState $) {
        this.rotateImmediately = $.rotateImmediately;
        this.rotationEnabled = $.rotationEnabled;
        this.rotationLambdaArn = $.rotationLambdaArn;
        this.rotationRules = $.rotationRules;
        this.secretId = $.secretId;
    }

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

    public static final class Builder {
        private SecretRotationState $;

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

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

        /**
         * @param rotateImmediately Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in `rotation_rules`. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder rotateImmediately(@Nullable Output rotateImmediately) {
            $.rotateImmediately = rotateImmediately;
            return this;
        }

        /**
         * @param rotateImmediately Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in `rotation_rules`. For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder rotateImmediately(Boolean rotateImmediately) {
            return rotateImmediately(Output.of(rotateImmediately));
        }

        /**
         * @param rotationEnabled Specifies whether automatic rotation is enabled for this secret.
         * 
         * @return builder
         * 
         */
        public Builder rotationEnabled(@Nullable Output rotationEnabled) {
            $.rotationEnabled = rotationEnabled;
            return this;
        }

        /**
         * @param rotationEnabled Specifies whether automatic rotation is enabled for this secret.
         * 
         * @return builder
         * 
         */
        public Builder rotationEnabled(Boolean rotationEnabled) {
            return rotationEnabled(Output.of(rotationEnabled));
        }

        /**
         * @param rotationLambdaArn Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
         * 
         * @return builder
         * 
         */
        public Builder rotationLambdaArn(@Nullable Output rotationLambdaArn) {
            $.rotationLambdaArn = rotationLambdaArn;
            return this;
        }

        /**
         * @param rotationLambdaArn Specifies the ARN of the Lambda function that can rotate the secret. Must be supplied if the secret is not managed by AWS.
         * 
         * @return builder
         * 
         */
        public Builder rotationLambdaArn(String rotationLambdaArn) {
            return rotationLambdaArn(Output.of(rotationLambdaArn));
        }

        /**
         * @param rotationRules A structure that defines the rotation configuration for this secret. Defined below.
         * 
         * @return builder
         * 
         */
        public Builder rotationRules(@Nullable Output rotationRules) {
            $.rotationRules = rotationRules;
            return this;
        }

        /**
         * @param rotationRules A structure that defines the rotation configuration for this secret. Defined below.
         * 
         * @return builder
         * 
         */
        public Builder rotationRules(SecretRotationRotationRulesArgs rotationRules) {
            return rotationRules(Output.of(rotationRules));
        }

        /**
         * @param secretId Specifies the secret to which you want to add a new version. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. The secret must already exist.
         * 
         * @return builder
         * 
         */
        public Builder secretId(@Nullable Output secretId) {
            $.secretId = secretId;
            return this;
        }

        /**
         * @param secretId Specifies the secret to which you want to add a new version. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. The secret must already exist.
         * 
         * @return builder
         * 
         */
        public Builder secretId(String secretId) {
            return secretId(Output.of(secretId));
        }

        public SecretRotationState build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy