本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
要更改传递通道的名称,您必须删除该传输通道,然后使用指定名称创建一个新传输通道。在删除传递通道之前,您必须暂时停止配置记录器。 AWS Config 控制台不提供删除传送渠道的选项。您必须使用 AWS CL AWS Config I、API 或其中一个 AWS SDKs。
使用重命名配送渠道 AWS CLI
-
使用
stop-configuration-recorder
命令停止配置记录器:$ aws configservice stop-configuration-recorder --configuration-recorder-name
configRecorderName
-
使用
describe-delivery-channels
命令,并记下您的传递通道属性:$ 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" } ] }
-
使用
delete-delivery-channel
命令删除传递通道:$ aws configservice delete-delivery-channel --delivery-channel-name
default
-
使用
put-delivery-channel
命令以所需名称创建传递通道:$ 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" } }
-
使用
start-configuration-recorder
命令恢复记录:$ aws configservice start-configuration-recorder --configuration-recorder-name
configRecorderName