security_groups_for_vpcs
Creates, updates, deletes, gets or lists a security_groups_for_vpcs resource.
Overview
| Name | security_groups_for_vpcs |
| Type | Resource |
| Id | aws.ec2.security_groups_for_vpcs |
Fields
The following fields are returned by SELECT queries:
- get_security_groups_for_vpc
| Name | Datatype | Description |
|---|---|---|
description | string | The security group's description. |
group_id | string | The security group ID. |
group_name | string | The security group name. |
owner_id | string | The security group owner ID. |
primary_vpc_id | string | The VPC ID in which the security group was created. |
tags | string | The security group tags. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_security_groups_for_vpc | select | VpcId, region | NextToken, MaxResults, Filter, DryRun | Gets security groups that can be associated by the Amazon Web Services account making the request with network interfaces in the specified VPC. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
VpcId | string | The VPC ID where the security group can be used. |
region | string | AWS region (default: us-east-1) |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
Filter | array | The filters. If using multiple filters, the results include security groups which match all filters. group-id: The security group ID. description: The security group's description. group-name: The security group name. owner-id: The security group owner ID. primary-vpc-id: The VPC ID in which the security group was created. |
MaxResults | integer | The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination. |
NextToken | string | The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
SELECT examples
- get_security_groups_for_vpc
Gets security groups that can be associated by the Amazon Web Services account making the request with network interfaces in the specified VPC.
SELECT
description,
group_id,
group_name,
owner_id,
primary_vpc_id,
tags
FROM aws.ec2.security_groups_for_vpcs
WHERE VpcId = '{{ VpcId }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND Filter = '{{ Filter }}'
AND DryRun = '{{ DryRun }}'
;