SageMakerRuntimeClient
Index > SageMakerRuntime > SageMakerRuntimeClient
Auto-generated documentation for SageMakerRuntime type annotations stubs module types-aiobotocore-sagemaker-runtime.
SageMakerRuntimeClient
Type annotations and code completion for session.client("sagemaker-runtime")
boto3 documentation
from aioboto3.session import Session
from types_aiobotocore_sagemaker_runtime.client import SageMakerRuntimeClient
session = Session()
async with session.client("sagemaker-runtime") as client:
client: SageMakerRuntimeClient
Exceptions
aioboto3
client exceptions are generated in runtime.
This class provides code completion for session.client("sagemaker-runtime").exceptions
structure.
async with session.client("sagemaker-runtime") as client:
try:
do_something(client)
except (
client.ClientError,
client.InternalDependencyException,
client.InternalFailure,
client.ModelError,
client.ModelNotReadyException,
client.ServiceUnavailable,
client.ValidationError,
) as e:
print(e)
from types_aiobotocore_sagemaker_runtime.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for session.client("sagemaker-runtime").can_paginate
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for session.client("sagemaker-runtime").close
method.
boto3 documentation
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for session.client("sagemaker-runtime").generate_presigned_url
method.
boto3 documentation
await def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
invoke_endpoint
After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint.
Type annotations and code completion for session.client("sagemaker-runtime").invoke_endpoint
method.
boto3 documentation
await def invoke_endpoint(
self,
*,
EndpointName: str,
Body: Union[str, bytes, IO[Any], StreamingBody],
ContentType: str = ...,
Accept: str = ...,
CustomAttributes: str = ...,
TargetModel: str = ...,
TargetVariant: str = ...,
TargetContainerHostname: str = ...,
InferenceId: str = ...,
) -> InvokeEndpointOutputTypeDef: # (1)
...
kwargs: InvokeEndpointInputRequestTypeDef = { # (1)
"EndpointName": ...,
"Body": ...,
}
parent.invoke_endpoint(**kwargs)
invoke_endpoint_async
.
Type annotations and code completion for session.client("sagemaker-runtime").invoke_endpoint_async
method.
boto3 documentation
await def invoke_endpoint_async(
self,
*,
EndpointName: str,
InputLocation: str,
ContentType: str = ...,
Accept: str = ...,
CustomAttributes: str = ...,
InferenceId: str = ...,
RequestTTLSeconds: int = ...,
) -> InvokeEndpointAsyncOutputTypeDef: # (1)
...
kwargs: InvokeEndpointAsyncInputRequestTypeDef = { # (1)
"EndpointName": ...,
"InputLocation": ...,
}
parent.invoke_endpoint_async(**kwargs)
__aenter__
Type annotations and code completion for session.client("sagemaker-runtime").__aenter__
method.
boto3 documentation
__aexit__
Type annotations and code completion for session.client("sagemaker-runtime").__aexit__
method.
boto3 documentation