Creates or updates a delivery channel to deliver configuration information and other compliance information.
You can use this operation to create a new delivery channel or to update the Amazon S3 bucket and the Amazon SNS topic of an existing delivery channel.
For more information, see Working with the Delivery Channel in the Config Developer Guide.
One delivery channel per account per Region
You can have only one delivery channel for each account for each Amazon Web Services Region.
Parameters:
-
delivery_channel
(DeliveryChannel)
–
An object for the delivery channel. A delivery channel sends notifications and updated configuration states.
Raises:
Source code in docs_src/capo_config_service/_services/config_service.py
| def put_delivery_channel(
self,
delivery_channel: "capo_config_service.types.delivery_channel.DeliveryChannel",
*,
config_overrides: Optional[ConfigServiceClientConfig] = None,
) -> None:
"""<p>Creates or updates a delivery channel to deliver configuration information and other compliance information.</p> <p>You can use this operation to create a new delivery channel or to update the Amazon S3 bucket and the Amazon SNS topic of an existing delivery channel.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/config/latest/developerguide/manage-delivery-channel.html"> <b>Working with the Delivery Channel</b> </a> in the <i>Config Developer Guide.</i> </p> <note> <p> <b>One delivery channel per account per Region</b> </p> <p>You can have only one delivery channel for each account for each Amazon Web Services Region.</p> </note>
Args:
delivery_channel: <p>An object for the delivery channel. A delivery channel sends notifications and updated configuration states. </p>
Raises:
capo_config_service.errors.insufficient_delivery_policy_exception.InsufficientDeliveryPolicyException: <p>Your Amazon S3 bucket policy does not allow Config to write to it.</p>
capo_config_service.errors.invalid_delivery_channel_name_exception.InvalidDeliveryChannelNameException: <p>The specified delivery channel name is not valid.</p>
capo_config_service.errors.invalid_s3_key_prefix_exception.InvalidS3KeyPrefixException: <p>The specified Amazon S3 key prefix is not valid.</p>
capo_config_service.errors.invalid_s3_kms_key_arn_exception.InvalidS3KmsKeyArnException: <p>The specified Amazon KMS Key ARN is not valid.</p>
capo_config_service.errors.invalid_sns_topic_arn_exception.InvalidSNSTopicARNException: <p>The specified Amazon SNS topic does not exist.</p>
capo_config_service.errors.max_number_of_delivery_channels_exceeded_exception.MaxNumberOfDeliveryChannelsExceededException: <p>You have reached the limit of the number of delivery channels you can create.</p>
capo_config_service.errors.no_available_configuration_recorder_exception.NoAvailableConfigurationRecorderException: <p>There are no customer managed configuration recorders available to record your resources. Use the <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_PutConfigurationRecorder.html">PutConfigurationRecorder</a> operation to create the customer managed configuration recorder.</p>
capo_config_service.errors.no_such_bucket_exception.NoSuchBucketException: <p>The specified Amazon S3 bucket does not exist.</p>
capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_config_service.types.put_delivery_channel_request.PutDeliveryChannelRequest]",
) -> OperationResponse[None]:
import capo_config_service._operations.starling_dove_service.put_delivery_channel
output, http_response = (
capo_config_service._operations.starling_dove_service.put_delivery_channel.put_delivery_channel(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutDeliveryChannel")
)
input_: capo_config_service.types.put_delivery_channel_request.PutDeliveryChannelRequest = {
"delivery_channel": delivery_channel
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|