Skip to content

Commit 10a5c44

Browse files
authored
TECH DEBT Use right workspace api call for listing credentials (#3957)
<!-- REMOVE IRRELEVANT COMMENTS BEFORE CREATING A PULL REQUEST --> ## Changes <!-- Summary of your changes that are easy to understand. Add screenshots when necessary --> ### Linked issues <!-- DOC: Link issue with a keyword: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved. See https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> Resolves #3571
1 parent 3b18ca6 commit 10a5c44

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/databricks/labs/ucx/aws/credentials.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ def list(self, include_names: set[str] | None = None) -> set[str]:
5959

6060
def list_glue(self) -> dict[str, str]:
6161
# list existed service credentials that are using iam roles, capturing the arns and names
62-
# TODO: replace with SDK call when available
6362
try:
64-
credential_response = self._ws.api_client.do('GET', '/api/2.1/unity-catalog/credentials')
63+
credential_response = self._ws.credentials.list_credentials()
6564
except NotFound:
6665
logger.info('Could not retrieve credentials for Glue access. ')
6766
return {}

0 commit comments

Comments
 (0)