Skip to main content

deliveries

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

Overview

Namedeliveries
TypeResource
Idaws.logs.deliveries

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique ID that identifies this delivery in your account. (pattern: <code>^[0-9A-Za-z]+$</code>)
arnstringThe Amazon Resource Name (ARN) that uniquely identifies this delivery.
delivery_destination_arnstringThe ARN of the delivery destination that is associated with this delivery.
delivery_destination_typestringDisplays whether the delivery destination associated with this delivery is CloudWatch Logs, Amazon S3, Firehose, or X-Ray. (S3, CWL, FH, XRAY)
delivery_source_namestringThe name of the delivery source that is associated with this delivery. (pattern: <code>[\w-]*</code>)
field_delimiterstringThe field delimiter that is used between record fields when the final output format of a delivery is in Plain, W3C, or Raw format.
record_fieldsarrayThe record fields used in this delivery.
s_3_delivery_configurationobjectThis structure contains delivery configurations that apply only when the delivery destination resource is an S3 bucket.
tagsobjectThe tags that have been assigned to this delivery.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_deliveryselectregionReturns complete information about one logical delivery. A delivery is a connection between a delivery source and a delivery destination . 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, or Firehose. Only some Amazon Web Services services support being configured as a delivery source. These services are listed in Enable logging from Amazon Web Services services. You need to specify the delivery id in this operation. You can find the IDs of the deliveries in your account with the DescribeDeliveries operation.
describe_deliveriesselectregionRetrieves a list of the deliveries that have been created in the account. A delivery is a connection between a delivery source and a delivery destination . 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. Only some Amazon Web Services services support being configured as a delivery source. These services are listed in Enable logging from Amazon Web Services services.
create_deliveryinsertregion, deliverySourceName, deliveryDestinationArnCreates a delivery. A delivery is a connection between a logical delivery source and a logical delivery destination that you have already created. Only some Amazon Web Services services support being configured as a delivery source using this operation. These services are listed as Supported [V2 Permissions] in the table at Enabling logging from Amazon Web Services services. A delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, a delivery stream in Firehose, or X-Ray. 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. 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. 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. To update an existing delivery configuration, use UpdateDeliveryConfiguration.
update_delivery_configurationupdateregion, idUse this operation to update the configuration of a delivery to change either the S3 path pattern or the format of the delivered logs. You can't use this operation to change the source or destination of the delivery.
delete_deliverydeleteregionDeletes a delivery. A delivery is a connection between a logical delivery source and a logical delivery destination. Deleting a delivery only deletes the connection between the delivery source and delivery destination. It does not delete the delivery destination or the delivery source.

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

Returns complete information about one logical delivery. A delivery is a connection between a delivery source and a delivery destination . 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, or Firehose. Only some Amazon Web Services services support being configured as a delivery source. These services are listed in Enable logging from Amazon Web Services services. You need to specify the delivery id in this operation. You can find the IDs of the deliveries in your account with the DescribeDeliveries operation.

SELECT
id,
arn,
delivery_destination_arn,
delivery_destination_type,
delivery_source_name,
field_delimiter,
record_fields,
s_3_delivery_configuration,
tags
FROM aws.logs.deliveries
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a delivery. A delivery is a connection between a logical delivery source and a logical delivery destination that you have already created. Only some Amazon Web Services services support being configured as a delivery source using this operation. These services are listed as Supported [V2 Permissions] in the table at Enabling logging from Amazon Web Services services. A delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, a delivery stream in Firehose, or X-Ray. 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. 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. 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. To update an existing delivery configuration, use UpdateDeliveryConfiguration.

INSERT INTO aws.logs.deliveries (
deliverySourceName,
deliveryDestinationArn,
recordFields,
fieldDelimiter,
s3DeliveryConfiguration,
tags,
region
)
SELECT
'{{ deliverySourceName }}' /* required */,
'{{ deliveryDestinationArn }}' /* required */,
'{{ recordFields }}',
'{{ fieldDelimiter }}',
'{{ s3DeliveryConfiguration }}',
'{{ tags }}',
'{{ region }}'
RETURNING
delivery
;

UPDATE examples

Use this operation to update the configuration of a delivery to change either the S3 path pattern or the format of the delivered logs. You can't use this operation to change the source or destination of the delivery.

UPDATE aws.logs.deliveries
SET
id = '{{ id }}',
recordFields = '{{ recordFields }}',
fieldDelimiter = '{{ fieldDelimiter }}',
s3DeliveryConfiguration = '{{ s3DeliveryConfiguration }}'
WHERE
region = '{{ region }}' --required
AND id = '{{ id }}' --required;

DELETE examples

Deletes a delivery. A delivery is a connection between a logical delivery source and a logical delivery destination. Deleting a delivery only deletes the connection between the delivery source and delivery destination. It does not delete the delivery destination or the delivery source.

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