Describe Security Groups
ec2_describe_security_groups | R Documentation |
Describes the specified security groups or all of your security groups¶
Description¶
Describes the specified security groups or all of your security groups.
Usage¶
ec2_describe_security_groups(GroupIds, GroupNames, NextToken,
MaxResults, DryRun, Filters)
Arguments¶
GroupIds |
The IDs of the security groups. Required for security groups in a nondefault VPC. Default: Describes all of your security groups. |
GroupNames |
[Default VPC] The names of the security groups. You can specify either the security group name or the security group ID. Default: Describes all of your security groups. |
NextToken |
The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
MaxResults |
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. This value can be between 5 and 1000. If this parameter is not specified, then all items are returned. For more information, see Pagination. |
DryRun |
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
|
Filters |
The filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.
|
Value¶
A list with the following syntax:
list(
NextToken = "string",
SecurityGroups = list(
list(
GroupId = "string",
IpPermissionsEgress = list(
list(
IpProtocol = "string",
FromPort = 123,
ToPort = 123,
UserIdGroupPairs = list(
list(
Description = "string",
UserId = "string",
GroupName = "string",
GroupId = "string",
VpcId = "string",
VpcPeeringConnectionId = "string",
PeeringStatus = "string"
)
),
IpRanges = list(
list(
Description = "string",
CidrIp = "string"
)
),
Ipv6Ranges = list(
list(
Description = "string",
CidrIpv6 = "string"
)
),
PrefixListIds = list(
list(
Description = "string",
PrefixListId = "string"
)
)
)
),
Tags = list(
list(
Key = "string",
Value = "string"
)
),
VpcId = "string",
SecurityGroupArn = "string",
OwnerId = "string",
GroupName = "string",
Description = "string",
IpPermissions = list(
list(
IpProtocol = "string",
FromPort = 123,
ToPort = 123,
UserIdGroupPairs = list(
list(
Description = "string",
UserId = "string",
GroupName = "string",
GroupId = "string",
VpcId = "string",
VpcPeeringConnectionId = "string",
PeeringStatus = "string"
)
),
IpRanges = list(
list(
Description = "string",
CidrIp = "string"
)
),
Ipv6Ranges = list(
list(
Description = "string",
CidrIpv6 = "string"
)
),
PrefixListIds = list(
list(
Description = "string",
PrefixListId = "string"
)
)
)
)
)
)
)
Request syntax¶
svc$describe_security_groups(
GroupIds = list(
"string"
),
GroupNames = list(
"string"
),
NextToken = "string",
MaxResults = 123,
DryRun = TRUE|FALSE,
Filters = list(
list(
Name = "string",
Values = list(
"string"
)
)
)
)
Examples¶
## Not run:
# This example describes the specified security group.
svc$describe_security_groups(
GroupIds = list(
"sg-903004f8"
)
)
# This example describes the security groups that include the specified
# tag (Purpose=test).
svc$describe_security_groups(
Filters = list(
list(
Name = "tag:Purpose",
Values = list(
"test"
)
)
)
)
## End(Not run)