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 | aws.logs.delivery_destinations |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of this delivery destination. |
arn | string | The Amazon Resource Name (ARN) that uniquely identifies this delivery destination. |
destination_resource_arn | string | The ARN of the AWS resource that will receive the logs. |
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 |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all delivery_destinations
in a region.
SELECT
region,
name,
arn,
destination_resource_arn,
tags,
delivery_destination_type,
delivery_destination_policy
FROM aws.logs.delivery_destinations
WHERE region = 'us-east-1';
Gets all properties from an individual delivery_destination
.
SELECT
region,
name,
arn,
destination_resource_arn,
tags,
delivery_destination_type,
delivery_destination_policy
FROM aws.logs.delivery_destinations
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';
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 aws.logs.delivery_destinations (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.logs.delivery_destinations (
Name,
DestinationResourceArn,
Tags,
DeliveryDestinationPolicy,
region
)
SELECT
'{{ Name }}',
'{{ DestinationResourceArn }}',
'{{ Tags }}',
'{{ DeliveryDestinationPolicy }}',
'{{ region }}';
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: DestinationResourceArn
value: '{{ DestinationResourceArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: DeliveryDestinationPolicy
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.logs.delivery_destinations
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';
Permissions
To operate on the delivery_destinations
resource, the following permissions are required:
Create
logs:PutDeliveryDestination,
logs:GetDeliveryDestination,
logs:ListTagsForResource,
logs:TagResource,
logs:UntagResource,
logs:PutDeliveryDestinationPolicy,
logs:GetDeliveryDestinationPolicy
Read
logs:GetDeliveryDestination,
logs:ListTagsForResource,
logs:GetDeliveryDestinationPolicy
Update
logs:PutDeliveryDestination,
logs:GetDeliveryDestination,
logs:ListTagsForResource,
logs:TagResource,
logs:UntagResource,
logs:DeleteDeliveryDestinationPolicy,
logs:PutDeliveryDestinationPolicy,
logs:GetDeliveryDestinationPolicy
Delete
logs:DeleteDeliveryDestination,
logs:DeleteDeliveryDestinationPolicy
List
logs:DescribeDeliveryDestinations,
logs:GetDeliveryDestinationPolicy