Skip to content

Commit

Permalink
Merge branch 'release-1.36.35'
Browse files Browse the repository at this point in the history
* release-1.36.35:
  Bumping version to 1.36.35
  Update changelog based on model updates
  Remove examples for iot1click-devices and iot1click-projects (#9187)
  Expose `--bucket-name-prefix` and `--bucket-region` to `s3 ls` (#9189)
  • Loading branch information
aws-sdk-python-automation committed Jan 7, 2025
2 parents 09d4349 + 13482b1 commit b468279
Show file tree
Hide file tree
Showing 38 changed files with 168 additions and 556 deletions.
22 changes: 22 additions & 0 deletions .changes/1.36.35.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"category": "``cloudhsmv2``",
"description": "Adds support to ModifyCluster for modifying a Cluster's Hsm Type.",
"type": "api-change"
},
{
"category": "``dynamodb``",
"description": "This release makes Amazon DynamoDB point-in-time-recovery (PITR) to be configurable. You can set PITR recovery period for each table individually to between 1 and 35 days.",
"type": "api-change"
},
{
"category": "``imagebuilder``",
"description": "This release adds support for importing images from ISO disk files. Added new ImportDiskImage API operation.",
"type": "api-change"
},
{
"category": "``s3 ls``",
"description": "Expose low-level ``ListBuckets` parameters ``Prefix`` and ``BucketRegion`` to high-level ``s3 ls`` command as ``--bucket-name-prefix`` and ``--bucket-region``.",
"type": "enhancement"
}
]
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.36.35
=======

* api-change:``cloudhsmv2``: Adds support to ModifyCluster for modifying a Cluster's Hsm Type.
* api-change:``dynamodb``: This release makes Amazon DynamoDB point-in-time-recovery (PITR) to be configurable. You can set PITR recovery period for each table individually to between 1 and 35 days.
* api-change:``imagebuilder``: This release adds support for importing images from ISO disk files. Added new ImportDiskImage API operation.
* enhancement:``s3 ls``: Expose low-level ``ListBuckets` parameters ``Prefix`` and ``BucketRegion`` to high-level ``s3 ls`` command as ``--bucket-name-prefix`` and ``--bucket-region``.


1.36.34
=======

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

import os

__version__ = '1.36.34'
__version__ = '1.36.35'

#
# Get our data path to be added to botocore's search path
Expand Down
40 changes: 37 additions & 3 deletions awscli/customizations/s3/subcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,26 @@
'help_text': 'Indicates the algorithm used to create the checksum for the object.'
}

BUCKET_NAME_PREFIX = {
'name': 'bucket-name-prefix',
'help_text': (
'Limits the response to bucket names that begin with the specified '
'bucket name prefix.'
)
}

BUCKET_REGION = {
'name': 'bucket-region',
'help_text': (
'Limits the response to buckets that are located in the specified '
'Amazon Web Services Region. The Amazon Web Services Region must be '
'expressed according to the Amazon Web Services Region code, such as '
'us-west-2 for the US West (Oregon) Region. For a list of the valid '
'values for all of the Amazon Web Services Regions, see '
'https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region'
)
}

TRANSFER_ARGS = [DRYRUN, QUIET, INCLUDE, EXCLUDE, ACL,
FOLLOW_SYMLINKS, NO_FOLLOW_SYMLINKS, NO_GUESS_MIME_TYPE,
SSE, SSE_C, SSE_C_KEY, SSE_KMS_KEY_ID, SSE_C_COPY_SOURCE,
Expand Down Expand Up @@ -494,7 +514,8 @@ class ListCommand(S3Command):
USAGE = "<S3Uri> or NONE"
ARG_TABLE = [{'name': 'paths', 'nargs': '?', 'default': 's3://',
'positional_arg': True, 'synopsis': USAGE}, RECURSIVE,
PAGE_SIZE, HUMAN_READABLE, SUMMARIZE, REQUEST_PAYER]
PAGE_SIZE, HUMAN_READABLE, SUMMARIZE, REQUEST_PAYER,
BUCKET_NAME_PREFIX, BUCKET_REGION]

def _run_main(self, parsed_args, parsed_globals):
super(ListCommand, self)._run_main(parsed_args, parsed_globals)
Expand All @@ -508,7 +529,11 @@ def _run_main(self, parsed_args, parsed_globals):
path = path[5:]
bucket, key = find_bucket_key(path)
if not bucket:
self._list_all_buckets(parsed_args.page_size)
self._list_all_buckets(
parsed_args.page_size,
parsed_args.bucket_name_prefix,
parsed_args.bucket_region,
)
elif parsed_args.dir_op:
# Then --recursive was specified.
self._list_all_objects_recursive(
Expand Down Expand Up @@ -572,11 +597,20 @@ def _display_page(self, response_data, use_basename=True):
uni_print(print_str)
self._at_first_page = False

def _list_all_buckets(self, page_size=None):
def _list_all_buckets(
self,
page_size=None,
prefix=None,
bucket_region=None,
):
paginator = self.client.get_paginator('list_buckets')
paging_args = {
'PaginationConfig': {'PageSize': page_size}
}
if prefix:
paging_args['Prefix'] = prefix
if bucket_region:
paging_args['BucketRegion'] = bucket_region

iterator = paginator.paginate(**paging_args)

Expand Down
15 changes: 0 additions & 15 deletions awscli/examples/iot1click-devices/claim-devices-by-claim-code.rst

This file was deleted.

27 changes: 0 additions & 27 deletions awscli/examples/iot1click-devices/describe-device.rst

This file was deleted.

14 changes: 0 additions & 14 deletions awscli/examples/iot1click-devices/finalize-device-claim.rst

This file was deleted.

30 changes: 0 additions & 30 deletions awscli/examples/iot1click-devices/get-device-methods.rst

This file was deleted.

14 changes: 0 additions & 14 deletions awscli/examples/iot1click-devices/initiate-device-claim.rst

This file was deleted.

24 changes: 0 additions & 24 deletions awscli/examples/iot1click-devices/invoke-device-method.rst

This file was deleted.

32 changes: 0 additions & 32 deletions awscli/examples/iot1click-devices/list-device-events.rst

This file was deleted.

26 changes: 0 additions & 26 deletions awscli/examples/iot1click-devices/list-devices.rst

This file was deleted.

17 changes: 0 additions & 17 deletions awscli/examples/iot1click-devices/list-tags-for-resource.rst

This file was deleted.

20 changes: 0 additions & 20 deletions awscli/examples/iot1click-devices/tag-resource.rst

This file was deleted.

14 changes: 0 additions & 14 deletions awscli/examples/iot1click-devices/unclaim-device.rst

This file was deleted.

12 changes: 0 additions & 12 deletions awscli/examples/iot1click-devices/untag-resource.rst

This file was deleted.

11 changes: 0 additions & 11 deletions awscli/examples/iot1click-devices/update-device-state.rst

This file was deleted.

Loading

0 comments on commit b468279

Please sign in to comment.