Link

class Link : KotlinCustomResource

Resource for managing an AWS CloudWatch Observability Access Manager Link.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.oam.Link("example", {
labelTemplate: "$AccountName",
resourceTypes: ["AWS::CloudWatch::Metric"],
sinkIdentifier: test.id,
tags: {
Env: "prod",
},
});
import pulumi
import pulumi_aws as aws
example = aws.oam.Link("example",
label_template="$AccountName",
resource_types=["AWS::CloudWatch::Metric"],
sink_identifier=test["id"],
tags={
"Env": "prod",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Oam.Link("example", new()
{
LabelTemplate = "$AccountName",
ResourceTypes = new[]
{
"AWS::CloudWatch::Metric",
},
SinkIdentifier = test.Id,
Tags =
{
{ "Env", "prod" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/oam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := oam.NewLink(ctx, "example", &oam.LinkArgs{
LabelTemplate: pulumi.String("$AccountName"),
ResourceTypes: pulumi.StringArray{
pulumi.String("AWS::CloudWatch::Metric"),
},
SinkIdentifier: pulumi.Any(test.Id),
Tags: pulumi.StringMap{
"Env": pulumi.String("prod"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.oam.Link;
import com.pulumi.aws.oam.LinkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Link("example", LinkArgs.builder()
.labelTemplate("$AccountName")
.resourceTypes("AWS::CloudWatch::Metric")
.sinkIdentifier(test.id())
.tags(Map.of("Env", "prod"))
.build());
}
}
resources:
example:
type: aws:oam:Link
properties:
labelTemplate: $AccountName
resourceTypes:
- AWS::CloudWatch::Metric
sinkIdentifier: ${test.id}
tags:
Env: prod

Import

Using pulumi import, import CloudWatch Observability Access Manager Link using the arn. For example:

$ pulumi import aws:oam/link:Link example arn:aws:oam:us-west-2:123456789012:link/link-id

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the link.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val label: Output<String>

Label that is assigned to this link.

Link copied to clipboard
val labelTemplate: Output<String>

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

Link copied to clipboard
val linkId: Output<String>

ID string that AWS generated as part of the link ARN.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceTypes: Output<List<String>>

Types of data that the source account shares with the monitoring account.

Link copied to clipboard
val sinkArn: Output<String>

ARN of the sink that is used for this link.

Link copied to clipboard
val sinkIdentifier: Output<String>

Identifier of the sink to use to create this link. The following arguments are optional:

Link copied to clipboard
val tags: Output<Map<String, String>>?

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

Link copied to clipboard
val tagsAll: Output<Map<String, String>>
Link copied to clipboard
val urn: Output<String>