deliveries
Creates, updates, deletes or gets a delivery resource or lists deliveries in a region
Overview
| Name | deliveries |
| Type | Resource |
| Description | This 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. |
| Id | awscc.logs.deliveries |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
delivery_id | string | The unique ID that identifies this delivery in your account. |
arn | string | The Amazon Resource Name (ARN) that uniquely identifies this delivery. |
delivery_source_name | string | The name of the delivery source that is associated with this delivery. |
delivery_destination_type | string | Displays whether the delivery destination associated with this delivery is CloudWatch Logs, Amazon S3, or Kinesis Data Firehose. |
tags | array | The tags that have been assigned to this delivery. |
record_fields | array | The 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_delimiter | string | The field delimiter to use between record fields when the final output format of a delivery is in Plain , W3C , or Raw format. |
s3_suffix_path | string | This 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_path | boolean | This parameter causes the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
delivery_id | string | The unique ID that identifies this delivery in your account. |
region | string | AWS region. |
For more information, see AWS::Logs::Delivery.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | deliveries | INSERT | DeliverySourceName, DeliveryDestinationArn, region |
delete_resource | deliveries | DELETE | Identifier, region |
update_resource | deliveries | UPDATE | Identifier, PatchDocument, region |
list_resources | deliveries_list_only | SELECT | region |
get_resource | deliveries | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = '{{ region }}' AND
Identifier = '{{ delivery_id }}';
Lists all deliveries in a region.
SELECT
region,
delivery_id
FROM awscc.logs.deliveries_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new delivery resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.logs.deliveries (
DeliverySourceName,
DeliveryDestinationArn,
region
)
SELECT
'{{ delivery_source_name }}',
'{{ delivery_destination_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.logs.deliveries (
DeliverySourceName,
DeliveryDestinationArn,
Tags,
RecordFields,
FieldDelimiter,
S3SuffixPath,
S3EnableHiveCompatiblePath,
region
)
SELECT
'{{ delivery_source_name }}',
'{{ delivery_destination_arn }}',
'{{ tags }}',
'{{ record_fields }}',
'{{ field_delimiter }}',
'{{ s3_suffix_path }}',
'{{ s3_enable_hive_compatible_path }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: delivery
props:
- name: delivery_source_name
value: '{{ delivery_source_name }}'
- name: delivery_destination_arn
value: '{{ delivery_destination_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: record_fields
value:
- '{{ record_fields[0] }}'
- name: field_delimiter
value: '{{ field_delimiter }}'
- name: s3_suffix_path
value: '{{ s3_suffix_path }}'
- name: s3_enable_hive_compatible_path
value: '{{ s3_enable_hive_compatible_path }}'
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.logs.deliveries
WHERE
Identifier = '{{ delivery_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the deliveries resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
logs:CreateDelivery,
logs:GetDelivery,
logs:DescribeDeliveries,
logs:ListTagsForResource,
logs:TagResource,
logs:GetDeliverySource,
logs:GetDeliveryDestination
logs:GetDelivery,
logs:ListTagsForResource
logs:GetDelivery,
logs:ListTagsForResource,
logs:TagResource,
logs:UntagResource,
logs:UpdateDeliveryConfiguration
logs:DeleteDelivery,
logs:ListTagsForResource,
logs:UntagResource
logs:DescribeDeliveries,
logs:ListTagsForResource