put_delivery_destination
async
¶
put_delivery_destination(
name: DeliveryDestinationName,
*,
config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
output_format: Optional[OutputFormat] = None,
delivery_destination_configuration: Optional[
DeliveryDestinationConfiguration
] = None,
delivery_destination_type: Optional[DeliveryDestinationType] = None,
role_arn: Optional[Arn] = None,
tags: Optional[Tags] = None,
) -> PutDeliveryDestinationResponse
Creates or updates a logical delivery destination. A delivery destination is an Amazon Web Services resource that represents an Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, and Firehose are supported as logs delivery destinations and X-Ray as the trace delivery destination.
To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
-
Create a delivery source, which is a logical object that represents the resource that is actually sending the logs. For more information, see PutDeliverySource.
-
Use
PutDeliveryDestinationto create a delivery destination in the same account of the actual delivery destination. The delivery destination that you create is a logical object that represents the actual delivery destination. -
If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination.
-
Use
CreateDeliveryto create a delivery by pairing exactly one delivery source and one delivery destination. For more information, see CreateDelivery.
You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.
Only some Amazon Web Services services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at Enabling logging from Amazon Web Services services.
If you use this operation to update an existing delivery destination, all the current delivery destination parameters are overwritten with the new parameter values that you specify.
Parameters:
-
name(DeliveryDestinationName) –A name for this delivery destination. This name must be unique for all delivery destinations in your account.
-
output_format(Optional[OutputFormat], default:None) –The format for the logs that this delivery destination will receive.
-
delivery_destination_configuration(Optional[DeliveryDestinationConfiguration], default:None) –A structure that contains the ARN of the Amazon Web Services resource that will receive the logs.
deliveryDestinationConfigurationis required for CloudWatch Logs, Amazon S3, Firehose log delivery destinations and not required for X-Ray trace delivery destinations.deliveryDestinationTypeis needed for X-Ray trace delivery destinations but not required for other logs delivery destinations. -
delivery_destination_type(Optional[DeliveryDestinationType], default:None) –The type of delivery destination. This parameter specifies the target service where log data will be delivered. Valid values include:
-
S3- Amazon S3 for long-term storage and analytics -
CWL- CloudWatch Logs for centralized log management -
FH- Amazon Kinesis Data Firehose for real-time data streaming -
XRAY- Amazon Web Services X-Ray for distributed tracing and application monitoring
The delivery destination type determines the format and configuration options available for log delivery.
-
-
role_arn(Optional[Arn], default:None) –The ARN of an IAM role in your account that CloudWatch Logs assumes to deliver to this delivery destination. The trust policy of the role must allow CloudWatch Logs to assume it. This parameter is supported only for X-Ray trace delivery destinations.
-
tags(Optional[Tags], default:None) –An optional list of key-value pairs to associate with the resource.
For more information about tagging, see Tagging Amazon Web Services resources
Raises:
-
ConflictException–This operation attempted to create a resource that already exists.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–This request exceeds a service quota.
-
ServiceUnavailableException–The service cannot complete the request.
-
ThrottlingException–The request was throttled because of quota limits.
-
ValidationException–One of the parameters for the request is not valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudwatch_logs/_services/async_cloud_watch_logs.py
6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 | |