Skip to main content

delivery_sources

Creates, updates, deletes, gets or lists a delivery_sources resource.

Overview

Namedelivery_sources
TypeResource
Idaws.logs.delivery_sources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe unique name of the delivery source. (pattern: <code>[\w-]*</code>)
arnstringThe Amazon Resource Name (ARN) that uniquely identifies this delivery source.
delivery_source_configurationobjectThe map of key-value pairs that configure the delivery source.
log_typestringThe type of log that the source is sending. For valid values for this parameter, see the documentation for the source service. (pattern: <code>[\w]*</code>)
resource_arnsarrayThis array contains the ARN of the Amazon Web Services resource that sends logs and is represented by this delivery source. Currently, only one ARN can be in the array.
servicestringThe Amazon Web Services service that is sending logs. (pattern: <code>[\w_-]*</code>)
statusstringThe status of the delivery source. A delivery source can have the status ACTIVE or INACTIVE. Note: This value is defined for selective log types. (ACTIVE, INACTIVE)
status_reasonstringThe reason for the status of the delivery source. A status reason of RESOURCE_DELETED indicates that the resource associated with the delivery source has been deleted. Note: This value is defined for selective log types. (RESOURCE_DELETED)
tagsobjectThe tags that have been assigned to this delivery source.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_delivery_sourceselectregionRetrieves complete information about one delivery source.
describe_delivery_sourcesselectregionRetrieves a list of the delivery sources that have been created in the account.
put_delivery_sourcereplaceregion, name, resourceArn, logTypeCreates or updates a logical delivery source. A delivery source represents an Amazon Web Services resource that sends logs to an logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, Firehose or X-Ray for sending traces. To configure logs delivery between a delivery destination and an Amazon Web Services service that is supported as a delivery source, you must do the following: Use PutDeliverySource to create a delivery source, which is a logical object that represents the resource that is actually sending the logs. Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual delivery destination. For more information, see PutDeliveryDestination. 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 CreateDelivery to 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 source, all the current delivery source parameters are overwritten with the new parameter values that you specify.
delete_delivery_sourcedeleteregionDeletes a delivery source. A delivery is a connection between a logical delivery source and a logical delivery destination. You can't delete a delivery source if any current deliveries are associated with it. To find whether any deliveries are associated with this delivery source, use the DescribeDeliveries operation and check the deliverySourceName field in the results.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves complete information about one delivery source.

SELECT
name,
arn,
delivery_source_configuration,
log_type,
resource_arns,
service,
status,
status_reason,
tags
FROM aws.logs.delivery_sources
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Creates or updates a logical delivery source. A delivery source represents an Amazon Web Services resource that sends logs to an logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, Firehose or X-Ray for sending traces. To configure logs delivery between a delivery destination and an Amazon Web Services service that is supported as a delivery source, you must do the following: Use PutDeliverySource to create a delivery source, which is a logical object that represents the resource that is actually sending the logs. Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual delivery destination. For more information, see PutDeliveryDestination. 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 CreateDelivery to 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 source, all the current delivery source parameters are overwritten with the new parameter values that you specify.

REPLACE aws.logs.delivery_sources
SET
name = '{{ name }}',
resourceArn = '{{ resourceArn }}',
logType = '{{ logType }}',
tags = '{{ tags }}',
deliverySourceConfiguration = '{{ deliverySourceConfiguration }}'
WHERE
region = '{{ region }}' --required
AND name = '{{ name }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND logType = '{{ logType }}' --required
RETURNING
delivery_source;

DELETE examples

Deletes a delivery source. A delivery is a connection between a logical delivery source and a logical delivery destination. You can't delete a delivery source if any current deliveries are associated with it. To find whether any deliveries are associated with this delivery source, use the DescribeDeliveries operation and check the deliverySourceName field in the results.

DELETE FROM aws.logs.delivery_sources
WHERE region = '{{ region }}' --required
;