# CfnResourceMetricsConfigurationProps

Properties for defining a `CfnResourceMetricsConfiguration`.

Used as props by: [CfnResourceMetricsConfiguration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnResourceMetricsConfiguration.html)

- Source: Generated at build time
- Type last changed: v2.274.0 · 20 Oct 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const cfnResourceMetricsConfigurationProps: cloudwatch.CfnResourceMetricsConfigurationProps = {
  resourceArn: 'resourceArn',

  // the properties below are optional
  metricSelections: [{
    includeMetrics: ['includeMetrics'],
  }],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch

cfn_resource_metrics_configuration_props = cloudwatch.CfnResourceMetricsConfigurationProps(
    resource_arn="resourceArn",

    # the properties below are optional
    metric_selections=[cloudwatch.CfnResourceMetricsConfiguration.ResourceMetricSelectionProperty(
        include_metrics=["includeMetrics"]
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;

CfnResourceMetricsConfigurationProps cfnResourceMetricsConfigurationProps = CfnResourceMetricsConfigurationProps.builder()
        .resourceArn("resourceArn")

        // the properties below are optional
        .metricSelections(List.of(ResourceMetricSelectionProperty.builder()
                .includeMetrics(List.of("includeMetrics"))
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;

var cfnResourceMetricsConfigurationProps = new CfnResourceMetricsConfigurationProps {
    ResourceArn = "resourceArn",

    // the properties below are optional
    MetricSelections = new [] { new ResourceMetricSelectionProperty {
        IncludeMetrics = new [] { "includeMetrics" }
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnResourceMetricsConfigurationProps := &CfnResourceMetricsConfigurationProps{
	ResourceArn: jsii.String("resourceArn"),

	// the properties below are optional
	MetricSelections: []interface{}{
		&ResourceMetricSelectionProperty{
			IncludeMetrics: []*string{
				jsii.String("includeMetrics"),
			},
		},
	},
}
```

## Properties

- `metricSelections`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResourceMetricsConfiguration.ResourceMetricSelectionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnResourceMetricsConfiguration.ResourceMetricSelectionProperty.html)[] — The metric selections that define which metrics are enabled for detailed monitoring on the resource.

- `resourceArn`: string (required) — The Amazon Resource Name (ARN) of the resource for which the detailed monitoring metrics configuration is managed.
