com.pulumi.aws.s3.outputs.ObjectCopyGrant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** 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 ObjectCopyGrant {
/**
* @return Email address of the grantee. Used only when `type` is `AmazonCustomerByEmail`.
*
*/
private @Nullable String email;
/**
* @return Canonical user ID of the grantee. Used only when `type` is `CanonicalUser`.
*
*/
private @Nullable String id;
/**
* @return List of permissions to grant to grantee. Valid values are `READ`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
*
*/
private List permissions;
/**
* @return Type of grantee. Valid values are `CanonicalUser`, `Group`, and `AmazonCustomerByEmail`.
*
* This configuration block has the following optional arguments (one of the three is required):
*
*/
private String type;
/**
* @return URI of the grantee group. Used only when `type` is `Group`.
*
*/
private @Nullable String uri;
private ObjectCopyGrant() {}
/**
* @return Email address of the grantee. Used only when `type` is `AmazonCustomerByEmail`.
*
*/
public Optional email() {
return Optional.ofNullable(this.email);
}
/**
* @return Canonical user ID of the grantee. Used only when `type` is `CanonicalUser`.
*
*/
public Optional id() {
return Optional.ofNullable(this.id);
}
/**
* @return List of permissions to grant to grantee. Valid values are `READ`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
*
*/
public List permissions() {
return this.permissions;
}
/**
* @return Type of grantee. Valid values are `CanonicalUser`, `Group`, and `AmazonCustomerByEmail`.
*
* This configuration block has the following optional arguments (one of the three is required):
*
*/
public String type() {
return this.type;
}
/**
* @return URI of the grantee group. 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(ObjectCopyGrant defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String email;
private @Nullable String id;
private List permissions;
private String type;
private @Nullable String uri;
public Builder() {}
public Builder(ObjectCopyGrant defaults) {
Objects.requireNonNull(defaults);
this.email = defaults.email;
this.id = defaults.id;
this.permissions = defaults.permissions;
this.type = defaults.type;
this.uri = defaults.uri;
}
@CustomType.Setter
public Builder email(@Nullable String email) {
this.email = email;
return this;
}
@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("ObjectCopyGrant", "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("ObjectCopyGrant", "type");
}
this.type = type;
return this;
}
@CustomType.Setter
public Builder uri(@Nullable String uri) {
this.uri = uri;
return this;
}
public ObjectCopyGrant build() {
final var _resultValue = new ObjectCopyGrant();
_resultValue.email = email;
_resultValue.id = id;
_resultValue.permissions = permissions;
_resultValue.type = type;
_resultValue.uri = uri;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy