Skip to content

Resource: awsOamLink

Terraform resource for managing an AWS CloudWatch Observability Access Manager Link.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.oamLink.OamLink(this, "example", {
  labelTemplate: "$AccountName",
  resourceTypes: ["AWS::CloudWatch::Metric"],
  sinkIdentifier: "${aws_oam_sink.test.id}",
  tags: {
    Env: "prod",
  },
});

Argument Reference

The following arguments are required:

  • labelTemplate - (Required) Human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.
  • resourceTypes - (Required) Types of data that the source account shares with the monitoring account.
  • sinkIdentifier - (Required) Identifier of the sink to use to create this link.

The following arguments are optional:

  • tags - (Optional) A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - ARN of the link.
  • label - Label that is assigned to this link.
  • linkId - ID string that AWS generated as part of the link ARN.
  • sinkArn - ARN of the sink that is used for this link.

Timeouts

Configuration options:

  • create - (Default 1M)
  • update - (Default 1M)
  • delete - (Default 1M)

Import

CloudWatch Observability Access Manager Link can be imported using the arn, e.g.,

$ terraform import aws_oam_link.example arn:aws:oam:us-west-2:123456789012:link/link-id