Skip to main content

attachments

Creates, updates, deletes, gets or lists an attachments resource.

Overview

Nameattachments
TypeResource
Idaws.networkmanager.attachments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attachment_idstringThe ID of the attachment. (pattern: <code>^attachment-([0-9a-f]{8,17})$</code>)
attachment_policy_rule_numberintegerThe policy rule number associated with the attachment.
attachment_typestringThe type of attachment. (CONNECT, SITE_TO_SITE_VPN, VPC, DIRECT_CONNECT_GATEWAY, TRANSIT_GATEWAY_ROUTE_TABLE)
core_network_arnstringThe ARN of a core network. (pattern: <code>[\s\S]*</code>)
core_network_idstringThe ID of a core network. (pattern: <code>^core-network-([0-9a-f]{8,17})$</code>)
created_atstring (date-time)The timestamp when the attachment was created.
edge_locationstringThe 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_locationsarrayThe 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_errorsarrayDescribes the error associated with the attachment request.
network_function_group_namestringThe name of the network function group. (pattern: <code>[\s\S]*</code>)
owner_account_idstringThe ID of the attachment account owner. (pattern: <code>[\s\S]*</code>)
proposed_network_function_group_changeobjectDescribes a proposed change to a network function group associated with the attachment.
proposed_segment_changeobjectThe attachment to move from one segment to another.
resource_arnstringThe attachment resource ARN. (pattern: <code>[\s\S]*</code>)
segment_namestringThe name of the segment attachment. (pattern: <code>[\s\S]*</code>)
statestringThe state of the attachment. (REJECTED, PENDING_ATTACHMENT_ACCEPTANCE, CREATING, FAILED, AVAILABLE, UPDATING, PENDING_NETWORK_UPDATE, PENDING_TAG_ACCEPTANCE, DELETING)
tagsarrayThe tags associated with the attachment.
updated_atstring (date-time)The timestamp when the attachment was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_attachmentsselectregioncoreNetworkId, attachmentType, edgeLocation, state, maxResults, nextTokenReturns a list of core network attachments.
remove_attachment_routing_policy_labelupdatecore_network_id, attachment_id, regionRemoves a routing policy label from an attachment.
put_attachment_routing_policy_labelreplaceregion, CoreNetworkId, AttachmentId, RoutingPolicyLabelApplies a routing policy label to an attachment for traffic routing decisions.
delete_attachmentdeleteattachment_id, regionDeletes an attachment. Supports all attachment types.
accept_attachmentexecattachment_id, regionAccepts 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_attachmentexecattachment_id, regionRejects 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.

NameDatatypeDescription
attachment_idstringThe ID of the attachment.
core_network_idstringThe ID of the core network containing the attachment.
regionstringAWS region (default: us-east-1)
attachmentTypestringThe type of attachment.
coreNetworkIdstringThe ID of a core network.
edgeLocationstringThe Region where the edge is located.
maxResultsintegerThe maximum number of results to return.
nextTokenstringThe token for the next page of results.
statestringThe state of the attachment.

SELECT examples

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

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

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

Deletes an attachment. Supports all attachment types.

DELETE FROM aws.networkmanager.attachments
WHERE attachment_id = '{{ attachment_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

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
;