Skip to main content

vpc_attachments

Creates, updates, deletes, gets or lists a vpc_attachments resource.

Overview

Namevpc_attachments
TypeResource
Idaws.networkmanager.vpc_attachments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attachmentobjectDescribes a core network attachment.
optionsobjectDescribes the VPC options.
subnet_arnsarrayThe subnet ARNs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_vpc_attachmentselectattachment_id, regionReturns information about a VPC attachment.
create_vpc_attachmentinsertregion, CoreNetworkId, VpcArn, SubnetArnsCreates a VPC attachment on an edge location of a core network.
update_vpc_attachmentupdateattachment_id, regionUpdates a VPC attachment.

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.
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about a VPC attachment.

SELECT
attachment,
options,
subnet_arns
FROM aws.networkmanager.vpc_attachments
WHERE attachment_id = '{{ attachment_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a VPC attachment on an edge location of a core network.

INSERT INTO aws.networkmanager.vpc_attachments (
CoreNetworkId,
VpcArn,
SubnetArns,
Options,
RoutingPolicyLabel,
Tags,
ClientToken,
region
)
SELECT
'{{ CoreNetworkId }}' /* required */,
'{{ VpcArn }}' /* required */,
'{{ SubnetArns }}' /* required */,
'{{ Options }}',
'{{ RoutingPolicyLabel }}',
'{{ Tags }}',
'{{ ClientToken }}',
'{{ region }}'
RETURNING
vpc_attachment
;

UPDATE examples

Updates a VPC attachment.

UPDATE aws.networkmanager.vpc_attachments
SET
AddSubnetArns = '{{ AddSubnetArns }}',
RemoveSubnetArns = '{{ RemoveSubnetArns }}',
Options = '{{ Options }}'
WHERE
attachment_id = '{{ attachment_id }}' --required
AND region = '{{ region }}' --required
RETURNING
vpc_attachment;