Class CfnAccessGrantProps.Builder
java.lang.Object
software.amazon.awscdk.services.s3.CfnAccessGrantProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAccessGrantProps>
- Enclosing interface:
CfnAccessGrantProps
@Stability(Stable)
public static final class CfnAccessGrantProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAccessGrantProps>
A builder for
CfnAccessGrantProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessGrantsLocationConfiguration
(IResolvable accessGrantsLocationConfiguration) Sets the value ofCfnAccessGrantProps.getAccessGrantsLocationConfiguration()
accessGrantsLocationConfiguration
(CfnAccessGrant.AccessGrantsLocationConfigurationProperty accessGrantsLocationConfiguration) Sets the value ofCfnAccessGrantProps.getAccessGrantsLocationConfiguration()
accessGrantsLocationId
(String accessGrantsLocationId) Sets the value ofCfnAccessGrantProps.getAccessGrantsLocationId()
applicationArn
(String applicationArn) Sets the value ofCfnAccessGrantProps.getApplicationArn()
build()
Builds the configured instance.grantee
(IResolvable grantee) Sets the value ofCfnAccessGrantProps.getGrantee()
grantee
(CfnAccessGrant.GranteeProperty grantee) Sets the value ofCfnAccessGrantProps.getGrantee()
permission
(String permission) Sets the value ofCfnAccessGrantProps.getPermission()
s3PrefixType
(String s3PrefixType) Sets the value ofCfnAccessGrantProps.getS3PrefixType()
Sets the value ofCfnAccessGrantProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
accessGrantsLocationId
@Stability(Stable) public CfnAccessGrantProps.Builder accessGrantsLocationId(String accessGrantsLocationId) Sets the value ofCfnAccessGrantProps.getAccessGrantsLocationId()
- Parameters:
accessGrantsLocationId
- The ID of the registered location to which you are granting access. This parameter is required. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the IDdefault
to the default locations3://
and assigns an auto-generated ID to other locations that you register.- Returns:
this
-
grantee
Sets the value ofCfnAccessGrantProps.getGrantee()
- Parameters:
grantee
- The user, group, or role to which you are granting access. This parameter is required. You can grant access to an IAM user or role. If you have added your corporate directory to AWS IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.- Returns:
this
-
grantee
@Stability(Stable) public CfnAccessGrantProps.Builder grantee(CfnAccessGrant.GranteeProperty grantee) Sets the value ofCfnAccessGrantProps.getGrantee()
- Parameters:
grantee
- The user, group, or role to which you are granting access. This parameter is required. You can grant access to an IAM user or role. If you have added your corporate directory to AWS IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.- Returns:
this
-
permission
Sets the value ofCfnAccessGrantProps.getPermission()
- Parameters:
permission
- The type of access that you are granting to your S3 data, which can be set to one of the following values: -READ
– Grant read-only access to the S3 data. This parameter is required.WRITE
– Grant write-only access to the S3 data.READWRITE
– Grant both read and write access to the S3 data.
- Returns:
this
-
accessGrantsLocationConfiguration
@Stability(Stable) public CfnAccessGrantProps.Builder accessGrantsLocationConfiguration(IResolvable accessGrantsLocationConfiguration) Sets the value ofCfnAccessGrantProps.getAccessGrantsLocationConfiguration()
- Parameters:
accessGrantsLocationConfiguration
- The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access. It contains theS3SubPrefix
field. The grant scope is the result of appending the subprefix to the location scope of the registered location.- Returns:
this
-
accessGrantsLocationConfiguration
@Stability(Stable) public CfnAccessGrantProps.Builder accessGrantsLocationConfiguration(CfnAccessGrant.AccessGrantsLocationConfigurationProperty accessGrantsLocationConfiguration) Sets the value ofCfnAccessGrantProps.getAccessGrantsLocationConfiguration()
- Parameters:
accessGrantsLocationConfiguration
- The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access. It contains theS3SubPrefix
field. The grant scope is the result of appending the subprefix to the location scope of the registered location.- Returns:
this
-
applicationArn
Sets the value ofCfnAccessGrantProps.getApplicationArn()
- Parameters:
applicationArn
- The Amazon Resource Name (ARN) of an AWS IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.- Returns:
this
-
s3PrefixType
Sets the value ofCfnAccessGrantProps.getS3PrefixType()
- Parameters:
s3PrefixType
- The type ofS3SubPrefix
. The only possible value isObject
. Pass this value if the access grant scope is an object. Do not pass this value if the access grant scope is a bucket or a bucket and a prefix.- Returns:
this
-
tags
Sets the value ofCfnAccessGrantProps.getTags()
- Parameters:
tags
- The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAccessGrantProps>
- Returns:
- a new instance of
CfnAccessGrantProps
- Throws:
NullPointerException
- if any required attribute was not provided
-