1. Packages
  2. Packages
  3. AWS
  4. API Docs
  5. cloudwatch
  6. OtelEnrichment
Viewing docs for AWS v7.28.0
published on Thursday, Apr 30, 2026 by Pulumi
aws logo
Viewing docs for AWS v7.28.0
published on Thursday, Apr 30, 2026 by Pulumi

    Manages AWS CloudWatch OTel enrichment. This is a singleton resource that enables OTel enrichment at the account level.

    NOTE: This resource requires the aws.observabilityadmin.TelemetryEnrichment resource to be configured first. Without telemetry enrichment enabled, OTel enrichment will not function properly even if the API accepts the configuration.

    Example Usage

    Enable OTel Enrichment

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.observabilityadmin.TelemetryEnrichment("example", {});
    const exampleOtelEnrichment = new aws.cloudwatch.OtelEnrichment("example", {}, {
        dependsOn: [example],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.observabilityadmin.TelemetryEnrichment("example")
    example_otel_enrichment = aws.cloudwatch.OtelEnrichment("example", opts = pulumi.ResourceOptions(depends_on=[example]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch"
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/observabilityadmin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := observabilityadmin.NewTelemetryEnrichment(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		_, err = cloudwatch.NewOtelEnrichment(ctx, "example", nil, pulumi.DependsOn([]pulumi.Resource{
    			example,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Observabilityadmin.TelemetryEnrichment("example");
    
        var exampleOtelEnrichment = new Aws.CloudWatch.OtelEnrichment("example", new()
        {
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.observabilityadmin.TelemetryEnrichment;
    import com.pulumi.aws.cloudwatch.OtelEnrichment;
    import com.pulumi.aws.cloudwatch.OtelEnrichmentArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 TelemetryEnrichment("example");
    
            var exampleOtelEnrichment = new OtelEnrichment("exampleOtelEnrichment", OtelEnrichmentArgs.Empty, CustomResourceOptions.builder()
                .dependsOn(List.of(example))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:observabilityadmin:TelemetryEnrichment
      exampleOtelEnrichment:
        type: aws:cloudwatch:OtelEnrichment
        name: example
        options:
          dependsOn:
            - ${example}
    

    Create OtelEnrichment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new OtelEnrichment(name: string, args?: OtelEnrichmentArgs, opts?: CustomResourceOptions);
    @overload
    def OtelEnrichment(resource_name: str,
                       args: Optional[OtelEnrichmentArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def OtelEnrichment(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       region: Optional[str] = None,
                       timeouts: Optional[OtelEnrichmentTimeoutsArgs] = None)
    func NewOtelEnrichment(ctx *Context, name string, args *OtelEnrichmentArgs, opts ...ResourceOption) (*OtelEnrichment, error)
    public OtelEnrichment(string name, OtelEnrichmentArgs? args = null, CustomResourceOptions? opts = null)
    public OtelEnrichment(String name, OtelEnrichmentArgs args)
    public OtelEnrichment(String name, OtelEnrichmentArgs args, CustomResourceOptions options)
    
    type: aws:cloudwatch:OtelEnrichment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OtelEnrichmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OtelEnrichmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OtelEnrichmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OtelEnrichmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OtelEnrichmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var otelEnrichmentResource = new Aws.CloudWatch.OtelEnrichment("otelEnrichmentResource", new()
    {
        Region = "string",
        Timeouts = new Aws.CloudWatch.Inputs.OtelEnrichmentTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := cloudwatch.NewOtelEnrichment(ctx, "otelEnrichmentResource", &cloudwatch.OtelEnrichmentArgs{
    	Region: pulumi.String("string"),
    	Timeouts: &cloudwatch.OtelEnrichmentTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var otelEnrichmentResource = new OtelEnrichment("otelEnrichmentResource", OtelEnrichmentArgs.builder()
        .region("string")
        .timeouts(OtelEnrichmentTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    otel_enrichment_resource = aws.cloudwatch.OtelEnrichment("otelEnrichmentResource",
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const otelEnrichmentResource = new aws.cloudwatch.OtelEnrichment("otelEnrichmentResource", {
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: aws:cloudwatch:OtelEnrichment
    properties:
        region: string
        timeouts:
            create: string
            delete: string
    

    OtelEnrichment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The OtelEnrichment resource accepts the following input properties:

    Region string
    AWS region where this resource is managed.
    Timeouts OtelEnrichmentTimeouts
    Region string
    AWS region where this resource is managed.
    Timeouts OtelEnrichmentTimeoutsArgs
    region String
    AWS region where this resource is managed.
    timeouts OtelEnrichmentTimeouts
    region string
    AWS region where this resource is managed.
    timeouts OtelEnrichmentTimeouts
    region str
    AWS region where this resource is managed.
    timeouts OtelEnrichmentTimeoutsArgs
    region String
    AWS region where this resource is managed.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OtelEnrichment resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing OtelEnrichment Resource

    Get an existing OtelEnrichment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: OtelEnrichmentState, opts?: CustomResourceOptions): OtelEnrichment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            region: Optional[str] = None,
            timeouts: Optional[OtelEnrichmentTimeoutsArgs] = None) -> OtelEnrichment
    func GetOtelEnrichment(ctx *Context, name string, id IDInput, state *OtelEnrichmentState, opts ...ResourceOption) (*OtelEnrichment, error)
    public static OtelEnrichment Get(string name, Input<string> id, OtelEnrichmentState? state, CustomResourceOptions? opts = null)
    public static OtelEnrichment get(String name, Output<String> id, OtelEnrichmentState state, CustomResourceOptions options)
    resources:  _:    type: aws:cloudwatch:OtelEnrichment    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Region string
    AWS region where this resource is managed.
    Timeouts OtelEnrichmentTimeouts
    Region string
    AWS region where this resource is managed.
    Timeouts OtelEnrichmentTimeoutsArgs
    region String
    AWS region where this resource is managed.
    timeouts OtelEnrichmentTimeouts
    region string
    AWS region where this resource is managed.
    timeouts OtelEnrichmentTimeouts
    region str
    AWS region where this resource is managed.
    timeouts OtelEnrichmentTimeoutsArgs
    region String
    AWS region where this resource is managed.
    timeouts Property Map

    Supporting Types

    OtelEnrichmentTimeouts, OtelEnrichmentTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

    Import

    Identity Schema

    Required

    No required attributes for singleton identity.

    Optional

    • accountId (String) AWS Account where this resource is managed.
    • region (String) Region where this resource is managed.

    Using pulumi import, import CloudWatch OTel Enrichment using the region. For example:

    $ pulumi import aws:cloudwatch/otelEnrichment:OtelEnrichment example us-west-2
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    Viewing docs for AWS v7.28.0
    published on Thursday, Apr 30, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.