MonitoringConfigurationProperty Struct
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 | |
|---|---|
| Type last changed |
Example
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
# 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
// 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();
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
} }
};
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
metricConfigurationsIResolvable | IResolvable | CfnService.metric_configurationstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricConfigurationProperty]]]metricConfigurationsIResolvableMetricConfigurationsIResolvableMetricConfigurationsinterface{} required #The list of metric configurations for the service monitoring.