putDeliveryChannel method
Creates a delivery channel object to deliver configuration information to an Amazon S3 bucket and Amazon SNS topic.
Before you can create a delivery channel, you must create a configuration recorder.
You can use this action to change the Amazon S3 bucket or an Amazon SNS topic of the existing delivery channel. To change the Amazon S3 bucket or an Amazon SNS topic, call this action and specify the changed values for the S3 bucket and the SNS topic. If you specify a different value for either the S3 bucket or the SNS topic, this action will keep the existing value for the parameter that is not changed.
May throw MaxNumberOfDeliveryChannelsExceededException. May throw NoAvailableConfigurationRecorderException. May throw InvalidDeliveryChannelNameException. May throw NoSuchBucketException. May throw InvalidS3KeyPrefixException. May throw InvalidSNSTopicARNException. May throw InsufficientDeliveryPolicyException.
Parameter deliveryChannel
:
The configuration delivery channel object that delivers the configuration
information to an Amazon S3 bucket and to an Amazon SNS topic.
Implementation
Future<void> putDeliveryChannel({
required DeliveryChannel deliveryChannel,
}) async {
ArgumentError.checkNotNull(deliveryChannel, 'deliveryChannel');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StarlingDoveService.PutDeliveryChannel'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DeliveryChannel': deliveryChannel,
},
);
}