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 | aws.vpclattice.service_network_vpc_associations |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all service_network_vpc_associations
in a region.
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 aws.vpclattice.service_network_vpc_associations
WHERE region = 'us-east-1';
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 aws.vpclattice.service_network_vpc_associations
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
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 aws.vpclattice.service_network_vpc_associations (
SecurityGroupIds,
ServiceNetworkIdentifier,
VpcIdentifier,
Tags,
region
)
SELECT
'{{ SecurityGroupIds }}',
'{{ ServiceNetworkIdentifier }}',
'{{ VpcIdentifier }}',
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.vpclattice.service_network_vpc_associations (
SecurityGroupIds,
ServiceNetworkIdentifier,
VpcIdentifier,
Tags,
region
)
SELECT
'{{ SecurityGroupIds }}',
'{{ ServiceNetworkIdentifier }}',
'{{ VpcIdentifier }}',
'{{ 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: SecurityGroupIds
value:
- '{{ SecurityGroupIds[0] }}'
- name: ServiceNetworkIdentifier
value: '{{ ServiceNetworkIdentifier }}'
- name: VpcIdentifier
value: '{{ VpcIdentifier }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.vpclattice.service_network_vpc_associations
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the service_network_vpc_associations
resource, the following permissions are required:
Create
vpc-lattice:CreateServiceNetworkVpcAssociation,
vpc-lattice:GetServiceNetworkVpcAssociation,
vpc-lattice:ListServiceNetworkVpcAssociations,
vpc-lattice:ListTagsForResource,
ec2:DescribeSecurityGroups,
ec2:DescribeVpcs,
vpc-lattice:TagResource
Read
vpc-lattice:GetServiceNetworkVpcAssociation,
vpc-lattice:ListTagsForResource
Update
vpc-lattice:TagResource,
vpc-lattice:UntagResource,
vpc-lattice:GetServiceNetworkVpcAssociation,
vpc-lattice:UpdateServiceNetworkVpcAssociation,
ec2:DescribeSecurityGroups,
vpc-lattice:ListTagsForResource
Delete
vpc-lattice:DeleteServiceNetworkVpcAssociation,
vpc-lattice:GetServiceNetworkVpcAssociation
List
vpc-lattice:ListServiceNetworkVpcAssociations