delivery_destinations
Creates, updates, deletes or gets a delivery_destination resource or lists delivery_destinations in a region
Overview
| Name | delivery_destinations |
| Type | Resource |
| Description | This structure contains information about one delivery destination in your account.A delivery destination is an AWS resource that represents an AWS service that logs can be sent to CloudWatch Logs, Amazon S3, are supported as Kinesis Data Firehose delivery destinations. |
| Id | awscc.logs.delivery_destinations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | The name of this delivery destination. |
arn | string | The Amazon Resource Name (ARN) that uniquely identifies this delivery destination. |
tags | array | The tags that have been assigned to this delivery destination. |
delivery_destination_type | string | Displays whether this delivery destination is CloudWatch Logs, Amazon S3, or Kinesis Data Firehose. |
delivery_destination_policy | object | IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account.The policy must be in JSON string format.Length Constraints: Maximum length of 51200 |
output_format | string | The format of the logs that are sent to this delivery destination. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of this delivery destination. |
region | string | AWS region. |
For more information, see AWS::Logs::DeliveryDestination.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | delivery_destinations | INSERT | Name, region |
delete_resource | delivery_destinations | DELETE | Identifier, region |
update_resource | delivery_destinations | UPDATE | Identifier, PatchDocument, region |
list_resources | delivery_destinations_list_only | SELECT | region |
get_resource | delivery_destinations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual delivery_destination.
SELECT
region,
name,
arn,
destination_resource_arn,
tags,
delivery_destination_type,
delivery_destination_policy,
output_format
FROM awscc.logs.delivery_destinations
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';
Lists all delivery_destinations in a region.
SELECT
region,
name
FROM awscc.logs.delivery_destinations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new delivery_destination resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.logs.delivery_destinations (
Name,
region
)
SELECT
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.logs.delivery_destinations (
Name,
DestinationResourceArn,
Tags,
DeliveryDestinationPolicy,
OutputFormat,
region
)
SELECT
'{{ name }}',
'{{ destination_resource_arn }}',
'{{ tags }}',
'{{ delivery_destination_policy }}',
'{{ output_format }}',
'{{ 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_destination
props:
- name: name
value: '{{ name }}'
- name: destination_resource_arn
value: '{{ destination_resource_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: delivery_destination_policy
value:
delivery_destination_name: '{{ delivery_destination_name }}'
delivery_destination_policy: {}
- name: output_format
value: '{{ output_format }}'
UPDATE example
Use the following StackQL query and manifest file to update a delivery_destination resource, using stack-deploy.
/*+ update */
UPDATE awscc.logs.delivery_destinations
SET PatchDocument = string('{{ {
"Tags": tags,
"DeliveryDestinationPolicy": delivery_destination_policy
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.logs.delivery_destinations
WHERE
Identifier = '{{ name }}' 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 delivery_destinations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
logs:PutDeliveryDestination,
logs:GetDeliveryDestination,
logs:ListTagsForResource,
logs:TagResource,
logs:UntagResource,
logs:PutDeliveryDestinationPolicy,
logs:GetDeliveryDestinationPolicy
logs:GetDeliveryDestination,
logs:ListTagsForResource,
logs:GetDeliveryDestinationPolicy
logs:PutDeliveryDestination,
logs:GetDeliveryDestination,
logs:ListTagsForResource,
logs:TagResource,
logs:UntagResource,
logs:DeleteDeliveryDestinationPolicy,
logs:PutDeliveryDestinationPolicy,
logs:GetDeliveryDestinationPolicy
logs:DeleteDeliveryDestination,
logs:DeleteDeliveryDestinationPolicy
logs:DescribeDeliveryDestinations,
logs:GetDeliveryDestinationPolicy