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
Description
A 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.
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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.logs.delivery_sources
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:

ParameterDescription
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_sources resource, the following permissions are required:

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