AWS::Oam::LinkCreates a link between a source account and a sink that you have created in a monitoring account. Before you create a link, you must create a sink in the monitoring account. The sink must have a sink policy that permits the source account to link to it. You can grant permission to source accounts by granting permission to an entire organization, an organizational unit, or to individual accounts. For more information, see [CreateSink](https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html) and [PutSinkPolicy](https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html) . Each monitoring account can be linked to as many as 100,000 source accounts. Each source account can be linked to as many as five monitoring accounts.
import { CfnLink } from 'aws-cdk-lib/aws-oam';Or use the module namespace:
import * as oam from 'aws-cdk-lib/aws-oam';
// oam.CfnLinkConfiguration passed to the constructor as CfnLinkProps.
resourceTypesRequiredstring[]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` .
sinkIdentifierRequiredstringThe ARN of the sink in the monitoring account that you want to link to. You can use [ListSinks](https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html) to find the ARNs of sinks.
labelTemplateOptionalstringSpecify 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.
linkConfigurationOptionalIResolvable | LinkConfigurationPropertyUse 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.
tagsOptional{ [key: string]: string }An array of key-value pairs to apply to the link. For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-oamAWS::Oam::Link