Class: Aws::LookoutforVision::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::LookoutforVision::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-lookoutforvision/client.rb
Overview
An API client for LookoutforVision. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::LookoutforVision::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_dataset(params = {}) ⇒ Types::CreateDatasetResponse
Creates a new dataset in an Amazon Lookout for Vision project.
-
#create_model(params = {}) ⇒ Types::CreateModelResponse
Creates a new version of a model within an an Amazon Lookout for Vision project.
-
#create_project(params = {}) ⇒ Types::CreateProjectResponse
Creates an empty Amazon Lookout for Vision project.
-
#delete_dataset(params = {}) ⇒ Struct
Deletes an existing Amazon Lookout for Vision ‘dataset`.
-
#delete_model(params = {}) ⇒ Types::DeleteModelResponse
Deletes an Amazon Lookout for Vision model.
-
#delete_project(params = {}) ⇒ Types::DeleteProjectResponse
Deletes an Amazon Lookout for Vision project.
-
#describe_dataset(params = {}) ⇒ Types::DescribeDatasetResponse
Describe an Amazon Lookout for Vision dataset.
-
#describe_model(params = {}) ⇒ Types::DescribeModelResponse
Describes a version of an Amazon Lookout for Vision model.
-
#describe_model_packaging_job(params = {}) ⇒ Types::DescribeModelPackagingJobResponse
Describes an Amazon Lookout for Vision model packaging job.
-
#describe_project(params = {}) ⇒ Types::DescribeProjectResponse
Describes an Amazon Lookout for Vision project.
-
#detect_anomalies(params = {}) ⇒ Types::DetectAnomaliesResponse
Detects anomalies in an image that you supply.
-
#list_dataset_entries(params = {}) ⇒ Types::ListDatasetEntriesResponse
Lists the JSON Lines within a dataset.
-
#list_model_packaging_jobs(params = {}) ⇒ Types::ListModelPackagingJobsResponse
Lists the model packaging jobs created for an Amazon Lookout for Vision project.
-
#list_models(params = {}) ⇒ Types::ListModelsResponse
Lists the versions of a model in an Amazon Lookout for Vision project.
-
#list_projects(params = {}) ⇒ Types::ListProjectsResponse
Lists the Amazon Lookout for Vision projects in your AWS account that are in the AWS Region in which you call ‘ListProjects`.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of tags attached to the specified Amazon Lookout for Vision model.
-
#start_model(params = {}) ⇒ Types::StartModelResponse
Starts the running of the version of an Amazon Lookout for Vision model.
-
#start_model_packaging_job(params = {}) ⇒ Types::StartModelPackagingJobResponse
Starts an Amazon Lookout for Vision model packaging job.
-
#stop_model(params = {}) ⇒ Types::StopModelResponse
Stops the hosting of a running model.
-
#tag_resource(params = {}) ⇒ Struct
Adds one or more key-value tags to an Amazon Lookout for Vision model.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from an Amazon Lookout for Vision model.
-
#update_dataset_entries(params = {}) ⇒ Types::UpdateDatasetEntriesResponse
Adds or updates one or more JSON Line entries in a dataset.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
444 445 446 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 444 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1915 1916 1917 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1915 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1918 1919 1920 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1918 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1888 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::LookoutforVision') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-lookoutforvision' context[:gem_version] = '1.44.0' Seahorse::Client::Request.new(handlers, context) end |
#create_dataset(params = {}) ⇒ Types::CreateDatasetResponse
Creates a new dataset in an Amazon Lookout for Vision project. ‘CreateDataset` can create a training or a test dataset from a valid dataset source (`DatasetSource`).
If you want a single dataset project, specify ‘train` for the value of `DatasetType`.
To have a project with separate training and test datasets, call ‘CreateDataset` twice. On the first call, specify `train` for the value of `DatasetType`. On the second call, specify `test` for the value of `DatasetType`.
This operation requires permissions to perform the ‘lookoutvision:CreateDataset` operation.
538 539 540 541 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 538 def create_dataset(params = {}, = {}) req = build_request(:create_dataset, params) req.send_request() end |
#create_model(params = {}) ⇒ Types::CreateModelResponse
Creates a new version of a model within an an Amazon Lookout for Vision project. ‘CreateModel` is an asynchronous operation in which Amazon Lookout for Vision trains, tests, and evaluates a new version of a model.
To get the current status, check the ‘Status` field returned in the response from DescribeModel.
If the project has a single dataset, Amazon Lookout for Vision internally splits the dataset to create a training and a test dataset. If the project has a training and a test dataset, Lookout for Vision uses the respective datasets to train and test the model.
After training completes, the evaluation metrics are stored at the location specified in ‘OutputConfig`.
This operation requires permissions to perform the ‘lookoutvision:CreateModel` operation. If you want to tag your model, you also require permission to the `lookoutvision:TagResource` operation.
644 645 646 647 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 644 def create_model(params = {}, = {}) req = build_request(:create_model, params) req.send_request() end |
#create_project(params = {}) ⇒ Types::CreateProjectResponse
Creates an empty Amazon Lookout for Vision project. After you create the project, add a dataset by calling CreateDataset.
This operation requires permissions to perform the ‘lookoutvision:CreateProject` operation.
699 700 701 702 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 699 def create_project(params = {}, = {}) req = build_request(:create_project, params) req.send_request() end |
#delete_dataset(params = {}) ⇒ Struct
Deletes an existing Amazon Lookout for Vision ‘dataset`.
If your the project has a single dataset, you must create a new dataset before you can create a model.
If you project has a training dataset and a test dataset consider the following.
-
If you delete the test dataset, your project reverts to a single dataset project. If you then train the model, Amazon Lookout for Vision internally splits the remaining dataset into a training and test dataset.
-
If you delete the training dataset, you must create a training dataset before you can create a model.
This operation requires permissions to perform the ‘lookoutvision:DeleteDataset` operation.
766 767 768 769 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 766 def delete_dataset(params = {}, = {}) req = build_request(:delete_dataset, params) req.send_request() end |
#delete_model(params = {}) ⇒ Types::DeleteModelResponse
Deletes an Amazon Lookout for Vision model. You can’t delete a running model. To stop a running model, use the StopModel operation.
It might take a few seconds to delete a model. To determine if a model has been deleted, call ListModels and check if the version of the model (‘ModelVersion`) is in the `Models` array.
This operation requires permissions to perform the ‘lookoutvision:DeleteModel` operation.
830 831 832 833 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 830 def delete_model(params = {}, = {}) req = build_request(:delete_model, params) req.send_request() end |
#delete_project(params = {}) ⇒ Types::DeleteProjectResponse
Deletes an Amazon Lookout for Vision project.
To delete a project, you must first delete each version of the model associated with the project. To delete a model use the DeleteModel operation.
You also have to delete the dataset(s) associated with the model. For more information, see DeleteDataset. The images referenced by the training and test datasets aren’t deleted.
This operation requires permissions to perform the ‘lookoutvision:DeleteProject` operation.
890 891 892 893 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 890 def delete_project(params = {}, = {}) req = build_request(:delete_project, params) req.send_request() end |
#describe_dataset(params = {}) ⇒ Types::DescribeDatasetResponse
Describe an Amazon Lookout for Vision dataset.
This operation requires permissions to perform the ‘lookoutvision:DescribeDataset` operation.
937 938 939 940 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 937 def describe_dataset(params = {}, = {}) req = build_request(:describe_dataset, params) req.send_request() end |
#describe_model(params = {}) ⇒ Types::DescribeModelResponse
Describes a version of an Amazon Lookout for Vision model.
This operation requires permissions to perform the ‘lookoutvision:DescribeModel` operation.
991 992 993 994 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 991 def describe_model(params = {}, = {}) req = build_request(:describe_model, params) req.send_request() end |
#describe_model_packaging_job(params = {}) ⇒ Types::DescribeModelPackagingJobResponse
Describes an Amazon Lookout for Vision model packaging job.
This operation requires permissions to perform the ‘lookoutvision:DescribeModelPackagingJob` operation.
For more information, see *Using your Amazon Lookout for Vision model on an edge device* in the Amazon Lookout for Vision Developer Guide.
1054 1055 1056 1057 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1054 def describe_model_packaging_job(params = {}, = {}) req = build_request(:describe_model_packaging_job, params) req.send_request() end |
#describe_project(params = {}) ⇒ Types::DescribeProjectResponse
Describes an Amazon Lookout for Vision project.
This operation requires permissions to perform the ‘lookoutvision:DescribeProject` operation.
1092 1093 1094 1095 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1092 def describe_project(params = {}, = {}) req = build_request(:describe_project, params) req.send_request() end |
#detect_anomalies(params = {}) ⇒ Types::DetectAnomaliesResponse
Detects anomalies in an image that you supply.
The response from ‘DetectAnomalies` includes a boolean prediction that the image contains one or more anomalies and a confidence value for the prediction. If the model is an image segmentation model, the response also includes segmentation information for each type of anomaly found in the image.
<note markdown=“1”> Before calling ‘DetectAnomalies`, you must first start your model with the StartModel operation. You are charged for the amount of time, in minutes, that a model runs and for the number of anomaly detection units that your model uses. If you are not using a model, use the StopModel operation to stop your model.
</note>
For more information, see *Detecting anomalies in an image* in the Amazon Lookout for Vision developer guide.
This operation requires permissions to perform the ‘lookoutvision:DetectAnomalies` operation.
1161 1162 1163 1164 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1161 def detect_anomalies(params = {}, = {}) req = build_request(:detect_anomalies, params) req.send_request() end |
#list_dataset_entries(params = {}) ⇒ Types::ListDatasetEntriesResponse
Lists the JSON Lines within a dataset. An Amazon Lookout for Vision JSON Line contains the anomaly information for a single image, including the image location and the assigned label.
This operation requires permissions to perform the ‘lookoutvision:ListDatasetEntries` operation.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1247 1248 1249 1250 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1247 def list_dataset_entries(params = {}, = {}) req = build_request(:list_dataset_entries, params) req.send_request() end |
#list_model_packaging_jobs(params = {}) ⇒ Types::ListModelPackagingJobsResponse
Lists the model packaging jobs created for an Amazon Lookout for Vision project.
This operation requires permissions to perform the ‘lookoutvision:ListModelPackagingJobs` operation.
For more information, see *Using your Amazon Lookout for Vision model on an edge device* in the Amazon Lookout for Vision Developer Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1310 1311 1312 1313 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1310 def list_model_packaging_jobs(params = {}, = {}) req = build_request(:list_model_packaging_jobs, params) req.send_request() end |
#list_models(params = {}) ⇒ Types::ListModelsResponse
Lists the versions of a model in an Amazon Lookout for Vision project.
The ‘ListModels` operation is eventually consistent. Recent calls to `CreateModel` might take a while to appear in the response from `ListProjects`.
This operation requires permissions to perform the ‘lookoutvision:ListModels` operation.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1373 1374 1375 1376 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1373 def list_models(params = {}, = {}) req = build_request(:list_models, params) req.send_request() end |
#list_projects(params = {}) ⇒ Types::ListProjectsResponse
Lists the Amazon Lookout for Vision projects in your AWS account that are in the AWS Region in which you call ‘ListProjects`.
The ‘ListProjects` operation is eventually consistent. Recent calls to `CreateProject` and `DeleteProject` might take a while to appear in the response from `ListProjects`.
This operation requires permissions to perform the ‘lookoutvision:ListProjects` operation.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1426 1427 1428 1429 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1426 def list_projects(params = {}, = {}) req = build_request(:list_projects, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of tags attached to the specified Amazon Lookout for Vision model.
This operation requires permissions to perform the ‘lookoutvision:ListTagsForResource` operation.
1461 1462 1463 1464 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1461 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#start_model(params = {}) ⇒ Types::StartModelResponse
Starts the running of the version of an Amazon Lookout for Vision model. Starting a model takes a while to complete. To check the current state of the model, use DescribeModel.
A model is ready to use when its status is ‘HOSTED`.
Once the model is running, you can detect custom labels in new images by calling DetectAnomalies.
<note markdown=“1”> You are charged for the amount of time that the model is running. To stop a running model, call StopModel.
</note>
This operation requires permissions to perform the ‘lookoutvision:StartModel` operation.
1543 1544 1545 1546 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1543 def start_model(params = {}, = {}) req = build_request(:start_model, params) req.send_request() end |
#start_model_packaging_job(params = {}) ⇒ Types::StartModelPackagingJobResponse
Starts an Amazon Lookout for Vision model packaging job. A model packaging job creates an AWS IoT Greengrass component for a Lookout for Vision model. You can use the component to deploy your model to an edge device managed by Greengrass.
Use the DescribeModelPackagingJob API to determine the current status of the job. The model packaging job is complete if the value of ‘Status` is `SUCCEEDED`.
To deploy the component to the target device, use the component name and component version with the AWS IoT Greengrass
- CreateDeployment][1
-
API.
This operation requires the following permissions:
-
‘lookoutvision:StartModelPackagingJob`
-
‘s3:PutObject`
-
‘s3:GetBucketLocation`
-
‘kms:GenerateDataKey`
-
‘greengrass:CreateComponentVersion`
-
‘greengrass:DescribeComponent`
-
(Optional) ‘greengrass:TagResource`. Only required if you want to tag the component.
For more information, see *Using your Amazon Lookout for Vision model on an edge device* in the Amazon Lookout for Vision Developer Guide.
[1]: docs.aws.amazon.com/greengrass/v2/APIReference/API_CreateDeployment.html
1669 1670 1671 1672 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1669 def start_model_packaging_job(params = {}, = {}) req = build_request(:start_model_packaging_job, params) req.send_request() end |
#stop_model(params = {}) ⇒ Types::StopModelResponse
Stops the hosting of a running model. The operation might take a while to complete. To check the current status, call DescribeModel.
After the model hosting stops, the ‘Status` of the model is `TRAINED`.
This operation requires permissions to perform the ‘lookoutvision:StopModel` operation.
1728 1729 1730 1731 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1728 def stop_model(params = {}, = {}) req = build_request(:stop_model, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds one or more key-value tags to an Amazon Lookout for Vision model. For more information, see *Tagging a model* in the *Amazon Lookout for Vision Developer Guide*.
This operation requires permissions to perform the ‘lookoutvision:TagResource` operation.
1764 1765 1766 1767 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1764 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from an Amazon Lookout for Vision model. For more information, see *Tagging a model* in the *Amazon Lookout for Vision Developer Guide*.
This operation requires permissions to perform the ‘lookoutvision:UntagResource` operation.
1796 1797 1798 1799 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1796 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_dataset_entries(params = {}) ⇒ Types::UpdateDatasetEntriesResponse
Adds or updates one or more JSON Line entries in a dataset. A JSON Line includes information about an image used for training or testing an Amazon Lookout for Vision model.
To update an existing JSON Line, use the ‘source-ref` field to identify the JSON Line. The JSON line that you supply replaces the existing JSON line. Any existing annotations that are not in the new JSON line are removed from the dataset.
For more information, see *Defining JSON lines for anomaly classification* in the Amazon Lookout for Vision Developer Guide.
<note markdown=“1”> The images you reference in the ‘source-ref` field of a JSON line, must be in the same S3 bucket as the existing images in the dataset.
</note>
Updating a dataset might take a while to complete. To check the current status, call DescribeDataset and check the ‘Status` field in the response.
This operation requires permissions to perform the ‘lookoutvision:UpdateDatasetEntries` operation.
1879 1880 1881 1882 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1879 def update_dataset_entries(params = {}, = {}) req = build_request(:update_dataset_entries, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1908 1909 1910 |
# File 'lib/aws-sdk-lookoutforvision/client.rb', line 1908 def waiter_names [] end |