stale_security_groups
Creates, updates, deletes, gets or lists a stale_security_groups resource.
Overview
| Name | stale_security_groups |
| Type | Resource |
| Id | aws.ec2.stale_security_groups |
Fields
The following fields are returned by SELECT queries:
- describe_stale_security_groups
| Name | Datatype | Description |
|---|---|---|
description | string | The description of the security group. |
group_id | string | The ID of the security group. |
group_name | string | The name of the security group. |
stale_ip_permissions | string | Information about the stale inbound rules in the security group. |
stale_ip_permissions_egress | string | Information about the stale outbound rules in the security group. |
vpc_id | string | The ID of the VPC for the security group. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_stale_security_groups | select | VpcId, region | DryRun, MaxResults, NextToken | Describes the stale security group rules for security groups referenced across a VPC peering connection, transit gateway connection, or with a security group VPC association. Rules are stale when they reference a deleted security group. Rules can also be stale if they reference a security group in a peer VPC for which the VPC peering connection has been deleted, across a transit gateway where the transit gateway has been deleted (or the transit gateway security group referencing feature has been disabled), or if a security group VPC association has been disassociated. |
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 ID of the VPC. |
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. |
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
- describe_stale_security_groups
Describes the stale security group rules for security groups referenced across a VPC peering connection, transit gateway connection, or with a security group VPC association. Rules are stale when they reference a deleted security group. Rules can also be stale if they reference a security group in a peer VPC for which the VPC peering connection has been deleted, across a transit gateway where the transit gateway has been deleted (or the transit gateway security group referencing feature has been disabled), or if a security group VPC association has been disassociated.
SELECT
description,
group_id,
group_name,
stale_ip_permissions,
stale_ip_permissions_egress,
vpc_id
FROM aws.ec2.stale_security_groups
WHERE VpcId = '{{ VpcId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;