

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::ECS::Service MetricConfiguration
<a name="aws-properties-ecs-service-metricconfiguration"></a>

The configuration for a specific set of metrics to collect for a service.

## Syntax
<a name="aws-properties-ecs-service-metricconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-ecs-service-metricconfiguration-syntax.json"></a>

```
{
  "[MetricNames](#cfn-ecs-service-metricconfiguration-metricnames)" : {{[ String, ... ]}},
  "[ResolutionSeconds](#cfn-ecs-service-metricconfiguration-resolutionseconds)" : {{Integer}}
}
```

### YAML
<a name="aws-properties-ecs-service-metricconfiguration-syntax.yaml"></a>

```
  [MetricNames](#cfn-ecs-service-metricconfiguration-metricnames): {{
    - String}}
  [ResolutionSeconds](#cfn-ecs-service-metricconfiguration-resolutionseconds): {{Integer}}
```

## Properties
<a name="aws-properties-ecs-service-metricconfiguration-properties"></a>

`MetricNames`  <a name="cfn-ecs-service-metricconfiguration-metricnames"></a>
The list of metric names to configure. The supported metric names are `CPUUtilization` and `MemoryUtilization`.  
*Required*: Yes  
*Type*: Array of String  
*Allowed values*: `CPUUtilization | MemoryUtilization`  
*Minimum*: `1`  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResolutionSeconds`  <a name="cfn-ecs-service-metricconfiguration-resolutionseconds"></a>
The resolution, in seconds, at which to collect the metrics. The valid values are `20` and `60`.  
*Required*: Yes  
*Type*: Integer  
*Allowed values*: `20 | 60`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)