aws_security_group.md

April 1, 2019 ยท View on GitHub

Document: "ec2"

Path: "https://github.com/aws/aws-sdk-go-v2/tree/master/models/apis/ec2/2016-11-15/api-2.json")

SecurityGroup

aws_security_group {
  description => "description (optional)",
  dry_run => "DryRun (optional)",
  filters => "Filters (optional)",
  group_id => "group_id (optional)",
  group_ids => "GroupIds (optional)",
  group_name => "group_name (optional)",
  group_names => "GroupNames (optional)",
  max_results => "1234 (optional)",
  group_name => "group_name (optional)",
  next_token => "next_token (optional)",
  vpc_id => "vpc_id (optional)",
}
NameTypeRequired
descriptionStringfalse
dry_runBooleanfalse
filtersFilterListfalse
group_idStringfalse
group_idsGroupIdStringListfalse
group_nameStringfalse
group_namesGroupNameStringListfalse
max_resultsIntegerfalse
group_nameStringfalse
next_tokenStringfalse
vpc_idStringfalse

CRUD operations

Here is a list of endpoints that we use to create, read, update and delete the SecurityGroup

OperationPathVerbDescriptionOperationID
Create/POST

Creates a security group.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

EC2-Classic: You can have up to 500 security groups.

EC2-VPC: You can create up to 500 security groups per VPC.

When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress, AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress.

CreateSecurityGroup
List - list all/POST

Describes one or more of your security groups.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

DescribeSecurityGroups
List - get one``
List - get list using params/POST

Describes one or more of your security groups.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

DescribeSecurityGroups
Update``
Delete/POST

Deletes a security group.

If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in EC2-VPC.

DeleteSecurityGroup