Class: AWSCDK::S3::CfnBucket::InventoryConfigurationProperty

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

Overview

Specifies the S3 Inventory configuration for an Amazon S3 bucket.

For more information, see GET Bucket inventory in the Amazon S3 API Reference .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(destination:, enabled:, id:, included_object_versions:, schedule_frequency:, optional_fields: nil, prefix: nil) ⇒ InventoryConfigurationProperty

Returns a new instance of InventoryConfigurationProperty.

Parameters:

  • destination (AWSCDK::IResolvable, AWSCDK::S3::CfnBucket::DestinationProperty)

    Contains information about where to publish the inventory results.

  • enabled (Boolean, AWSCDK::IResolvable)

    Specifies whether the inventory is enabled or disabled.

  • id (String)

    The ID used to identify the inventory configuration.

  • included_object_versions (String)

    Object versions to include in the inventory list.

  • schedule_frequency (String)

    Specifies the schedule for generating inventory results.

  • optional_fields (Array<String>, nil) (defaults to: nil)

    Contains the optional fields that are included in the inventory results.

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

    Specifies the inventory filter prefix.



1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
# File 's3/cfn_bucket.rb', line 1864

def initialize(destination:, enabled:, id:, included_object_versions:, schedule_frequency:, optional_fields: nil, prefix: nil)
  @destination = destination.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::DestinationProperty.new(**destination.transform_keys(&:to_sym)) : destination
  Jsii::Type.check_type(@destination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuRGVzdGluYXRpb25Qcm9wZXJ0eSJ9XX19")), "destination")
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled")
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  @included_object_versions = included_object_versions
  Jsii::Type.check_type(@included_object_versions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "includedObjectVersions")
  @schedule_frequency = schedule_frequency
  Jsii::Type.check_type(@schedule_frequency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleFrequency")
  @optional_fields = optional_fields
  Jsii::Type.check_type(@optional_fields, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "optionalFields") unless @optional_fields.nil?
  @prefix = prefix
  Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil?
end

Instance Attribute Details

#destinationAWSCDK::IResolvable, AWSCDK::S3::CfnBucket::DestinationProperty (readonly)

Contains information about where to publish the inventory results.



1885
1886
1887
# File 's3/cfn_bucket.rb', line 1885

def destination
  @destination
end

#enabledBoolean, AWSCDK::IResolvable (readonly)

Specifies whether the inventory is enabled or disabled.

If set to True , an inventory list is generated. If set to False , no inventory list is generated.



1892
1893
1894
# File 's3/cfn_bucket.rb', line 1892

def enabled
  @enabled
end

#idString (readonly)

The ID used to identify the inventory configuration.



1897
1898
1899
# File 's3/cfn_bucket.rb', line 1897

def id
  @id
end

#included_object_versionsString (readonly)

Object versions to include in the inventory list.

If set to All , the list includes all the object versions, which adds the version-related fields VersionId , IsLatest , and DeleteMarker to the list. If set to Current , the list does not contain these version-related fields.



1904
1905
1906
# File 's3/cfn_bucket.rb', line 1904

def included_object_versions
  @included_object_versions
end

#optional_fieldsArray<String>? (readonly)

Contains the optional fields that are included in the inventory results.



1914
1915
1916
# File 's3/cfn_bucket.rb', line 1914

def optional_fields
  @optional_fields
end

#prefixString? (readonly)

Specifies the inventory filter prefix.



1919
1920
1921
# File 's3/cfn_bucket.rb', line 1919

def prefix
  @prefix
end

#schedule_frequencyString (readonly)

Specifies the schedule for generating inventory results.



1909
1910
1911
# File 's3/cfn_bucket.rb', line 1909

def schedule_frequency
  @schedule_frequency
end

Class Method Details

.jsii_propertiesObject



1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
# File 's3/cfn_bucket.rb', line 1921

def self.jsii_properties
  {
    :destination => "destination",
    :enabled => "enabled",
    :id => "id",
    :included_object_versions => "includedObjectVersions",
    :schedule_frequency => "scheduleFrequency",
    :optional_fields => "optionalFields",
    :prefix => "prefix",
  }
end

Instance Method Details

#to_jsiiObject



1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
# File 's3/cfn_bucket.rb', line 1933

def to_jsii
  result = {}
  result.merge!({
    "destination" => @destination,
    "enabled" => @enabled,
    "id" => @id,
    "includedObjectVersions" => @included_object_versions,
    "scheduleFrequency" => @schedule_frequency,
    "optionalFields" => @optional_fields,
    "prefix" => @prefix,
  })
  result.compact
end