Class: AWSCDK::OAM::CfnLinkProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
oam/cfn_link_props.rb

Overview

Properties for defining a CfnLink.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_types:, sink_identifier:, label_template: nil, link_configuration: nil, tags: nil) ⇒ CfnLinkProps

Returns a new instance of CfnLinkProps.

Parameters:

  • resource_types (Array<String>)

    An array of strings that define which types of data that the source account shares with the monitoring account.

  • sink_identifier (String)

    The ARN of the sink in the monitoring account that you want to link to.

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

    Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.

  • link_configuration (AWSCDK::IResolvable, AWSCDK::OAM::CfnLink::LinkConfigurationProperty, nil) (defaults to: nil)

    Use this structure to optionally create filters that specify that only some metric namespaces or log groups are to be shared from the source account to the monitoring account.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    An array of key-value pairs to apply to the link.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'oam/cfn_link_props.rb', line 14

def initialize(resource_types:, sink_identifier:, label_template: nil, link_configuration: nil, tags: nil)
  @resource_types = resource_types
  Jsii::Type.check_type(@resource_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "resourceTypes")
  @sink_identifier = sink_identifier
  Jsii::Type.check_type(@sink_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sinkIdentifier")
  @label_template = label_template
  Jsii::Type.check_type(@label_template, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "labelTemplate") unless @label_template.nil?
  @link_configuration = link_configuration.is_a?(Hash) ? ::AWSCDK::OAM::CfnLink::LinkConfigurationProperty.new(**link_configuration.transform_keys(&:to_sym)) : link_configuration
  Jsii::Type.check_type(@link_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vYW0uQ2ZuTGluay5MaW5rQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "linkConfiguration") unless @link_configuration.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#label_templateString? (readonly)

Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.

You can include the following variables in your template:

  • $AccountName is the name of the account
  • $AccountEmail is a globally-unique email address, which includes the email domain, such as mariagarcia@example.com
  • $AccountEmailNoDomain is an email address without the domain name, such as mariagarcia

In the and Regions, the only supported option is to use custom labels, and the $AccountName , $AccountEmail , and $AccountEmailNoDomain variables all resolve as account-id instead of the specified variable.



53
54
55
# File 'oam/cfn_link_props.rb', line 53

def label_template
  @label_template
end

Use this structure to optionally create filters that specify that only some metric namespaces or log groups are to be shared from the source account to the monitoring account.



58
59
60
# File 'oam/cfn_link_props.rb', line 58

def link_configuration
  @link_configuration
end

#resource_typesArray<String> (readonly)

An array of strings that define which types of data that the source account shares with the monitoring account.

Valid values are AWS::CloudWatch::Metric | AWS::Logs::LogGroup | AWS::XRay::Trace | AWS::ApplicationInsights::Application | AWS::InternetMonitor::Monitor .



33
34
35
# File 'oam/cfn_link_props.rb', line 33

def resource_types
  @resource_types
end

#sink_identifierString (readonly)

The ARN of the sink in the monitoring account that you want to link to.

You can use ListSinks to find the ARNs of sinks.



40
41
42
# File 'oam/cfn_link_props.rb', line 40

def sink_identifier
  @sink_identifier
end

#tagsHash{String => String}? (readonly)

An array of key-value pairs to apply to the link.

For more information, see Tag .



65
66
67
# File 'oam/cfn_link_props.rb', line 65

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
# File 'oam/cfn_link_props.rb', line 67

def self.jsii_properties
  {
    :resource_types => "resourceTypes",
    :sink_identifier => "sinkIdentifier",
    :label_template => "labelTemplate",
    :link_configuration => "linkConfiguration",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



77
78
79
80
81
82
83
84
85
86
87
# File 'oam/cfn_link_props.rb', line 77

def to_jsii
  result = {}
  result.merge!({
    "resourceTypes" => @resource_types,
    "sinkIdentifier" => @sink_identifier,
    "labelTemplate" => @label_template,
    "linkConfiguration" => @link_configuration,
    "tags" => @tags,
  })
  result.compact
end