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
| Name | service_network_vpc_associations |
| Type | Resource |
| Description | Associates a VPC with a service network. |
| Id | awscc.vpclattice.service_network_vpc_associations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
created_at | string | |
security_group_ids | array | |
id | string | |
service_network_arn | string | |
service_network_id | string | |
service_network_identifier | string | |
service_network_name | string | |
status | string | |
vpc_id | string | |
vpc_identifier | string | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::VpcLattice::ServiceNetworkVpcAssociation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | service_network_vpc_associations | INSERT | region |
delete_resource | service_network_vpc_associations | DELETE | Identifier, region |
update_resource | service_network_vpc_associations | UPDATE | Identifier, PatchDocument, region |
list_resources | service_network_vpc_associations_list_only | SELECT | region |
get_resource | service_network_vpc_associations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all service_network_vpc_associations in a region.
SELECT
region,
arn
FROM awscc.vpclattice.service_network_vpc_associations_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new service_network_vpc_association resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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 }}';
/*+ 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 }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service_network_vpc_association
props:
- name: security_group_ids
value:
- '{{ security_group_ids[0] }}'
- name: service_network_identifier
value: '{{ service_network_identifier }}'
- name: vpc_identifier
value: '{{ vpc_identifier }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.vpclattice.service_network_vpc_associations
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the service_network_vpc_associations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
vpc-lattice:CreateServiceNetworkVpcAssociation,
vpc-lattice:GetServiceNetworkVpcAssociation,
vpc-lattice:ListServiceNetworkVpcAssociations,
vpc-lattice:ListTagsForResource,
ec2:DescribeSecurityGroups,
ec2:DescribeVpcs,
vpc-lattice:TagResource
vpc-lattice:GetServiceNetworkVpcAssociation,
vpc-lattice:ListTagsForResource
vpc-lattice:TagResource,
vpc-lattice:UntagResource,
vpc-lattice:GetServiceNetworkVpcAssociation,
vpc-lattice:UpdateServiceNetworkVpcAssociation,
ec2:DescribeSecurityGroups,
vpc-lattice:ListTagsForResource
vpc-lattice:DeleteServiceNetworkVpcAssociation,
vpc-lattice:GetServiceNetworkVpcAssociation,
vpc-lattice:UntagResource
vpc-lattice:ListServiceNetworkVpcAssociations