From adea875ec4f3d09cc6d1a823ec78ad015572d489 Mon Sep 17 00:00:00 2001 From: Eron Hennessey Date: Tue, 12 Aug 2014 14:11:52 -0700 Subject: [PATCH 1/4] More updates from the AWS doc team (elb) --- awscli/examples/elb/add-tags.rst | 12 +++++++++ awscli/examples/elb/create-load-balancer.rst | 11 ++++++++ .../elb/describe-load-balancer-attributes.rst | 3 +++ awscli/examples/elb/describe-tags.rst | 25 +++++++++++++++++++ awscli/examples/elb/remove-tags.rst | 11 ++++++++ 5 files changed, 62 insertions(+) create mode 100644 awscli/examples/elb/add-tags.rst create mode 100644 awscli/examples/elb/describe-tags.rst create mode 100644 awscli/examples/elb/remove-tags.rst diff --git a/awscli/examples/elb/add-tags.rst b/awscli/examples/elb/add-tags.rst new file mode 100644 index 000000000000..9baec1ae0298 --- /dev/null +++ b/awscli/examples/elb/add-tags.rst @@ -0,0 +1,12 @@ +**To add tags for a load balancer** + +This example adds tags for a load balancer. + +Command:: + + aws elb add-tags --load-balancer-name MyTCPLoadBalancer --tag "Key=project,Value=lima" + +Output:: + + {} + diff --git a/awscli/examples/elb/create-load-balancer.rst b/awscli/examples/elb/create-load-balancer.rst index f2ee19bddb84..02e30165b693 100644 --- a/awscli/examples/elb/create-load-balancer.rst +++ b/awscli/examples/elb/create-load-balancer.rst @@ -54,3 +54,14 @@ Output:: "DNSName": "internal-MyInternalLoadBalancer-012345678.us-east-1.elb.amazonaws.com" } +This example creates a TCP load balancer in EC2-Classic and assigns a tag. + +Command:: + + aws elb create-load-balancer --load-balancer-name MyTCPLoadBalancer --listeners Protocol=HTTP,LoadBalancerPort=80,InstanceProtocol=HTTP,InstancePort=80 --tag Key=department,Value=digital-media --availability-zones us-east-1a + +Output:: + + { + "DNSName": "MyTCPLoadBalancer-012345678.us-east-1.elb.amazonaws.com" + } \ No newline at end of file diff --git a/awscli/examples/elb/describe-load-balancer-attributes.rst b/awscli/examples/elb/describe-load-balancer-attributes.rst index 97acfcf96ce9..7801ae2cbf67 100644 --- a/awscli/examples/elb/describe-load-balancer-attributes.rst +++ b/awscli/examples/elb/describe-load-balancer-attributes.rst @@ -10,6 +10,9 @@ Output:: { "LoadBalancerAttributes": { + "ConnectionSettings": { + "IdleTimeout": 30 + }, "ConnectionDraining": { "Enabled": false, "Timeout": 300 diff --git a/awscli/examples/elb/describe-tags.rst b/awscli/examples/elb/describe-tags.rst new file mode 100644 index 000000000000..9ff0d72db27e --- /dev/null +++ b/awscli/examples/elb/describe-tags.rst @@ -0,0 +1,25 @@ +**To describe the tags assigned to load balancer** + +This example describes the the tags assigned to a load balancer. + +Command:: + + aws elb describe-tags --load-balancer-name MyTCPLoadBalancer + +Output:: + +{ + "TagDescriptions": [ + { + "Tags": [ + { + "Value": "digital-media", + "Key": "department" + } + ], + "LoadBalancerName": "MyTCPLoadBalancer" + } + ] +} + + diff --git a/awscli/examples/elb/remove-tags.rst b/awscli/examples/elb/remove-tags.rst new file mode 100644 index 000000000000..72ea5f1c2eed --- /dev/null +++ b/awscli/examples/elb/remove-tags.rst @@ -0,0 +1,11 @@ +**To remove tags for a load balancer** + +This example removes tags for a load balancer. + +Command:: + + aws elb remove-tags --load-balancer-name MyTCPLoadBalancer --tag "Key=project,Value=lima" + +Output:: + + {} \ No newline at end of file From 42677d136f650ded695b05c99173ce2e51e3876d Mon Sep 17 00:00:00 2001 From: Eron Hennessey Date: Wed, 13 Aug 2014 10:23:17 -0700 Subject: [PATCH 2/4] Updated create-tags.rst --- awscli/examples/ec2/create-tags.rst | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/awscli/examples/ec2/create-tags.rst b/awscli/examples/ec2/create-tags.rst index afc79dcefaac..3213caf3dc02 100644 --- a/awscli/examples/ec2/create-tags.rst +++ b/awscli/examples/ec2/create-tags.rst @@ -1,6 +1,7 @@ **To add a tag to a resource** -This example adds the tag ``Stack=production`` to the specified image, or overwrites an existing tag for the AMI where the tag key is ``Stack``. +This example adds the tag ``Stack=production`` to the specified image, or overwrites an existing tag for the AMI where +the tag key is ``Stack``. Command:: @@ -14,7 +15,9 @@ Output:: **To add tags to multiple resources** -This example adds (or overwrites) two tags for an AMI and an instance. One of the tags contains just a key (``webserver``), with no value (we set the value to an empty string). The other tag consists of a key (``stack``) and value (``Production``). +This example adds (or overwrites) two tags for an AMI and an instance. One of the tags contains just a key +(``webserver``), with no value (we set the value to an empty string). The other tag consists of a key (``stack``) and +value (``Production``). Command:: @@ -22,20 +25,14 @@ Command:: **To add tags with special characters** -This example adds the tag ``[Group]=test`` for an instance. The square brackets ([ and ]) are special characters, and must be escaped. If you are using Windows, break out the characters with a backslash (\\), and surround them with double quotes ("): +If you have any special characters in your tags that must be escaped, such as square bracket ([ and ]) characters, +surround the entire tag with quotes. -Command:: - - aws ec2 create-tags --resources i-1a2b3c4d --tags Key=\"["Group\"]",Value=test - -If you are using Windows PowerShell, break out the characters with a backslash (\\), surround them with double quotes ("), and then surround the entire key and value structure with single quotes ('): +* On Linux, OS X, or in Windows Powershell, use single quotes to surround the tag:: -Command:: - - aws ec2 create-tags --resources i-1a2b3c4d --tags 'Key=\"["Group\"]",Value=test' + aws ec2 create-tags --resources i-1a2b3c4d --tags Key='[Group]',Value=test -If you are using Linux or OS X, enclose the entire key and value structure with single quotes ('), and then enclose the element with the special character with double quotes ("): +* On the basic (non-Powershell) Windows command-prompt, use double quotes instead:: -Command:: + aws ec2 create-tags --resources i-1a2b3c4d --tags Key="[Group]",Value=test - aws ec2 create-tags --resources i-1a2b3c4d --tags 'Key="[Group]",Value=test' From 7ede9fc9513c3851d60d86fbeb70c283d44c52c7 Mon Sep 17 00:00:00 2001 From: Eron Hennessey Date: Wed, 13 Aug 2014 10:34:52 -0700 Subject: [PATCH 3/4] Fix formatting of code in bullet list --- awscli/examples/ec2/create-tags.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awscli/examples/ec2/create-tags.rst b/awscli/examples/ec2/create-tags.rst index 3213caf3dc02..5daea28e96c2 100644 --- a/awscli/examples/ec2/create-tags.rst +++ b/awscli/examples/ec2/create-tags.rst @@ -30,9 +30,9 @@ surround the entire tag with quotes. * On Linux, OS X, or in Windows Powershell, use single quotes to surround the tag:: - aws ec2 create-tags --resources i-1a2b3c4d --tags Key='[Group]',Value=test + aws ec2 create-tags --resources i-1a2b3c4d --tags Key='[Group]',Value=test * On the basic (non-Powershell) Windows command-prompt, use double quotes instead:: - aws ec2 create-tags --resources i-1a2b3c4d --tags Key="[Group]",Value=test + aws ec2 create-tags --resources i-1a2b3c4d --tags Key="[Group]",Value=test From bd342bc070de533e6cc35676c5de676fcc9270e0 Mon Sep 17 00:00:00 2001 From: Eron Hennessey Date: Wed, 13 Aug 2014 14:06:31 -0700 Subject: [PATCH 4/4] final update to create-tags.rst (hope!) --- awscli/examples/ec2/create-tags.rst | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/awscli/examples/ec2/create-tags.rst b/awscli/examples/ec2/create-tags.rst index 5daea28e96c2..f183959b3744 100644 --- a/awscli/examples/ec2/create-tags.rst +++ b/awscli/examples/ec2/create-tags.rst @@ -1,7 +1,6 @@ **To add a tag to a resource** -This example adds the tag ``Stack=production`` to the specified image, or overwrites an existing tag for the AMI where -the tag key is ``Stack``. +This example adds the tag ``Stack=production`` to the specified image, or overwrites an existing tag for the AMI where the tag key is ``Stack``. Command:: @@ -15,9 +14,7 @@ Output:: **To add tags to multiple resources** -This example adds (or overwrites) two tags for an AMI and an instance. One of the tags contains just a key -(``webserver``), with no value (we set the value to an empty string). The other tag consists of a key (``stack``) and -value (``Production``). +This example adds (or overwrites) two tags for an AMI and an instance. One of the tags contains just a key (``webserver``), with no value (we set the value to an empty string). The other tag consists of a key (``stack``) and value (``Production``). Command:: @@ -25,14 +22,21 @@ Command:: **To add tags with special characters** -If you have any special characters in your tags that must be escaped, such as square bracket ([ and ]) characters, -surround the entire tag with quotes. +This example adds the tag ``[Group]=test`` for an instance. The square brackets ([ and ]) are special characters, and must be escaped. If you are using Windows, surround the value with (\"): -* On Linux, OS X, or in Windows Powershell, use single quotes to surround the tag:: +Command:: + + aws ec2 create-tags --resources i-1a2b3c4d --tags Key=\"[Group]\",Value=test - aws ec2 create-tags --resources i-1a2b3c4d --tags Key='[Group]',Value=test +If you are using Windows PowerShell, break out the characters with a backslash (\\), surround them with double quotes ("), and then surround the entire key and value structure with single quotes ('): + +Command:: -* On the basic (non-Powershell) Windows command-prompt, use double quotes instead:: + aws ec2 create-tags --resources i-1a2b3c4d --tags 'Key=\"[Group]\",Value=test' + +If you are using Linux or OS X, enclose the entire key and value structure with single quotes ('), and then enclose the element with the special character with double quotes ("): + +Command:: - aws ec2 create-tags --resources i-1a2b3c4d --tags Key="[Group]",Value=test + aws ec2 create-tags --resources i-1a2b3c4d --tags 'Key="[Group]",Value=test'