Class DynamicEndpointAuthSchemeFactory
EndpointAuthScheme whose scheme name is only known at runtime.
Endpoint rulesets normally declare the auth scheme name as a string literal, which lets codegen emit a direct call to the
matching concrete builder (for example SigV4AuthScheme.builder()). S3 is the one exception: its BDD-based ruleset
merges two otherwise identical results whose auth scheme names differ, lifting the difference into a runtime conditional:
_s3e_auth = ite(coalesce(DisableS3ExpressSessionAuth, false), "sigv4", "sigv4-s3express");
The merged result then refers to the name indirectly, so the concrete type cannot be selected at codegen time. This factory
collects the auth scheme properties up front and defers the type selection to create(String).
Only sigv4 and sigv4-s3express are supported, since those are the only names the S3 ruleset can produce
here. The two schemes share the same property set (signingName, signingRegion,
disableDoubleEncoding), so the properties are modelled directly rather than generically. Any other name is a
programming error and fails fast.
Instances are mutable and are not safe for concurrent use. Generated endpoint providers create a fresh instance per resolution, so each instance is confined to a single resolution.
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create the endpoint auth scheme matchingname, applying the properties collected on this factory.disableDoubleEncoding(Boolean disableDoubleEncoding) signingName(String signingName) signingRegion(String signingRegion)
-
Method Details
-
builder
-
signingName
-
signingRegion
-
disableDoubleEncoding
-
create
Create the endpoint auth scheme matchingname, applying the properties collected on this factory.Unset properties are passed through as
null, which the concrete auth schemes treat as "not set" in the same way they do when codegen emits a direct builder call.- Parameters:
name- the auth scheme name; must besigv4orsigv4-s3express- Returns:
- the constructed endpoint auth scheme
- Throws:
SdkClientException- ifnameis not a supported auth scheme name, including when it isnull
-