Class: AWSCDK::OAM::CfnLinkProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::OAM::CfnLinkProps
- Defined in:
- oam/cfn_link_props.rb
Overview
Properties for defining a CfnLink.
Instance Attribute Summary collapse
-
#label_template ⇒ String?
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.
-
#link_configuration ⇒ AWSCDK::IResolvable, ...
readonly
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.
-
#resource_types ⇒ Array<String>
readonly
An array of strings that define which types of data that the source account shares with the monitoring account.
-
#sink_identifier ⇒ String
readonly
The ARN of the sink in the monitoring account that you want to link to.
-
#tags ⇒ Hash{String => String}?
readonly
An array of key-value pairs to apply to the link.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(resource_types:, sink_identifier:, label_template: nil, link_configuration: nil, tags: nil) ⇒ CfnLinkProps
constructor
A new instance of CfnLinkProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(resource_types:, sink_identifier:, label_template: nil, link_configuration: nil, tags: nil) ⇒ CfnLinkProps
Returns a new instance of CfnLinkProps.
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 = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? end |
Instance Attribute Details
#label_template ⇒ String? (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:
$AccountNameis the name of the account$AccountEmailis a globally-unique email address, which includes the email domain, such asmariagarcia@example.com$AccountEmailNoDomainis an email address without the domain name, such asmariagarcia
In the and Regions, the only supported option is to use custom labels, and the
$AccountName,$AccountEmail, and$AccountEmailNoDomainvariables 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 |
#link_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
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_types ⇒ Array<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_identifier ⇒ String (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 |
#tags ⇒ Hash{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 end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |