sg_ingress: Security Group Egress/Ingress

Description Usage Arguments Value See Also Examples

Description

Authorize/Revoke Security Group Egress/Ingress

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
authorize_ingress(sgroup, cidr = paste0(my_ip(), "/32"), port = NULL,
  protocol = "-1", ...)

revoke_ingress(sgroup, cidr = paste0(my_ip(), "/32"), port = NULL,
  protocol = "-1", ...)

authorize_egress(sgroup, cidr = paste0(my_ip(), "/32"), port = NULL,
  protocol = "-1", ...)

revoke_egress(sgroup, cidr = paste0(my_ip(), "/32"), port = NULL,
  protocol = "-1", ...)

my_ip()

Arguments

sgroup

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

cidr

A one- or two-element character vector specifying an IP or range of IP addresses. The default is your current machine's public IP as returned by http://checkip.amazonaws.com/.

port

A one- or two-element integer vector, specifying a port or port range.

protocol

A character string specifying a protocol. A value of “-1” (the default) means all protocols.

...

Additional arguments passed to [ec2HTTP()].

Value

A list

See Also

create_sgroup()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
s <- describe_subnets()
g <- create_sgroup("test_group", "new security group", vpc = s[[1]])
authorize_ingress(g, port = 80, protocol = "tcp")
authorize_egress(g, port = 80, protocol = "tcp")

# cleanup
revoke_ingress(g, port = 80, protocol = "tcp")
revoke_egress(g, port = 80, protocol = "tcp")

## End(Not run)

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