attachments
Creates, updates, deletes, gets or lists an attachments resource.
Overview
| Name | attachments |
| Type | Resource |
| Id | aws.networkmanager.attachments |
Fields
The following fields are returned by SELECT queries:
- list_attachments
| Name | Datatype | Description |
|---|---|---|
attachment_id | string | The ID of the attachment. (pattern: <code>^attachment-([0-9a-f]{8,17})$</code>) |
attachment_policy_rule_number | integer | The policy rule number associated with the attachment. |
attachment_type | string | The type of attachment. (CONNECT, SITE_TO_SITE_VPN, VPC, DIRECT_CONNECT_GATEWAY, TRANSIT_GATEWAY_ROUTE_TABLE) |
core_network_arn | string | The ARN of a core network. (pattern: <code>[\s\S]*</code>) |
core_network_id | string | The ID of a core network. (pattern: <code>^core-network-([0-9a-f]{8,17})$</code>) |
created_at | string (date-time) | The timestamp when the attachment was created. |
edge_location | string | The Region where the edge is located. This is returned for all attachment types except a Direct Connect gateway attachment, which instead returns EdgeLocations. (pattern: <code>[\s\S]*</code>) |
edge_locations | array | The edge locations that the Direct Connect gateway is associated with. This is returned only for Direct Connect gateway attachments. All other attachment types retrun EdgeLocation. |
last_modification_errors | array | Describes the error associated with the attachment request. |
network_function_group_name | string | The name of the network function group. (pattern: <code>[\s\S]*</code>) |
owner_account_id | string | The ID of the attachment account owner. (pattern: <code>[\s\S]*</code>) |
proposed_network_function_group_change | object | Describes a proposed change to a network function group associated with the attachment. |
proposed_segment_change | object | The attachment to move from one segment to another. |
resource_arn | string | The attachment resource ARN. (pattern: <code>[\s\S]*</code>) |
segment_name | string | The name of the segment attachment. (pattern: <code>[\s\S]*</code>) |
state | string | The state of the attachment. (REJECTED, PENDING_ATTACHMENT_ACCEPTANCE, CREATING, FAILED, AVAILABLE, UPDATING, PENDING_NETWORK_UPDATE, PENDING_TAG_ACCEPTANCE, DELETING) |
tags | array | The tags associated with the attachment. |
updated_at | string (date-time) | The timestamp when the attachment was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_attachments | select | region | coreNetworkId, attachmentType, edgeLocation, state, maxResults, nextToken | Returns a list of core network attachments. |
remove_attachment_routing_policy_label | update | core_network_id, attachment_id, region | Removes a routing policy label from an attachment. | |
put_attachment_routing_policy_label | replace | region, CoreNetworkId, AttachmentId, RoutingPolicyLabel | Applies a routing policy label to an attachment for traffic routing decisions. | |
delete_attachment | delete | attachment_id, region | Deletes an attachment. Supports all attachment types. | |
accept_attachment | exec | attachment_id, region | Accepts a core network attachment request. Once the attachment request is accepted by a core network owner, the attachment is created and connected to a core network. | |
reject_attachment | exec | attachment_id, region | Rejects a core network attachment request. |
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 |
|---|---|---|
attachment_id | string | The ID of the attachment. |
core_network_id | string | The ID of the core network containing the attachment. |
region | string | AWS region (default: us-east-1) |
attachmentType | string | The type of attachment. |
coreNetworkId | string | The ID of a core network. |
edgeLocation | string | The Region where the edge is located. |
maxResults | integer | The maximum number of results to return. |
nextToken | string | The token for the next page of results. |
state | string | The state of the attachment. |
SELECT examples
- list_attachments
Returns a list of core network attachments.
SELECT
attachment_id,
attachment_policy_rule_number,
attachment_type,
core_network_arn,
core_network_id,
created_at,
edge_location,
edge_locations,
last_modification_errors,
network_function_group_name,
owner_account_id,
proposed_network_function_group_change,
proposed_segment_change,
resource_arn,
segment_name,
state,
tags,
updated_at
FROM aws.networkmanager.attachments
WHERE region = '{{ region }}' -- required
AND coreNetworkId = '{{ coreNetworkId }}'
AND attachmentType = '{{ attachmentType }}'
AND edgeLocation = '{{ edgeLocation }}'
AND state = '{{ state }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
UPDATE examples
- remove_attachment_routing_policy_label
Removes a routing policy label from an attachment.
UPDATE aws.networkmanager.attachments
SET
-- No updatable properties
WHERE
core_network_id = '{{ core_network_id }}' --required
AND attachment_id = '{{ attachment_id }}' --required
AND region = '{{ region }}' --required
RETURNING
attachment_id,
core_network_id,
routing_policy_label;
REPLACE examples
- put_attachment_routing_policy_label
Applies a routing policy label to an attachment for traffic routing decisions.
REPLACE aws.networkmanager.attachments
SET
CoreNetworkId = '{{ CoreNetworkId }}',
AttachmentId = '{{ AttachmentId }}',
RoutingPolicyLabel = '{{ RoutingPolicyLabel }}',
ClientToken = '{{ ClientToken }}'
WHERE
region = '{{ region }}' --required
AND CoreNetworkId = '{{ CoreNetworkId }}' --required
AND AttachmentId = '{{ AttachmentId }}' --required
AND RoutingPolicyLabel = '{{ RoutingPolicyLabel }}' --required
RETURNING
attachment_id,
core_network_id,
routing_policy_label;
DELETE examples
- delete_attachment
Deletes an attachment. Supports all attachment types.
DELETE FROM aws.networkmanager.attachments
WHERE attachment_id = '{{ attachment_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- accept_attachment
- reject_attachment
Accepts a core network attachment request. Once the attachment request is accepted by a core network owner, the attachment is created and connected to a core network.
EXEC aws.networkmanager.attachments.accept_attachment
@attachment_id='{{ attachment_id }}' --required,
@region='{{ region }}' --required
;
Rejects a core network attachment request.
EXEC aws.networkmanager.attachments.reject_attachment
@attachment_id='{{ attachment_id }}' --required,
@region='{{ region }}' --required
;