(self, account, alias)
| 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 | ) |
no test coverage detected