Class: AWSCDK::Logs::LogSubscriptionDestinationConfig

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

Overview

Properties returned by a Subscription destination.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arn:, role: nil) ⇒ LogSubscriptionDestinationConfig

Returns a new instance of LogSubscriptionDestinationConfig.

Parameters:

  • arn (String)

    The ARN of the subscription's destination.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The role to assume to write log events to the destination.



9
10
11
12
13
14
# File 'logs/log_subscription_destination_config.rb', line 9

def initialize(arn:, role: nil)
  @arn = arn
  Jsii::Type.check_type(@arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arn")
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
end

Instance Attribute Details

#arnString (readonly)

The ARN of the subscription's destination.

Returns:

  • (String)


19
20
21
# File 'logs/log_subscription_destination_config.rb', line 19

def arn
  @arn
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: No role assumed

The role to assume to write log events to the destination.

Returns:



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

def role
  @role
end

Class Method Details

.jsii_propertiesObject



26
27
28
29
30
31
# File 'logs/log_subscription_destination_config.rb', line 26

def self.jsii_properties
  {
    :arn => "arn",
    :role => "role",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "arn" => @arn,
    "role" => @role,
  })
  result.compact
end