|
5 | 5 |
|
6 | 6 | import boto3 # type: ignore |
7 | 7 |
|
8 | | -from awswrangler import _utils, exceptions |
| 8 | +from awswrangler import _utils, exceptions, sts |
9 | 9 | from awswrangler.quicksight._get_list import get_dashboard_id, get_data_source_id, get_dataset_id |
10 | 10 |
|
11 | 11 | _logger: logging.Logger = logging.getLogger(__name__) |
@@ -48,7 +48,7 @@ def describe_dashboard( |
48 | 48 | raise exceptions.InvalidArgument("You must pass a not None name or dashboard_id argument.") |
49 | 49 | session: boto3.Session = _utils.ensure_session(session=boto3_session) |
50 | 50 | if account_id is None: |
51 | | - account_id = _utils.get_account_id(boto3_session=session) |
| 51 | + account_id = sts.get_account_id(boto3_session=session) |
52 | 52 | if (dashboard_id is None) and (name is not None): |
53 | 53 | dashboard_id = get_dashboard_id(name=name, account_id=account_id, boto3_session=session) |
54 | 54 | client: boto3.client = _utils.client(service_name="quicksight", session=session) |
@@ -92,7 +92,7 @@ def describe_data_source( |
92 | 92 | raise exceptions.InvalidArgument("You must pass a not None name or data_source_id argument.") |
93 | 93 | session: boto3.Session = _utils.ensure_session(session=boto3_session) |
94 | 94 | if account_id is None: |
95 | | - account_id = _utils.get_account_id(boto3_session=session) |
| 95 | + account_id = sts.get_account_id(boto3_session=session) |
96 | 96 | if (data_source_id is None) and (name is not None): |
97 | 97 | data_source_id = get_data_source_id(name=name, account_id=account_id, boto3_session=session) |
98 | 98 | client: boto3.client = _utils.client(service_name="quicksight", session=session) |
@@ -136,7 +136,7 @@ def describe_data_source_permissions( |
136 | 136 | raise exceptions.InvalidArgument("You must pass a not None name or data_source_id argument.") |
137 | 137 | session: boto3.Session = _utils.ensure_session(session=boto3_session) |
138 | 138 | if account_id is None: |
139 | | - account_id = _utils.get_account_id(boto3_session=session) |
| 139 | + account_id = sts.get_account_id(boto3_session=session) |
140 | 140 | if (data_source_id is None) and (name is not None): |
141 | 141 | data_source_id = get_data_source_id(name=name, account_id=account_id, boto3_session=session) |
142 | 142 | client: boto3.client = _utils.client(service_name="quicksight", session=session) |
@@ -180,7 +180,7 @@ def describe_dataset( |
180 | 180 | raise exceptions.InvalidArgument("You must pass a not None name or dataset_id argument.") |
181 | 181 | session: boto3.Session = _utils.ensure_session(session=boto3_session) |
182 | 182 | if account_id is None: |
183 | | - account_id = _utils.get_account_id(boto3_session=session) |
| 183 | + account_id = sts.get_account_id(boto3_session=session) |
184 | 184 | if (dataset_id is None) and (name is not None): |
185 | 185 | dataset_id = get_dataset_id(name=name, account_id=account_id, boto3_session=session) |
186 | 186 | client: boto3.client = _utils.client(service_name="quicksight", session=session) |
@@ -227,7 +227,7 @@ def describe_ingestion( |
227 | 227 | raise exceptions.InvalidArgument("You must pass a not None name or dataset_id argument.") |
228 | 228 | session: boto3.Session = _utils.ensure_session(session=boto3_session) |
229 | 229 | if account_id is None: |
230 | | - account_id = _utils.get_account_id(boto3_session=session) |
| 230 | + account_id = sts.get_account_id(boto3_session=session) |
231 | 231 | if (dataset_id is None) and (dataset_name is not None): |
232 | 232 | dataset_id = get_dataset_id(name=dataset_name, account_id=account_id, boto3_session=session) |
233 | 233 | client: boto3.client = _utils.client(service_name="quicksight", session=session) |
|
0 commit comments