MCPcopy Create free account
hub / github.com/aws/aws-cli / _get_mrap_buckets

Method _get_mrap_buckets

awscli/customizations/s3/utils.py:847–866  ·  view source on GitHub ↗
(self, account, alias)

Source from the content-addressed store, hash-verified

845 return self._sts_client.get_caller_identity()['Account']
846
847 def _get_mrap_buckets(self, account, alias):
848 next_token = None
849 while True:
850 args = {"AccountId": account}
851 if next_token:
852 args['NextToken'] = next_token
853 response = self._s3control_client.list_multi_region_access_points(
854 **args
855 )
856 for access_point in response['AccessPoints']:
857 if access_point['Alias'] == alias:
858 return [
859 region["Bucket"] for region in access_point["Regions"]
860 ]
861 next_token = response.get('NextToken')
862 if not next_token:
863 raise ParamValidationError(
864 "Couldn't find multi-region access point "
865 f"with alias {alias} in account {account}"
866 )

Callers 1

_resolve_mrap_aliasMethod · 0.95

Calls 1

Tested by

no test coverage detected