Class: AWSCDK::S3::CfnBucket::MetricsConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
s3/cfn_bucket.rb

Overview

Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket.

If you're updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don't include the elements you want to keep, they are erased. For examples, see AWS::S3::Bucket . For more information, see PUT Bucket metrics in the Amazon S3 API Reference .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, access_point_arn: nil, prefix: nil, tag_filters: nil) ⇒ MetricsConfigurationProperty

Returns a new instance of MetricsConfigurationProperty.

Parameters:

  • id (String)

    The ID used to identify the metrics configuration.

  • access_point_arn (String, nil) (defaults to: nil)

    The access point that was used while performing operations on the object.

  • prefix (String, nil) (defaults to: nil)

    The prefix that an object must have to be included in the metrics results.

  • tag_filters (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::S3::CfnBucket::TagFilterProperty>, nil) (defaults to: nil)

    Specifies a list of tag filters to use as a metrics configuration filter.



2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
# File 's3/cfn_bucket.rb', line 2460

def initialize(id:, access_point_arn: nil, prefix: nil, tag_filters: nil)
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  @access_point_arn = access_point_arn
  Jsii::Type.check_type(@access_point_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessPointArn") unless @access_point_arn.nil?
  @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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuQ2ZuQnVja2V0LlRhZ0ZpbHRlclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "tagFilters") unless @tag_filters.nil?
end

Instance Attribute Details

#access_point_arnString? (readonly)

The access point that was used while performing operations on the object.

The metrics configuration only includes objects that meet the filter's criteria.



2484
2485
2486
# File 's3/cfn_bucket.rb', line 2484

def access_point_arn
  @access_point_arn
end

#idString (readonly)

The ID used to identify the metrics configuration.

This can be any value you choose that helps you identify your metrics configuration.



2477
2478
2479
# File 's3/cfn_bucket.rb', line 2477

def id
  @id
end

#prefixString? (readonly)

The prefix that an object must have to be included in the metrics results.



2489
2490
2491
# File 's3/cfn_bucket.rb', line 2489

def prefix
  @prefix
end

#tag_filtersAWSCDK::IResolvable, ... (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.



2496
2497
2498
# File 's3/cfn_bucket.rb', line 2496

def tag_filters
  @tag_filters
end

Class Method Details

.jsii_propertiesObject



2498
2499
2500
2501
2502
2503
2504
2505
# File 's3/cfn_bucket.rb', line 2498

def self.jsii_properties
  {
    :id => "id",
    :access_point_arn => "accessPointArn",
    :prefix => "prefix",
    :tag_filters => "tagFilters",
  }
end

Instance Method Details

#to_jsiiObject



2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
# File 's3/cfn_bucket.rb', line 2507

def to_jsii
  result = {}
  result.merge!({
    "id" => @id,
    "accessPointArn" => @access_point_arn,
    "prefix" => @prefix,
    "tagFilters" => @tag_filters,
  })
  result.compact
end