delivery_sources
Creates, updates, deletes, gets or lists a delivery_sources resource.
Overview
| Name | delivery_sources |
| Type | Resource |
| Id | aws.logs.delivery_sources |
Fields
The following fields are returned by SELECT queries:
- get_delivery_source
- describe_delivery_sources
| Name | Datatype | Description |
|---|---|---|
name | string | The unique name of the delivery source. (pattern: <code>[\w-]*</code>) |
arn | string | The Amazon Resource Name (ARN) that uniquely identifies this delivery source. |
delivery_source_configuration | object | The map of key-value pairs that configure the delivery source. |
log_type | string | The type of log that the source is sending. For valid values for this parameter, see the documentation for the source service. (pattern: <code>[\w]*</code>) |
resource_arns | array | This array contains the ARN of the Amazon Web Services resource that sends logs and is represented by this delivery source. Currently, only one ARN can be in the array. |
service | string | The Amazon Web Services service that is sending logs. (pattern: <code>[\w_-]*</code>) |
status | string | The status of the delivery source. A delivery source can have the status ACTIVE or INACTIVE. Note: This value is defined for selective log types. (ACTIVE, INACTIVE) |
status_reason | string | The reason for the status of the delivery source. A status reason of RESOURCE_DELETED indicates that the resource associated with the delivery source has been deleted. Note: This value is defined for selective log types. (RESOURCE_DELETED) |
tags | object | The tags that have been assigned to this delivery source. |
| Name | Datatype | Description |
|---|---|---|
name | string | The unique name of the delivery source. (pattern: <code>[\w-]*</code>) |
arn | string | The Amazon Resource Name (ARN) that uniquely identifies this delivery source. |
delivery_source_configuration | object | The map of key-value pairs that configure the delivery source. |
log_type | string | The type of log that the source is sending. For valid values for this parameter, see the documentation for the source service. (pattern: <code>[\w]*</code>) |
resource_arns | array | This array contains the ARN of the Amazon Web Services resource that sends logs and is represented by this delivery source. Currently, only one ARN can be in the array. |
service | string | The Amazon Web Services service that is sending logs. (pattern: <code>[\w_-]*</code>) |
status | string | The status of the delivery source. A delivery source can have the status ACTIVE or INACTIVE. Note: This value is defined for selective log types. (ACTIVE, INACTIVE) |
status_reason | string | The reason for the status of the delivery source. A status reason of RESOURCE_DELETED indicates that the resource associated with the delivery source has been deleted. Note: This value is defined for selective log types. (RESOURCE_DELETED) |
tags | object | The tags that have been assigned to this delivery source. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_delivery_source | select | region | Retrieves complete information about one delivery source. | |
describe_delivery_sources | select | region | Retrieves a list of the delivery sources that have been created in the account. | |
put_delivery_source | replace | region, name, resourceArn, logType | Creates or updates a logical delivery source. A delivery source represents an Amazon Web Services resource that sends logs to an logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, Firehose or X-Ray for sending traces. To configure logs delivery between a delivery destination and an Amazon Web Services service that is supported as a delivery source, you must do the following: Use PutDeliverySource to create a delivery source, which is a logical object that represents the resource that is actually sending the logs. Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual delivery destination. For more information, see PutDeliveryDestination. If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination. Use CreateDelivery to create a delivery by pairing exactly one delivery source and one delivery destination. For more information, see CreateDelivery. You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination. Only some Amazon Web Services services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at Enabling logging from Amazon Web Services services. If you use this operation to update an existing delivery source, all the current delivery source parameters are overwritten with the new parameter values that you specify. | |
delete_delivery_source | delete | region | Deletes a delivery source. A delivery is a connection between a logical delivery source and a logical delivery destination. You can't delete a delivery source if any current deliveries are associated with it. To find whether any deliveries are associated with this delivery source, use the DescribeDeliveries operation and check the deliverySourceName field in the results. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_delivery_source
- describe_delivery_sources
Retrieves complete information about one delivery source.
SELECT
name,
arn,
delivery_source_configuration,
log_type,
resource_arns,
service,
status,
status_reason,
tags
FROM aws.logs.delivery_sources
WHERE region = '{{ region }}' -- required
;
Retrieves a list of the delivery sources that have been created in the account.
SELECT
name,
arn,
delivery_source_configuration,
log_type,
resource_arns,
service,
status,
status_reason,
tags
FROM aws.logs.delivery_sources
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_delivery_source
Creates or updates a logical delivery source. A delivery source represents an Amazon Web Services resource that sends logs to an logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, Firehose or X-Ray for sending traces. To configure logs delivery between a delivery destination and an Amazon Web Services service that is supported as a delivery source, you must do the following: Use PutDeliverySource to create a delivery source, which is a logical object that represents the resource that is actually sending the logs. Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual delivery destination. For more information, see PutDeliveryDestination. If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy in the destination account to assign an IAM policy to the destination. This policy allows delivery to that destination. Use CreateDelivery to create a delivery by pairing exactly one delivery source and one delivery destination. For more information, see CreateDelivery. You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination. Only some Amazon Web Services services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at Enabling logging from Amazon Web Services services. If you use this operation to update an existing delivery source, all the current delivery source parameters are overwritten with the new parameter values that you specify.
REPLACE aws.logs.delivery_sources
SET
name = '{{ name }}',
resourceArn = '{{ resourceArn }}',
logType = '{{ logType }}',
tags = '{{ tags }}',
deliverySourceConfiguration = '{{ deliverySourceConfiguration }}'
WHERE
region = '{{ region }}' --required
AND name = '{{ name }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND logType = '{{ logType }}' --required
RETURNING
delivery_source;
DELETE examples
- delete_delivery_source
Deletes a delivery source. A delivery is a connection between a logical delivery source and a logical delivery destination. You can't delete a delivery source if any current deliveries are associated with it. To find whether any deliveries are associated with this delivery source, use the DescribeDeliveries operation and check the deliverySourceName field in the results.
DELETE FROM aws.logs.delivery_sources
WHERE region = '{{ region }}' --required
;