smithy-aws-core
aio
¶
protocols
¶
RestJsonClientProtocol
¶
Bases: HttpBindingClientProtocol
An implementation of the aws.protocols#restJson1 protocol.
Source code in packages/smithy-aws-core/src/smithy_aws_core/aio/protocols.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
__init__(service_schema)
¶
Initialize a RestJsonClientProtocol.
:param service: The schema for the service to interact with.
Source code in packages/smithy-aws-core/src/smithy_aws_core/aio/protocols.py
auth
¶
SigV4AuthScheme
¶
Bases: AuthScheme[HTTPRequest, AWSCredentialsIdentity, AWSIdentityProperties, SigV4SigningProperties]
SigV4 AuthScheme.
Source code in packages/smithy-aws-core/src/smithy_aws_core/auth/sigv4.py
__init__(*, service, signer=None)
¶
Constructor.
:param identity_resolver: The identity resolver to extract the api key identity. :param signer: The signer used to sign the request.
Source code in packages/smithy-aws-core/src/smithy_aws_core/auth/sigv4.py
sigv4
¶
SigV4AuthScheme
¶
Bases: AuthScheme[HTTPRequest, AWSCredentialsIdentity, AWSIdentityProperties, SigV4SigningProperties]
SigV4 AuthScheme.
Source code in packages/smithy-aws-core/src/smithy_aws_core/auth/sigv4.py
__init__(*, service, signer=None)
¶
Constructor.
:param identity_resolver: The identity resolver to extract the api key identity. :param signer: The signer used to sign the request.
Source code in packages/smithy-aws-core/src/smithy_aws_core/auth/sigv4.py
endpoints
¶
REGIONAL_ENDPOINT_CONFIG = PropertyKey(key='config', value_type=RegionalEndpointConfig)
module-attribute
¶
Endpoint config for services with standard regional endpoints.
RegionalEndpointConfig
¶
Bases: StaticEndpointConfig
Endpoint config for services with standard regional endpoints.
Source code in packages/smithy-aws-core/src/smithy_aws_core/endpoints/__init__.py
region
instance-attribute
¶
The AWS region to address the request to.
standard_regional
¶
StandardRegionalEndpointsResolver
¶
Bases: EndpointResolver
Resolves endpoints for services with standard regional endpoints.
Source code in packages/smithy-aws-core/src/smithy_aws_core/endpoints/standard_regional.py
identity
¶
AWSCredentialsIdentity
dataclass
¶
Bases: Identity
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/components.py
access_key_id
instance-attribute
¶
A unique identifier for an AWS user or role.
account_id = None
class-attribute
instance-attribute
¶
The AWS account's ID.
expiration = None
class-attribute
instance-attribute
¶
The expiration time of the identity.
If time zone is provided, it is updated to UTC. The value must always be in UTC.
secret_access_key
instance-attribute
¶
A secret key used in conjunction with the access key ID to authenticate programmatic access to AWS services.
session_token = None
class-attribute
instance-attribute
¶
A temporary token used to specify the current session for the supplied credentials.
ContainerCredentialsResolver
¶
Bases: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties]
Resolves AWS Credentials from container credential sources.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/container.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
|
EnvironmentCredentialsResolver
¶
Bases: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties]
Resolves AWS Credentials from system environment variables.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/environment.py
IMDSCredentialsResolver
¶
Bases: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties]
Resolves AWS Credentials from an EC2 Instance Metadata Service (IMDS) client.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/imds.py
StaticCredentialsResolver
¶
Bases: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties]
Resolve Static AWS Credentials.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/static.py
chain
¶
create_default_chain(http_client)
¶
Creates the default AWS credential provider chain.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/chain.py
components
¶
AWSCredentialsIdentity
dataclass
¶
Bases: Identity
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/components.py
access_key_id
instance-attribute
¶
A unique identifier for an AWS user or role.
account_id = None
class-attribute
instance-attribute
¶
The AWS account's ID.
expiration = None
class-attribute
instance-attribute
¶
The expiration time of the identity.
If time zone is provided, it is updated to UTC. The value must always be in UTC.
secret_access_key
instance-attribute
¶
A secret key used in conjunction with the access key ID to authenticate programmatic access to AWS services.
session_token = None
class-attribute
instance-attribute
¶
A temporary token used to specify the current session for the supplied credentials.
container
¶
ContainerCredentialsConfig
dataclass
¶
Configuration for container credential retrieval operations.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/container.py
ContainerCredentialsResolver
¶
Bases: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties]
Resolves AWS Credentials from container credential sources.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/container.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
|
ContainerMetadataClient
¶
Client for remote credential retrieval in Container environments like ECS/EKS.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/container.py
environment
¶
EnvironmentCredentialsResolver
¶
Bases: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties]
Resolves AWS Credentials from system environment variables.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/environment.py
imds
¶
Config
dataclass
¶
Configuration for EC2Metadata.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/imds.py
IMDSCredentialsResolver
¶
Bases: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties]
Resolves AWS Credentials from an EC2 Instance Metadata Service (IMDS) client.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/imds.py
Token
¶
Represents an IMDSv2 session token with a value and method for checking expiration.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/imds.py
TokenCache
¶
Holds the token needed to fetch instance metadata.
In addition, it knows how to refresh itself.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/imds.py
static
¶
StaticCredentialsResolver
¶
Bases: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties]
Resolve Static AWS Credentials.
Source code in packages/smithy-aws-core/src/smithy_aws_core/identity/static.py
interceptors
¶
user_agent
¶
UserAgentInterceptor
¶
Bases: Interceptor[Any, Any, Any, Any]
Adds AWS fields to the UserAgent.
Source code in packages/smithy-aws-core/src/smithy_aws_core/interceptors/user_agent.py
__init__(*, ua_suffix, ua_app_id, sdk_version, service_id)
¶
Initialize the UserAgentInterceptor.
:param ua_suffix: Additional suffix to be added to the UserAgent header. :param ua_app_id: User defined and opaque application ID to be added to the UserAgent header. :param sdk_version: SDK version to be added to the UserAgent header. :param service_id: ServiceId to be added to the UserAgent header.