Skip to main content

vpc_attachments

Creates, updates, deletes or gets a vpc_attachment resource or lists vpc_attachments in a region

Overview

Namevpc_attachments
TypeResource
DescriptionAWS::NetworkManager::VpcAttachment Resoruce Type
Idawscc.networkmanager.vpc_attachments

Fields

NameDatatypeDescription
core_network_idstringThe ID of a core network for the VPC attachment.
core_network_arnstringThe ARN of a core network for the VPC attachment.
attachment_idstringId of the attachment.
owner_account_idstringOwner account of the attachment.
attachment_typestringAttachment type.
statestringState of the attachment.
edge_locationstringThe Region where the edge is located.
vpc_arnstringThe ARN of the VPC.
resource_arnstringThe ARN of the Resource.
attachment_policy_rule_numberintegerThe policy rule number associated with the attachment.
segment_namestringThe name of the segment attachment..
proposed_segment_changeobjectThe attachment to move from one segment to another.
network_function_group_namestringThe name of the network function group attachment.
proposed_network_function_group_changeobjectThe attachment to move from one network function group to another.
tagsarrayTags for the attachment.
created_atstringCreation time of the attachment.
updated_atstringLast update time of the attachment.
subnet_arnsarraySubnet Arn list
optionsobjectVpc options of the attachment.
regionstringAWS region.

For more information, see AWS::NetworkManager::VpcAttachment.

Methods

NameResourceAccessible byRequired Params
create_resourcevpc_attachmentsINSERTCoreNetworkId, VpcArn, SubnetArns, region
delete_resourcevpc_attachmentsDELETEIdentifier, region
update_resourcevpc_attachmentsUPDATEIdentifier, PatchDocument, region
list_resourcesvpc_attachments_list_onlySELECTregion
get_resourcevpc_attachmentsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual vpc_attachment.

SELECT
region,
core_network_id,
core_network_arn,
attachment_id,
owner_account_id,
attachment_type,
state,
edge_location,
vpc_arn,
resource_arn,
attachment_policy_rule_number,
segment_name,
proposed_segment_change,
network_function_group_name,
proposed_network_function_group_change,
tags,
created_at,
updated_at,
subnet_arns,
options
FROM awscc.networkmanager.vpc_attachments
WHERE
region = 'us-east-1' AND
Identifier = '{{ attachment_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new vpc_attachment resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.networkmanager.vpc_attachments (
CoreNetworkId,
VpcArn,
SubnetArns,
region
)
SELECT
'{{ core_network_id }}',
'{{ vpc_arn }}',
'{{ subnet_arns }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a vpc_attachment resource, using stack-deploy.

/*+ update */
UPDATE awscc.networkmanager.vpc_attachments
SET PatchDocument = string('{{ {
"ProposedSegmentChange": proposed_segment_change,
"ProposedNetworkFunctionGroupChange": proposed_network_function_group_change,
"Tags": tags,
"SubnetArns": subnet_arns,
"Options": options
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ attachment_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.networkmanager.vpc_attachments
WHERE
Identifier = '{{ attachment_id }}' AND
region = 'us-east-1';

Permissions

To operate on the vpc_attachments resource, the following permissions are required:

networkmanager:CreateVpcAttachment,
networkmanager:GetVpcAttachment,
networkmanager:TagResource,
ec2:DescribeRegions,
iam:CreateServiceLinkedRole