pub struct Client { /* private fields */ }
Expand description
Client for Amazon Lookout for Vision
Client for invoking operations on Amazon Lookout for Vision. Each operation on Amazon Lookout for Vision is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_lookoutvision::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_lookoutvision::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateDataset
operation has
a Client::create_dataset
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.create_dataset()
.project_name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn create_dataset(&self) -> CreateDatasetFluentBuilder
pub fn create_dataset(&self) -> CreateDatasetFluentBuilder
Constructs a fluent builder for the CreateDataset
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project in which you want to create a dataset.
dataset_type(impl Into<String>)
/set_dataset_type(Option<String>)
:
required: trueThe type of the dataset. Specify
train
for a training dataset. Specifytest
for a test dataset.dataset_source(DatasetSource)
/set_dataset_source(Option<DatasetSource>)
:
required: falseThe location of the manifest file that Amazon Lookout for Vision uses to create the dataset.
If you don’t specify
DatasetSource
, an empty dataset is created and the operation synchronously returns. Later, you can add JSON Lines by callingUpdateDatasetEntries
.If you specify a value for
DataSource
, the manifest at the S3 location is validated and used to create the dataset. The call toCreateDataset
is asynchronous and might take a while to complete. To find out the current status, Check the value ofStatus
returned in a call toDescribeDataset
.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
CreateDataset
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromCreateDataset
. In this case, safely retry your call toCreateDataset
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple dataset creation requests. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toCreateDataset
. An idempotency token is active for 8 hours.
- On success, responds with
CreateDatasetOutput
with field(s):dataset_metadata(Option<DatasetMetadata>)
:Information about the dataset.
- On failure, responds with
SdkError<CreateDatasetError>
Source§impl Client
impl Client
Sourcepub fn create_model(&self) -> CreateModelFluentBuilder
pub fn create_model(&self) -> CreateModelFluentBuilder
Constructs a fluent builder for the CreateModel
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project in which you want to create a model version.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description for the version of the model.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
CreateModel
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromCreateModel
. In this case, safely retry your call toCreateModel
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from starting multiple training jobs. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toCreateModel
. An idempotency token is active for 8 hours.output_config(OutputConfig)
/set_output_config(Option<OutputConfig>)
:
required: trueThe location where Amazon Lookout for Vision saves the training results.
kms_key_id(impl Into<String>)
/set_kms_key_id(Option<String>)
:
required: falseThe identifier for your AWS KMS key. The key is used to encrypt training and test images copied into the service for model training. Your source images are unaffected. If this parameter is not specified, the copied images are encrypted by a key that AWS owns and manages.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseA set of tags (key-value pairs) that you want to attach to the model.
- On success, responds with
CreateModelOutput
with field(s):model_metadata(Option<ModelMetadata>)
:The response from a call to
CreateModel
.
- On failure, responds with
SdkError<CreateModelError>
Source§impl Client
impl Client
Sourcepub fn create_project(&self) -> CreateProjectFluentBuilder
pub fn create_project(&self) -> CreateProjectFluentBuilder
Constructs a fluent builder for the CreateProject
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name for the project.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
CreateProject
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromCreateProject
. In this case, safely retry your call toCreateProject
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple project creation requests. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toCreateProject
. An idempotency token is active for 8 hours.
- On success, responds with
CreateProjectOutput
with field(s):project_metadata(Option<ProjectMetadata>)
:Information about the project.
- On failure, responds with
SdkError<CreateProjectError>
Source§impl Client
impl Client
Sourcepub fn delete_dataset(&self) -> DeleteDatasetFluentBuilder
pub fn delete_dataset(&self) -> DeleteDatasetFluentBuilder
Constructs a fluent builder for the DeleteDataset
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the dataset that you want to delete.
dataset_type(impl Into<String>)
/set_dataset_type(Option<String>)
:
required: trueThe type of the dataset to delete. Specify
train
to delete the training dataset. Specifytest
to delete the test dataset. To delete the dataset in a single dataset project, specifytrain
.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
DeleteDataset
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromDeleteDataset
. In this case, safely retry your call toDeleteDataset
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple deletetion requests. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toDeleteDataset
. An idempotency token is active for 8 hours.
- On success, responds with
DeleteDatasetOutput
- On failure, responds with
SdkError<DeleteDatasetError>
Source§impl Client
impl Client
Sourcepub fn delete_model(&self) -> DeleteModelFluentBuilder
pub fn delete_model(&self) -> DeleteModelFluentBuilder
Constructs a fluent builder for the DeleteModel
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the model that you want to delete.
model_version(impl Into<String>)
/set_model_version(Option<String>)
:
required: trueThe version of the model that you want to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
DeleteModel
completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response fromDeleteModel
. In this case, safely retry your call toDeleteModel
by using the sameClientToken
parameter value.If you don’t supply a value for ClientToken, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple model deletion requests. You’ll need to provide your own value for other use cases.
An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toDeleteModel
. An idempotency token is active for 8 hours.
- On success, responds with
DeleteModelOutput
with field(s):model_arn(Option<String>)
:The Amazon Resource Name (ARN) of the model that was deleted.
- On failure, responds with
SdkError<DeleteModelError>
Source§impl Client
impl Client
Sourcepub fn delete_project(&self) -> DeleteProjectFluentBuilder
pub fn delete_project(&self) -> DeleteProjectFluentBuilder
Constructs a fluent builder for the DeleteProject
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
DeleteProject
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromDeleteProject
. In this case, safely retry your call toDeleteProject
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple project deletion requests. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toDeleteProject
. An idempotency token is active for 8 hours.
- On success, responds with
DeleteProjectOutput
with field(s):project_arn(Option<String>)
:The Amazon Resource Name (ARN) of the project that was deleted.
- On failure, responds with
SdkError<DeleteProjectError>
Source§impl Client
impl Client
Sourcepub fn describe_dataset(&self) -> DescribeDatasetFluentBuilder
pub fn describe_dataset(&self) -> DescribeDatasetFluentBuilder
Constructs a fluent builder for the DescribeDataset
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the dataset that you want to describe.
dataset_type(impl Into<String>)
/set_dataset_type(Option<String>)
:
required: trueThe type of the dataset to describe. Specify
train
to describe the training dataset. Specifytest
to describe the test dataset. If you have a single dataset project, specifytrain
- On success, responds with
DescribeDatasetOutput
with field(s):dataset_description(Option<DatasetDescription>)
:The description of the requested dataset.
- On failure, responds with
SdkError<DescribeDatasetError>
Source§impl Client
impl Client
Sourcepub fn describe_model(&self) -> DescribeModelFluentBuilder
pub fn describe_model(&self) -> DescribeModelFluentBuilder
Constructs a fluent builder for the DescribeModel
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe project that contains the version of a model that you want to describe.
model_version(impl Into<String>)
/set_model_version(Option<String>)
:
required: trueThe version of the model that you want to describe.
- On success, responds with
DescribeModelOutput
with field(s):model_description(Option<ModelDescription>)
:Contains the description of the model.
- On failure, responds with
SdkError<DescribeModelError>
Source§impl Client
impl Client
Sourcepub fn describe_model_packaging_job(
&self,
) -> DescribeModelPackagingJobFluentBuilder
pub fn describe_model_packaging_job( &self, ) -> DescribeModelPackagingJobFluentBuilder
Constructs a fluent builder for the DescribeModelPackagingJob
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the model packaging job that you want to describe.
job_name(impl Into<String>)
/set_job_name(Option<String>)
:
required: trueThe job name for the model packaging job.
- On success, responds with
DescribeModelPackagingJobOutput
with field(s):model_packaging_description(Option<ModelPackagingDescription>)
:The description of the model packaging job.
- On failure, responds with
SdkError<DescribeModelPackagingJobError>
Source§impl Client
impl Client
Sourcepub fn describe_project(&self) -> DescribeProjectFluentBuilder
pub fn describe_project(&self) -> DescribeProjectFluentBuilder
Constructs a fluent builder for the DescribeProject
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that you want to describe.
- On success, responds with
DescribeProjectOutput
with field(s):project_description(Option<ProjectDescription>)
:The description of the project.
- On failure, responds with
SdkError<DescribeProjectError>
Source§impl Client
impl Client
Sourcepub fn detect_anomalies(&self) -> DetectAnomaliesFluentBuilder
pub fn detect_anomalies(&self) -> DetectAnomaliesFluentBuilder
Constructs a fluent builder for the DetectAnomalies
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the model version that you want to use.
model_version(impl Into<String>)
/set_model_version(Option<String>)
:
required: trueThe version of the model that you want to use.
body(ByteStream)
/set_body(ByteStream)
:
required: trueThe unencrypted image bytes that you want to analyze.
content_type(impl Into<String>)
/set_content_type(Option<String>)
:
required: trueThe type of the image passed in
Body
. Valid values areimage/png
(PNG format images) andimage/jpeg
(JPG format images).
- On success, responds with
DetectAnomaliesOutput
with field(s):detect_anomaly_result(Option<DetectAnomalyResult>)
:The results of the
DetectAnomalies
operation.
- On failure, responds with
SdkError<DetectAnomaliesError>
Source§impl Client
impl Client
Sourcepub fn list_dataset_entries(&self) -> ListDatasetEntriesFluentBuilder
pub fn list_dataset_entries(&self) -> ListDatasetEntriesFluentBuilder
Constructs a fluent builder for the ListDatasetEntries
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the dataset that you want to list.
dataset_type(impl Into<String>)
/set_dataset_type(Option<String>)
:
required: trueThe type of the dataset that you want to list. Specify
train
to list the training dataset. Specifytest
to list the test dataset. If you have a single dataset project, specifytrain
.labeled(bool)
/set_labeled(Option<bool>)
:
required: falseSpecify
true
to include labeled entries, otherwise specifyfalse
. If you don’t specify a value, Lookout for Vision returns all entries.anomaly_class(impl Into<String>)
/set_anomaly_class(Option<String>)
:
required: falseSpecify
normal
to include only normal images. Specifyanomaly
to only include anomalous entries. If you don’t specify a value, Amazon Lookout for Vision returns normal and anomalous images.before_creation_date(DateTime)
/set_before_creation_date(Option<DateTime>)
:
required: falseOnly includes entries before the specified date in the response. For example,
2020-06-23T00:00:00
.after_creation_date(DateTime)
/set_after_creation_date(Option<DateTime>)
:
required: falseOnly includes entries after the specified date in the response. For example,
2020-06-23T00:00:00
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf the previous response was incomplete (because there is more data to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of dataset entries.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
source_ref_contains(impl Into<String>)
/set_source_ref_contains(Option<String>)
:
required: falsePerform a “contains” search on the values of the
source-ref
key within the dataset. For example a value of “IMG_17” returns all JSON Lines where thesource-ref
key value matches IMG_17.
- On success, responds with
ListDatasetEntriesOutput
with field(s):dataset_entries(Option<Vec::<String>>)
:A list of the entries (JSON Lines) within the dataset.
next_token(Option<String>)
:If the response is truncated, Amazon Lookout for Vision returns this token that you can use in the subsequent request to retrieve the next set ofdataset entries.
- On failure, responds with
SdkError<ListDatasetEntriesError>
Source§impl Client
impl Client
Sourcepub fn list_model_packaging_jobs(&self) -> ListModelPackagingJobsFluentBuilder
pub fn list_model_packaging_jobs(&self) -> ListModelPackagingJobsFluentBuilder
Constructs a fluent builder for the ListModelPackagingJobs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project for which you want to list the model packaging jobs.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf the previous response was incomplete (because there is more results to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
- On success, responds with
ListModelPackagingJobsOutput
with field(s):model_packaging_jobs(Option<Vec::<ModelPackagingJobMetadata>>)
:A list of the model packaging jobs created for the specified Amazon Lookout for Vision project.
next_token(Option<String>)
:If the previous response was incomplete (because there is more results to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
- On failure, responds with
SdkError<ListModelPackagingJobsError>
Source§impl Client
impl Client
Sourcepub fn list_models(&self) -> ListModelsFluentBuilder
pub fn list_models(&self) -> ListModelsFluentBuilder
Constructs a fluent builder for the ListModels
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the model versions that you want to list.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf the previous response was incomplete (because there is more data to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of models.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
- On success, responds with
ListModelsOutput
with field(s):models(Option<Vec::<ModelMetadata>>)
:A list of model versions in the specified project.
next_token(Option<String>)
:If the response is truncated, Amazon Lookout for Vision returns this token that you can use in the subsequent request to retrieve the next set of models.
- On failure, responds with
SdkError<ListModelsError>
Source§impl Client
impl Client
Sourcepub fn list_projects(&self) -> ListProjectsFluentBuilder
pub fn list_projects(&self) -> ListProjectsFluentBuilder
Constructs a fluent builder for the ListProjects
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf the previous response was incomplete (because there is more data to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of projects.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
- On success, responds with
ListProjectsOutput
with field(s):projects(Option<Vec::<ProjectMetadata>>)
:A list of projects in your AWS account.
next_token(Option<String>)
:If the response is truncated, Amazon Lookout for Vision returns this token that you can use in the subsequent request to retrieve the next set of projects.
- On failure, responds with
SdkError<ListProjectsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the model for which you want to list tags.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:A map of tag keys and values attached to the specified model.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn start_model(&self) -> StartModelFluentBuilder
pub fn start_model(&self) -> StartModelFluentBuilder
Constructs a fluent builder for the StartModel
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the model that you want to start.
model_version(impl Into<String>)
/set_model_version(Option<String>)
:
required: trueThe version of the model that you want to start.
min_inference_units(i32)
/set_min_inference_units(Option<i32>)
:
required: trueThe minimum number of inference units to use. A single inference unit represents 1 hour of processing. Use a higher number to increase the TPS throughput of your model. You are charged for the number of inference units that you use.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
StartModel
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromStartModel
. In this case, safely retry your call toStartModel
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple start requests. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toStartModel
. An idempotency token is active for 8 hours.max_inference_units(i32)
/set_max_inference_units(Option<i32>)
:
required: falseThe maximum number of inference units to use for auto-scaling the model. If you don’t specify a value, Amazon Lookout for Vision doesn’t auto-scale the model.
- On success, responds with
StartModelOutput
with field(s):status(Option<ModelHostingStatus>)
:The current running status of the model.
- On failure, responds with
SdkError<StartModelError>
Source§impl Client
impl Client
Sourcepub fn start_model_packaging_job(&self) -> StartModelPackagingJobFluentBuilder
pub fn start_model_packaging_job(&self) -> StartModelPackagingJobFluentBuilder
Constructs a fluent builder for the StartModelPackagingJob
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project which contains the version of the model that you want to package.
model_version(impl Into<String>)
/set_model_version(Option<String>)
:
required: trueThe version of the model within the project that you want to package.
job_name(impl Into<String>)
/set_job_name(Option<String>)
:
required: falseA name for the model packaging job. If you don’t supply a value, the service creates a job name for you.
configuration(ModelPackagingConfiguration)
/set_configuration(Option<ModelPackagingConfiguration>)
:
required: trueThe configuration for the model packaging job.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description for the model packaging job.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
StartModelPackagingJob
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromStartModelPackagingJob
. In this case, safely retry your call toStartModelPackagingJob
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple dataset creation requests. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toStartModelPackagingJob
. An idempotency token is active for 8 hours.
- On success, responds with
StartModelPackagingJobOutput
with field(s):job_name(Option<String>)
:The job name for the model packaging job. If you don’t supply a job name in the
JobName
input parameter, the service creates a job name for you.
- On failure, responds with
SdkError<StartModelPackagingJobError>
Source§impl Client
impl Client
Sourcepub fn stop_model(&self) -> StopModelFluentBuilder
pub fn stop_model(&self) -> StopModelFluentBuilder
Constructs a fluent builder for the StopModel
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the model that you want to stop.
model_version(impl Into<String>)
/set_model_version(Option<String>)
:
required: trueThe version of the model that you want to stop.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
StopModel
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromStopModel
. In this case, safely retry your call toStopModel
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple stop requests. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toStopModel
. An idempotency token is active for 8 hours.
- On success, responds with
StopModelOutput
with field(s):status(Option<ModelHostingStatus>)
:The status of the model.
- On failure, responds with
SdkError<StopModelError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the model to assign the tags.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueThe key-value tags to assign to the model.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the model from which you want to remove tags.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueA list of the keys of the tags that you want to remove.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_dataset_entries(&self) -> UpdateDatasetEntriesFluentBuilder
pub fn update_dataset_entries(&self) -> UpdateDatasetEntriesFluentBuilder
Constructs a fluent builder for the UpdateDatasetEntries
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:
required: trueThe name of the project that contains the dataset that you want to update.
dataset_type(impl Into<String>)
/set_dataset_type(Option<String>)
:
required: trueThe type of the dataset that you want to update. Specify
train
to update the training dataset. Specifytest
to update the test dataset. If you have a single dataset project, specifytrain
.changes(Blob)
/set_changes(Option<Blob>)
:
required: trueThe entries to add to the dataset.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseClientToken is an idempotency token that ensures a call to
UpdateDatasetEntries
completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response fromUpdateDatasetEntries
. In this case, safely retry your call toUpdateDatasetEntries
by using the sameClientToken
parameter value.If you don’t supply a value for
ClientToken
, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple updates with the same dataset entries. You’ll need to provide your own value for other use cases.An error occurs if the other input parameters are not the same as in the first request. Using a different value for
ClientToken
is considered a new call toUpdateDatasetEntries
. An idempotency token is active for 8 hours.
- On success, responds with
UpdateDatasetEntriesOutput
with field(s):status(Option<DatasetStatus>)
:The status of the dataset update.
- On failure, responds with
SdkError<UpdateDatasetEntriesError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);