Skip to main content

deliveries

Creates, updates, deletes or gets a delivery resource or lists deliveries in a region

Overview

Namedeliveries
TypeResource
DescriptionThis structure contains information about one delivery in your account.
A delivery is a connection between a logical delivery source and a logical delivery destination.
For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html).
Idawscc.logs.deliveries

Fields

NameDatatypeDescription
delivery_idstringThe unique ID that identifies this delivery in your account.
arnstringThe Amazon Resource Name (ARN) that uniquely identifies this delivery.
delivery_source_namestringThe name of the delivery source that is associated with this delivery.
delivery_destination_typestringDisplays whether the delivery destination associated with this delivery is CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
tagsarrayThe tags that have been assigned to this delivery.
record_fieldsarrayThe list of record fields to be delivered to the destination, in order. If the delivery's log source has mandatory fields, they must be included in this list.
field_delimiterstringThe field delimiter to use between record fields when the final output format of a delivery is in Plain , W3C , or Raw format.
s3_suffix_pathstringThis string allows re-configuring the S3 object prefix to contain either static or variable sections. The valid variables to use in the suffix path will vary by each log source. See ConfigurationTemplate$allowedSuffixPathFields for more info on what values are supported in the suffix path for each log source.
s3_enable_hive_compatible_pathbooleanThis parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.
regionstringAWS region.

For more information, see AWS::Logs::Delivery.

Methods

NameResourceAccessible byRequired Params
create_resourcedeliveriesINSERTDeliverySourceName, DeliveryDestinationArn, region
delete_resourcedeliveriesDELETEIdentifier, region
update_resourcedeliveriesUPDATEIdentifier, PatchDocument, region
list_resourcesdeliveries_list_onlySELECTregion
get_resourcedeliveriesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual delivery.

SELECT
region,
delivery_id,
arn,
delivery_source_name,
delivery_destination_arn,
delivery_destination_type,
tags,
record_fields,
field_delimiter,
s3_suffix_path,
s3_enable_hive_compatible_path
FROM awscc.logs.deliveries
WHERE
region = 'us-east-1' AND
Identifier = '{{ delivery_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new delivery resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.logs.deliveries (
DeliverySourceName,
DeliveryDestinationArn,
region
)
SELECT
'{{ delivery_source_name }}',
'{{ delivery_destination_arn }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a delivery resource, using stack-deploy.

/*+ update */
UPDATE awscc.logs.deliveries
SET PatchDocument = string('{{ {
"Tags": tags,
"RecordFields": record_fields,
"FieldDelimiter": field_delimiter,
"S3SuffixPath": s3_suffix_path,
"S3EnableHiveCompatiblePath": s3_enable_hive_compatible_path
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ delivery_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.logs.deliveries
WHERE
Identifier = '{{ delivery_id }}' AND
region = 'us-east-1';

Permissions

To operate on the deliveries resource, the following permissions are required:

logs:CreateDelivery,
logs:GetDelivery,
logs:DescribeDeliveries,
logs:ListTagsForResource,
logs:TagResource,
logs:GetDeliverySource,
logs:GetDeliveryDestination