Skip to content

Commit

Permalink
update endpoint mode variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgromero committed Feb 13, 2025
1 parent 05d803b commit e9606f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions botocore/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def get_client_args(
configured_endpoint_url = final_args['configured_endpoint_url']
signing_region = endpoint_config['signing_region']
endpoint_region_name = endpoint_config['region_name']
endpoint_mode = config_kwargs['account_id_endpoint_mode']
account_id_endpoint_mode = config_kwargs['account_id_endpoint_mode']

event_emitter = copy.copy(self._event_emitter)
signer = RequestSigner(
Expand Down Expand Up @@ -191,7 +191,7 @@ def get_client_args(
endpoint_bridge,
event_emitter,
credentials,
endpoint_mode,
account_id_endpoint_mode,
)

# Copy the session's user agent factory and adds client configuration.
Expand Down Expand Up @@ -657,7 +657,7 @@ def _build_endpoint_resolver(
endpoint_bridge,
event_emitter,
credentials,
endpoint_mode,
account_id_endpoint_mode,
):
if endpoints_ruleset_data is None:
return None
Expand All @@ -683,7 +683,7 @@ def _build_endpoint_resolver(
client_endpoint_url=endpoint_url,
legacy_endpoint_url=endpoint.host,
credentials=credentials,
endpoint_mode=endpoint_mode,
account_id_endpoint_mode=account_id_endpoint_mode,
)
# Client context params for s3 conflict with the available settings
# in the `s3` parameter on the `Config` object. If the same parameter
Expand Down Expand Up @@ -720,7 +720,7 @@ def compute_endpoint_resolver_builtin_defaults(
client_endpoint_url,
legacy_endpoint_url,
credentials,
endpoint_mode,
account_id_endpoint_mode,
):
# EndpointRulesetResolver rulesets may accept an "SDK::Endpoint" as
# input. If the endpoint_url argument of create_client() is set, it
Expand Down Expand Up @@ -800,7 +800,7 @@ def compute_endpoint_resolver_builtin_defaults(
)
if credentials
else None,
EPRBuiltins.ACCOUNT_ID_ENDPOINT_MODE: endpoint_mode,
EPRBuiltins.ACCOUNT_ID_ENDPOINT_MODE: account_id_endpoint_mode,
}

def _compute_user_agent_appid_config(self, config_kwargs):
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def call_compute_endpoint_resolver_builtin_defaults(self, **overrides):
'client_endpoint_url': None,
'legacy_endpoint_url': 'https://my.legacy.endpoint.com',
'credentials': None,
'endpoint_mode': 'preferred',
'account_id_endpoint_mode': 'preferred',
}
kwargs = {**defaults, **overrides}
return self.args_create.compute_endpoint_resolver_builtin_defaults(
Expand Down Expand Up @@ -1002,7 +1002,7 @@ def test_account_id_set_with_credentials(self):

def test_account_id_endpoint_mode_set_to_disabled(self):
bins = self.call_compute_endpoint_resolver_builtin_defaults(
endpoint_mode='disabled'
account_id_endpoint_mode='disabled'
)
self.assertEqual(bins['AWS::Auth::AccountIdEndpointMode'], 'disabled')

Expand Down

0 comments on commit e9606f7

Please sign in to comment.