Skip to content

Commit

Permalink
Merge branch 'release-1.10.25'
Browse files Browse the repository at this point in the history
* release-1.10.25:
  Bumping version to 1.10.25
  Update changelog based on model updates
  replace non-ascii characters
  Update error messaging
  Flush stdout after input prompt.
  new and updated ec2 examples
  formatting
  Direct Connect examples
  Add additional check for boolean arguments
  Fix issue with boolean argument translations
  formatting
  updated configservice put-delivery-channel example
  Adding -t option to emr ssh command when using certificate
  • Loading branch information
AWS committed May 3, 2016
2 parents 780cb64 + 535c14a commit 3d846fe
Show file tree
Hide file tree
Showing 36 changed files with 604 additions and 31 deletions.
22 changes: 22 additions & 0 deletions .changes/1.10.25.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"category": "``inspector``",
"description": "Update inspector command to latest version",
"type": "feature"
},
{
"category": "``codepipeline``",
"description": "Update codepipeline command to latest version",
"type": "feature"
},
{
"category": "Configure",
"description": "Fix issue causing prompts not to display on mintty. Fixes `#1925 <https://github.com/aws/aws-cli/issues/1925>`__",
"type": "bugfix"
},
{
"category": "``elasticbeanstalk``",
"description": "Update elasticbeanstalk command to latest version",
"type": "feature"
}
]
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
CHANGELOG
=========

1.10.25
=======

* feature:``inspector``: Update inspector command to latest version
* feature:``codepipeline``: Update codepipeline command to latest version
* bugfix:Configure: Fix issue causing prompts not to display on mintty. Fixes `#1925 <https://github.com/aws/aws-cli/issues/1925>`__
* feature:``elasticbeanstalk``: Update elasticbeanstalk command to latest version


1.10.24
=======

Expand Down
2 changes: 1 addition & 1 deletion awscli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
import os

__version__ = '1.10.24'
__version__ = '1.10.25'

#
# Get our data path to be added to botocore's search path
Expand Down
17 changes: 16 additions & 1 deletion awscli/clidocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,22 @@ def build_translation_map(self):
d = {}
for cli_name, cli_argument in self.help_command.arg_table.items():
if cli_argument.argument_model is not None:
d[cli_argument.argument_model.name] = cli_name
argument_name = cli_argument.argument_model.name
if argument_name in d:
previous_mapping = d[argument_name]
# If the argument name is a boolean argument, we want the
# the translation to default to the one that does not start
# with --no-. So we check if the cli parameter currently
# being used starts with no- and if stripping off the no-
# results in the new proposed cli argument name. If it
# does, we assume we have the postive form of the argument
# which is the name we want to use in doc translations.
if cli_argument.cli_type_name == 'boolean' and \
previous_mapping.startswith('no-') and \
cli_name == previous_mapping[3:]:
d[argument_name] = cli_name
else:
d[argument_name] = cli_name
for operation_name in operation_model.service_model.operation_names:
d[operation_name] = xform_name(operation_name, '-')
return d
Expand Down
17 changes: 17 additions & 0 deletions awscli/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,20 @@ def compat_open(filename, mode='r', encoding=None):
if 'b' not in mode:
encoding = locale.getpreferredencoding()
return io.open(filename, mode, encoding=encoding)


def compat_input(prompt):
"""
Cygwin's pty's are based on pipes. Therefore, when it interacts with a Win32
program (such as Win32 python), what that program sees is a pipe instead of
a console. This is important because python buffers pipes, and so on a
pty-based terminal, text will not necessarily appear immediately. In most
cases, this isn't a big deal. But when we're doing an interactive prompt,
the result is that the prompts won't display until we fill the buffer. Since
raw_input does not flush the prompt, we need to manually write and flush it.
See https://github.com/mintty/mintty/issues/56 for more details.
"""
sys.stdout.write(prompt)
sys.stdout.flush()
return raw_input()
2 changes: 1 addition & 1 deletion awscli/customizations/awslambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from awscli.customizations import utils

ERROR_MSG = (
"--zip-file must be a file with the fileb:// prefix.\n"
"--zip-file must be a zip file with the fileb:// prefix.\n"
"Example usage: --zip-file fileb://path/to/file.zip")

ZIP_DOCSTRING = ('<p>The path to the zip file of the code you are uploading. '
Expand Down
4 changes: 2 additions & 2 deletions awscli/customizations/configure/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from botocore.exceptions import ProfileNotFound

from awscli.compat import raw_input
from awscli.compat import compat_input
from awscli.customizations.commands import BasicCommand
from awscli.customizations.configure.addmodel import AddModelCommand
from awscli.customizations.configure.set import ConfigureSetCommand
Expand All @@ -39,7 +39,7 @@ class InteractivePrompter(object):
def get_value(self, current_value, config_name, prompt_text=''):
if config_name in ('aws_access_key_id', 'aws_secret_access_key'):
current_value = mask_value(current_value)
response = raw_input("%s [%s]: " % (prompt_text, current_value))
response = compat_input("%s [%s]: " % (prompt_text, current_value))
if not response:
# If the user hits enter, we return a value of None
# instead of an empty string. That way we can determine
Expand Down
2 changes: 1 addition & 1 deletion awscli/customizations/emr/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _run_main_command(self, parsed_args, parsed_globals):
command = ['ssh', '-o', 'StrictHostKeyChecking=no', '-o',
'ServerAliveInterval=10', '-i',
parsed_args.key_pair_file, constants.SSH_USER +
'@' + master_dns]
'@' + master_dns, '-t']
if parsed_args.command:
command.append(parsed_args.command)
else:
Expand Down
29 changes: 27 additions & 2 deletions awscli/examples/configservice/put-delivery-channel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,39 @@ The following command provides the settings for the delivery channel as JSON cod

aws configservice put-delivery-channel --delivery-channel file://deliveryChannel.json

`deliveryChannel.json` is a JSON file that specifies the Amazon S3 bucket and Amazon SNS topic to which AWS Config will deliver configuration information::
The ``deliveryChannel.json`` file specifies the delivery channel attributes::

{
"name": "default",
"s3BucketName": "config-bucket-123456789012",
"snsTopicARN": "arn:aws:sns:us-east-1:123456789012:config-topic"
"snsTopicARN": "arn:aws:sns:us-east-1:123456789012:config-topic",
"configSnapshotDeliveryProperties": {
"deliveryFrequency": "Twelve_Hours"
},
}

This example sets the following attributes:

- ``name`` - The name of the delivery channel. By default, AWS Config assigns the name ``default`` to a new delivery channel.

You cannot update the delivery channel name with the ``put-delivery-channel`` command. For the steps to change the name, see `Renaming the Delivery Channel`__.

.. __: http://docs.aws.amazon.com/config/latest/developerguide/update-dc.html#update-dc-rename

- ``s3BucketName`` - The name of the Amazon S3 bucket to which AWS Config delivers configuration snapshots and configuration history files.

If you specify a bucket that belongs to another AWS account, that bucket must have policies that grant access permissions to AWS Config. For more information, see `Permissions for the Amazon S3 Bucket`__.

.. __: http://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-policy.html

- ``snsTopicARN`` - The Amazon Resource Name (ARN) of the Amazon SNS topic to which AWS Config sends notifications about configuration changes.

If you choose a topic from another account, the topic must have policies that grant access permissions to AWS Config. For more information, see `Permissions for the Amazon SNS Topic`__.

.. __: http://docs.aws.amazon.com/config/latest/developerguide/sns-topic-policy.html

- ``configSnapshotDeliveryProperties`` - Contains the ``deliveryFrequency`` attribute, which sets how often AWS Config delivers configuration snapshots and how often it invokes evaluations for periodic Config rules.

If the command succeeds, AWS Config returns no output. To verify the settings of your delivery channel, run the `describe-delivery-channels`__ command.

.. __: http://docs.aws.amazon.com/cli/latest/reference/configservice/describe-delivery-channels.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
**To create a hosted connection on an interconnect**

The following ``allocate-connection-on-interconnect`` command creates a hosted connection on an interconnect::

aws directconnect allocate-connection-on-interconnect --bandwidth 500Mbps --connection-name mydcinterconnect --owner-account 123456789012 --interconnect-id dxcon-fgktov66 --vlan 101

Output::

{
"partnerName": "TIVIT",
"vlan": 101,
"ownerAccount": "123456789012",
"connectionId": "dxcon-ffzc51m1",
"connectionState": "ordering",
"bandwidth": "500Mbps",
"location": "TIVIT",
"connectionName": "mydcinterconnect",
"region": "sa-east-1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**To provision a private virtual interface**

The following ``allocate-private-virtual-interface`` command provisions a private virtual interface to be owned by a different customer::

aws directconnect allocate-private-virtual-interface --connection-id dxcon-ffjrkx17 --owner-account 123456789012 --new-private-virtual-interface-allocation virtualInterfaceName=PrivateVirtualInterface,vlan=1000,asn=65000,authKey=asdf34example,amazonAddress=192.168.1.1/30,customerAddress=192.168.1.2/30

Output::

{
"virtualInterfaceState": "confirming",
"asn": 65000,
"vlan": 1000,
"customerAddress": "192.168.1.2/30",
"ownerAccount": "123456789012",
"connectionId": "dxcon-ffjrkx17",
"virtualInterfaceId": "dxvif-fgy8orxu",
"authKey": "asdf34example",
"routeFilterPrefixes": [],
"location": "TIVIT",
"customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <logical_connection id=\"dxvif-fgy8orxu\">\n <vlan>1000</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>private</connection_type>\n</logical_connection>\n",
"amazonAddress": "192.168.1.1/30",
"virtualInterfaceType": "private",
"virtualInterfaceName": "PrivateVirtualInterface"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
**To provision a public virtual interface**

The following ``allocate-public-virtual-interface`` command provisions a public virtual interface to be owned by a different customer::

aws directconnect allocate-public-virtual-interface --connection-id dxcon-ffjrkx17 --owner-account 123456789012 --new-public-virtual-interface-allocation virtualInterfaceName=PublicVirtualInterface,vlan=2000,asn=65000,authKey=asdf34example,amazonAddress=203.0.113.1/30,customerAddress=203.0.113.2/30,routeFilterPrefixes=[{cidr=203.0.113.0/30},{cidr=203.0.113.4/30}]

Output::

{
"virtualInterfaceState": "confirming",
"asn": 65000,
"vlan": 2000,
"customerAddress": "203.0.113.2/30",
"ownerAccount": "123456789012",
"connectionId": "dxcon-ffjrkx17",
"virtualInterfaceId": "dxvif-fg9xo9vp",
"authKey": "asdf34example",
"routeFilterPrefixes": [
{
"cidr": "203.0.113.0/30"
},
{
"cidr": "203.0.113.4/30"
}
],
"location": "TIVIT",
"customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fg9xo9vp\">\n <vlan>2000</vlan>\n <customer_address>203.0.113.2/30</customer_address>\n <amazon_address>203.0.113.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>public</connection_type>\n</logical_connection>\n",
"amazonAddress": "203.0.113.1/30",
"virtualInterfaceType": "public",
"virtualInterfaceName": "PublicVirtualInterface"
}
11 changes: 11 additions & 0 deletions awscli/examples/directconnect/confirm-connection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**To confirm the creation of a hosted connection on an interconnect**

The following ``confirm-connection`` command confirms the creation of a hosted connection on an interconnect::

aws directconnect confirm-connection --connection-id dxcon-fg2wi7hy

Output::

{
"connectionState": "pending"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**To accept ownership of a private virtual interface**

The following ``confirm-private-virtual-interface`` command accepts ownership of a private virtual interface created by another customer::

aws directconnect confirm-private-virtual-interface --virtual-interface-id dxvif-fgy8orxu --virtual-gateway-id vgw-e4a47df9

Output::

{
"virtualInterfaceState": "pending"
}
11 changes: 11 additions & 0 deletions awscli/examples/directconnect/confirm-public-virtual-interface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**To accept ownership of a public virtual interface**

The following ``confirm-public-virtual-interface`` command accepts ownership of a public virtual interface created by another customer::

aws directconnect confirm-public-virtual-interface --virtual-interface-id dxvif-fg9xo9vp

Output::

{
"virtualInterfaceState": "verifying"
}
17 changes: 17 additions & 0 deletions awscli/examples/directconnect/create-connection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**To create a connection from your network to an AWS Direct Connect location**

The following ``create-connection`` command creates a connection from your network to an AWS Direct Connect location::

aws directconnect create-connection --location TIVIT --bandwidth 1Gbps --connection-name "Connection to AWS"

Output::

{
"ownerAccount": "123456789012",
"connectionId": "dxcon-fg31dyv6",
"connectionState": "requested",
"bandwidth": "1Gbps",
"location": "TIVIT",
"connectionName": "Connection to AWS",
"region": "sa-east-1"
}
16 changes: 16 additions & 0 deletions awscli/examples/directconnect/create-interconnect.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**To create an interconnect between a partner's network and AWS**

The following ``create-interconnect`` command creates an interconnect between an AWS Direct Connect partner's network and a specific AWS Direct Connect location::

aws directconnect create-interconnect --interconnect-name "1G Interconnect to AWS" --bandwidth 1Gbps --location TIVIT

Output::

{
"region": "sa-east-1",
"bandwidth": "1Gbps",
"location": "TIVIT",
"interconnectName": "1G Interconnect to AWS",
"interconnectId": "dxcon-fgktov66",
"interconnectState": "requested"
}
25 changes: 25 additions & 0 deletions awscli/examples/directconnect/create-private-virtual-interface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**To create a private virtual interface**

The following ``create-private-virtual-interface`` command creates a private virtual interface::

aws directconnect create-private-virtual-interface --connection-id dxcon-ffjrkx17 --new-private-virtual-interface virtualInterfaceName=PrivateVirtualInterface,vlan=101,asn=65000,authKey=asdf34example,amazonAddress=192.168.1.1/30,customerAddress=192.168.1.2/30,virtualGatewayId=vgw-aba37db6

Output::

{
"virtualInterfaceState": "pending",
"asn": 65000,
"vlan": 101,
"customerAddress": "192.168.1.2/30",
"ownerAccount": "123456789012",
"connectionId": "dxcon-ffjrkx17",
"virtualGatewayId": "vgw-aba37db6",
"virtualInterfaceId": "dxvif-ffhhk74f",
"authKey": "asdf34example",
"routeFilterPrefixes": [],
"location": "TIVIT",
"customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-ffhhk74f\">\n <vlan>101</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>private</connection_type>\n</logical_connection>\n",
"amazonAddress": "192.168.1.1/30",
"virtualInterfaceType": "private",
"virtualInterfaceName": "PrivateVirtualInterface"
}
31 changes: 31 additions & 0 deletions awscli/examples/directconnect/create-public-virtual-interface.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
**To create a public virtual interface**

The following ``create-public-virtual-interface`` command creates a public virtual interface::

aws directconnect create-public-virtual-interface --connection-id dxcon-ffjrkx17 --new-public-virtual-interface virtualInterfaceName=PublicVirtualInterface,vlan=2000,asn=65000,authKey=asdf34example,amazonAddress=203.0.113.1/30,customerAddress=203.0.113.2/30,routeFilterPrefixes=[{cidr=203.0.113.0/30},{cidr=203.0.113.4/30}]

Output::

{
"virtualInterfaceState": "verifying",
"asn": 65000,
"vlan": 2000,
"customerAddress": "203.0.113.2/30",
"ownerAccount": "123456789012",
"connectionId": "dxcon-ffjrkx17",
"virtualInterfaceId": "dxvif-fgh0hcrk",
"authKey": "asdf34example",
"routeFilterPrefixes": [
{
"cidr": "203.0.113.0/30"
},
{
"cidr": "203.0.113.4/30"
}
],
"location": "TIVIT",
"customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fgh0hcrk\">\n <vlan>2000</vlan>\n <customer_address>203.0.113.2/30</customer_address>\n <amazon_address>203.0.113.1/30</amazon_address>\n <bgp_asn>65000</bgp_asn>\n <bgp_auth_key>asdf34example</bgp_auth_key>\n <amazon_bgp_asn>7224</amazon_bgp_asn>\n <connection_type>public</connection_type>\n</logical_connection>\n",
"amazonAddress": "203.0.113.1/30",
"virtualInterfaceType": "public",
"virtualInterfaceName": "PublicVirtualInterface"
}

0 comments on commit 3d846fe

Please sign in to comment.