Interface BucketAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BucketAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:37.492Z")
@Stability(Stable)
public interface BucketAttributes
extends software.amazon.jsii.JsiiSerializable
A reference to a bucket outside this stack.
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());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forBucketAttributes
static final class
An implementation forBucketAttributes
-
Method Summary
Modifier and TypeMethodDescriptionstatic BucketAttributes.Builder
builder()
default String
The account this existing bucket belongs to.default String
The ARN of the bucket.default String
The domain name of the bucket.default String
The IPv6 DNS name of the specified bucket.default String
The name of the bucket.default String
The regional domain name of the specified bucket.default Boolean
The format of the website URL of the bucket.default String
The website URL of the bucket (if static web hosting is enabled).default IKey
default Boolean
If this bucket has been configured for static website hosting.default IRole
The role to be used by the notifications handler.default String
The region this existing bucket is in.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAccount
The account this existing bucket belongs to.Default: - it's assumed the bucket belongs to the same account as the scope it's being imported into
-
getBucketArn
The ARN of the bucket.At least one of bucketArn or bucketName must be defined in order to initialize a bucket ref.
-
getBucketDomainName
The domain name of the bucket.Default: Inferred from bucket name
-
getBucketDualStackDomainName
The IPv6 DNS name of the specified bucket. -
getBucketName
The name of the bucket.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.
-
getBucketRegionalDomainName
The regional domain name of the specified bucket. -
getBucketWebsiteNewUrlFormat
The format of the website URL of the bucket.This should be true for regions launched since 2014.
Default: false
-
getBucketWebsiteUrl
The website URL of the bucket (if static web hosting is enabled).Default: Inferred from bucket name
-
getEncryptionKey
-
getIsWebsite
If this bucket has been configured for static website hosting.Default: false
-
getNotificationsHandlerRole
The role to be used by the notifications handler.Default: - a new role will be created.
-
getRegion
The region this existing bucket is in.Default: - it's assumed the bucket is in the same region as the scope it's being imported into
-
builder
- Returns:
- a
BucketAttributes.Builder
ofBucketAttributes
-