1515from .interfaces .io import AsyncSeekable , Seekable
1616from ._http import URI , AWSRequest , Field
1717from ._identity import AWSCredentialIdentity
18+ from .interfaces .identity import AWSCredentialsIdentity as _AWSCredentialsIdentity
1819from ._io import AsyncBytesReader
1920from .exceptions import AWSSDKWarning , MissingExpectedParameterException
2021
@@ -49,14 +50,14 @@ def sign(
4950 self ,
5051 * ,
5152 signing_properties : SigV4SigningProperties ,
52- request : AWSRequest ,
53+ http_request : AWSRequest ,
5354 identity : AWSCredentialIdentity ,
5455 ) -> AWSRequest :
5556 """Generate and apply a SigV4 Signature to a copy of the supplied request.
5657
5758 :param signing_properties: SigV4SigningProperties to define signing primitives
5859 such as the target service, region, and date.
59- :param request : An AWSRequest to sign prior to sending to the service.
60+ :param http_request : An AWSRequest to sign prior to sending to the service.
6061 :param identity: A set of credentials representing an AWS Identity or role
6162 capacity.
6263 """
@@ -68,7 +69,7 @@ def sign(
6869 )
6970 assert "date" in new_signing_properties
7071
71- new_request = self ._generate_new_request (request = request )
72+ new_request = self ._generate_new_request (request = http_request )
7273 self ._apply_required_fields (
7374 request = new_request ,
7475 signing_properties = new_signing_properties ,
@@ -159,7 +160,7 @@ def _hash(self, key: bytes, value: str) -> bytes:
159160
160161 def _validate_identity (self , * , identity : AWSCredentialIdentity ) -> None :
161162 """Perform runtime and expiration checks before attempting signing."""
162- if not isinstance (identity , AWSCredentialIdentity ): # pyright: ignore
163+ if not isinstance (identity , _AWSCredentialsIdentity ): # pyright: ignore
163164 raise ValueError (
164165 "Received unexpected value for identity parameter. Expected "
165166 f"AWSCredentialIdentity but received { type (identity )} ."
@@ -413,14 +414,14 @@ async def sign(
413414 self ,
414415 * ,
415416 signing_properties : SigV4SigningProperties ,
416- request : AWSRequest ,
417+ http_request : AWSRequest ,
417418 identity : AWSCredentialIdentity ,
418419 ) -> AWSRequest :
419420 """Generate and apply a SigV4 Signature to a copy of the supplied request.
420421
421422 :param signing_properties: SigV4SigningProperties to define signing primitives
422423 such as the target service, region, and date.
423- :param request : An AWSRequest to sign prior to sending to the service.
424+ :param http_request : An AWSRequest to sign prior to sending to the service.
424425 :param identity: A set of credentials representing an AWS Identity or role
425426 capacity.
426427 """
@@ -431,7 +432,7 @@ async def sign(
431432 new_signing_properties = await self ._normalize_signing_properties (
432433 signing_properties = signing_properties
433434 )
434- new_request = await self ._generate_new_request (request = request )
435+ new_request = await self ._generate_new_request (request = http_request )
435436 await self ._apply_required_fields (
436437 request = new_request ,
437438 signing_properties = new_signing_properties ,
@@ -522,7 +523,7 @@ async def _hash(self, key: bytes, value: str) -> bytes:
522523
523524 async def _validate_identity (self , * , identity : AWSCredentialIdentity ) -> None :
524525 """Perform runtime and expiration checks before attempting signing."""
525- if not isinstance (identity , AWSCredentialIdentity ): # pyright: ignore
526+ if not isinstance (identity , _AWSCredentialsIdentity ): # pyright: ignore
526527 raise ValueError (
527528 "Received unexpected value for identity parameter. Expected "
528529 f"AWSCredentialIdentity but received { type (identity )} ."
0 commit comments