MachineLearningClient#
Index > MachineLearning > MachineLearningClient
Auto-generated documentation for MachineLearning type annotations stubs module types-boto3-machinelearning.
MachineLearningClient#
Type annotations and code completion for boto3.client("machinelearning")
.
boto3 documentation
# MachineLearningClient usage example
from boto3.session import Session
from types_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 types_boto3_machinelearning.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
can_paginate#
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:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("machinelearning").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
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)
...
- See TagTypeDef
- See TaggableResourceTypeType
- See AddTagsOutputTypeDef
# add_tags method usage example with argument unpacking
kwargs: AddTagsInputRequestTypeDef = { # (1)
"Tags": ...,
"ResourceId": ...,
"ResourceType": ...,
}
parent.add_tags(**kwargs)
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)
...
# create_batch_prediction method usage example with argument unpacking
kwargs: CreateBatchPredictionInputRequestTypeDef = { # (1)
"BatchPredictionId": ...,
"MLModelId": ...,
"BatchPredictionDataSourceId": ...,
"OutputUri": ...,
}
parent.create_batch_prediction(**kwargs)
create_data_source_from_rds#
Creates a DataSource
object from an Amazon Relational Database Service
(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)
...
# create_data_source_from_rds method usage example with argument unpacking
kwargs: CreateDataSourceFromRDSInputRequestTypeDef = { # (1)
"DataSourceId": ...,
"RDSData": ...,
"RoleARN": ...,
}
parent.create_data_source_from_rds(**kwargs)
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)
...
# create_data_source_from_redshift method usage example with argument unpacking
kwargs: CreateDataSourceFromRedshiftInputRequestTypeDef = { # (1)
"DataSourceId": ...,
"DataSpec": ...,
"RoleARN": ...,
}
parent.create_data_source_from_redshift(**kwargs)
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)
...
# create_data_source_from_s3 method usage example with argument unpacking
kwargs: CreateDataSourceFromS3InputRequestTypeDef = { # (1)
"DataSourceId": ...,
"DataSpec": ...,
}
parent.create_data_source_from_s3(**kwargs)
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)
...
# create_evaluation method usage example with argument unpacking
kwargs: CreateEvaluationInputRequestTypeDef = { # (1)
"EvaluationId": ...,
"MLModelId": ...,
"EvaluationDataSourceId": ...,
}
parent.create_evaluation(**kwargs)
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)
...
# create_ml_model method usage example with argument unpacking
kwargs: CreateMLModelInputRequestTypeDef = { # (1)
"MLModelId": ...,
"MLModelType": ...,
"TrainingDataSourceId": ...,
}
parent.create_ml_model(**kwargs)
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)
...
# create_realtime_endpoint method usage example with argument unpacking
kwargs: CreateRealtimeEndpointInputRequestTypeDef = { # (1)
"MLModelId": ...,
}
parent.create_realtime_endpoint(**kwargs)
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)
...
# delete_batch_prediction method usage example with argument unpacking
kwargs: DeleteBatchPredictionInputRequestTypeDef = { # (1)
"BatchPredictionId": ...,
}
parent.delete_batch_prediction(**kwargs)
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)
...
# delete_data_source method usage example with argument unpacking
kwargs: DeleteDataSourceInputRequestTypeDef = { # (1)
"DataSourceId": ...,
}
parent.delete_data_source(**kwargs)
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)
...
# delete_evaluation method usage example with argument unpacking
kwargs: DeleteEvaluationInputRequestTypeDef = { # (1)
"EvaluationId": ...,
}
parent.delete_evaluation(**kwargs)
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)
...
# delete_ml_model method usage example with argument unpacking
kwargs: DeleteMLModelInputRequestTypeDef = { # (1)
"MLModelId": ...,
}
parent.delete_ml_model(**kwargs)
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)
...
# delete_realtime_endpoint method usage example with argument unpacking
kwargs: DeleteRealtimeEndpointInputRequestTypeDef = { # (1)
"MLModelId": ...,
}
parent.delete_realtime_endpoint(**kwargs)
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)
...
# delete_tags method usage example with argument unpacking
kwargs: DeleteTagsInputRequestTypeDef = { # (1)
"TagKeys": ...,
"ResourceId": ...,
"ResourceType": ...,
}
parent.delete_tags(**kwargs)
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.
boto3 documentation
# describe_batch_predictions method definition
def describe_batch_predictions(
self,
*,
FilterVariable: BatchPredictionFilterVariableType = ..., # (1)
EQ: str = ...,
GT: str = ...,
LT: str = ...,
GE: str = ...,
LE: str = ...,
NE: str = ...,
Prefix: str = ...,
SortOrder: SortOrderType = ..., # (2)
NextToken: str = ...,
Limit: int = ...,
) -> DescribeBatchPredictionsOutputTypeDef: # (3)
...
# describe_batch_predictions method usage example with argument unpacking
kwargs: DescribeBatchPredictionsInputRequestTypeDef = { # (1)
"FilterVariable": ...,
}
parent.describe_batch_predictions(**kwargs)
describe_data_sources#
Returns a list of DataSource
that match the search criteria in the
request.
Type annotations and code completion for boto3.client("machinelearning").describe_data_sources
method.
boto3 documentation
# describe_data_sources method definition
def describe_data_sources(
self,
*,
FilterVariable: DataSourceFilterVariableType = ..., # (1)
EQ: str = ...,
GT: str = ...,
LT: str = ...,
GE: str = ...,
LE: str = ...,
NE: str = ...,
Prefix: str = ...,
SortOrder: SortOrderType = ..., # (2)
NextToken: str = ...,
Limit: int = ...,
) -> DescribeDataSourcesOutputTypeDef: # (3)
...
# describe_data_sources method usage example with argument unpacking
kwargs: DescribeDataSourcesInputRequestTypeDef = { # (1)
"FilterVariable": ...,
}
parent.describe_data_sources(**kwargs)
describe_evaluations#
Returns a list of DescribeEvaluations
that match the search
criteria in the request.
Type annotations and code completion for boto3.client("machinelearning").describe_evaluations
method.
boto3 documentation
# describe_evaluations method definition
def describe_evaluations(
self,
*,
FilterVariable: EvaluationFilterVariableType = ..., # (1)
EQ: str = ...,
GT: str = ...,
LT: str = ...,
GE: str = ...,
LE: str = ...,
NE: str = ...,
Prefix: str = ...,
SortOrder: SortOrderType = ..., # (2)
NextToken: str = ...,
Limit: int = ...,
) -> DescribeEvaluationsOutputTypeDef: # (3)
...
# describe_evaluations method usage example with argument unpacking
kwargs: DescribeEvaluationsInputRequestTypeDef = { # (1)
"FilterVariable": ...,
}
parent.describe_evaluations(**kwargs)
describe_ml_models#
Returns a list of MLModel
that match the search criteria in the
request.
Type annotations and code completion for boto3.client("machinelearning").describe_ml_models
method.
boto3 documentation
# describe_ml_models method definition
def describe_ml_models(
self,
*,
FilterVariable: MLModelFilterVariableType = ..., # (1)
EQ: str = ...,
GT: str = ...,
LT: str = ...,
GE: str = ...,
LE: str = ...,
NE: str = ...,
Prefix: str = ...,
SortOrder: SortOrderType = ..., # (2)
NextToken: str = ...,
Limit: int = ...,
) -> DescribeMLModelsOutputTypeDef: # (3)
...
# describe_ml_models method usage example with argument unpacking
kwargs: DescribeMLModelsInputRequestTypeDef = { # (1)
"FilterVariable": ...,
}
parent.describe_ml_models(**kwargs)
describe_tags#
Describes one or more of the tags for your Amazon ML object.
Type annotations and code completion for boto3.client("machinelearning").describe_tags
method.
boto3 documentation
# describe_tags method definition
def describe_tags(
self,
*,
ResourceId: str,
ResourceType: TaggableResourceTypeType, # (1)
) -> DescribeTagsOutputTypeDef: # (2)
...
# describe_tags method usage example with argument unpacking
kwargs: DescribeTagsInputRequestTypeDef = { # (1)
"ResourceId": ...,
"ResourceType": ...,
}
parent.describe_tags(**kwargs)
get_batch_prediction#
Returns a BatchPrediction
that includes detailed metadata, status,
and data file information for a Batch Prediction
request.
Type annotations and code completion for boto3.client("machinelearning").get_batch_prediction
method.
boto3 documentation
# get_batch_prediction method definition
def get_batch_prediction(
self,
*,
BatchPredictionId: str,
) -> GetBatchPredictionOutputTypeDef: # (1)
...
# get_batch_prediction method usage example with argument unpacking
kwargs: GetBatchPredictionInputRequestTypeDef = { # (1)
"BatchPredictionId": ...,
}
parent.get_batch_prediction(**kwargs)
get_data_source#
Returns a DataSource
that includes metadata and data file
information, as well as the current status of the DataSource
.
Type annotations and code completion for boto3.client("machinelearning").get_data_source
method.
boto3 documentation
# get_data_source method definition
def get_data_source(
self,
*,
DataSourceId: str,
Verbose: bool = ...,
) -> GetDataSourceOutputTypeDef: # (1)
...
# get_data_source method usage example with argument unpacking
kwargs: GetDataSourceInputRequestTypeDef = { # (1)
"DataSourceId": ...,
}
parent.get_data_source(**kwargs)
get_evaluation#
Returns an Evaluation
that includes metadata as well as the
current status of the Evaluation
.
Type annotations and code completion for boto3.client("machinelearning").get_evaluation
method.
boto3 documentation
# get_evaluation method definition
def get_evaluation(
self,
*,
EvaluationId: str,
) -> GetEvaluationOutputTypeDef: # (1)
...
# get_evaluation method usage example with argument unpacking
kwargs: GetEvaluationInputRequestTypeDef = { # (1)
"EvaluationId": ...,
}
parent.get_evaluation(**kwargs)
get_ml_model#
Returns an MLModel
that includes detailed metadata, data source
information, and the current status of the MLModel
.
Type annotations and code completion for boto3.client("machinelearning").get_ml_model
method.
boto3 documentation
# get_ml_model method definition
def get_ml_model(
self,
*,
MLModelId: str,
Verbose: bool = ...,
) -> GetMLModelOutputTypeDef: # (1)
...
# get_ml_model method usage example with argument unpacking
kwargs: GetMLModelInputRequestTypeDef = { # (1)
"MLModelId": ...,
}
parent.get_ml_model(**kwargs)
predict#
Generates a prediction for the observation using the specified ML
Model
.
Type annotations and code completion for boto3.client("machinelearning").predict
method.
boto3 documentation
# predict method definition
def predict(
self,
*,
MLModelId: str,
Record: Mapping[str, str],
PredictEndpoint: str,
) -> PredictOutputTypeDef: # (1)
...
# predict method usage example with argument unpacking
kwargs: PredictInputRequestTypeDef = { # (1)
"MLModelId": ...,
"Record": ...,
"PredictEndpoint": ...,
}
parent.predict(**kwargs)
update_batch_prediction#
Updates the BatchPredictionName
of a BatchPrediction
.
Type annotations and code completion for boto3.client("machinelearning").update_batch_prediction
method.
boto3 documentation
# update_batch_prediction method definition
def update_batch_prediction(
self,
*,
BatchPredictionId: str,
BatchPredictionName: str,
) -> UpdateBatchPredictionOutputTypeDef: # (1)
...
# update_batch_prediction method usage example with argument unpacking
kwargs: UpdateBatchPredictionInputRequestTypeDef = { # (1)
"BatchPredictionId": ...,
"BatchPredictionName": ...,
}
parent.update_batch_prediction(**kwargs)
update_data_source#
Updates the DataSourceName
of a DataSource
.
Type annotations and code completion for boto3.client("machinelearning").update_data_source
method.
boto3 documentation
# update_data_source method definition
def update_data_source(
self,
*,
DataSourceId: str,
DataSourceName: str,
) -> UpdateDataSourceOutputTypeDef: # (1)
...
# update_data_source method usage example with argument unpacking
kwargs: UpdateDataSourceInputRequestTypeDef = { # (1)
"DataSourceId": ...,
"DataSourceName": ...,
}
parent.update_data_source(**kwargs)
update_evaluation#
Updates the EvaluationName
of an Evaluation
.
Type annotations and code completion for boto3.client("machinelearning").update_evaluation
method.
boto3 documentation
# update_evaluation method definition
def update_evaluation(
self,
*,
EvaluationId: str,
EvaluationName: str,
) -> UpdateEvaluationOutputTypeDef: # (1)
...
# update_evaluation method usage example with argument unpacking
kwargs: UpdateEvaluationInputRequestTypeDef = { # (1)
"EvaluationId": ...,
"EvaluationName": ...,
}
parent.update_evaluation(**kwargs)
update_ml_model#
Updates the MLModelName
and the ScoreThreshold
of an
MLModel
.
Type annotations and code completion for boto3.client("machinelearning").update_ml_model
method.
boto3 documentation
# update_ml_model method definition
def update_ml_model(
self,
*,
MLModelId: str,
MLModelName: str = ...,
ScoreThreshold: float = ...,
) -> UpdateMLModelOutputTypeDef: # (1)
...
# update_ml_model method usage example with argument unpacking
kwargs: UpdateMLModelInputRequestTypeDef = { # (1)
"MLModelId": ...,
}
parent.update_ml_model(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("machinelearning").get_paginator
method with overloads.
client.get_paginator("describe_batch_predictions")
-> DescribeBatchPredictionsPaginatorclient.get_paginator("describe_data_sources")
-> DescribeDataSourcesPaginatorclient.get_paginator("describe_evaluations")
-> DescribeEvaluationsPaginatorclient.get_paginator("describe_ml_models")
-> DescribeMLModelsPaginator
get_waiter#
Type annotations and code completion for boto3.client("machinelearning").get_waiter
method with overloads.
client.get_waiter("batch_prediction_available")
-> BatchPredictionAvailableWaiterclient.get_waiter("data_source_available")
-> DataSourceAvailableWaiterclient.get_waiter("evaluation_available")
-> EvaluationAvailableWaiterclient.get_waiter("ml_model_available")
-> MLModelAvailableWaiter