Skip to main content

sinks

Creates, updates, deletes, gets or lists a sinks resource.

Overview

Namesinks
TypeResource
Idaws.oam.sinks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN of the sink.
idstringThe random ID string that Amazon Web Services generated as part of the sink ARN.
namestringThe name of the sink.
tagsobjectThe tags assigned to the sink.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_sinkselectregionReturns complete information about one monitoring account sink. To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.
list_sinksselectregionUse this operation in a monitoring account to return the list of sinks created in that account.
create_sinkinsertregionUse this to create a sink in the current account, so that it can be used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that represents an attachment point in a monitoring account. Source accounts can link to the sink to send observability data. After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see PutSinkPolicy. Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.
delete_sinkdeleteregionDeletes a sink. You must delete all links to a sink before you can delete that sink.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns complete information about one monitoring account sink. To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.

SELECT
arn,
id,
name,
tags
FROM aws.oam.sinks
WHERE region = '{{ region }}' -- required
;

INSERT examples

Use this to create a sink in the current account, so that it can be used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that represents an attachment point in a monitoring account. Source accounts can link to the sink to send observability data. After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see PutSinkPolicy. Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.

INSERT INTO aws.oam.sinks (
Name,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
arn,
id,
name,
tags
;

DELETE examples

Deletes a sink. You must delete all links to a sink before you can delete that sink.

DELETE FROM aws.oam.sinks
WHERE region = '{{ region }}' --required
;