Skip to content

Commit

Permalink
update set_credentials method to take optional account_id arg
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlm committed Oct 2, 2023
1 parent 8afd119 commit 9b54c57
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions botocore/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ def set_default_client_config(self, client_config):
"""
self._client_config = client_config

def set_credentials(self, access_key, secret_key, token=None):
def set_credentials(
self, access_key, secret_key, token=None, account_id=None
):
"""
Manually create credentials for this session. If you would
prefer to use botocore without a config file, environment variables,
Expand All @@ -495,9 +497,13 @@ def set_credentials(self, access_key, secret_key, token=None):
:type token: str
:param token: An option session token used by STS session
credentials.
:type account_id: str
:param account_id: An optional account ID associated with the
credentials.
"""
self._credentials = botocore.credentials.Credentials(
access_key, secret_key, token
access_key, secret_key, token, account_id=account_id
)

def get_credentials(self):
Expand Down

0 comments on commit 9b54c57

Please sign in to comment.