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 | awscc.ec2.security_group_vpc_associations |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| 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. |
region | string | AWS region. |
For more information, see AWS::EC2::SecurityGroupVpcAssociation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | security_group_vpc_associations | INSERT | GroupId, VpcId, region |
delete_resource | security_group_vpc_associations | DELETE | Identifier, region |
list_resources | security_group_vpc_associations_list_only | SELECT | region |
get_resource | security_group_vpc_associations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual security_group_vpc_association.
SELECT
region,
group_id,
vpc_id,
vpc_owner_id,
state,
state_reason
FROM awscc.ec2.security_group_vpc_associations
WHERE
region = 'us-east-1' AND
Identifier = '{{ group_id }}|{{ vpc_id }}';
Lists all security_group_vpc_associations in a region.
SELECT
region,
group_id,
vpc_id
FROM awscc.ec2.security_group_vpc_associations_list_only
WHERE
region = 'us-east-1';
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 awscc.ec2.security_group_vpc_associations (
GroupId,
VpcId,
region
)
SELECT
'{{ group_id }}',
'{{ vpc_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ec2.security_group_vpc_associations (
GroupId,
VpcId,
region
)
SELECT
'{{ group_id }}',
'{{ vpc_id }}',
'{{ 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: group_id
value: '{{ group_id }}'
- name: vpc_id
value: '{{ vpc_id }}'
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.security_group_vpc_associations
WHERE
Identifier = '{{ group_id }}|{{ vpc_id }}' AND
region = 'us-east-1';
Permissions
To operate on the security_group_vpc_associations resource, the following permissions are required:
- Create
- Read
- Delete
- List
ec2:AssociateSecurityGroupVpc,
ec2:DescribeSecurityGroupVpcAssociations
ec2:DescribeSecurityGroupVpcAssociations
ec2:DisassociateSecurityGroupVpc,
ec2:DescribeSecurityGroupVpcAssociations
ec2:DescribeSecurityGroupVpcAssociations