Skip to main content

stale_security_groups

Creates, updates, deletes, gets or lists a stale_security_groups resource.

Overview

Namestale_security_groups
TypeResource
Idaws.ec2.stale_security_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringThe description of the security group.
group_idstringThe ID of the security group.
group_namestringThe name of the security group.
stale_ip_permissionsstringInformation about the stale inbound rules in the security group.
stale_ip_permissions_egressstringInformation about the stale outbound rules in the security group.
vpc_idstringThe ID of the VPC for the security group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_stale_security_groupsselectVpcId, regionDryRun, MaxResults, NextTokenDescribes 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.

NameDatatypeDescription
VpcIdstringThe ID of the VPC.
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks 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.
MaxResultsintegerThe 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.
NextTokenstringThe token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

SELECT examples

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 }}'
;