Skip to main content

security_group_vpc_associations

Creates, updates, deletes or gets a security_group_vpc_association resource or lists security_group_vpc_associations in a region

Overview

Namesecurity_group_vpc_associations
TypeResource
DescriptionResource type definition for the AWS::EC2::SecurityGroupVpcAssociation resource
Idaws.ec2.security_group_vpc_associations

Fields

NameDatatypeDescription
group_idstringThe group ID of the specified security group.
vpc_idstringThe ID of the VPC in the security group vpc association.
vpc_owner_idstringThe owner of the VPC in the security group vpc association.
statestringThe state of the security group vpc association.
state_reasonstringThe reason for the state of the security group vpc association.
regionstringAWS region.

For more information, see AWS::EC2::SecurityGroupVpcAssociation.

Methods

NameAccessible byRequired Params
create_resourceINSERTGroupId, VpcId, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all security_group_vpc_associations in a region.

SELECT
region,
group_id,
vpc_id,
vpc_owner_id,
state,
state_reason
FROM aws.ec2.security_group_vpc_associations
WHERE region = 'us-east-1';

Gets all properties from an individual security_group_vpc_association.

SELECT
region,
group_id,
vpc_id,
vpc_owner_id,
state,
state_reason
FROM aws.ec2.security_group_vpc_associations
WHERE region = 'us-east-1' AND data__Identifier = '<GroupId>|<VpcId>';

INSERT example

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

/*+ create */
INSERT INTO aws.ec2.security_group_vpc_associations (
GroupId,
VpcId,
region
)
SELECT
'{{ GroupId }}',
'{{ VpcId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.ec2.security_group_vpc_associations
WHERE data__Identifier = '<GroupId|VpcId>'
AND region = 'us-east-1';

Permissions

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

Create

ec2:AssociateSecurityGroupVpc,
ec2:DescribeSecurityGroupVpcAssociations

Read

ec2:DescribeSecurityGroupVpcAssociations

Delete

ec2:DisassociateSecurityGroupVpc,
ec2:DescribeSecurityGroupVpcAssociations

List

ec2:DescribeSecurityGroupVpcAssociations