cross_account_attachments
Creates, updates, deletes or gets a cross_account_attachment resource or lists cross_account_attachments in a region
Overview
| Name | cross_account_attachments |
| Type | Resource |
| Description | Resource Type definition for AWS::GlobalAccelerator::CrossAccountAttachment |
| Id | awscc.globalaccelerator.cross_account_attachments |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | The Friendly identifier of the attachment. |
attachment_arn | string | The Amazon Resource Name (ARN) of the attachment. |
principals | array | Principals to share the resources with. |
resources | array | Resources shared using the attachment. |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
attachment_arn | string | The Amazon Resource Name (ARN) of the attachment. |
region | string | AWS region. |
For more information, see AWS::GlobalAccelerator::CrossAccountAttachment.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | cross_account_attachments | INSERT | Name, region |
delete_resource | cross_account_attachments | DELETE | Identifier, region |
update_resource | cross_account_attachments | UPDATE | Identifier, PatchDocument, region |
list_resources | cross_account_attachments_list_only | SELECT | region |
get_resource | cross_account_attachments | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual cross_account_attachment.
SELECT
region,
name,
attachment_arn,
principals,
resources,
tags
FROM awscc.globalaccelerator.cross_account_attachments
WHERE
region = 'us-east-1' AND
Identifier = '{{ attachment_arn }}';
Lists all cross_account_attachments in a region.
SELECT
region,
attachment_arn
FROM awscc.globalaccelerator.cross_account_attachments_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new cross_account_attachment resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.globalaccelerator.cross_account_attachments (
Name,
region
)
SELECT
'{{ name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.globalaccelerator.cross_account_attachments (
Name,
Principals,
Resources,
Tags,
region
)
SELECT
'{{ name }}',
'{{ principals }}',
'{{ resources }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cross_account_attachment
props:
- name: name
value: '{{ name }}'
- name: principals
value:
- '{{ principals[0] }}'
- name: resources
value:
- endpoint_id: '{{ endpoint_id }}'
cidr: '{{ cidr }}'
region: '{{ region }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a cross_account_attachment resource, using stack-deploy.
/*+ update */
UPDATE awscc.globalaccelerator.cross_account_attachments
SET PatchDocument = string('{{ {
"Name": name,
"Principals": principals,
"Resources": resources,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ attachment_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.globalaccelerator.cross_account_attachments
WHERE
Identifier = '{{ attachment_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the cross_account_attachments resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
globalaccelerator:DescribeCrossAccountAttachment,
globalaccelerator:CreateCrossAccountAttachment,
globalaccelerator:TagResource
globalaccelerator:DescribeCrossAccountAttachment
globalaccelerator:UpdateCrossAccountAttachment,
globalaccelerator:DescribeCrossAccountAttachment,
globalaccelerator:TagResource,
globalaccelerator:UntagResource
globalaccelerator:DescribeCrossAccountAttachment,
globalaccelerator:DeleteCrossAccountAttachment
globalaccelerator:ListCrossAccountAttachments