Class: AWSCDK::S3::Inventory
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::Inventory
- Defined in:
- s3/inventory.rb
Overview
Specifies the inventory configuration of an S3 Bucket.
Instance Attribute Summary collapse
-
#destination ⇒ AWSCDK::S3::InventoryDestination
readonly
The destination of the inventory.
-
#enabled ⇒ Boolean?
readonly
Whether the inventory is enabled or disabled.
-
#format ⇒ AWSCDK::S3::InventoryFormat?
readonly
The format of the inventory.
-
#frequency ⇒ AWSCDK::S3::InventoryFrequency?
readonly
Frequency at which the inventory should be generated.
-
#include_object_versions ⇒ AWSCDK::S3::InventoryObjectVersion?
readonly
If the inventory should contain all the object versions or only the current one.
-
#inventory_id ⇒ String?
readonly
The inventory configuration ID.
-
#objects_prefix ⇒ String?
readonly
The inventory will only include objects that meet the prefix filter criteria.
-
#optional_fields ⇒ Array<String>?
readonly
A list of optional fields to be included in the inventory result.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(destination:, enabled: nil, format: nil, frequency: nil, include_object_versions: nil, inventory_id: nil, objects_prefix: nil, optional_fields: nil) ⇒ Inventory
constructor
A new instance of Inventory.
- #to_jsii ⇒ Object
Constructor Details
#initialize(destination:, enabled: nil, format: nil, frequency: nil, include_object_versions: nil, inventory_id: nil, objects_prefix: nil, optional_fields: nil) ⇒ Inventory
Returns a new instance of Inventory.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 's3/inventory.rb', line 17 def initialize(destination:, enabled: nil, format: nil, frequency: nil, include_object_versions: nil, inventory_id: nil, objects_prefix: nil, optional_fields: nil) @destination = destination.is_a?(Hash) ? ::AWSCDK::S3::InventoryDestination.new(**destination.transform_keys(&:to_sym)) : destination Jsii::Type.check_type(@destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSW52ZW50b3J5RGVzdGluYXRpb24ifQ==")), "destination") @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil? @format = format Jsii::Type.check_type(@format, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSW52ZW50b3J5Rm9ybWF0In0=")), "format") unless @format.nil? @frequency = frequency Jsii::Type.check_type(@frequency, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSW52ZW50b3J5RnJlcXVlbmN5In0=")), "frequency") unless @frequency.nil? @include_object_versions = include_object_versions Jsii::Type.check_type(@include_object_versions, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSW52ZW50b3J5T2JqZWN0VmVyc2lvbiJ9")), "includeObjectVersions") unless @include_object_versions.nil? @inventory_id = inventory_id Jsii::Type.check_type(@inventory_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inventoryId") unless @inventory_id.nil? @objects_prefix = objects_prefix Jsii::Type.check_type(@objects_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectsPrefix") unless @objects_prefix.nil? @optional_fields = optional_fields Jsii::Type.check_type(@optional_fields, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "optionalFields") unless @optional_fields.nil? end |
Instance Attribute Details
#destination ⇒ AWSCDK::S3::InventoryDestination (readonly)
The destination of the inventory.
39 40 41 |
# File 's3/inventory.rb', line 39 def destination @destination end |
#enabled ⇒ Boolean? (readonly)
Default: true
Whether the inventory is enabled or disabled.
44 45 46 |
# File 's3/inventory.rb', line 44 def enabled @enabled end |
#format ⇒ AWSCDK::S3::InventoryFormat? (readonly)
Default: InventoryFormat.CSV
The format of the inventory.
49 50 51 |
# File 's3/inventory.rb', line 49 def format @format end |
#frequency ⇒ AWSCDK::S3::InventoryFrequency? (readonly)
Default: InventoryFrequency.WEEKLY
Frequency at which the inventory should be generated.
54 55 56 |
# File 's3/inventory.rb', line 54 def frequency @frequency end |
#include_object_versions ⇒ AWSCDK::S3::InventoryObjectVersion? (readonly)
Default: InventoryObjectVersion.ALL
If the inventory should contain all the object versions or only the current one.
59 60 61 |
# File 's3/inventory.rb', line 59 def include_object_versions @include_object_versions end |
#inventory_id ⇒ String? (readonly)
Default: - generated ID.
The inventory configuration ID.
Should be limited to 64 characters and can only contain letters, numbers, periods, dashes, and underscores.
66 67 68 |
# File 's3/inventory.rb', line 66 def inventory_id @inventory_id end |
#objects_prefix ⇒ String? (readonly)
Default: - No objects prefix
The inventory will only include objects that meet the prefix filter criteria.
71 72 73 |
# File 's3/inventory.rb', line 71 def objects_prefix @objects_prefix end |
#optional_fields ⇒ Array<String>? (readonly)
Default: - No optional fields.
A list of optional fields to be included in the inventory result.
76 77 78 |
# File 's3/inventory.rb', line 76 def optional_fields @optional_fields end |
Class Method Details
.jsii_properties ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 's3/inventory.rb', line 78 def self.jsii_properties { :destination => "destination", :enabled => "enabled", :format => "format", :frequency => "frequency", :include_object_versions => "includeObjectVersions", :inventory_id => "inventoryId", :objects_prefix => "objectsPrefix", :optional_fields => "optionalFields", } end |
Instance Method Details
#to_jsii ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 's3/inventory.rb', line 91 def to_jsii result = {} result.merge!({ "destination" => @destination, "enabled" => @enabled, "format" => @format, "frequency" => @frequency, "includeObjectVersions" => @include_object_versions, "inventoryId" => @inventory_id, "objectsPrefix" => @objects_prefix, "optionalFields" => @optional_fields, }) result.compact end |