Skip to content

Commit 925e5a0

Browse files
Merge branch 'release-1.25.62'
* release-1.25.62: Bumping version to 1.25.62 Update changelog based on model updates Add note for Tagged Unions refactor config tests to be in CI and use `run_cmd` instead of `aws` (#7211) Update sidebar AWS logo in refs
2 parents 729f5d2 + 697959f commit 925e5a0

16 files changed

Lines changed: 510 additions & 358 deletions

File tree

.changes/1.25.62.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"category": "docs",
4+
"description": "Generate a usage note for Tagged Union structures.",
5+
"type": "enhancement"
6+
},
7+
{
8+
"category": "``mediapackage``",
9+
"description": "This release adds Ads AdTriggers and AdsOnDeliveryRestrictions to describe calls for CMAF endpoints on MediaPackage.",
10+
"type": "api-change"
11+
},
12+
{
13+
"category": "``rds``",
14+
"description": "Removes support for RDS Custom from DBInstanceClass in ModifyDBInstance",
15+
"type": "api-change"
16+
}
17+
]

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
CHANGELOG
33
=========
44

5+
1.25.62
6+
=======
7+
8+
* enhancement:docs: Generate a usage note for Tagged Union structures.
9+
* api-change:``mediapackage``: This release adds Ads AdTriggers and AdsOnDeliveryRestrictions to describe calls for CMAF endpoints on MediaPackage.
10+
* api-change:``rds``: Removes support for RDS Custom from DBInstanceClass in ModifyDBInstance
11+
12+
513
1.25.61
614
=======
715

awscli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"""
1818
import os
1919

20-
__version__ = '1.25.61'
20+
__version__ = '1.25.62'
2121

2222
#
2323
# Get our data path to be added to botocore's search path

awscli/clidocs.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
from awscli.topictags import TopicTagDB
2424
from awscli.utils import (
2525
find_service_and_method_in_event_name, is_document_type,
26-
operation_uses_document_types, is_streaming_blob_type
26+
operation_uses_document_types, is_streaming_blob_type,
27+
is_tagged_union_type
2728
)
2829

2930
LOG = logging.getLogger(__name__)
@@ -56,6 +57,8 @@ def _get_argument_type_name(self, shape, default):
5657
return 'document'
5758
if is_streaming_blob_type(shape):
5859
return 'streaming blob'
60+
if is_tagged_union_type(shape):
61+
return 'tagged union structure'
5962
return default
6063

6164
def _map_handlers(self, session, event_class, mapfn):
@@ -185,6 +188,8 @@ def doc_option(self, arg_name, help_command, **kwargs):
185188
doc.include_doc_string(argument.documentation)
186189
if is_streaming_blob_type(argument.argument_model):
187190
self._add_streaming_blob_note(doc)
191+
if is_tagged_union_type(argument.argument_model):
192+
self._add_tagged_union_note(argument.argument_model, doc)
188193
if hasattr(argument, 'argument_model'):
189194
self._document_enums(argument.argument_model, doc)
190195
self._document_nested_structure(argument.argument_model, doc)
@@ -264,6 +269,8 @@ def _do_doc_member(self, doc, member_name, member_shape, stack):
264269
doc.style.indent()
265270
doc.style.new_paragraph()
266271
doc.include_doc_string(docs)
272+
if is_tagged_union_type(member_shape):
273+
self._add_tagged_union_note(member_shape, doc)
267274
doc.style.new_paragraph()
268275
member_type_name = member_shape.type_name
269276
if member_type_name == 'structure':
@@ -290,6 +297,16 @@ def _add_streaming_blob_note(self, doc):
290297
doc.writeln(msg)
291298
doc.style.end_note()
292299

300+
def _add_tagged_union_note(self, shape, doc):
301+
doc.style.start_note()
302+
members_str = ", ".join(
303+
[f'``{key}``' for key in shape.members.keys()]
304+
)
305+
msg = ("This is a Tagged Union structure. Only one of the "
306+
f"following top level keys can be set: {members_str}.")
307+
doc.writeln(msg)
308+
doc.style.end_note()
309+
293310

294311
class ProviderDocumentEventHandler(CLIDocumentEventHandler):
295312

awscli/customizations/configure/get.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ class ConfigureGetCommand(BasicCommand):
3434
'cli_type_name': 'string', 'positional_arg': True},
3535
]
3636

37-
def __init__(self, session, stream=sys.stdout, error_stream=sys.stderr):
37+
def __init__(self, session, stream=None, error_stream=None):
3838
super(ConfigureGetCommand, self).__init__(session)
39+
if stream is None:
40+
stream = sys.stdout
41+
if error_stream is None:
42+
error_stream = sys.stderr
3943
self._stream = stream
4044
self._error_stream = error_stream
4145

awscli/customizations/configure/list.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ class ConfigureListCommand(BasicCommand):
4444
'\n'
4545
)
4646

47-
def __init__(self, session, stream=sys.stdout):
47+
def __init__(self, session, stream=None):
4848
super(ConfigureListCommand, self).__init__(session)
49+
if stream is None:
50+
stream = sys.stdout
4951
self._stream = stream
5052

5153
def _run_main(self, args, parsed_globals):
@@ -66,6 +68,7 @@ def _run_main(self, args, parsed_globals):
6668

6769
region = self._lookup_config('region')
6870
self._display_config_value(region, 'region')
71+
return 0
6972

7073
def _display_config_value(self, config_value, config_name):
7174
self._stream.write('%10s %24s %16s %s\n' % (

awscli/customizations/configure/set.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ def _run_main(self, args, parsed_globals):
105105
section = profile_to_section(profile)
106106
updated_config = {'__section__': section, varname: value}
107107
self._config_writer.update_config(updated_config, config_filename)
108+
return 0

awscli/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ def is_streaming_blob_type(shape):
159159
shape.serialization.get('streaming', False))
160160

161161

162+
def is_tagged_union_type(shape):
163+
"""Check if the shape is a tagged union structure."""
164+
return getattr(shape, 'is_tagged_union', False)
165+
166+
162167
def operation_uses_document_types(operation_model):
163168
"""Check if document types are ever used in the operation"""
164169
recording_visitor = ShapeRecordingVisitor()

doc/source/_static/logo.png

2.69 KB
Loading

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# The short X.Y version.
5353
version = '1.25.'
5454
# The full version, including alpha/beta/rc tags.
55-
release = '1.25.61'
55+
release = '1.25.62'
5656

5757
# The language for content autogenerated by Sphinx. Refer to documentation
5858
# for a list of supported languages.

0 commit comments

Comments
 (0)