account_links
Creates, updates, deletes, gets or lists an account_links resource.
Overview
| Name | account_links |
| Type | Resource |
| Id | aws.workspaces.account_links |
Fields
The following fields are returned by SELECT queries:
- get_account_link
| Name | Datatype | Description |
|---|---|---|
account_link_id | string | The identifier of the account link. (pattern: <code>^link-.{8,24}$</code>) |
account_link_status | string | The status of the account link. (LINKED, LINKING_FAILED, LINK_NOT_FOUND, PENDING_ACCEPTANCE_BY_TARGET_ACCOUNT, REJECTED) |
source_account_id | string | The identifier of the source account. (pattern: <code>^\d{12}$</code>) |
target_account_id | string | The identifier of the target account. (pattern: <code>^\d{12}$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_account_link | select | region | Retrieves account link information. | |
create_account_link_invitation | insert | region, TargetAccountId | Creates the account link invitation. | |
delete_account_link_invitation | delete | region | Deletes the account link invitation. | |
accept_account_link_invitation | exec | region, LinkId | Accepts the account link invitation. There's currently no unlinking capability after you accept the account linking invitation. | |
list_account_links | exec | region | Lists all account links. | |
reject_account_link_invitation | exec | region, LinkId | Rejects the account link invitation. |
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_account_link
Retrieves account link information.
SELECT
account_link_id,
account_link_status,
source_account_id,
target_account_id
FROM aws.workspaces.account_links
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_account_link_invitation
- Manifest
Creates the account link invitation.
INSERT INTO aws.workspaces.account_links (
TargetAccountId,
ClientToken,
region
)
SELECT
'{{ TargetAccountId }}' /* required */,
'{{ ClientToken }}',
'{{ region }}'
RETURNING
account_link
;
# Description fields are for documentation purposes
- name: account_links
props:
- name: region
value: "{{ region }}"
description: Required parameter for the account_links resource.
- name: TargetAccountId
value: "{{ TargetAccountId }}"
description: |
The identifier of the target account.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A string of up to 64 ASCII characters that Amazon WorkSpaces uses to ensure idempotent creation.
DELETE examples
- delete_account_link_invitation
Deletes the account link invitation.
DELETE FROM aws.workspaces.account_links
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- accept_account_link_invitation
- list_account_links
- reject_account_link_invitation
Accepts the account link invitation. There's currently no unlinking capability after you accept the account linking invitation.
EXEC aws.workspaces.account_links.accept_account_link_invitation
@region='{{ region }}' --required
@@json=
'{
"LinkId": "{{ LinkId }}",
"ClientToken": "{{ ClientToken }}"
}'
;
Lists all account links.
EXEC aws.workspaces.account_links.list_account_links
@region='{{ region }}' --required
@@json=
'{
"LinkStatusFilter": "{{ LinkStatusFilter }}",
"NextToken": "{{ NextToken }}",
"MaxResults": {{ MaxResults }}
}'
;
Rejects the account link invitation.
EXEC aws.workspaces.account_links.reject_account_link_invitation
@region='{{ region }}' --required
@@json=
'{
"LinkId": "{{ LinkId }}",
"ClientToken": "{{ ClientToken }}"
}'
;