Class: AWSCDK::S3::BucketMetrics
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::BucketMetrics
- Defined in:
- s3/bucket_metrics.rb
Overview
Specifies a metrics configuration for the CloudWatch request metrics from an Amazon S3 bucket.
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
The ID used to identify the metrics configuration.
-
#prefix ⇒ String?
readonly
The prefix that an object must have to be included in the metrics results.
-
#tag_filters ⇒ Hash{String => Object}?
readonly
Specifies a list of tag filters to use as a metrics configuration filter.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, prefix: nil, tag_filters: nil) ⇒ BucketMetrics
constructor
A new instance of BucketMetrics.
- #to_jsii ⇒ Object
Constructor Details
#initialize(id:, prefix: nil, tag_filters: nil) ⇒ BucketMetrics
Returns a new instance of BucketMetrics.
10 11 12 13 14 15 16 17 |
# File 's3/bucket_metrics.rb', line 10 def initialize(id:, prefix: nil, tag_filters: nil) @id = id Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") @prefix = prefix Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil? @tag_filters = tag_filters Jsii::Type.check_type(@tag_filters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "tagFilters") unless @tag_filters.nil? end |
Instance Attribute Details
#id ⇒ String (readonly)
The ID used to identify the metrics configuration.
22 23 24 |
# File 's3/bucket_metrics.rb', line 22 def id @id end |
#prefix ⇒ String? (readonly)
The prefix that an object must have to be included in the metrics results.
26 27 28 |
# File 's3/bucket_metrics.rb', line 26 def prefix @prefix end |
#tag_filters ⇒ Hash{String => Object}? (readonly)
Specifies a list of tag filters to use as a metrics configuration filter.
The metrics configuration includes only objects that meet the filter's criteria.
32 33 34 |
# File 's3/bucket_metrics.rb', line 32 def tag_filters @tag_filters end |
Class Method Details
.jsii_properties ⇒ Object
34 35 36 37 38 39 40 |
# File 's3/bucket_metrics.rb', line 34 def self.jsii_properties { :id => "id", :prefix => "prefix", :tag_filters => "tagFilters", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 's3/bucket_metrics.rb', line 42 def to_jsii result = {} result.merge!({ "id" => @id, "prefix" => @prefix, "tagFilters" => @tag_filters, }) result.compact end |