Typed dictionaries#
Index > SageMakerRuntime > Typed dictionaries
Auto-generated documentation for SageMakerRuntime type annotations stubs module mypy-boto3-sagemaker-runtime.
InvokeEndpointAsyncInputRequestTypeDef#
# InvokeEndpointAsyncInputRequestTypeDef usage example
from mypy_boto3_sagemaker_runtime.type_defs import InvokeEndpointAsyncInputRequestTypeDef
def get_value() -> InvokeEndpointAsyncInputRequestTypeDef:
return {
"EndpointName": ...,
"InputLocation": ...,
}
# InvokeEndpointAsyncInputRequestTypeDef definition
class InvokeEndpointAsyncInputRequestTypeDef(TypedDict):
EndpointName: str,
InputLocation: str,
ContentType: NotRequired[str],
Accept: NotRequired[str],
CustomAttributes: NotRequired[str],
InferenceId: NotRequired[str],
RequestTTLSeconds: NotRequired[int],
InvocationTimeoutSeconds: NotRequired[int],
InvokeEndpointAsyncOutputTypeDef#
# InvokeEndpointAsyncOutputTypeDef usage example
from mypy_boto3_sagemaker_runtime.type_defs import InvokeEndpointAsyncOutputTypeDef
def get_value() -> InvokeEndpointAsyncOutputTypeDef:
return {
"InferenceId": ...,
"OutputLocation": ...,
"FailureLocation": ...,
"ResponseMetadata": ...,
}
# InvokeEndpointAsyncOutputTypeDef definition
class InvokeEndpointAsyncOutputTypeDef(TypedDict):
InferenceId: str,
OutputLocation: str,
FailureLocation: str,
ResponseMetadata: ResponseMetadataTypeDef, # (1)
InvokeEndpointInputRequestTypeDef#
# InvokeEndpointInputRequestTypeDef usage example
from mypy_boto3_sagemaker_runtime.type_defs import InvokeEndpointInputRequestTypeDef
def get_value() -> InvokeEndpointInputRequestTypeDef:
return {
"EndpointName": ...,
"Body": ...,
}
# InvokeEndpointInputRequestTypeDef definition
class InvokeEndpointInputRequestTypeDef(TypedDict):
EndpointName: str,
Body: Union[str, bytes, IO[Any], StreamingBody],
ContentType: NotRequired[str],
Accept: NotRequired[str],
CustomAttributes: NotRequired[str],
TargetModel: NotRequired[str],
TargetVariant: NotRequired[str],
TargetContainerHostname: NotRequired[str],
InferenceId: NotRequired[str],
EnableExplanations: NotRequired[str],
InvokeEndpointOutputTypeDef#
# InvokeEndpointOutputTypeDef usage example
from mypy_boto3_sagemaker_runtime.type_defs import InvokeEndpointOutputTypeDef
def get_value() -> InvokeEndpointOutputTypeDef:
return {
"Body": ...,
"ContentType": ...,
"InvokedProductionVariant": ...,
"CustomAttributes": ...,
"ResponseMetadata": ...,
}
# InvokeEndpointOutputTypeDef definition
class InvokeEndpointOutputTypeDef(TypedDict):
Body: StreamingBody,
ContentType: str,
InvokedProductionVariant: str,
CustomAttributes: str,
ResponseMetadata: ResponseMetadataTypeDef, # (1)
ResponseMetadataTypeDef#
# ResponseMetadataTypeDef usage example
from mypy_boto3_sagemaker_runtime.type_defs import ResponseMetadataTypeDef
def get_value() -> ResponseMetadataTypeDef:
return {
"RequestId": ...,
"HostId": ...,
"HTTPStatusCode": ...,
"HTTPHeaders": ...,
"RetryAttempts": ...,
}
# ResponseMetadataTypeDef definition
class ResponseMetadataTypeDef(TypedDict):
RequestId: str,
HostId: str,
HTTPStatusCode: int,
HTTPHeaders: Dict[str, str],
RetryAttempts: int,