

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::IoT::SecurityProfile MetricsExportConfig
<a name="aws-properties-iot-securityprofile-metricsexportconfig"></a>

Specifies the MQTT topic and role ARN required for metric export.

## Syntax
<a name="aws-properties-iot-securityprofile-metricsexportconfig-syntax"></a>

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

### JSON
<a name="aws-properties-iot-securityprofile-metricsexportconfig-syntax.json"></a>

```
{
  "[MqttTopic](#cfn-iot-securityprofile-metricsexportconfig-mqtttopic)" : String,
  "[RoleArn](#cfn-iot-securityprofile-metricsexportconfig-rolearn)" : String
}
```

### YAML
<a name="aws-properties-iot-securityprofile-metricsexportconfig-syntax.yaml"></a>

```
  [MqttTopic](#cfn-iot-securityprofile-metricsexportconfig-mqtttopic): String
  [RoleArn](#cfn-iot-securityprofile-metricsexportconfig-rolearn): String
```

## Properties
<a name="aws-properties-iot-securityprofile-metricsexportconfig-properties"></a>

`MqttTopic`  <a name="cfn-iot-securityprofile-metricsexportconfig-mqtttopic"></a>
The MQTT topic that Device Defender Detect should publish messages to for metrics export.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `512`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-securityprofile-metricsexportconfig-rolearn"></a>
This role ARN has permission to publish MQTT messages, after which Device Defender Detect can assume the role and publish messages on your behalf.  
*Required*: Yes  
*Type*: String  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)