@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-02T14:17:18.504Z") @Stability(value=Stable) public interface BucketAttributes extends software.amazon.jsii.JsiiSerializable
Example:
Function myLambda; IBucket bucket = Bucket.fromBucketAttributes(this, "ImportedBucket", BucketAttributes.builder() .bucketArn("arn:aws:s3:::my-bucket") .build()); // now you can just call methods on the bucket bucket.addEventNotification(EventType.OBJECT_CREATED, new LambdaDestination(myLambda), NotificationKeyFilter.builder().prefix("home/myusername/*").build());
Modifier and Type | Interface and Description |
---|---|
static class |
BucketAttributes.Builder
A builder for
BucketAttributes |
static class |
BucketAttributes.Jsii$Proxy
An implementation for
BucketAttributes |
Modifier and Type | Method and Description |
---|---|
static BucketAttributes.Builder |
builder() |
default String |
getAccount()
The account this existing bucket belongs to.
|
default String |
getBucketArn()
The ARN of the bucket.
|
default String |
getBucketDomainName()
The domain name of the bucket.
|
default String |
getBucketDualStackDomainName()
The IPv6 DNS name of the specified bucket.
|
default String |
getBucketName()
The name of the bucket.
|
default String |
getBucketRegionalDomainName()
The regional domain name of the specified bucket.
|
default Boolean |
getBucketWebsiteNewUrlFormat()
The format of the website URL of the bucket.
|
default String |
getBucketWebsiteUrl()
The website URL of the bucket (if static web hosting is enabled).
|
default IKey |
getEncryptionKey() |
default Boolean |
getIsWebsite()
If this bucket has been configured for static website hosting.
|
default IRole |
getNotificationsHandlerRole()
The role to be used by the notifications handler.
|
default String |
getRegion()
The region this existing bucket is in.
|
@Stability(value=Stable) @Nullable default String getAccount()
Default: - it's assumed the bucket belongs to the same account as the scope it's being imported into
@Stability(value=Stable) @Nullable default String getBucketArn()
At least one of bucketArn or bucketName must be defined in order to initialize a bucket ref.
@Stability(value=Stable) @Nullable default String getBucketDomainName()
Default: Inferred from bucket name
@Stability(value=Stable) @Nullable default String getBucketDualStackDomainName()
@Stability(value=Stable) @Nullable default String getBucketName()
If the underlying value of ARN is a string, the name will be parsed from the ARN. Otherwise, the name is optional, but some features that require the bucket name such as auto-creating a bucket policy, won't work.
@Stability(value=Stable) @Nullable default String getBucketRegionalDomainName()
@Stability(value=Stable) @Nullable default Boolean getBucketWebsiteNewUrlFormat()
This should be true for regions launched since 2014.
Default: false
@Stability(value=Stable) @Nullable default String getBucketWebsiteUrl()
Default: Inferred from bucket name
@Stability(value=Stable) @Nullable default IKey getEncryptionKey()
@Stability(value=Stable) @Nullable default Boolean getIsWebsite()
Default: false
@Stability(value=Stable) @Nullable default IRole getNotificationsHandlerRole()
Default: - a new role will be created.
@Stability(value=Stable) @Nullable default String getRegion()
Default: - it's assumed the bucket is in the same region as the scope it's being imported into
@Stability(value=Stable) static BucketAttributes.Builder builder()
BucketAttributes.Builder
of BucketAttributes
Copyright © 2023. All rights reserved.