Class: AWSCDK::Logs::CrossAccountDestinationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
logs/cross_account_destination_props.rb

Overview

Properties for a CrossAccountDestination.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role:, target_arn:, destination_name: nil) ⇒ CrossAccountDestinationProps

Returns a new instance of CrossAccountDestinationProps.

Parameters:

  • role (AWSCDK::Interfaces::AWSIAM::IRoleRef)

    The role to assume that grants permissions to write to 'target'.

  • target_arn (String)

    The log destination target's ARN.

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

    The name of the log destination.



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

def initialize(role:, target_arn:, destination_name: nil)
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifQ==")), "role")
  @target_arn = target_arn
  Jsii::Type.check_type(@target_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetArn")
  @destination_name = destination_name
  Jsii::Type.check_type(@destination_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationName") unless @destination_name.nil?
end

Instance Attribute Details

#destination_nameString? (readonly)

Note:

Default: Automatically generated

The name of the log destination.

Returns:

  • (String, nil)


33
34
35
# File 'logs/cross_account_destination_props.rb', line 33

def destination_name
  @destination_name
end

#roleAWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

The role to assume that grants permissions to write to 'target'.

The role must be assumable by 'logs.REGION.amazonaws.com'.



24
25
26
# File 'logs/cross_account_destination_props.rb', line 24

def role
  @role
end

#target_arnString (readonly)

The log destination target's ARN.

Returns:

  • (String)


28
29
30
# File 'logs/cross_account_destination_props.rb', line 28

def target_arn
  @target_arn
end

Class Method Details

.jsii_propertiesObject



35
36
37
38
39
40
41
# File 'logs/cross_account_destination_props.rb', line 35

def self.jsii_properties
  {
    :role => "role",
    :target_arn => "targetArn",
    :destination_name => "destinationName",
  }
end

Instance Method Details

#to_jsiiObject



43
44
45
46
47
48
49
50
51
# File 'logs/cross_account_destination_props.rb', line 43

def to_jsii
  result = {}
  result.merge!({
    "role" => @role,
    "targetArn" => @target_arn,
    "destinationName" => @destination_name,
  })
  result.compact
end