Skip to content

Type definitions#

Index > SageMakerRuntime > Type definitions

Auto-generated documentation for SageMakerRuntime type annotations stubs module mypy-boto3-sagemaker-runtime.

BlobTypeDef#

# BlobTypeDef definition

BlobTypeDef = Union[
    str,
    bytes,
    IO[Any],
    StreamingBody,
]

InternalStreamFailureTypeDef#

# InternalStreamFailureTypeDef definition

class InternalStreamFailureTypeDef(TypedDict):
    Message: NotRequired[str],

InvokeEndpointAsyncInputRequestTypeDef#

# 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],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,
    HostId: NotRequired[str],

ModelStreamErrorTypeDef#

# ModelStreamErrorTypeDef definition

class ModelStreamErrorTypeDef(TypedDict):
    Message: NotRequired[str],
    ErrorCode: NotRequired[str],

PayloadPartTypeDef#

# PayloadPartTypeDef definition

class PayloadPartTypeDef(TypedDict):
    Bytes: NotRequired[bytes],

InvokeEndpointInputRequestTypeDef#

# 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],
    InferenceComponentName: NotRequired[str],

InvokeEndpointWithResponseStreamInputRequestTypeDef#

# InvokeEndpointWithResponseStreamInputRequestTypeDef definition

class InvokeEndpointWithResponseStreamInputRequestTypeDef(TypedDict):
    EndpointName: str,
    Body: Union[str, bytes, IO[Any], StreamingBody],
    ContentType: NotRequired[str],
    Accept: NotRequired[str],
    CustomAttributes: NotRequired[str],
    TargetVariant: NotRequired[str],
    TargetContainerHostname: NotRequired[str],
    InferenceId: NotRequired[str],
    InferenceComponentName: NotRequired[str],

InvokeEndpointAsyncOutputTypeDef#

# InvokeEndpointAsyncOutputTypeDef definition

class InvokeEndpointAsyncOutputTypeDef(TypedDict):
    InferenceId: str,
    OutputLocation: str,
    FailureLocation: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

InvokeEndpointOutputTypeDef#

# InvokeEndpointOutputTypeDef definition

class InvokeEndpointOutputTypeDef(TypedDict):
    Body: StreamingBody,
    ContentType: str,
    InvokedProductionVariant: str,
    CustomAttributes: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ResponseStreamTypeDef#

# ResponseStreamTypeDef definition

class ResponseStreamTypeDef(TypedDict):
    PayloadPart: NotRequired[PayloadPartTypeDef],  # (1)
    ModelStreamError: NotRequired[ModelStreamErrorTypeDef],  # (2)
    InternalStreamFailure: NotRequired[InternalStreamFailureTypeDef],  # (3)
  1. See PayloadPartTypeDef
  2. See ModelStreamErrorTypeDef
  3. See InternalStreamFailureTypeDef

InvokeEndpointWithResponseStreamOutputTypeDef#

# InvokeEndpointWithResponseStreamOutputTypeDef definition

class InvokeEndpointWithResponseStreamOutputTypeDef(TypedDict):
    Body: EventStream[ResponseStreamTypeDef],  # (1)
    ContentType: str,
    InvokedProductionVariant: str,
    CustomAttributes: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ResponseStreamTypeDef
  2. See ResponseMetadataTypeDef