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
Name | security_group_vpc_associations |
Type | Resource |
Description | Resource type definition for the AWS::EC2::SecurityGroupVpcAssociation resource |
Id | aws.ec2.security_group_vpc_associations |
Fields
Name | Datatype | Description |
---|---|---|
group_id | string | The group ID of the specified security group. |
vpc_id | string | The ID of the VPC in the security group vpc association. |
vpc_owner_id | string | The owner of the VPC in the security group vpc association. |
state | string | The state of the security group vpc association. |
state_reason | string | The reason for the state of the security group vpc association. |
region | string | AWS region. |
For more information, see AWS::EC2::SecurityGroupVpcAssociation
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | GroupId, VpcId, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.security_group_vpc_associations (
GroupId,
VpcId,
region
)
SELECT
'{{ GroupId }}',
'{{ VpcId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.security_group_vpc_associations (
GroupId,
VpcId,
region
)
SELECT
'{{ GroupId }}',
'{{ VpcId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: security_group_vpc_association
props:
- name: GroupId
value: '{{ GroupId }}'
- name: VpcId
value: '{{ VpcId }}'
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