Type definitions#
Index > SageMakerRuntime > Type definitions
Auto-generated documentation for SageMakerRuntime type annotations stubs module types-aiobotocore-sagemaker-runtime.
BlobTypeDef#
# BlobTypeDef Union usage example
from types_aiobotocore_sagemaker_runtime.type_defs import BlobTypeDef
def get_value() -> BlobTypeDef:
return ...
# BlobTypeDef definition
BlobTypeDef = Union[
str,
bytes,
IO[Any],
aiobotocore.response.StreamingBody,
]
InternalStreamFailureTypeDef#
# InternalStreamFailureTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import InternalStreamFailureTypeDef
def get_value() -> InternalStreamFailureTypeDef:
return {
"Message": ...,
}
# InternalStreamFailureTypeDef definition
class InternalStreamFailureTypeDef(TypedDict):
Message: NotRequired[str],
InvokeEndpointAsyncInputTypeDef#
# InvokeEndpointAsyncInputTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import InvokeEndpointAsyncInputTypeDef
def get_value() -> InvokeEndpointAsyncInputTypeDef:
return {
"EndpointName": ...,
}
# InvokeEndpointAsyncInputTypeDef definition
class InvokeEndpointAsyncInputTypeDef(TypedDict):
EndpointName: str,
InputLocation: str,
ContentType: NotRequired[str],
Accept: NotRequired[str],
CustomAttributes: NotRequired[str],
InferenceId: NotRequired[str],
RequestTTLSeconds: NotRequired[int],
InvocationTimeoutSeconds: NotRequired[int],
ResponseMetadataTypeDef#
# ResponseMetadataTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import ResponseMetadataTypeDef
def get_value() -> ResponseMetadataTypeDef:
return {
"RequestId": ...,
}
# ResponseMetadataTypeDef definition
class ResponseMetadataTypeDef(TypedDict):
RequestId: str,
HTTPStatusCode: int,
HTTPHeaders: Dict[str, str],
RetryAttempts: int,
HostId: NotRequired[str],
ModelStreamErrorTypeDef#
# ModelStreamErrorTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import ModelStreamErrorTypeDef
def get_value() -> ModelStreamErrorTypeDef:
return {
"Message": ...,
}
# ModelStreamErrorTypeDef definition
class ModelStreamErrorTypeDef(TypedDict):
Message: NotRequired[str],
ErrorCode: NotRequired[str],
PayloadPartTypeDef#
# PayloadPartTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import PayloadPartTypeDef
def get_value() -> PayloadPartTypeDef:
return {
"Bytes": ...,
}
# PayloadPartTypeDef definition
class PayloadPartTypeDef(TypedDict):
Bytes: NotRequired[bytes],
InvokeEndpointInputTypeDef#
# InvokeEndpointInputTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import InvokeEndpointInputTypeDef
def get_value() -> InvokeEndpointInputTypeDef:
return {
"EndpointName": ...,
}
# InvokeEndpointInputTypeDef definition
class InvokeEndpointInputTypeDef(TypedDict):
EndpointName: str,
Body: BlobTypeDef,
ContentType: NotRequired[str],
Accept: NotRequired[str],
CustomAttributes: NotRequired[str],
TargetModel: NotRequired[str],
TargetVariant: NotRequired[str],
TargetContainerHostname: NotRequired[str],
InferenceId: NotRequired[str],
EnableExplanations: NotRequired[str],
InferenceComponentName: NotRequired[str],
SessionId: NotRequired[str],
InvokeEndpointWithResponseStreamInputTypeDef#
# InvokeEndpointWithResponseStreamInputTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import InvokeEndpointWithResponseStreamInputTypeDef
def get_value() -> InvokeEndpointWithResponseStreamInputTypeDef:
return {
"EndpointName": ...,
}
# InvokeEndpointWithResponseStreamInputTypeDef definition
class InvokeEndpointWithResponseStreamInputTypeDef(TypedDict):
EndpointName: str,
Body: BlobTypeDef,
ContentType: NotRequired[str],
Accept: NotRequired[str],
CustomAttributes: NotRequired[str],
TargetVariant: NotRequired[str],
TargetContainerHostname: NotRequired[str],
InferenceId: NotRequired[str],
InferenceComponentName: NotRequired[str],
SessionId: NotRequired[str],
InvokeEndpointAsyncOutputTypeDef#
# InvokeEndpointAsyncOutputTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import InvokeEndpointAsyncOutputTypeDef
def get_value() -> InvokeEndpointAsyncOutputTypeDef:
return {
"InferenceId": ...,
}
# InvokeEndpointAsyncOutputTypeDef definition
class InvokeEndpointAsyncOutputTypeDef(TypedDict):
InferenceId: str,
OutputLocation: str,
FailureLocation: str,
ResponseMetadata: ResponseMetadataTypeDef, # (1)
InvokeEndpointOutputTypeDef#
# InvokeEndpointOutputTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import InvokeEndpointOutputTypeDef
def get_value() -> InvokeEndpointOutputTypeDef:
return {
"Body": ...,
}
# InvokeEndpointOutputTypeDef definition
class InvokeEndpointOutputTypeDef(TypedDict):
Body: aiobotocore.response.StreamingBody,
ContentType: str,
InvokedProductionVariant: str,
CustomAttributes: str,
NewSessionId: str,
ClosedSessionId: str,
ResponseMetadata: ResponseMetadataTypeDef, # (1)
ResponseStreamTypeDef#
# ResponseStreamTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import ResponseStreamTypeDef
def get_value() -> ResponseStreamTypeDef:
return {
"PayloadPart": ...,
}
# ResponseStreamTypeDef definition
class ResponseStreamTypeDef(TypedDict):
PayloadPart: NotRequired[PayloadPartTypeDef], # (1)
ModelStreamError: NotRequired[ModelStreamErrorTypeDef], # (2)
InternalStreamFailure: NotRequired[InternalStreamFailureTypeDef], # (3)
InvokeEndpointWithResponseStreamOutputTypeDef#
# InvokeEndpointWithResponseStreamOutputTypeDef TypedDict usage example
from types_aiobotocore_sagemaker_runtime.type_defs import InvokeEndpointWithResponseStreamOutputTypeDef
def get_value() -> InvokeEndpointWithResponseStreamOutputTypeDef:
return {
"Body": ...,
}
# InvokeEndpointWithResponseStreamOutputTypeDef definition
class InvokeEndpointWithResponseStreamOutputTypeDef(TypedDict):
Body: aiobotocore.eventstream.AioEventStream[ResponseStreamTypeDef], # (1)
ContentType: str,
InvokedProductionVariant: str,
CustomAttributes: str,
ResponseMetadata: ResponseMetadataTypeDef, # (2)
- See
AioEventStream[ResponseStreamTypeDef]
- See ResponseMetadataTypeDef