

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 重新為交付管道命名
<a name="update-dc-rename"></a>

若要變更交付管道名稱，您必須將其刪除，並使用您指定的名稱建立新的交付管道。您必須暫時停止組態記錄器，才能刪除交付管道。 AWS Config 主控台不提供刪除交付管道的選項。您必須使用 AWS CLI、 AWS Config API 或其中一個 AWS SDKs。

**使用 重新命名交付管道 AWS CLI**

1. 使用 [https://docs.aws.amazon.com/cli/latest/reference/configservice/stop-configuration-recorder.html](https://docs.aws.amazon.com/cli/latest/reference/configservice/stop-configuration-recorder.html) 命令停止組態記錄器：

   ```
   $ aws configservice stop-configuration-recorder --configuration-recorder-name {{configRecorderName}}
   ```

1. 使用 [https://docs.aws.amazon.com/cli/latest/reference/configservice/describe-delivery-channels.html](https://docs.aws.amazon.com/cli/latest/reference/configservice/describe-delivery-channels.html) 命令並記下您交付管道的屬性：

   ```
   $ aws configservice describe-delivery-channels
   {
       "DeliveryChannels": [
           {
               "configSnapshotDeliveryProperties": {
                   "deliveryFrequency": "Twelve_Hours"
               },
               "snsTopicARN": "arn:aws:sns:us-east-2:123456789012:config-topic",
               "name": "default",
               "s3BucketName": "config-bucket-123456789012"
           }
       ]
   }
   ```

1. 使用 [https://docs.aws.amazon.com/cli/latest/reference/configservice/delete-delivery-channel.html](https://docs.aws.amazon.com/cli/latest/reference/configservice/delete-delivery-channel.html) 命令刪除交付管道：

   ```
   $ aws configservice delete-delivery-channel --delivery-channel-name {{default}}
   ```

1. 使用 [https://docs.aws.amazon.com/cli/latest/reference/configservice/put-delivery-channel.html](https://docs.aws.amazon.com/cli/latest/reference/configservice/put-delivery-channel.html) 命令，使用需要的名稱建立交付管道：

   ```
   $ aws configservice put-delivery-channel --delivery-channel file://deliveryChannel.json
   ```

   deliveryChannel.json 檔案指定了交付管道屬性：

   ```
   {
       "name": "myCustomDeliveryChannelName",
       "s3BucketName": "config-bucket-123456789012",
       "snsTopicARN": "arn:aws:sns:us-east-2:123456789012:config-topic",
       "configSnapshotDeliveryProperties": {
           "deliveryFrequency": "Twelve_Hours"
       }
   }
   ```

1. 使用 `start-configuration-recorder` 命令繼續記錄：

   ```
   $ aws configservice start-configuration-recorder --configuration-recorder-name {{configRecorderName}}
   ```