This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::CloudWatch::ResourceMetricsConfiguration
Turns on CloudWatch detailed monitoring for an individual AWS resource. Also defines which detailed metrics CloudWatch collects for it. Detailed monitoring provides higher-resolution OpenTelemetry metrics for supported resources.
Each resource can have at most one ResourceMetricsConfiguration. The resource is identified by its Amazon Resource Name (ARN), and the ARN also serves as the identifier for this CloudFormation resource. Creating the resource turns on detailed monitoring. Deleting the resource turns detailed monitoring off, but it does not delete metric data that CloudWatch already collected.
For the list of resource types that support detailed monitoring, see Supported resources for CloudWatch detailed monitoring in the Amazon CloudWatch User Guide.
Syntax
To declare this entity in your CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::CloudWatch::ResourceMetricsConfiguration", "Properties" : { "MetricSelections" :[ ResourceMetricSelection, ... ], "ResourceArn" :String} }
YAML
Type: AWS::CloudWatch::ResourceMetricsConfiguration Properties: MetricSelections:- ResourceMetricSelectionResourceArn:String
Properties
MetricSelections-
Specifies which metrics Amazon CloudWatch collects for the resource. If you omit this parameter, Amazon CloudWatch collects all available detailed metrics for the resource.
Required: No
Type: Array of ResourceMetricSelection
Minimum:
1Maximum:
1Update requires: No interruption
ResourceArn-
The Amazon Resource Name (ARN) of the AWS resource to enable detailed monitoring for.
Required: Yes
Type: String
Pattern:
^arn:[a-zA-Z0-9-]+:[a-zA-Z0-9-]+:[a-zA-Z0-9-]*:\d{12}:.+$Minimum:
20Maximum:
2048Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ARN of the monitored resource.
For more information about using the Ref function, see Ref.
Fn::GetAtt
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.
CreatedAt-
The date and time that detailed monitoring was turned on for the resource.
UpdatedAt-
The date and time that the configuration was last changed.