Class IBucket.Jsii$Proxy
- All Implemented Interfaces:
IEnvironmentAware,IEnvironmentAware.Jsii$Default,IBucketRef,IBucketRef.Jsii$Default,IResource,IResource.Jsii$Default,IBucket,IBucket.Jsii$Default,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IConstruct.Jsii$Default,software.constructs.IDependable,software.constructs.IDependable.Jsii$Default
- Enclosing interface:
IBucket
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.s3.IBucket
IBucket.Jsii$Default, IBucket.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.s3.IBucketRef
IBucketRef.Jsii$Default, IBucketRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IDependable
software.constructs.IDependable.Jsii$Default, software.constructs.IDependable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
IEnvironmentAware.Jsii$Default, IEnvironmentAware.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddReplicationPolicy(String roleArn) Function to add required permissions to the destination bucket for cross account replication.final voidaddReplicationPolicy(String roleArn, Boolean accessControlTransition) Function to add required permissions to the destination bucket for cross account replication.final GrantgrantDelete(IGrantable identity) Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket.final GrantgrantPut(IGrantable identity) Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.final GrantgrantPutAcl(IGrantable identity) Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket.final GrantgrantRead(IGrantable identity) Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User).final GrantgrantReadWrite(IGrantable identity) Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User).final GrantgrantWrite(IGrantable identity) Grant write permissions to this bucket to an IAM principal.final GrantgrantWrite(IGrantable identity, Object objectsKeyPattern) Grant write permissions to this bucket to an IAM principal.final RuleDefines a CloudWatch event that triggers when something happens to this bucket.final RuleDefines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call.final RuleDefines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to.final StringThe S3 URL of an S3 object.final StringThe https Transfer Acceleration URL of an S3 object.final StringThe https Transfer Acceleration URL of an S3 object.final StringThe https URL of an S3 object.final StringThe virtual hosted-style URL of an S3 object.final StringThe virtual hosted-style URL of an S3 object.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awscdk.services.s3.IBucket.Jsii$Default
addEventNotification, addObjectCreatedNotification, addObjectRemovedNotification, addReplicationPolicy, addToResourcePolicy, arnForObjects, enableEventBridgeNotification, getBucketArn, getBucketDomainName, getBucketDualStackDomainName, getBucketName, getBucketRegionalDomainName, getBucketWebsiteDomainName, getBucketWebsiteUrl, getEncryptionKey, getIsWebsite, getPolicy, getReplicationRoleArn, grantDelete, grantPublicAccess, grantPut, grantPutAcl, grantRead, grantReadWrite, grantReplicationPermission, grantWrite, onCloudTrailEvent, onCloudTrailPutObject, onCloudTrailWriteObject, s3UrlForObject, setPolicy, setReplicationRoleArn, transferAccelerationUrlForObject, urlForObject, virtualHostedUrlForObjectMethods inherited from interface software.amazon.awscdk.interfaces.s3.IBucketRef.Jsii$Default
getBucketRefMethods inherited from interface software.constructs.IConstruct.Jsii$Default
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware.Jsii$Default
getEnvMethods inherited from interface software.amazon.awscdk.IResource.Jsii$Default
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
-
-
Method Details
-
addReplicationPolicy
@Stability(Stable) public final void addReplicationPolicy(@NotNull String roleArn, @Nullable Boolean accessControlTransition) Function to add required permissions to the destination bucket for cross account replication.These permissions will be added as a resource based policy on the bucket.
- Specified by:
addReplicationPolicyin interfaceIBucket- Specified by:
addReplicationPolicyin interfaceIBucket.Jsii$Default- Parameters:
roleArn- This parameter is required.accessControlTransition-- See Also:
-
addReplicationPolicy
Function to add required permissions to the destination bucket for cross account replication.These permissions will be added as a resource based policy on the bucket.
- Specified by:
addReplicationPolicyin interfaceIBucket- Specified by:
addReplicationPolicyin interfaceIBucket.Jsii$Default- Parameters:
roleArn- This parameter is required.- See Also:
-
grantDelete
Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket.- Specified by:
grantDeletein interfaceIBucket- Specified by:
grantDeletein interfaceIBucket.Jsii$Default- Parameters:
identity- The principal. This parameter is required.
-
grantPut
Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal.
- Specified by:
grantPutin interfaceIBucket- Specified by:
grantPutin interfaceIBucket.Jsii$Default- Parameters:
identity- The principal. This parameter is required.
-
grantPutAcl
Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket.If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag set, calling
grantWriteorgrantReadWriteno longer grants permissions to modify the ACLs of the objects; in this case, if you need to modify object ACLs, call this method explicitly.- Specified by:
grantPutAclin interfaceIBucket- Specified by:
grantPutAclin interfaceIBucket.Jsii$Default- Parameters:
identity- The principal. This parameter is required.
-
grantRead
Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User).If encryption is used, permission to use the key to decrypt the contents of the bucket will also be granted to the same principal.
- Specified by:
grantReadin interfaceIBucket- Specified by:
grantReadin interfaceIBucket.Jsii$Default- Parameters:
identity- The principal. This parameter is required.
-
grantReadWrite
Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User).If an encryption key is used, permission to use the key for encrypt/decrypt will also be granted.
Before CDK version 1.85.0, this method granted the
s3:PutObject*permission that includeds3:PutObjectAcl, which could be used to grant read/write object access to IAM principals in other accounts. If you want to get rid of that behavior, update your CDK version to 1.85.0 or later, and make sure the@aws-cdk/aws-s3:grantWriteWithoutAclfeature flag is set totruein thecontextkey of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use thegrantPutAclmethod.- Specified by:
grantReadWritein interfaceIBucket- Specified by:
grantReadWritein interfaceIBucket.Jsii$Default- Parameters:
identity- The principal. This parameter is required.
-
grantWrite
@Stability(Stable) @NotNull public final Grant grantWrite(@NotNull IGrantable identity, @Nullable Object objectsKeyPattern) Grant write permissions to this bucket to an IAM principal.If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal.
Before CDK version 1.85.0, this method granted the
s3:PutObject*permission that includeds3:PutObjectAcl, which could be used to grant read/write object access to IAM principals in other accounts. If you want to get rid of that behavior, update your CDK version to 1.85.0 or later, and make sure the@aws-cdk/aws-s3:grantWriteWithoutAclfeature flag is set totruein thecontextkey of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use thegrantPutAclmethod.- Specified by:
grantWritein interfaceIBucket- Specified by:
grantWritein interfaceIBucket.Jsii$Default- Parameters:
identity- The principal. This parameter is required.objectsKeyPattern- Restrict the permission to a certain key pattern (default '*').
-
grantWrite
Grant write permissions to this bucket to an IAM principal.If encryption is used, permission to use the key to encrypt the contents of written files will also be granted to the same principal.
Before CDK version 1.85.0, this method granted the
s3:PutObject*permission that includeds3:PutObjectAcl, which could be used to grant read/write object access to IAM principals in other accounts. If you want to get rid of that behavior, update your CDK version to 1.85.0 or later, and make sure the@aws-cdk/aws-s3:grantWriteWithoutAclfeature flag is set totruein thecontextkey of your cdk.json file. If you've already updated, but still need the principal to have permissions to modify the ACLs, use thegrantPutAclmethod.- Specified by:
grantWritein interfaceIBucket- Specified by:
grantWritein interfaceIBucket.Jsii$Default- Parameters:
identity- The principal. This parameter is required.
-
onCloudTrailEvent
Defines a CloudWatch event that triggers when something happens to this bucket.Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.
- Specified by:
onCloudTrailEventin interfaceIBucket- Specified by:
onCloudTrailEventin interfaceIBucket.Jsii$Default- Parameters:
id- The id of the rule. This parameter is required.
-
onCloudTrailPutObject
Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call.Note that some tools like
aws s3 cpwill automatically use either PutObject or the multipart upload API depending on the file size, so usingonCloudTrailWriteObjectmay be preferable.Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.
- Specified by:
onCloudTrailPutObjectin interfaceIBucket- Specified by:
onCloudTrailPutObjectin interfaceIBucket.Jsii$Default- Parameters:
id- The id of the rule. This parameter is required.
-
onCloudTrailWriteObject
Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to.This includes the events PutObject, CopyObject, and CompleteMultipartUpload.
Note that some tools like
aws s3 cpwill automatically use either PutObject or the multipart upload API depending on the file size, so using this method may be preferable toonCloudTrailPutObject.Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.
- Specified by:
onCloudTrailWriteObjectin interfaceIBucket- Specified by:
onCloudTrailWriteObjectin interfaceIBucket.Jsii$Default- Parameters:
id- The id of the rule. This parameter is required.
-
s3UrlForObject
The S3 URL of an S3 object.For example:
s3://onlybuckets3://bucket/key
- Specified by:
s3UrlForObjectin interfaceIBucket- Specified by:
s3UrlForObjectin interfaceIBucket.Jsii$Default- Returns:
- an ObjectS3Url token
-
transferAccelerationUrlForObject
@Stability(Stable) @NotNull public final String transferAccelerationUrlForObject(@Nullable String key) The https Transfer Acceleration URL of an S3 object.Specify
dualStack: trueat the options for dual-stack endpoint (connect to the bucket over IPv6). For example:https://bucket---s3-accelerate.amazonaws.com.rproxy.govskope.cahttps://bucket.s3-accelerate.amazonaws.com/key
- Specified by:
transferAccelerationUrlForObjectin interfaceIBucket- Specified by:
transferAccelerationUrlForObjectin interfaceIBucket.Jsii$Default- Parameters:
key- The S3 key of the object.- Returns:
- an TransferAccelerationUrl token
-
transferAccelerationUrlForObject
The https Transfer Acceleration URL of an S3 object.Specify
dualStack: trueat the options for dual-stack endpoint (connect to the bucket over IPv6). For example:https://bucket---s3-accelerate.amazonaws.com.rproxy.govskope.cahttps://bucket.s3-accelerate.amazonaws.com/key
- Specified by:
transferAccelerationUrlForObjectin interfaceIBucket- Specified by:
transferAccelerationUrlForObjectin interfaceIBucket.Jsii$Default- Returns:
- an TransferAccelerationUrl token
-
urlForObject
The https URL of an S3 object. For example:.https://s3.us-west-1.amazonaws.com/onlybuckethttps://s3.us-west-1.amazonaws.com/bucket/keyhttps://s3---cn-north-1.amazonaws.com.rproxy.govskope.ca.cn/china-bucket/mykey
- Specified by:
urlForObjectin interfaceIBucket- Specified by:
urlForObjectin interfaceIBucket.Jsii$Default- Returns:
- an ObjectS3Url token
-
virtualHostedUrlForObject
The virtual hosted-style URL of an S3 object. Specifyregional: falseat the options for non-regional URL. For example:.https://only-bucket---s3---us-west-1.amazonaws.com.rproxy.govskope.cahttps://bucket.s3.us-west-1.amazonaws.com/keyhttps://bucket.s3.amazonaws.com/keyhttps://china-bucket---s3---cn-north-1.amazonaws.com.rproxy.govskope.ca.cn/mykey
- Specified by:
virtualHostedUrlForObjectin interfaceIBucket- Specified by:
virtualHostedUrlForObjectin interfaceIBucket.Jsii$Default- Parameters:
key- The S3 key of the object.- Returns:
- an ObjectS3Url token
-
virtualHostedUrlForObject
The virtual hosted-style URL of an S3 object. Specifyregional: falseat the options for non-regional URL. For example:.https://only-bucket---s3---us-west-1.amazonaws.com.rproxy.govskope.cahttps://bucket.s3.us-west-1.amazonaws.com/keyhttps://bucket.s3.amazonaws.com/keyhttps://china-bucket---s3---cn-north-1.amazonaws.com.rproxy.govskope.ca.cn/mykey
- Specified by:
virtualHostedUrlForObjectin interfaceIBucket- Specified by:
virtualHostedUrlForObjectin interfaceIBucket.Jsii$Default- Returns:
- an ObjectS3Url token
-