# MonitoringConfigurationProperty

The optional monitoring configuration for a service, which defines the resolution for the service-level ``CPUUtilization`` and ``MemoryUtilization`` Amazon CloudWatch metrics.

When not specified, Amazon ECS uses the default resolution of ``60`` seconds.

- Source: Generated at build time
- Type last changed: v2.261.0 · 2 Jul 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_ecs as ecs } from 'aws-cdk-lib';
const monitoringConfigurationProperty: ecs.CfnService.MonitoringConfigurationProperty = {
  metricConfigurations: [{
    metricNames: ['metricNames'],
    resolutionSeconds: 123,
  }],
};
```

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_ecs as ecs

monitoring_configuration_property = ecs.CfnService.MonitoringConfigurationProperty(
    metric_configurations=[ecs.CfnService.MetricConfigurationProperty(
        metric_names=["metricNames"],
        resolution_seconds=123
    )]
)
```

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.ecs.*;

MonitoringConfigurationProperty monitoringConfigurationProperty = MonitoringConfigurationProperty.builder()
        .metricConfigurations(List.of(MetricConfigurationProperty.builder()
                .metricNames(List.of("metricNames"))
                .resolutionSeconds(123)
                .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.ECS;

var monitoringConfigurationProperty = new MonitoringConfigurationProperty {
    MetricConfigurations = new [] { new MetricConfigurationProperty {
        MetricNames = new [] { "metricNames" },
        ResolutionSeconds = 123
    } }
};
```

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"

monitoringConfigurationProperty := &MonitoringConfigurationProperty{
	MetricConfigurations: []interface{}{
		&MetricConfigurationProperty{
			MetricNames: []*string{
				jsii.String("metricNames"),
			},
			ResolutionSeconds: jsii.Number(123),
		},
	},
}
```

## Properties

- `metricConfigurations`: [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) | [CfnService.MetricConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnService.MetricConfigurationProperty.html)[] (required) — The list of metric configurations for the service monitoring.
