Skip to content

Commit

Permalink
Add sts_region parameter to auth.aws.configure (#1136)
Browse files Browse the repository at this point in the history
* Add sts_region parameter to auth.aws.configure

* Move sts_region parameter to end of list
  • Loading branch information
ewanoomen committed Apr 5, 2024
1 parent 48027db commit 09aacf1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hvac/api/auth_methods/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def configure(
sts_endpoint=None,
iam_server_id_header_value=None,
mount_point=AWS_DEFAULT_MOUNT_POINT,
sts_region=None,
):
"""Configure the credentials required to perform API calls to AWS as well as custom endpoints to talk to AWS API.
Expand Down Expand Up @@ -69,6 +70,9 @@ def configure(
:type iam_server_id_header_value: str | unicode
:param mount_point: The path the AWS auth method was mounted on.
:type mount_point: str | unicode
:param sts_region: Region to override the default region for making AWS STS API calls. Should only be set if
sts_endpoint is set. If so, should be set to the region in which the custom sts_endpoint resides
:type sts_region: str | unicode
:return: The response of the request.
:rtype: requests.Response
"""
Expand All @@ -82,6 +86,7 @@ def configure(
"iam_endpoint": iam_endpoint,
"sts_endpoint": sts_endpoint,
"iam_server_id_header_value": iam_server_id_header_value,
"sts_region": sts_region,
}
)
api_path = utils.format_url(
Expand Down

0 comments on commit 09aacf1

Please sign in to comment.