security_groups: Security Groups

Description Usage Arguments Details Value References See Also Examples

Description

Describe, create, and delete Security Groups

Usage

1
2
3
4
5
describe_sgroups(sgroup = NULL, name = NULL, filter = NULL, ...)

create_sgroup(name, description, vpc = NULL, ...)

delete_sgroup(name = NULL, sgroup = NULL, ...)

Arguments

sgroup

A character vector specifying one or more Security Group IDs, or (a list of) objects of class “ec2_security_group”.

name

A character string (max 255 characters) specifying a security group name.

filter

...

...

Additional arguments passed to [ec2HTTP()].

description

A character string specifying a security group description.

vpc

A character string specifying a VPC Id (required for a VPC).

Details

Security groups provide a layer of security for a Virtual Private Cloud (VPC) for an EC2 instance or set of instances. These can be used in tandem with or in lieu of network Access Control Lists (ACLs) (see describe_netacls()). Any given instance can be in multiple security groups, which can be confusing.

Value

For describe_sgroups and create_sgroup, a list of objects of class “ec2_security_group”. For delete_sgroup, a logical.

References

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteSecurityGroup.html

See Also

authorize_ingress()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
describe_sgroups()
# create a generic security group
sg1 <- create_sgroup("test_group", "example security group")
delete_sgroup(sg1)

# create a security group within a VPC
## setup the VPC
vpc <- allocate_ip("vpc")
vpc <- describe_ips(vpc)[[1]]
sg2 <- create_sgroup("test_group2", "new security group", vpc = vpc)

## End(Not run)

HanjoStudy/awsR documentation built on May 6, 2019, 9:06 a.m.