Description Usage Arguments Details Value References See Also Examples
Get, create, and delete subnets
1 2 3 4 5 | describe_subnets(subnet = NULL, filter = NULL, ...)
create_subnet(vpc, cidr, zone = NULL, ...)
delete_subnet(subnet, ...)
|
subnet |
A character string containing the name of a subnet, or an object of class “ec2_subnet”. |
filter |
... |
... |
Additional arguments passed to [ec2HTTP()]. |
vpc |
A character string specifying a VPC Allocation ID or an object of class “ec2_ip”. |
cidr |
A character string specifying a network range for the subnet in CIDR notation. |
zone |
Optionally, a character string specifying an availability zone (see |
Use create_netacl()
and associate_netacl()
to specify a non-default Access Control List (ACL) for the subnet
A list of objects of class “ec2_subnet”.
http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSubnet.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteSubnet.html
create_vpc()
, create_netacl()
, associate_netacl()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# describe existing subnets
(d <- describe_subnets())
describe_subnets(d[[1]])
# create a subnet
## setup new VPC IP address
new_ip <- allocate_ip("vpc")
aid <- describe_ips(new_ip$publicIp)[[1]]$allocationId
s <- create_subnet(aid, cidr = "10.0.1.0/24")
# delete a subnet
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.