Skip to content

Commit

Permalink
Merge branch 'release-1.27.31' into develop
Browse files Browse the repository at this point in the history
* release-1.27.31:
  Bumping version to 1.27.31
  Update changelog based on model updates
  Add pagination backcompat for kinesis list-streams
  • Loading branch information
aws-sdk-python-automation committed Dec 15, 2022
2 parents cd7cf2e + 31c4ad4 commit 3b5a597
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 4 deletions.
57 changes: 57 additions & 0 deletions .changes/1.27.31.json
@@ -0,0 +1,57 @@
[
{
"category": "``backup-gateway``",
"description": "This release adds support for VMware vSphere tags, enabling customer to protect VMware virtual machines using tag-based policies for AWS tags mapped from vSphere tags. This release also adds support for customer-accessible gateway-hypervisor interaction log and upload bandwidth rate limit schedule.",
"type": "api-change"
},
{
"category": "``connect``",
"description": "Added support for \"English - New Zealand\" and \"English - South African\" to be used with Amazon Connect Custom Vocabulary APIs.",
"type": "api-change"
},
{
"category": "``ecs``",
"description": "This release adds support for container port ranges in ECS, a new capability that allows customers to provide container port ranges to simplify use cases where multiple ports are in use in a container. This release updates TaskDefinition mutation APIs and the Task description APIs.",
"type": "api-change"
},
{
"category": "``eks``",
"description": "Add support for Windows managed nodes groups.",
"type": "api-change"
},
{
"category": "``glue``",
"description": "This release adds support for AWS Glue Crawler with native DeltaLake tables, allowing Crawlers to classify Delta Lake format tables and catalog them for query engines to query against.",
"type": "api-change"
},
{
"category": "``kinesis``",
"description": "Added StreamARN parameter for Kinesis Data Streams APIs. Added a new opaque pagination token for ListStreams. SDKs will auto-generate Account Endpoint when accessing Kinesis Data Streams.",
"type": "api-change"
},
{
"category": "``location``",
"description": "This release adds support for a new style, \"VectorOpenDataStandardLight\" which can be used with the new data source, \"Open Data Maps (Preview)\".",
"type": "api-change"
},
{
"category": "``m2``",
"description": "Adds an optional create-only `KmsKeyId` property to Environment and Application resources.",
"type": "api-change"
},
{
"category": "``sagemaker``",
"description": "SageMaker Inference Recommender now allows customers to load tests their models on various instance types using private VPC.",
"type": "api-change"
},
{
"category": "``securityhub``",
"description": "Added new resource details objects to ASFF, including resources for AwsEc2LaunchTemplate, AwsSageMakerNotebookInstance, AwsWafv2WebAcl and AwsWafv2RuleGroup.",
"type": "api-change"
},
{
"category": "``translate``",
"description": "Raised the input byte size limit of the Text field in the TranslateText API to 10000 bytes.",
"type": "api-change"
}
]
16 changes: 16 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -2,6 +2,22 @@
CHANGELOG
=========

1.27.31
=======

* api-change:``backup-gateway``: This release adds support for VMware vSphere tags, enabling customer to protect VMware virtual machines using tag-based policies for AWS tags mapped from vSphere tags. This release also adds support for customer-accessible gateway-hypervisor interaction log and upload bandwidth rate limit schedule.
* api-change:``connect``: Added support for "English - New Zealand" and "English - South African" to be used with Amazon Connect Custom Vocabulary APIs.
* api-change:``ecs``: This release adds support for container port ranges in ECS, a new capability that allows customers to provide container port ranges to simplify use cases where multiple ports are in use in a container. This release updates TaskDefinition mutation APIs and the Task description APIs.
* api-change:``eks``: Add support for Windows managed nodes groups.
* api-change:``glue``: This release adds support for AWS Glue Crawler with native DeltaLake tables, allowing Crawlers to classify Delta Lake format tables and catalog them for query engines to query against.
* api-change:``kinesis``: Added StreamARN parameter for Kinesis Data Streams APIs. Added a new opaque pagination token for ListStreams. SDKs will auto-generate Account Endpoint when accessing Kinesis Data Streams.
* api-change:``location``: This release adds support for a new style, "VectorOpenDataStandardLight" which can be used with the new data source, "Open Data Maps (Preview)".
* api-change:``m2``: Adds an optional create-only `KmsKeyId` property to Environment and Application resources.
* api-change:``sagemaker``: SageMaker Inference Recommender now allows customers to load tests their models on various instance types using private VPC.
* api-change:``securityhub``: Added new resource details objects to ASFF, including resources for AwsEc2LaunchTemplate, AwsSageMakerNotebookInstance, AwsWafv2WebAcl and AwsWafv2RuleGroup.
* api-change:``translate``: Raised the input byte size limit of the Text field in the TranslateText API to 10000 bytes.


1.27.30
=======

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

__version__ = '1.27.30'
__version__ = '1.27.31'

#
# Get our data path to be added to botocore's search path
Expand Down
46 changes: 46 additions & 0 deletions awscli/customizations/kinesis.py
@@ -0,0 +1,46 @@
# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.


def register_kinesis_list_streams_pagination_backcompat(event_emitter):
# The ListStreams previously used the ExclusiveStartStreamName parameter
# for input tokens to pagination. This operation was then updated to
# also allow for the typical NextToken input and output parameters. The
# pagination model was also updated to use the NextToken field instead of
# the ExclusiveStartStreamName field for input tokens. However, the
# ExclusiveStartStreamName is still a valid parameter to control pagination
# of this operation and is incompatible with the NextToken parameter. So,
# the CLI needs to continue to treat the ExclusiveStartStreamName as if it
# is a raw input token parameter to the API by disabling auto-pagination if
# provided. Otherwise, if it was treated as a normal API parameter, errors
# would be thrown when paginating across multiple pages since the parameter
# is incompatible with the NextToken parameter.
event_emitter.register(
'building-argument-table.kinesis.list-streams',
undocument_exclusive_start_stream_name,
)
event_emitter.register(
'operation-args-parsed.kinesis.list-streams',
disable_pagination_when_exclusive_start_stream_name_provided,
)


def undocument_exclusive_start_stream_name(argument_table, **kwargs):
argument_table['exclusive-start-stream-name']._UNDOCUMENTED = True


def disable_pagination_when_exclusive_start_stream_name_provided(
parsed_args, parsed_globals, **kwargs
):
if parsed_args.exclusive_start_stream_name is not None:
parsed_globals.paginate = False
3 changes: 3 additions & 0 deletions awscli/handlers.py
Expand Up @@ -92,6 +92,8 @@
from awscli.customizations.sms_voice import register_sms_voice_hide
from awscli.customizations.dynamodb import register_dynamodb_paginator_fix
from awscli.customizations.overridesslcommonname import register_override_ssl_common_name
from awscli.customizations.kinesis import \
register_kinesis_list_streams_pagination_backcompat


def awscli_initialize(event_handlers):
Expand Down Expand Up @@ -185,3 +187,4 @@ def awscli_initialize(event_handlers):
register_sms_voice_hide(event_handlers)
register_dynamodb_paginator_fix(event_handlers)
register_override_ssl_common_name(event_handlers)
register_kinesis_list_streams_pagination_backcompat(event_handlers)
2 changes: 1 addition & 1 deletion doc/source/conf.py
Expand Up @@ -52,7 +52,7 @@
# The short X.Y version.
version = '1.27.'
# The full version, including alpha/beta/rc tags.
release = '1.27.30'
release = '1.27.31'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -3,7 +3,7 @@ universal = 0

[metadata]
requires_dist =
botocore==1.29.30
botocore==1.29.31
docutils>=0.10,<0.17
s3transfer>=0.6.0,<0.7.0
PyYAML>=3.10,<5.5
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -24,7 +24,7 @@ def find_version(*file_paths):


install_requires = [
'botocore==1.29.30',
'botocore==1.29.31',
'docutils>=0.10,<0.17',
's3transfer>=0.6.0,<0.7.0',
'PyYAML>=3.10,<5.5',
Expand Down
52 changes: 52 additions & 0 deletions tests/functional/kinesis/test_list_streams.py
@@ -0,0 +1,52 @@
# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import json

from awscli.testutils import BaseAWSCommandParamsTest, BaseAWSHelpOutputTest


class TestListStreams(BaseAWSCommandParamsTest):

prefix = ['kinesis', 'list-streams']

def test_exclusive_start_stream_name_disables_auto_pagination(self):
cmdline = self.prefix + ['--exclusive-start-stream-name', 'stream-1']
self.parsed_responses = [
{
'StreamNames': ['stream-1', 'stream-2'],
'StreamSummaries': [
{'StreamName': 'stream-1'},
{'StreamName': 'stream-2'},
],
'HasMoreStreams': True,
'NextToken': 'token',
}
]
expected_params = {'ExclusiveStartStreamName': 'stream-1'}
stdout, _, _ = self.assert_params_for_cmd(cmdline, expected_params)
output = json.dumps(stdout)
self.assertIn('NextToken', output)
self.assertIn('HasMoreStreams', output)

def test_exclusive_start_stream_name_incompatible_with_page_args(self):
cmdline = self.prefix + ['--exclusive-start-stream-name', 'stream-1']
cmdline += ['--page-size', '1']
_, stderr, _ = self.run_cmd(cmdline, expected_rc=255)
self.assertIn('Error during pagination: Cannot specify', stderr)
self.assertIn('--page-size', stderr)


class TestListStreamsHelp(BaseAWSHelpOutputTest):
def test_exclusive_start_stream_name_is_undocumented(self):
self.driver.main(['kinesis', 'list-streams', 'help'])
self.assert_not_contains('--exclusive-start-steam-name')

0 comments on commit 3b5a597

Please sign in to comment.