Skip to content

MachineLearningClient#

Index > MachineLearning > MachineLearningClient

Auto-generated documentation for MachineLearning type annotations stubs module mypy-boto3-machinelearning.

MachineLearningClient#

Type annotations and code completion for boto3.client("machinelearning"). boto3 documentation

# MachineLearningClient usage example

from boto3.session import Session
from mypy_boto3_machinelearning.client import MachineLearningClient

def get_machinelearning_client() -> MachineLearningClient:
    return Session().client("machinelearning")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("machinelearning").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("machinelearning")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.IdempotentParameterMismatchException,
    client.exceptions.InternalServerException,
    client.exceptions.InvalidInputException,
    client.exceptions.InvalidTagException,
    client.exceptions.LimitExceededException,
    client.exceptions.PredictorNotMountedException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.TagLimitExceededException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_machinelearning.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods#

add_tags#

Adds one or more tags to an object, up to a limit of 10.

Type annotations and code completion for boto3.client("machinelearning").add_tags method. boto3 documentation

# add_tags method definition

def add_tags(
    self,
    *,
    Tags: Sequence[TagTypeDef],  # (1)
    ResourceId: str,
    ResourceType: TaggableResourceTypeType,  # (2)
) -> AddTagsOutputTypeDef:  # (3)
    ...
  1. See TagTypeDef
  2. See TaggableResourceTypeType
  3. See AddTagsOutputTypeDef
# add_tags method usage example with argument unpacking

kwargs: AddTagsInputRequestTypeDef = {  # (1)
    "Tags": ...,
    "ResourceId": ...,
    "ResourceType": ...,
}

parent.add_tags(**kwargs)
  1. See AddTagsInputRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("machinelearning").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("machinelearning").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_batch_prediction#

Generates predictions for a group of observations.

Type annotations and code completion for boto3.client("machinelearning").create_batch_prediction method. boto3 documentation

# create_batch_prediction method definition

def create_batch_prediction(
    self,
    *,
    BatchPredictionId: str,
    MLModelId: str,
    BatchPredictionDataSourceId: str,
    OutputUri: str,
    BatchPredictionName: str = ...,
) -> CreateBatchPredictionOutputTypeDef:  # (1)
    ...
  1. See CreateBatchPredictionOutputTypeDef
# create_batch_prediction method usage example with argument unpacking

kwargs: CreateBatchPredictionInputRequestTypeDef = {  # (1)
    "BatchPredictionId": ...,
    "MLModelId": ...,
    "BatchPredictionDataSourceId": ...,
    "OutputUri": ...,
}

parent.create_batch_prediction(**kwargs)
  1. See CreateBatchPredictionInputRequestTypeDef

create_data_source_from_rds#

Creates a DataSource object from an Amazon Relational Database Service <http://aws.amazon.com/rds/>__ (Amazon RDS).

Type annotations and code completion for boto3.client("machinelearning").create_data_source_from_rds method. boto3 documentation

# create_data_source_from_rds method definition

def create_data_source_from_rds(
    self,
    *,
    DataSourceId: str,
    RDSData: RDSDataSpecTypeDef,  # (1)
    RoleARN: str,
    DataSourceName: str = ...,
    ComputeStatistics: bool = ...,
) -> CreateDataSourceFromRDSOutputTypeDef:  # (2)
    ...
  1. See RDSDataSpecTypeDef
  2. See CreateDataSourceFromRDSOutputTypeDef
# create_data_source_from_rds method usage example with argument unpacking

kwargs: CreateDataSourceFromRDSInputRequestTypeDef = {  # (1)
    "DataSourceId": ...,
    "RDSData": ...,
    "RoleARN": ...,
}

parent.create_data_source_from_rds(**kwargs)
  1. See CreateDataSourceFromRDSInputRequestTypeDef

create_data_source_from_redshift#

Creates a DataSource from a database hosted on an Amazon Redshift cluster.

Type annotations and code completion for boto3.client("machinelearning").create_data_source_from_redshift method. boto3 documentation

# create_data_source_from_redshift method definition

def create_data_source_from_redshift(
    self,
    *,
    DataSourceId: str,
    DataSpec: RedshiftDataSpecTypeDef,  # (1)
    RoleARN: str,
    DataSourceName: str = ...,
    ComputeStatistics: bool = ...,
) -> CreateDataSourceFromRedshiftOutputTypeDef:  # (2)
    ...
  1. See RedshiftDataSpecTypeDef
  2. See CreateDataSourceFromRedshiftOutputTypeDef
# create_data_source_from_redshift method usage example with argument unpacking

kwargs: CreateDataSourceFromRedshiftInputRequestTypeDef = {  # (1)
    "DataSourceId": ...,
    "DataSpec": ...,
    "RoleARN": ...,
}

parent.create_data_source_from_redshift(**kwargs)
  1. See CreateDataSourceFromRedshiftInputRequestTypeDef

create_data_source_from_s3#

Creates a DataSource object.

Type annotations and code completion for boto3.client("machinelearning").create_data_source_from_s3 method. boto3 documentation

# create_data_source_from_s3 method definition

def create_data_source_from_s3(
    self,
    *,
    DataSourceId: str,
    DataSpec: S3DataSpecTypeDef,  # (1)
    DataSourceName: str = ...,
    ComputeStatistics: bool = ...,
) -> CreateDataSourceFromS3OutputTypeDef:  # (2)
    ...
  1. See S3DataSpecTypeDef
  2. See CreateDataSourceFromS3OutputTypeDef
# create_data_source_from_s3 method usage example with argument unpacking

kwargs: CreateDataSourceFromS3InputRequestTypeDef = {  # (1)
    "DataSourceId": ...,
    "DataSpec": ...,
}

parent.create_data_source_from_s3(**kwargs)
  1. See CreateDataSourceFromS3InputRequestTypeDef

create_evaluation#

Creates a new Evaluation of an MLModel.

Type annotations and code completion for boto3.client("machinelearning").create_evaluation method. boto3 documentation

# create_evaluation method definition

def create_evaluation(
    self,
    *,
    EvaluationId: str,
    MLModelId: str,
    EvaluationDataSourceId: str,
    EvaluationName: str = ...,
) -> CreateEvaluationOutputTypeDef:  # (1)
    ...
  1. See CreateEvaluationOutputTypeDef
# create_evaluation method usage example with argument unpacking

kwargs: CreateEvaluationInputRequestTypeDef = {  # (1)
    "EvaluationId": ...,
    "MLModelId": ...,
    "EvaluationDataSourceId": ...,
}

parent.create_evaluation(**kwargs)
  1. See CreateEvaluationInputRequestTypeDef

create_ml_model#

Creates a new MLModel using the DataSource and the recipe as information sources.

Type annotations and code completion for boto3.client("machinelearning").create_ml_model method. boto3 documentation

# create_ml_model method definition

def create_ml_model(
    self,
    *,
    MLModelId: str,
    MLModelType: MLModelTypeType,  # (1)
    TrainingDataSourceId: str,
    MLModelName: str = ...,
    Parameters: Mapping[str, str] = ...,
    Recipe: str = ...,
    RecipeUri: str = ...,
) -> CreateMLModelOutputTypeDef:  # (2)
    ...
  1. See MLModelTypeType
  2. See CreateMLModelOutputTypeDef
# create_ml_model method usage example with argument unpacking

kwargs: CreateMLModelInputRequestTypeDef = {  # (1)
    "MLModelId": ...,
    "MLModelType": ...,
    "TrainingDataSourceId": ...,
}

parent.create_ml_model(**kwargs)
  1. See CreateMLModelInputRequestTypeDef

create_realtime_endpoint#

Creates a real-time endpoint for the MLModel.

Type annotations and code completion for boto3.client("machinelearning").create_realtime_endpoint method. boto3 documentation

# create_realtime_endpoint method definition

def create_realtime_endpoint(
    self,
    *,
    MLModelId: str,
) -> CreateRealtimeEndpointOutputTypeDef:  # (1)
    ...
  1. See CreateRealtimeEndpointOutputTypeDef
# create_realtime_endpoint method usage example with argument unpacking

kwargs: CreateRealtimeEndpointInputRequestTypeDef = {  # (1)
    "MLModelId": ...,
}

parent.create_realtime_endpoint(**kwargs)
  1. See CreateRealtimeEndpointInputRequestTypeDef

delete_batch_prediction#

Assigns the DELETED status to a BatchPrediction, rendering it unusable.

Type annotations and code completion for boto3.client("machinelearning").delete_batch_prediction method. boto3 documentation

# delete_batch_prediction method definition

def delete_batch_prediction(
    self,
    *,
    BatchPredictionId: str,
) -> DeleteBatchPredictionOutputTypeDef:  # (1)
    ...
  1. See DeleteBatchPredictionOutputTypeDef
# delete_batch_prediction method usage example with argument unpacking

kwargs: DeleteBatchPredictionInputRequestTypeDef = {  # (1)
    "BatchPredictionId": ...,
}

parent.delete_batch_prediction(**kwargs)
  1. See DeleteBatchPredictionInputRequestTypeDef

delete_data_source#

Assigns the DELETED status to a DataSource, rendering it unusable.

Type annotations and code completion for boto3.client("machinelearning").delete_data_source method. boto3 documentation

# delete_data_source method definition

def delete_data_source(
    self,
    *,
    DataSourceId: str,
) -> DeleteDataSourceOutputTypeDef:  # (1)
    ...
  1. See DeleteDataSourceOutputTypeDef
# delete_data_source method usage example with argument unpacking

kwargs: DeleteDataSourceInputRequestTypeDef = {  # (1)
    "DataSourceId": ...,
}

parent.delete_data_source(**kwargs)
  1. See DeleteDataSourceInputRequestTypeDef

delete_evaluation#

Assigns the DELETED status to an Evaluation, rendering it unusable.

Type annotations and code completion for boto3.client("machinelearning").delete_evaluation method. boto3 documentation

# delete_evaluation method definition

def delete_evaluation(
    self,
    *,
    EvaluationId: str,
) -> DeleteEvaluationOutputTypeDef:  # (1)
    ...
  1. See DeleteEvaluationOutputTypeDef
# delete_evaluation method usage example with argument unpacking

kwargs: DeleteEvaluationInputRequestTypeDef = {  # (1)
    "EvaluationId": ...,
}

parent.delete_evaluation(**kwargs)
  1. See DeleteEvaluationInputRequestTypeDef

delete_ml_model#

Assigns the DELETED status to an MLModel, rendering it unusable.

Type annotations and code completion for boto3.client("machinelearning").delete_ml_model method. boto3 documentation

# delete_ml_model method definition

def delete_ml_model(
    self,
    *,
    MLModelId: str,
) -> DeleteMLModelOutputTypeDef:  # (1)
    ...
  1. See DeleteMLModelOutputTypeDef
# delete_ml_model method usage example with argument unpacking

kwargs: DeleteMLModelInputRequestTypeDef = {  # (1)
    "MLModelId": ...,
}

parent.delete_ml_model(**kwargs)
  1. See DeleteMLModelInputRequestTypeDef

delete_realtime_endpoint#

Deletes a real time endpoint of an MLModel.

Type annotations and code completion for boto3.client("machinelearning").delete_realtime_endpoint method. boto3 documentation

# delete_realtime_endpoint method definition

def delete_realtime_endpoint(
    self,
    *,
    MLModelId: str,
) -> DeleteRealtimeEndpointOutputTypeDef:  # (1)
    ...
  1. See DeleteRealtimeEndpointOutputTypeDef
# delete_realtime_endpoint method usage example with argument unpacking

kwargs: DeleteRealtimeEndpointInputRequestTypeDef = {  # (1)
    "MLModelId": ...,
}

parent.delete_realtime_endpoint(**kwargs)
  1. See DeleteRealtimeEndpointInputRequestTypeDef

delete_tags#

Deletes the specified tags associated with an ML object.

Type annotations and code completion for boto3.client("machinelearning").delete_tags method. boto3 documentation

# delete_tags method definition

def delete_tags(
    self,
    *,
    TagKeys: Sequence[str],
    ResourceId: str,
    ResourceType: TaggableResourceTypeType,  # (1)
) -> DeleteTagsOutputTypeDef:  # (2)
    ...
  1. See TaggableResourceTypeType
  2. See DeleteTagsOutputTypeDef
# delete_tags method usage example with argument unpacking

kwargs: DeleteTagsInputRequestTypeDef = {  # (1)
    "TagKeys": ...,
    "ResourceId": ...,
    "ResourceType": ...,
}

parent.delete_tags(**kwargs)
  1. See DeleteTagsInputRequestTypeDef

describe_batch_predictions#

Returns a list of BatchPrediction operations that match the search criteria in the request.

Type annotations and code completion for boto3.client("machinelearning").describe_batch_predictions method.