Class: AWSCDK::S3::GrantReplicationPermissionDestinationProps

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

Overview

The properties for the destination bucket for granting replication permission.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, encryption_key: nil) ⇒ GrantReplicationPermissionDestinationProps

Returns a new instance of GrantReplicationPermissionDestinationProps.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    The destination bucket.

  • encryption_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    The KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key.



9
10
11
12
13
14
# File 's3/grant_replication_permission_destination_props.rb', line 9

def initialize(bucket:, encryption_key: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  @encryption_key = encryption_key
  Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil?
end

Instance Attribute Details

#bucketAWSCDK::S3::IBucket (readonly)

The destination bucket.

Returns:



19
20
21
# File 's3/grant_replication_permission_destination_props.rb', line 19

def bucket
  @bucket
end

#encryption_keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: - no KMS key is used for replication.

The KMS key to use for encryption if a destination bucket needs to be encrypted with a customer-managed KMS key.

Returns:



24
25
26
# File 's3/grant_replication_permission_destination_props.rb', line 24

def encryption_key
  @encryption_key
end

Class Method Details

.jsii_propertiesObject



26
27
28
29
30
31
# File 's3/grant_replication_permission_destination_props.rb', line 26

def self.jsii_properties
  {
    :bucket => "bucket",
    :encryption_key => "encryptionKey",
  }
end

Instance Method Details

#to_jsiiObject



33
34
35
36
37
38
39
40
# File 's3/grant_replication_permission_destination_props.rb', line 33

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "encryptionKey" => @encryption_key,
  })
  result.compact
end