sinks
Creates, updates, deletes, gets or lists a sinks resource.
Overview
| Name | sinks |
| Type | Resource |
| Id | aws.oam.sinks |
Fields
The following fields are returned by SELECT queries:
- get_sink
- list_sinks
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the sink. |
id | string | The random ID string that Amazon Web Services generated as part of the sink ARN. |
name | string | The name of the sink. |
tags | object | The tags assigned to the sink. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the sink. |
id | string | The random ID string that Amazon Web Services generated as part of the sink ARN. |
name | string | The name of the sink. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_sink | select | region | 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. | |
list_sinks | select | region | Use this operation in a monitoring account to return the list of sinks created in that account. | |
create_sink | insert | region | 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. | |
delete_sink | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_sink
- list_sinks
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
;
Use this operation in a monitoring account to return the list of sinks created in that account.
SELECT
arn,
id,
name
FROM aws.oam.sinks
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_sink
- Manifest
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
;
# Description fields are for documentation purposes
- name: sinks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the sinks resource.
- name: Name
value: "{{ Name }}"
- name: Tags
value: "{{ Tags }}"
DELETE examples
- delete_sink
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
;