重新為交付管道命名 - AWS Config

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

重新為交付管道命名

若要變更傳送管道名稱,您必須將其刪除,然後使用您指定的名稱建立新的傳送管道。您必須暫時停止組態記錄器,才能刪除交付管道。主 AWS Config 控台未提供刪除傳送通道的選項。您必須使用 AWS CLI、 AWS Config API 或其中一個 AWS 開發套件。

使用重新命名傳送管道 AWS CLI
  1. 使用 stop-configuration-recorder 命令停止組態記錄器:

    $ aws configservice stop-configuration-recorder --configuration-recorder-name configRecorderName
  2. 使用 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" } ] }
  3. 使用 delete-delivery-channel 命令刪除交付管道:

    $ aws configservice delete-delivery-channel --delivery-channel-name default
  4. 使用 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" } }
  5. 使用 start-configuration-recorder 命令繼續記錄:

    $ aws configservice start-configuration-recorder --configuration-recorder-name configRecorderName