Skip to content

Commit

Permalink
add account_id to set_credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlm committed Oct 4, 2023
1 parent 89a8497 commit 5cd1734
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 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,12 @@ 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: The account ID part of 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 5cd1734

Please sign in to comment.