Class: AWSCDK::S3Outposts::CfnBucketProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3Outposts::CfnBucketProps
- Defined in:
- s3_outposts/cfn_bucket_props.rb
Overview
Properties for defining a CfnBucket.
Instance Attribute Summary collapse
-
#bucket_name ⇒ String
readonly
A name for the S3 on Outposts bucket.
-
#lifecycle_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.
-
#outpost_id ⇒ String
readonly
The ID of the Outpost of the specified bucket.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Sets the tags for an S3 on Outposts bucket.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket_name:, outpost_id:, lifecycle_configuration: nil, tags: nil) ⇒ CfnBucketProps
constructor
A new instance of CfnBucketProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket_name:, outpost_id:, lifecycle_configuration: nil, tags: nil) ⇒ CfnBucketProps
Returns a new instance of CfnBucketProps.
13 14 15 16 17 18 19 20 21 22 |
# File 's3_outposts/cfn_bucket_props.rb', line 13 def initialize(bucket_name:, outpost_id:, lifecycle_configuration: nil, tags: nil) @bucket_name = bucket_name Jsii::Type.check_type(@bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketName") @outpost_id = outpost_id Jsii::Type.check_type(@outpost_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outpostId") @lifecycle_configuration = lifecycle_configuration.is_a?(Hash) ? ::AWSCDK::S3Outposts::CfnBucket::LifecycleConfigurationProperty.new(**lifecycle_configuration.transform_keys(&:to_sym)) : lifecycle_configuration Jsii::Type.check_type(@lifecycle_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zM291dHBvc3RzLkNmbkJ1Y2tldC5MaWZlY3ljbGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "lifecycleConfiguration") unless @lifecycle_configuration.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#bucket_name ⇒ String (readonly)
A name for the S3 on Outposts bucket.
If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. The bucket name must contain only lowercase letters, numbers, periods (.), and dashes (-) and must follow Amazon S3 bucket restrictions and limitations . For more information, see Bucket naming rules .
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.
32 33 34 |
# File 's3_outposts/cfn_bucket_props.rb', line 32 def bucket_name @bucket_name end |
#lifecycle_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.
Outposts buckets only support lifecycle configurations that delete/expire objects after a certain period of time and abort incomplete multipart uploads.
44 45 46 |
# File 's3_outposts/cfn_bucket_props.rb', line 44 def lifecycle_configuration @lifecycle_configuration end |
#outpost_id ⇒ String (readonly)
The ID of the Outpost of the specified bucket.
37 38 39 |
# File 's3_outposts/cfn_bucket_props.rb', line 37 def outpost_id @outpost_id end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Sets the tags for an S3 on Outposts bucket. For more information, see Using Amazon S3 on Outposts .
Use tags to organize your AWS bill to reflect your own cost structure. To do this, sign up to get your AWS account bill with tag key values included. Then, to see the cost of combined resources, organize your billing information according to resources with the same tag key values. For example, you can tag several resources with a specific application name, and then organize your billing information to see the total cost of that application across several services. For more information, see Cost allocation and tags .
Within a bucket, if you add a tag that has the same key as an existing tag, the new value overwrites the old value. For more information, see Using cost allocation and bucket tags .
To use this resource, you must have permissions to perform the s3-outposts:PutBucketTagging . The S3 on Outposts bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing access permissions to your Amazon S3 resources .
55 56 57 |
# File 's3_outposts/cfn_bucket_props.rb', line 55 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
57 58 59 60 61 62 63 64 |
# File 's3_outposts/cfn_bucket_props.rb', line 57 def self.jsii_properties { :bucket_name => "bucketName", :outpost_id => "outpostId", :lifecycle_configuration => "lifecycleConfiguration", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
66 67 68 69 70 71 72 73 74 75 |
# File 's3_outposts/cfn_bucket_props.rb', line 66 def to_jsii result = {} result.merge!({ "bucketName" => @bucket_name, "outpostId" => @outpost_id, "lifecycleConfiguration" => @lifecycle_configuration, "tags" => @tags, }) result.compact end |