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

com.pulumi.aws.s3.outputs.BucketGrant 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.66.3
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.outputs;

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

@CustomType
public final class BucketGrant {
    /**
     * @return Canonical user id to grant for. Used only when `type` is `CanonicalUser`.
     * 
     */
    private @Nullable String id;
    /**
     * @return List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
     * 
     */
    private List permissions;
    /**
     * @return Type of grantee to apply for. Valid values are `CanonicalUser` and `Group`. `AmazonCustomerByEmail` is not supported.
     * 
     */
    private String type;
    /**
     * @return Uri address to grant for. Used only when `type` is `Group`.
     * 
     */
    private @Nullable String uri;

    private BucketGrant() {}
    /**
     * @return Canonical user id to grant for. Used only when `type` is `CanonicalUser`.
     * 
     */
    public Optional id() {
        return Optional.ofNullable(this.id);
    }
    /**
     * @return List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
     * 
     */
    public List permissions() {
        return this.permissions;
    }
    /**
     * @return Type of grantee to apply for. Valid values are `CanonicalUser` and `Group`. `AmazonCustomerByEmail` is not supported.
     * 
     */
    public String type() {
        return this.type;
    }
    /**
     * @return Uri address to grant for. Used only when `type` is `Group`.
     * 
     */
    public Optional uri() {
        return Optional.ofNullable(this.uri);
    }

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

    public static Builder builder(BucketGrant defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String id;
        private List permissions;
        private String type;
        private @Nullable String uri;
        public Builder() {}
        public Builder(BucketGrant defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.id = defaults.id;
    	      this.permissions = defaults.permissions;
    	      this.type = defaults.type;
    	      this.uri = defaults.uri;
        }

        @CustomType.Setter
        public Builder id(@Nullable String id) {

            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder permissions(List permissions) {
            if (permissions == null) {
              throw new MissingRequiredPropertyException("BucketGrant", "permissions");
            }
            this.permissions = permissions;
            return this;
        }
        public Builder permissions(String... permissions) {
            return permissions(List.of(permissions));
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("BucketGrant", "type");
            }
            this.type = type;
            return this;
        }
        @CustomType.Setter
        public Builder uri(@Nullable String uri) {

            this.uri = uri;
            return this;
        }
        public BucketGrant build() {
            final var _resultValue = new BucketGrant();
            _resultValue.id = id;
            _resultValue.permissions = permissions;
            _resultValue.type = type;
            _resultValue.uri = uri;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy