Skip to content

Commit

Permalink
Merge branch 'EronHennessey-doc-updates' into develop
Browse files Browse the repository at this point in the history
* EronHennessey-doc-updates:
  Updates from AWS Doc team
  • Loading branch information
jamesls committed Dec 20, 2013
2 parents f999b7f + bd42a5e commit 2a6a17b
Show file tree
Hide file tree
Showing 75 changed files with 1,854 additions and 30 deletions.
27 changes: 27 additions & 0 deletions awscli/examples/ec2/assign-private-ip-addresses.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
**To assign a specific secondary private IP address a network interface**

This example assigns the specified secondary private IP address to the specified network interface.

Command::

aws ec2 assign-private-ip-addresses --network-interface-id eni-e5aa89a3 --private-ip-addresses 10.0.0.82

Output::

{
"return": "true"
}

**To assign secondary private IP addresses that Amazon EC2 selects to a network interface**

This example assigns two secondary private IP addresses to the specified network interface. Amazon EC2 automatically assigns these IP addresses from the available IP addresses in the CIDR block range of the subnet the network interface is associated with.

Command::

aws ec2 assign-private-ip-addresses --network-interface-id eni-e5aa89a3 --secondary-private-ip-address-count 2

Output::

{
"return": "true"
}
2 changes: 2 additions & 0 deletions awscli/examples/ec2/associate-address.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ This example associates an Elastic IP with a private IP address that's associate
Command::

aws ec2 associate-address --allocation-id eipalloc-64d5890a --network-interface-id eni-1a2b3c4d --private-ip-address 10.0.0.85

27 changes: 27 additions & 0 deletions awscli/examples/ec2/associate-dhcp-options.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
**To associate a DHCP options set with your VPC**

This example associates the specified DHCP options set with the specified VPC.

Command::

aws ec2 associate-dhcp-options --dhcp-options-id dopt-d9070ebb --vpc-id vpc-a01106c2

Output::

{
"return": "true"
}

**To associate the default DHCP options set with your VPC**

This example associates the default DHCP options set with the specified VPC.

Command::

aws ec2 associate-dhcp-options --dhcp-options-id default --vpc-id vpc-a01106c2

Output::

{
"return": "true"
}
13 changes: 13 additions & 0 deletions awscli/examples/ec2/associate-route-table.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**To associate a route table with a subnet**

This example associates the specified route table with the specified subnet.

Command::

aws ec2 associate-route-table --route-table-id rtb-22574640 --subnet-id subnet-9d4a7b6c

Output::

{
"AssociationId": "rtbassoc-781d0d1a"
}
13 changes: 13 additions & 0 deletions awscli/examples/ec2/attach-internet-gateway.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**To attach an Internet gateway to your VPC**

This example attaches the specified Internet gateway to the specified VPC.

Command::

aws ec2 attach-internet-gateway --internet-gateway-id igw-c0a643a9 --vpc-id vpc-a01106c2

Output::

{
"return": "true"
}
13 changes: 13 additions & 0 deletions awscli/examples/ec2/attach-network-interface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**To attach a network interface to an instance**

This example attaches the specified network interface to the specified instance.

Command::

aws ec2 attach-network-interface --network-interface-id eni-e5aa89a3 --instance-id i-640a3c17 --device-index 1

Output::

{
"AttachmentId": "eni-attach-66c4350a"
}
16 changes: 16 additions & 0 deletions awscli/examples/ec2/attach-vpn-gateway.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**To attach a virtual private gateway to your VPC**

This example attaches the specified virtual private gateway to the specified VPC.

Command::

aws ec2 attach-vpn-gateway --vpn-gateway-id vgw-9a4cacf3 --vpc-id vpc-a01106c2

Output::

{
"VpcAttachement": {
"State": "attaching",
"VpcId": "vpc-a01106c2"
}
}
15 changes: 14 additions & 1 deletion awscli/examples/ec2/authorize-security-group-ingress.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**To add a rule to a security group that allow inbound SSH traffic**
**[EC2-Classic] To add a rule to a security group that allows inbound SSH traffic**

This example enables inbound traffic on TCP port 22 (SSH).

Expand All @@ -12,6 +12,19 @@ Output::
"return": "true"
}

**[EC2-VPC] To add a rule to a security group that allows inbound SSH traffic**

This example enables inbound traffic on TCP port 22 (SSH). Note that you can't reference a security group for EC2-VPC by name.

Command::

aws ec2 authorize-security-group-ingress --group-id sg-903004f8 --protocol tcp --port 22 --cidr 203.0.113.0/24

Output::

{
"return": "true"
}

For more information, see `Using Security Groups`_ in the *AWS Command Line Interface User Guide*.

Expand Down
13 changes: 13 additions & 0 deletions awscli/examples/ec2/copy-image.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**To copy an AMI to another region**

This example copies the specified AMI from the ``us-east-1`` region to the ``ap-northeast-1`` region.

Command::

aws ec2 copy-image --source-image-id ami-5731123e --source-region us-east-1 --region ap-northeast-1 --name "My server"

Output::

{
"ImageId": "ami-438bea42"
}
19 changes: 19 additions & 0 deletions awscli/examples/ec2/create-customer-gateway.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
**To create a customer gateway**

This example creates a customer gateway with the specified IP address for its outside interface.

Command::

aws ec2 create-customer-gateway --type ipsec.1 --public-ip 12.1.2.3 --bgp-asn 65534

Output::

{
"CustomerGateway": {
"CustomerGatewayId": "cgw-0e11f167",
"IpAddress": "12.1.2.3",
"State": "available",
"Type": "ipsec.1",
"BgpAsn": "65534"
}
}
24 changes: 24 additions & 0 deletions awscli/examples/ec2/create-dhcp-options.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**To create a DHCP options set**

This example creates a DHCP options set.

Command::

aws ec2 create-dhcp-options --dhcp-configuration "Key=domain-name-servers,Values=10.2.5.1,10.2.5.2"

Output::

{
"DhcpOptions": {
"DhcpConfigurations": [
{
"Values": [
"10.2.5.2",
"10.2.5.1"
],
"Key": "domain-name-servers"
}
],
"DhcpOptionsId": "dopt-d9070ebb"
}
}
13 changes: 13 additions & 0 deletions awscli/examples/ec2/create-image.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**To create an AMI from an Amazon EBS-backed instance**

This example creates an AMI from the specified instance.

Command::

aws ec2 create-image --instance-id i-10a64379 --name "My server" --description "An AMI for my server"

Output::

{
"ImageId": "ami-5731123e"
}
17 changes: 17 additions & 0 deletions awscli/examples/ec2/create-internet-gateway.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**To create an Internet gateway**

This example creates an Internet gateway.

Command::

aws ec2 create-internet-gateway

Output::

{
"InternetGateway": {
"Tags": [],
"InternetGatewayId": "igw-c0a643a9",
"Attachments": []
}
}
35 changes: 35 additions & 0 deletions awscli/examples/ec2/create-network-acl.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
**To create a network ACL**

This example creates a network ACL for the specified VPC.

Command::

aws ec2 create-network-acl --vpc-id vpc-a01106c2

Output::

{
"NetworkAcl": {
"Associations": [],
"NetworkAclId": "acl-5fb85d36",
"VpcId": "vpc-a01106c2",
"Tags": [],
"Entries": [
{
"CidrBlock": "0.0.0.0/0",
"RuleNumber": 32767,
"Protocol": "-1",
"Egress": true,
"RuleAction": "deny"
},
{
"CidrBlock": "0.0.0.0/0",
"RuleNumber": 32767,
"Protocol": "-1",
"Egress": false,
"RuleAction": "deny"
}
],
"IsDefault": false
}
}
38 changes: 38 additions & 0 deletions awscli/examples/ec2/create-network-interface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
**To create a network interface**

This example creates a network interface for the specified subnet.

Command::

aws ec2 create-network-interface --subnet-id subnet-9d4a7b6c --description "my network interface" --groups sg-903004f8 --private-ip-address 10.0.2.17

Output::

{
"NetworkInterface": {
"Status": "pending",
"MacAddress": "02:1a:80:41:52:9c",
"SourceDestCheck": true,
"VpcId": "vpc-a01106c2",
"Description": "my network interface",
"NetworkInterfaceId": "eni-e5aa89a3",
"PrivateIpAddresses": [
{
"Primary": true,
"PrivateIpAddress": "10.0.2.17"
}
],
"RequesterManaged": false,
"AvailabilityZone": "us-east-1d",
"Groups": [
{
"GroupName": "default",
"GroupId": "sg-903004f8"
}
],
"SubnetId": "subnet-9d4a7b6c",
"OwnerId": "123456789012",
"TagSet": [],
"PrivateIpAddress": "10.0.2.17"
}
}
26 changes: 26 additions & 0 deletions awscli/examples/ec2/create-route-table.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
**To create a route table**

This example creates a route table for the specified VPC.

Command::

aws ec2 create-route-table --vpc-id vpc-a01106c2

Output::

{
"RouteTable": {
"Associations": [],
"RouteTableId": "rtb-22574640",
"VpcId": "vpc-a01106c2",
"PropagatingVgws": [],
"Tags": [],
"Routes": [
{
"GatewayId": "local",
"DestinationCidrBlock": "10.0.0.0/16",
"State": "active"
}
]
}
}
13 changes: 13 additions & 0 deletions awscli/examples/ec2/create-route.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**To create a route**

This example creates a route for the specified route table. The route matches all traffic (``0.0.0.0/0``) and routes it to the specified Internet gateway.

Command::

aws ec2 create-route --route-table-id rtb-22574640 --destination-cidr-block 0.0.0.0/0 --gateway-id igw-c0a643a9

Output::

{
"return": "true"
}
17 changes: 16 additions & 1 deletion awscli/examples/ec2/create-security-group.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**To create a security group**
**To create a security group for EC2-Classic**

This example creates a security group named ``MySecurityGroup``.

Expand All @@ -13,6 +13,21 @@ Output::
"GroupId": "sg-903004f8"
}

**To create a security group for EC2-VPC**

This example creates a security group named ``MySecurityGroup`` for the specified VPC.

Command::

aws ec2 create-security-group --group-name MySecurityGroup --description "My security group" --vpc-id vpc-1a2b3c4d

Output::

{
"return": "true"
"GroupId": "sg-903004f8"
}

For more information, see `Using Security Groups`_ in the *AWS Command Line Interface User Guide*.

.. _`Using Security Groups`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-sg.html
Loading

0 comments on commit 2a6a17b

Please sign in to comment.