Class: AWSCDK::S3::InventoryDestination

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

Overview

The destination of the inventory.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, bucket_owner: nil, prefix: nil) ⇒ InventoryDestination

Returns a new instance of InventoryDestination.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    Bucket where all inventories will be saved in.

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

    The account ID that owns the destination S3 bucket.

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

    The prefix to be used when saving the inventory.



10
11
12
13
14
15
16
17
# File 's3/inventory_destination.rb', line 10

def initialize(bucket:, bucket_owner: nil, prefix: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  @bucket_owner = bucket_owner
  Jsii::Type.check_type(@bucket_owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketOwner") unless @bucket_owner.nil?
  @prefix = prefix
  Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil?
end

Instance Attribute Details

#bucketAWSCDK::S3::IBucket (readonly)

Bucket where all inventories will be saved in.

Returns:



22
23
24
# File 's3/inventory_destination.rb', line 22

def bucket
  @bucket
end

#bucket_ownerString? (readonly)

Note:

Default: - No account ID.

The account ID that owns the destination S3 bucket.

If no account ID is provided, the owner is not validated before exporting data. It's recommended to set an account ID to prevent problems if the destination bucket ownership changes.

Returns:

  • (String, nil)


30
31
32
# File 's3/inventory_destination.rb', line 30

def bucket_owner
  @bucket_owner
end

#prefixString? (readonly)

Note:

Default: - No prefix.

The prefix to be used when saving the inventory.

Returns:

  • (String, nil)


35
36
37
# File 's3/inventory_destination.rb', line 35

def prefix
  @prefix
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
43
# File 's3/inventory_destination.rb', line 37

def self.jsii_properties
  {
    :bucket => "bucket",
    :bucket_owner => "bucketOwner",
    :prefix => "prefix",
  }
end

Instance Method Details

#to_jsiiObject



45
46
47
48
49
50
51
52
53
# File 's3/inventory_destination.rb', line 45

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "bucketOwner" => @bucket_owner,
    "prefix" => @prefix,
  })
  result.compact
end