links
Creates, updates, deletes or gets a link resource or lists links in a region
Overview
| Name | links |
| Type | Resource |
| Description | Definition of AWS::Oam::Link Resource Type |
| Id | awscc.oam.links |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
label | string | |
label_template | string | |
resource_types | array | |
sink_identifier | string | |
link_configuration | object | |
tags | object | Tags to apply to the link |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::Oam::Link.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | links | INSERT | ResourceTypes, SinkIdentifier, region |
delete_resource | links | DELETE | Identifier, region |
update_resource | links | UPDATE | Identifier, PatchDocument, region |
list_resources | links_list_only | SELECT | region |
get_resource | links | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual link.
SELECT
region,
arn,
label,
label_template,
resource_types,
sink_identifier,
link_configuration,
tags
FROM awscc.oam.links
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all links in a region.
SELECT
region,
arn
FROM awscc.oam.links_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new link resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.oam.links (
ResourceTypes,
SinkIdentifier,
region
)
SELECT
'{{ resource_types }}',
'{{ sink_identifier }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.oam.links (
LabelTemplate,
ResourceTypes,
SinkIdentifier,
LinkConfiguration,
Tags,
region
)
SELECT
'{{ label_template }}',
'{{ resource_types }}',
'{{ sink_identifier }}',
'{{ link_configuration }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: link
props:
- name: label_template
value: '{{ label_template }}'
- name: resource_types
value:
- '{{ resource_types[0] }}'
- name: sink_identifier
value: '{{ sink_identifier }}'
- name: link_configuration
value:
metric_configuration:
filter: '{{ filter }}'
log_group_configuration: null
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a link resource, using stack-deploy.
/*+ update */
UPDATE awscc.oam.links
SET PatchDocument = string('{{ {
"ResourceTypes": resource_types,
"LinkConfiguration": link_configuration,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.oam.links
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the links resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
oam:CreateLink,
oam:GetLink,
oam:TagResource,
oam:ListTagsForResource,
cloudwatch:Link,
logs:Link,
xray:Link,
applicationinsights:Link,
internetmonitor:Link,
application-signals:Link
oam:GetLink,
oam:ListTagsForResource
oam:GetLink,
oam:UpdateLink,
cloudwatch:Link,
logs:Link,
xray:Link,
applicationinsights:Link,
internetmonitor:Link,
application-signals:Link,
oam:TagResource,
oam:UntagResource,
oam:ListTagsForResource
oam:DeleteLink,
oam:GetLink
oam:ListLinks