- Generated client operations take the members of their input as keyword-only
parameters,
client.assume_role(role_arn="...", role_session_name="..."), or the whole request as a single positional argument, either the input model,client.assume_role(AssumeRoleInput(...)), or its dictionary form,client.assume_role({"role_arn": "...", "role_session_name": "..."}). The two can't be mixed in one call. The request is positional-only, so it takes no member's name: a member namedinputis still passed asinput=. An operation without input members is called with no arguments. Interceptors still receive the input model, which the client builds from the arguments before any other client setup. - Members marked
@requiredare required keyword parameters, including members of input structures and@clientOptionalmembers. A member with a default may be omitted, and so may an idempotency token. PassingNoneis the same as omitting a member: a member with a modeled default is sent with that default, and any other is not sent. A call that leaves a required member unset raises aTypeErrorbefore the request is sent. - A member of an operation input whose Python name is
pluginsorselfis generated asplugins_orself_, because it would collide with a parameter every client method already declares. Only the Python name changes, not the wire representation, and members of nested structures are not affected.
-
Nested structures and unions in a request may be written as dictionaries, as generated models, or as a mix of both. A union is a dictionary with exactly one key, the Python name of the variant being set, and a value that is not
None. Unknown keys, missing required members, malformed unions, and astrpassed for a list raise aTypeErrorthat gives the path to the problem and never includes a value. Under a@sensitiveshape it does not include the keys the caller wrote either. -
A model passed in a request is used as it is, never copied or changed, so a model from a response can be sent back. It is still checked before the request is sent: a required member that is
None, an unknown union variant, or a dictionary inside a model raises the sameTypeError. A dictionary is only converted outside a model. A member a model sets toNonestays unset, even if it has a default. -
An operation's idempotency token is generated when it is omitted or
None. It is generated once per call, after every interceptor'smodify_before_serializationhook has run and before the request is serialized, so every retry sends the same token. A token the caller passes is sent unchanged, even an empty one. -
Every structure and union reachable from an operation input has a
TypedDictform named with aDictsuffix, such asAssumeRoleInputDict, declared in the generated model stubs. At runtime the name is plaindict, so importing it builds nothing. List and map members are typedSequenceandMapping, which accept a collection of models, of dictionaries, or of both. -
An operation input with a streaming body has two dictionary forms, because the sync and async clients accept different bodies. The plain form, such as
PutObjectInputDict, takes the bodies a sync client can send, so it can be unpacked into either client. The form with anAsyncprefix, such asAsyncPutObjectInputDict, also takes async streams, and only the async client accepts it. -
Generated client packages include a
py.typedmarker, so type checkers use the types of an installed client. -
Generated AWS clients validate the checksums of response payloads for operations with the
aws.protocols#httpChecksumtrait, such as Amazon S3'sGetObject. These clients depend on thechecksumsextra ofsmithy-aws-core. -
Generated AWS clients calculate checksums of request payloads for operations with the
aws.protocols#httpChecksumtrait, which fixes Amazon S3 operations that require one, such asPutBucketPolicyandDeleteObjects. -
The code generator converts documentation with one Pandoc process per generation instead of starting Pandoc for every documentation string, which makes generation faster. This needs Pandoc 3.2 or later. On Windows, with older Pandoc versions, and for any document Pandoc logs a message about, it starts Pandoc per conversion as before.
- Generated operation outputs and modeled errors now reserve a
response_metadataattribute, carrying the request ID, extended request ID, and HTTP status code of the response that produced them. A modeled member namedresponseMetadataon an output or error is now generated asresponse_metadata_to avoid the collision; only the Python attribute name changes, not the wire representation.
- Removed the deprecated unprefixed aliases for generated AWS service clients.
Imports such as
BedrockRuntimeClientmust now use theAsync-prefixed name, such asAsyncBedrockRuntimeClient. - Changed all generated AWS clients to use
AIOHTTPClientas their default transport, including services configured for HTTP/2 or event streaming. Applications that require the CRT transport, such as those using bidirectional event streams, must install the generated client'sawscrtextra and explicitly configureAWSCRTHTTPClient. - Removed the legacy
Configclass from generated AWS clients in favor of the service-specific, async-resolvedAsync<SdkId>Configclass, such asAsyncBedrockRuntimeConfig. Explicit configuration must now be resolved withawait Async<SdkId>Config.resolve(...)before it is passed to the client.
- Renamed generated AWS service clients to include
Async(e.g.BedrockRuntimeClientis nowAsyncBedrockRuntimeClient) to match the Python community convention for async clients. For clients that were already published under the unprefixed name, the old name remains available as a deprecated alias that emits aDeprecationWarningand will be removed in an upcoming release. The unprefixed name will later be reintroduced for synchronous clients.