Class CfnAccessGrant
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.s3.CfnAccessGrant
- All Implemented Interfaces:
IInspectable
,ITaggableV2
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:08.812Z")
@Stability(Stable)
public class CfnAccessGrant
extends CfnResource
implements IInspectable, ITaggableV2
The
AWS::S3::AccessGrant
resource creates an access grant that gives a grantee access to your S3 data.
The grantee can be an IAM user or role or a directory user, or group. Before you can create a grant, you must have an S3 Access Grants instance in the same Region as the S3 data. You can create an S3 Access Grants instance using the AWS::S3::AccessGrantsInstance . You must also have registered at least one S3 data location in your S3 Access Grants instance using AWS::S3::AccessGrantsLocation .
- Permissions - You must have the
s3:CreateAccessGrant
permission to use this resource. - Additional Permissions - For any directory identity -
sso:DescribeInstance
andsso:DescribeApplication
For directory users - identitystore:DescribeUser
For directory groups - identitystore:DescribeGroup
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.s3.*; CfnAccessGrant cfnAccessGrant = CfnAccessGrant.Builder.create(this, "MyCfnAccessGrant") .accessGrantsLocationId("accessGrantsLocationId") .grantee(GranteeProperty.builder() .granteeIdentifier("granteeIdentifier") .granteeType("granteeType") .build()) .permission("permission") // the properties below are optional .accessGrantsLocationConfiguration(AccessGrantsLocationConfigurationProperty.builder() .s3SubPrefix("s3SubPrefix") .build()) .applicationArn("applicationArn") .s3PrefixType("s3PrefixType") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The configuration options of the S3 Access Grants location.static final class
A fluent builder forCfnAccessGrant
.static interface
The user, group, or role to which you are granting access.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnAccessGrant
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAccessGrant
(software.amazon.jsii.JsiiObjectRef objRef) CfnAccessGrant
(software.constructs.Construct scope, String id, CfnAccessGrantProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe configuration options of the grant location.The ID of the registered location to which you are granting access.The Amazon Resource Name (ARN) of an AWS IAM Identity Center application associated with your Identity Center instance.The ARN of the access grant.The ID of the access grant.The S3 path of the data to which you are granting access.Tag Manager which manages the tags for this resource.The user, group, or role to which you are granting access.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.The type ofS3SubPrefix
.getTags()
The AWS resource tags that you are adding to the access grant.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The configuration options of the grant location.void
setAccessGrantsLocationConfiguration
(CfnAccessGrant.AccessGrantsLocationConfigurationProperty value) The configuration options of the grant location.void
setAccessGrantsLocationId
(String value) The ID of the registered location to which you are granting access.void
setApplicationArn
(String value) The Amazon Resource Name (ARN) of an AWS IAM Identity Center application associated with your Identity Center instance.void
setGrantee
(IResolvable value) The user, group, or role to which you are granting access.void
The user, group, or role to which you are granting access.void
setPermission
(String value) 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.void
setS3PrefixType
(String value) The type ofS3SubPrefix
.void
The AWS resource tags that you are adding to the access grant.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAccessGrant
protected CfnAccessGrant(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAccessGrant
protected CfnAccessGrant(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAccessGrant
@Stability(Stable) public CfnAccessGrant(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAccessGrantProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrAccessGrantArn
The ARN of the access grant. -
getAttrAccessGrantId
The ID of the access grant.S3 Access Grants auto-generates this ID when you create the access grant.
-
getAttrGrantScope
The S3 path of the data to which you are granting access.It is the result of appending the
Subprefix
to the location scope. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManager
in interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getAccessGrantsLocationId
The ID of the registered location to which you are granting access. -
setAccessGrantsLocationId
The ID of the registered location to which you are granting access. -
getGrantee
The user, group, or role to which you are granting access. -
setGrantee
The user, group, or role to which you are granting access. -
setGrantee
The user, group, or role to which you are granting access. -
getPermission
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. -
setPermission
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. -
getAccessGrantsLocationConfiguration
The configuration options of the grant location. -
setAccessGrantsLocationConfiguration
The configuration options of the grant location. -
setAccessGrantsLocationConfiguration
@Stability(Stable) public void setAccessGrantsLocationConfiguration(@Nullable CfnAccessGrant.AccessGrantsLocationConfigurationProperty value) The configuration options of the grant location. -
getApplicationArn
The Amazon Resource Name (ARN) of an AWS IAM Identity Center application associated with your Identity Center instance. -
setApplicationArn
The Amazon Resource Name (ARN) of an AWS IAM Identity Center application associated with your Identity Center instance. -
getS3PrefixType
The type ofS3SubPrefix
. -
setS3PrefixType
The type ofS3SubPrefix
. -
getTags
The AWS resource tags that you are adding to the access grant. -
setTags
The AWS resource tags that you are adding to the access grant.
-