Skip to main content

service_network_vpc_associations

Creates, updates, deletes or gets a service_network_vpc_association resource or lists service_network_vpc_associations in a region

Overview

Nameservice_network_vpc_associations
TypeResource
DescriptionAssociates a VPC with a service network.
Idawscc.vpclattice.service_network_vpc_associations

Fields

NameDatatypeDescription
arnstring
created_atstring
security_group_idsarray
idstring
service_network_arnstring
service_network_idstring
service_network_identifierstring
service_network_namestring
statusstring
vpc_idstring
vpc_identifierstring
tagsarray
regionstringAWS region.

For more information, see AWS::VpcLattice::ServiceNetworkVpcAssociation.

Methods

NameResourceAccessible byRequired Params
create_resourceservice_network_vpc_associationsINSERTregion
delete_resourceservice_network_vpc_associationsDELETEIdentifier, region
update_resourceservice_network_vpc_associationsUPDATEIdentifier, PatchDocument, region
list_resourcesservice_network_vpc_associations_list_onlySELECTregion
get_resourceservice_network_vpc_associationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual service_network_vpc_association.

SELECT
region,
arn,
created_at,
security_group_ids,
id,
service_network_arn,
service_network_id,
service_network_identifier,
service_network_name,
status,
vpc_id,
vpc_identifier,
tags
FROM awscc.vpclattice.service_network_vpc_associations
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.vpclattice.service_network_vpc_associations (
SecurityGroupIds,
ServiceNetworkIdentifier,
VpcIdentifier,
Tags,
region
)
SELECT
'{{ security_group_ids }}',
'{{ service_network_identifier }}',
'{{ vpc_identifier }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.vpclattice.service_network_vpc_associations
SET PatchDocument = string('{{ {
"SecurityGroupIds": security_group_ids,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.vpclattice.service_network_vpc_associations
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

vpc-lattice:CreateServiceNetworkVpcAssociation,
vpc-lattice:GetServiceNetworkVpcAssociation,
vpc-lattice:ListServiceNetworkVpcAssociations,
vpc-lattice:ListTagsForResource,
ec2:DescribeSecurityGroups,
ec2:DescribeVpcs,
vpc-lattice:TagResource