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

com.pulumi.aws.secretsmanager.SecretPolicyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
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.aws.secretsmanager;

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


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

    public static final SecretPolicyArgs Empty = new SecretPolicyArgs();

    /**
     * Makes an optional API call to Zelkova to validate the Resource Policy to prevent broad access to your secret.
     * 
     */
    @Import(name="blockPublicPolicy")
    private @Nullable Output blockPublicPolicy;

    /**
     * @return Makes an optional API call to Zelkova to validate the Resource Policy to prevent broad access to your secret.
     * 
     */
    public Optional> blockPublicPolicy() {
        return Optional.ofNullable(this.blockPublicPolicy);
    }

    /**
     * Valid JSON document representing a [resource policy](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). Unlike `aws.secretsmanager.Secret`, where `policy` can be set to `"{}"` to delete the policy, `"{}"` is not a valid policy since `policy` is required.
     * 
     */
    @Import(name="policy", required=true)
    private Output policy;

    /**
     * @return Valid JSON document representing a [resource policy](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). Unlike `aws.secretsmanager.Secret`, where `policy` can be set to `"{}"` to delete the policy, `"{}"` is not a valid policy since `policy` is required.
     * 
     */
    public Output policy() {
        return this.policy;
    }

    /**
     * Secret ARN.
     * 
     * The following arguments are optional:
     * 
     */
    @Import(name="secretArn", required=true)
    private Output secretArn;

    /**
     * @return Secret ARN.
     * 
     * The following arguments are optional:
     * 
     */
    public Output secretArn() {
        return this.secretArn;
    }

    private SecretPolicyArgs() {}

    private SecretPolicyArgs(SecretPolicyArgs $) {
        this.blockPublicPolicy = $.blockPublicPolicy;
        this.policy = $.policy;
        this.secretArn = $.secretArn;
    }

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

    public static final class Builder {
        private SecretPolicyArgs $;

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

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

        /**
         * @param blockPublicPolicy Makes an optional API call to Zelkova to validate the Resource Policy to prevent broad access to your secret.
         * 
         * @return builder
         * 
         */
        public Builder blockPublicPolicy(@Nullable Output blockPublicPolicy) {
            $.blockPublicPolicy = blockPublicPolicy;
            return this;
        }

        /**
         * @param blockPublicPolicy Makes an optional API call to Zelkova to validate the Resource Policy to prevent broad access to your secret.
         * 
         * @return builder
         * 
         */
        public Builder blockPublicPolicy(Boolean blockPublicPolicy) {
            return blockPublicPolicy(Output.of(blockPublicPolicy));
        }

        /**
         * @param policy Valid JSON document representing a [resource policy](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). Unlike `aws.secretsmanager.Secret`, where `policy` can be set to `"{}"` to delete the policy, `"{}"` is not a valid policy since `policy` is required.
         * 
         * @return builder
         * 
         */
        public Builder policy(Output policy) {
            $.policy = policy;
            return this;
        }

        /**
         * @param policy Valid JSON document representing a [resource policy](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). Unlike `aws.secretsmanager.Secret`, where `policy` can be set to `"{}"` to delete the policy, `"{}"` is not a valid policy since `policy` is required.
         * 
         * @return builder
         * 
         */
        public Builder policy(String policy) {
            return policy(Output.of(policy));
        }

        /**
         * @param secretArn Secret ARN.
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder secretArn(Output secretArn) {
            $.secretArn = secretArn;
            return this;
        }

        /**
         * @param secretArn Secret ARN.
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder secretArn(String secretArn) {
            return secretArn(Output.of(secretArn));
        }

        public SecretPolicyArgs build() {
            if ($.policy == null) {
                throw new MissingRequiredPropertyException("SecretPolicyArgs", "policy");
            }
            if ($.secretArn == null) {
                throw new MissingRequiredPropertyException("SecretPolicyArgs", "secretArn");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy