

This is the new *Amazon CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [Amazon CloudFormation User Guide](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::CloudWatch::OTelEnrichment
<a name="aws-resource-cloudwatch-otelenrichment"></a>

Enables OpenTelemetry (OTel) metric enrichment in Amazon CloudWatch, allowing CloudWatch vended metrics to be available for PromQL querying enriched with Amazon resource tags and metadata.

This is a singleton resource — only one `OTelEnrichment` resource can exist per Amazon account. The resource has no configurable properties. Creating the resource starts enrichment, and deleting it stops enrichment.

Before creating this resource, you must enable resource tags on telemetry for your account. For more information, see [Supported Amazon infrastructure metrics](https://docs.amazonaws.cn/AmazonCloudWatch/latest/monitoring/UsingResourceTagsForTelemetry.html) in the *Amazon CloudWatch User Guide*.

## Syntax
<a name="aws-resource-cloudwatch-otelenrichment-syntax"></a>

To declare this entity in your Amazon CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cloudwatch-otelenrichment-syntax.json"></a>

```
{
  "Type" : "AWS::CloudWatch::OTelEnrichment"
}
```

### YAML
<a name="aws-resource-cloudwatch-otelenrichment-syntax.yaml"></a>

```
Type: AWS::CloudWatch::OTelEnrichment
```

## Return values
<a name="aws-resource-cloudwatch-otelenrichment-return-values"></a>

### Ref
<a name="aws-resource-cloudwatch-otelenrichment-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns Amazon account ID.

For more information about using the `Ref` function, see [Ref](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-cloudwatch-otelenrichment-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-cloudwatch-otelenrichment-return-values-fn--getatt-fn--getatt"></a>

`AccountId`  <a name="AccountId-fn::getatt"></a>
The Amazon account ID. This is the primary identifier for this singleton resource.

`Status`  <a name="Status-fn::getatt"></a>
The current status of OTel enrichment for the account. Valid values are `RUNNING` (enrichment is enabled) and `STOPPED` (enrichment is disabled).