import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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. * * > **NOTE:** Creating this Terraform resource starts AWS CloudWatch OTel enrichment and deleting this Terraform resource stops AWS CloudWatch OTel enrichment. * * Filters are evaluated as follows. `includeFilter` is applied first, then the `excludeFilter` match set is subtracted from the result. Exclusion always wins, so a metric matched by both is not enriched. An inactive direction is permissive: with no `includeFilter`, every supported namespace is in scope, and with no `excludeFilter`, nothing is removed. Namespaces and metric names are matched exactly and case-sensitively, with no wildcards or prefixes, so `AWS/EC2` matches only `AWS/EC2`. At most 100 selectors are allowed across `includeFilter` and `excludeFilter` **combined**. Two lists of 60 selectors each satisfy the per-list limit but are rejected together. * * ## Example Usage * * ### Enable OTel Enrichment * * ```typescript * 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], * }); * ``` * * ### Filter Enrichment by Namespace and Metric * * By default every namespace that CloudWatch supports is enriched. Narrow that scope with `includeFilter` and `excludeFilter`. The configuration below enriches all of `AWS/EC2` except two network metrics, plus exactly two `AWS/RDS` metrics, and nothing else. * * ```typescript * 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", { * excludeFilters: [{ * namespace: "AWS/EC2", * metricNames: [ * "NetworkPacketsIn", * "NetworkPacketsOut", * ], * }], * includeFilters: [ * { * namespace: "AWS/EC2", * }, * { * namespace: "AWS/RDS", * metricNames: [ * "CPUUtilization", * "DatabaseConnections", * ], * }, * ], * }, { * dependsOn: [example], * }); * ``` * * ## 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: * * ```sh * $ pulumi import aws:cloudwatch/otelEnrichment:OtelEnrichment example us-west-2 * ``` */ export declare class OtelEnrichment extends pulumi.CustomResource { /** * Get an existing OtelEnrichment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: OtelEnrichmentState, opts?: pulumi.CustomResourceOptions): OtelEnrichment; /** * Check whether an existing OtelEnrichment resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: OtelEnrichmentState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of OtelEnrichment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is OtelEnrichment; /** * Namespaces and metric names to leave unenriched. See below. */ readonly excludeFilters: pulumi.Output; /** * Namespaces and metric names to enrich. See below. */ readonly includeFilters: pulumi.Output; /** * AWS region where this resource is managed. */ readonly region: pulumi.Output; readonly timeouts: pulumi.Output; /** * Create a OtelEnrichment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: OtelEnrichmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering OtelEnrichment resources. */ export interface OtelEnrichmentState { /** * Namespaces and metric names to leave unenriched. See below. */ excludeFilters?: pulumi.Input[] | undefined>; /** * Namespaces and metric names to enrich. See below. */ includeFilters?: pulumi.Input[] | undefined>; /** * AWS region where this resource is managed. */ region?: pulumi.Input; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a OtelEnrichment resource. */ export interface OtelEnrichmentArgs { /** * Namespaces and metric names to leave unenriched. See below. */ excludeFilters?: pulumi.Input[] | undefined>; /** * Namespaces and metric names to enrich. See below. */ includeFilters?: pulumi.Input[] | undefined>; /** * AWS region where this resource is managed. */ region?: pulumi.Input; timeouts?: pulumi.Input; } //# sourceMappingURL=otelEnrichment.d.ts.map