Skip to main content

delivery_sources

Creates, updates, deletes or gets a delivery_source resource or lists delivery_sources in a region

Overview

Namedelivery_sources
TypeResource
DescriptionA delivery source is an AWS resource that sends logs to an AWS destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
Only some AWS services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from AWS services](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html).
Idawscc.logs.delivery_sources

Fields

NameDatatypeDescription
namestringThe unique name of the Log source.
arnstringThe Amazon Resource Name (ARN) that uniquely identifies this delivery source.
resource_arnsarrayThis array contains the ARN of the AWS resource that sends logs and is represented by this delivery source. Currently, only one ARN can be in the array.
servicestringThe AWS service that is sending logs.
log_typestringThe type of logs being delivered. Only mandatory when the resourceArn could match more than one. In such a case, the error message will contain all the possible options.
tagsarrayThe tags that have been assigned to this delivery source.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcedelivery_sourcesINSERTName, region
delete_resourcedelivery_sourcesDELETEIdentifier, region
update_resourcedelivery_sourcesUPDATEIdentifier, PatchDocument, region
list_resourcesdelivery_sources_list_onlySELECTregion
get_resourcedelivery_sourcesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual delivery_source.

SELECT
region,
name,
arn,
resource_arns,
resource_arn,
service,
log_type,
tags
FROM awscc.logs.delivery_sources
WHERE
region = 'us-east-1' AND
Identifier = '{{ name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.logs.delivery_sources (
Name,
region
)
SELECT
'{{ name }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.logs.delivery_sources
SET PatchDocument = string('{{ {
"ResourceArn": resource_arn,
"LogType": log_type,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';

DELETE example

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

Permissions

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

logs:PutDeliverySource,
logs:GetDeliverySource,
logs:ListTagsForResource,
logs:TagResource,
logs:AllowVendedLogDeliveryForResource,
codewhisperer:AllowVendedLogDeliveryForResource,
autoloop:AllowVendedLogDeliveryForResource,
workmail:AllowVendedLogDeliveryForResource