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

com.pulumi.aws.s3.inputs.BucketPolicyState 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.s3.inputs;

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


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

    public static final BucketPolicyState Empty = new BucketPolicyState();

    /**
     * Name of the bucket to which to apply the policy.
     * 
     */
    @Import(name="bucket")
    private @Nullable Output bucket;

    /**
     * @return Name of the bucket to which to apply the policy.
     * 
     */
    public Optional> bucket() {
        return Optional.ofNullable(this.bucket);
    }

    /**
     * Text of the policy. Although this is a bucket policy rather than an IAM policy, the `aws.iam.getPolicyDocument` data source may be used, so long as it specifies a principal. For more information about building AWS IAM policy documents, see the AWS IAM Policy Document Guide. Note: Bucket policies are limited to 20 KB in size.
     * 
     */
    @Import(name="policy")
    private @Nullable Output policy;

    /**
     * @return Text of the policy. Although this is a bucket policy rather than an IAM policy, the `aws.iam.getPolicyDocument` data source may be used, so long as it specifies a principal. For more information about building AWS IAM policy documents, see the AWS IAM Policy Document Guide. Note: Bucket policies are limited to 20 KB in size.
     * 
     */
    public Optional> policy() {
        return Optional.ofNullable(this.policy);
    }

    private BucketPolicyState() {}

    private BucketPolicyState(BucketPolicyState $) {
        this.bucket = $.bucket;
        this.policy = $.policy;
    }

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

    public static final class Builder {
        private BucketPolicyState $;

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

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

        /**
         * @param bucket Name of the bucket to which to apply the policy.
         * 
         * @return builder
         * 
         */
        public Builder bucket(@Nullable Output bucket) {
            $.bucket = bucket;
            return this;
        }

        /**
         * @param bucket Name of the bucket to which to apply the policy.
         * 
         * @return builder
         * 
         */
        public Builder bucket(String bucket) {
            return bucket(Output.of(bucket));
        }

        /**
         * @param policy Text of the policy. Although this is a bucket policy rather than an IAM policy, the `aws.iam.getPolicyDocument` data source may be used, so long as it specifies a principal. For more information about building AWS IAM policy documents, see the AWS IAM Policy Document Guide. Note: Bucket policies are limited to 20 KB in size.
         * 
         * @return builder
         * 
         */
        public Builder policy(@Nullable Output policy) {
            $.policy = policy;
            return this;
        }

        /**
         * @param policy Text of the policy. Although this is a bucket policy rather than an IAM policy, the `aws.iam.getPolicyDocument` data source may be used, so long as it specifies a principal. For more information about building AWS IAM policy documents, see the AWS IAM Policy Document Guide. Note: Bucket policies are limited to 20 KB in size.
         * 
         * @return builder
         * 
         */
        public Builder policy(String policy) {
            return policy(Output.of(policy));
        }

        public BucketPolicyState build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy