SDK for PHP 3.x

Client: Aws\LookoutforVision\LookoutforVisionClient
Service ID: lookoutvision
Version: 2020-11-20

This page describes the parameters and results for the operations of the Amazon Lookout for Vision (2020-11-20), and shows how to use the Aws\LookoutforVision\LookoutforVisionClient object to call the described operations. This documentation is specific to the 2020-11-20 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CreateDataset ( array $params = [] )
Creates a new dataset in an Amazon Lookout for Vision project.
CreateModel ( array $params = [] )
Creates a new version of a model within an an Amazon Lookout for Vision project.
CreateProject ( array $params = [] )
Creates an empty Amazon Lookout for Vision project.
DeleteDataset ( array $params = [] )
Deletes an existing Amazon Lookout for Vision dataset.
DeleteModel ( array $params = [] )
Deletes an Amazon Lookout for Vision model.
DeleteProject ( array $params = [] )
Deletes an Amazon Lookout for Vision project.
DescribeDataset ( array $params = [] )
Describe an Amazon Lookout for Vision dataset.
DescribeModel ( array $params = [] )
Describes a version of an Amazon Lookout for Vision model.
DescribeModelPackagingJob ( array $params = [] )
Describes an Amazon Lookout for Vision model packaging job.
DescribeProject ( array $params = [] )
Describes an Amazon Lookout for Vision project.
DetectAnomalies ( array $params = [] )
Detects anomalies in an image that you supply.
ListDatasetEntries ( array $params = [] )
Lists the JSON Lines within a dataset.
ListModelPackagingJobs ( array $params = [] )
Lists the model packaging jobs created for an Amazon Lookout for Vision project.
ListModels ( array $params = [] )
Lists the versions of a model in an Amazon Lookout for Vision project.
ListProjects ( array $params = [] )
Lists the Amazon Lookout for Vision projects in your AWS account that are in the AWS Region in which you call ListProjects.
ListTagsForResource ( array $params = [] )
Returns a list of tags attached to the specified Amazon Lookout for Vision model.
StartModel ( array $params = [] )
Starts the running of the version of an Amazon Lookout for Vision model.
StartModelPackagingJob ( array $params = [] )
Starts an Amazon Lookout for Vision model packaging job.
StopModel ( array $params = [] )
Stops the hosting of a running model.
TagResource ( array $params = [] )
Adds one or more key-value tags to an Amazon Lookout for Vision model.
UntagResource ( array $params = [] )
Removes one or more tags from an Amazon Lookout for Vision model.
UpdateDatasetEntries ( array $params = [] )
Adds or updates one or more JSON Line entries in a dataset.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListDatasetEntries
ListModelPackagingJobs
ListModels
ListProjects

Operations

CreateDataset

$result = $client->createDataset([/* ... */]);
$promise = $client->createDatasetAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createDataset([
    'ClientToken' => '<string>',
    'DatasetSource' => [
        'GroundTruthManifest' => [
            'S3Object' => [
                'Bucket' => '<string>', // REQUIRED
                'Key' => '<string>', // REQUIRED
                'VersionId' => '<string>',
            ],
        ],
    ],
    'DatasetType' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from CreateDataset. In this case, safely retry your call to CreateDataset by using the same ClientToken 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 to CreateDataset. An idempotency token is active for 8 hours.

DatasetSource
Type: DatasetSource structure

The 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 calling UpdateDatasetEntries.

If you specify a value for DataSource, the manifest at the S3 location is validated and used to create the dataset. The call to CreateDataset is asynchronous and might take a while to complete. To find out the current status, Check the value of Status returned in a call to DescribeDataset.

DatasetType
Required: Yes
Type: string

The type of the dataset. Specify train for a training dataset. Specify test for a test dataset.

ProjectName
Required: Yes
Type: string

The name of the project in which you want to create a dataset.

Result Syntax

[
    'DatasetMetadata' => [
        'CreationTimestamp' => <DateTime>,
        'DatasetType' => '<string>',
        'Status' => 'CREATE_IN_PROGRESS|CREATE_COMPLETE|CREATE_FAILED|UPDATE_IN_PROGRESS|UPDATE_COMPLETE|UPDATE_FAILED_ROLLBACK_IN_PROGRESS|UPDATE_FAILED_ROLLBACK_COMPLETE|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED',
        'StatusMessage' => '<string>',
    ],
]

Result Details

Members
DatasetMetadata
Type: DatasetMetadata structure

Information about the dataset.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ServiceQuotaExceededException:

A service quota was exceeded the allowed limit. For more information, see Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer Guide.

CreateModel

$result = $client->createModel([/* ... */]);
$promise = $client->createModelAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createModel([
    'ClientToken' => '<string>',
    'Description' => '<string>',
    'KmsKeyId' => '<string>',
    'OutputConfig' => [ // REQUIRED
        'S3Location' => [ // REQUIRED
            'Bucket' => '<string>', // REQUIRED
            'Prefix' => '<string>',
        ],
    ],
    'ProjectName' => '<string>', // REQUIRED
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from CreateModel. In this case, safely retry your call to CreateModel by using the same ClientToken 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 to CreateModel. An idempotency token is active for 8 hours.

Description
Type: string

A description for the version of the model.

KmsKeyId
Type: string

The 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.

OutputConfig
Required: Yes
Type: OutputConfig structure

The location where Amazon Lookout for Vision saves the training results.

ProjectName
Required: Yes
Type: string

The name of the project in which you want to create a model version.

Tags
Type: Array of Tag structures

A set of tags (key-value pairs) that you want to attach to the model.

Result Syntax

[
    'ModelMetadata' => [
        'CreationTimestamp' => <DateTime>,
        'Description' => '<string>',
        'ModelArn' => '<string>',
        'ModelVersion' => '<string>',
        'Performance' => [
            'F1Score' => <float>,
            'Precision' => <float>,
            'Recall' => <float>,
        ],
        'Status' => 'TRAINING|TRAINED|TRAINING_FAILED|STARTING_HOSTING|HOSTED|HOSTING_FAILED|STOPPING_HOSTING|SYSTEM_UPDATING|DELETING',
        'StatusMessage' => '<string>',
    ],
]

Result Details

Members
ModelMetadata
Type: ModelMetadata structure

The response from a call to CreateModel.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ServiceQuotaExceededException:

A service quota was exceeded the allowed limit. For more information, see Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer Guide.

CreateProject

$result = $client->createProject([/* ... */]);
$promise = $client->createProjectAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createProject([
    'ClientToken' => '<string>',
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from CreateProject. In this case, safely retry your call to CreateProject by using the same ClientToken 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 to CreateProject. An idempotency token is active for 8 hours.

ProjectName
Required: Yes
Type: string

The name for the project.

Result Syntax

[
    'ProjectMetadata' => [
        'CreationTimestamp' => <DateTime>,
        'ProjectArn' => '<string>',
        'ProjectName' => '<string>',
    ],
]

Result Details

Members
ProjectMetadata
Type: ProjectMetadata structure

Information about the project.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ServiceQuotaExceededException:

A service quota was exceeded the allowed limit. For more information, see Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer Guide.

DeleteDataset

$result = $client->deleteDataset([/* ... */]);
$promise = $client->deleteDatasetAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteDataset([
    'ClientToken' => '<string>',
    'DatasetType' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from DeleteDataset. In this case, safely retry your call to DeleteDataset by using the same ClientToken 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 to DeleteDataset. An idempotency token is active for 8 hours.

DatasetType
Required: Yes
Type: string

The type of the dataset to delete. Specify train to delete the training dataset. Specify test to delete the test dataset. To delete the dataset in a single dataset project, specify train.

ProjectName
Required: Yes
Type: string

The name of the project that contains the dataset that you want to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

DeleteModel

$result = $client->deleteModel([/* ... */]);
$promise = $client->deleteModelAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteModel([
    'ClientToken' => '<string>',
    'ModelVersion' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from DeleteModel. In this case, safely retry your call to DeleteModel by using the same ClientToken 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 to DeleteModel. An idempotency token is active for 8 hours.

ModelVersion
Required: Yes
Type: string

The version of the model that you want to delete.

ProjectName
Required: Yes
Type: string

The name of the project that contains the model that you want to delete.

Result Syntax

[
    'ModelArn' => '<string>',
]

Result Details

Members
ModelArn
Type: string

The Amazon Resource Name (ARN) of the model that was deleted.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

DeleteProject

$result = $client->deleteProject([/* ... */]);
$promise = $client->deleteProjectAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteProject([
    'ClientToken' => '<string>',
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from DeleteProject. In this case, safely retry your call to DeleteProject by using the same ClientToken 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 to DeleteProject. An idempotency token is active for 8 hours.

ProjectName
Required: Yes
Type: string

The name of the project to delete.

Result Syntax

[
    'ProjectArn' => '<string>',
]

Result Details

Members
ProjectArn
Type: string

The Amazon Resource Name (ARN) of the project that was deleted.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

DescribeDataset

$result = $client->describeDataset([/* ... */]);
$promise = $client->describeDatasetAsync([/* ... */]);

Describe an Amazon Lookout for Vision dataset.

This operation requires permissions to perform the lookoutvision:DescribeDataset operation.

Parameter Syntax

$result = $client->describeDataset([
    'DatasetType' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
DatasetType
Required: Yes
Type: string

The type of the dataset to describe. Specify train to describe the training dataset. Specify test to describe the test dataset. If you have a single dataset project, specify train

ProjectName
Required: Yes
Type: string

The name of the project that contains the dataset that you want to describe.

Result Syntax

[
    'DatasetDescription' => [
        'CreationTimestamp' => <DateTime>,
        'DatasetType' => '<string>',
        'ImageStats' => [
            'Anomaly' => <integer>,
            'Labeled' => <integer>,
            'Normal' => <integer>,
            'Total' => <integer>,
        ],
        'LastUpdatedTimestamp' => <DateTime>,
        'ProjectName' => '<string>',
        'Status' => 'CREATE_IN_PROGRESS|CREATE_COMPLETE|CREATE_FAILED|UPDATE_IN_PROGRESS|UPDATE_COMPLETE|UPDATE_FAILED_ROLLBACK_IN_PROGRESS|UPDATE_FAILED_ROLLBACK_COMPLETE|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED',
        'StatusMessage' => '<string>',
    ],
]

Result Details

Members
DatasetDescription
Type: DatasetDescription structure

The description of the requested dataset.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

DescribeModel

$result = $client->describeModel([/* ... */]);
$promise = $client->describeModelAsync([/* ... */]);

Describes a version of an Amazon Lookout for Vision model.

This operation requires permissions to perform the lookoutvision:DescribeModel operation.

Parameter Syntax

$result = $client->describeModel([
    'ModelVersion' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ModelVersion
Required: Yes
Type: string

The version of the model that you want to describe.

ProjectName
Required: Yes
Type: string

The project that contains the version of a model that you want to describe.

Result Syntax

[
    'ModelDescription' => [
        'CreationTimestamp' => <DateTime>,
        'Description' => '<string>',
        'EvaluationEndTimestamp' => <DateTime>,
        'EvaluationManifest' => [
            'Bucket' => '<string>',
            'Key' => '<string>',
        ],
        'EvaluationResult' => [
            'Bucket' => '<string>',
            'Key' => '<string>',
        ],
        'KmsKeyId' => '<string>',
        'MaxInferenceUnits' => <integer>,
        'MinInferenceUnits' => <integer>,
        'ModelArn' => '<string>',
        'ModelVersion' => '<string>',
        'OutputConfig' => [
            'S3Location' => [
                'Bucket' => '<string>',
                'Prefix' => '<string>',
            ],
        ],
        'Performance' => [
            'F1Score' => <float>,
            'Precision' => <float>,
            'Recall' => <float>,
        ],
        'Status' => 'TRAINING|TRAINED|TRAINING_FAILED|STARTING_HOSTING|HOSTED|HOSTING_FAILED|STOPPING_HOSTING|SYSTEM_UPDATING|DELETING',
        'StatusMessage' => '<string>',
    ],
]

Result Details

Members
ModelDescription
Type: ModelDescription structure

Contains the description of the model.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

DescribeModelPackagingJob

$result = $client->describeModelPackagingJob([/* ... */]);
$promise = $client->describeModelPackagingJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeModelPackagingJob([
    'JobName' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
JobName
Required: Yes
Type: string

The job name for the model packaging job.

ProjectName
Required: Yes
Type: string

The name of the project that contains the model packaging job that you want to describe.

Result Syntax

[
    'ModelPackagingDescription' => [
        'CreationTimestamp' => <DateTime>,
        'JobName' => '<string>',
        'LastUpdatedTimestamp' => <DateTime>,
        'ModelPackagingConfiguration' => [
            'Greengrass' => [
                'CompilerOptions' => '<string>',
                'ComponentDescription' => '<string>',
                'ComponentName' => '<string>',
                'ComponentVersion' => '<string>',
                'S3OutputLocation' => [
                    'Bucket' => '<string>',
                    'Prefix' => '<string>',
                ],
                'Tags' => [
                    [
                        'Key' => '<string>',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
                'TargetDevice' => 'jetson_xavier',
                'TargetPlatform' => [
                    'Accelerator' => 'NVIDIA',
                    'Arch' => 'ARM64|X86_64',
                    'Os' => 'LINUX',
                ],
            ],
        ],
        'ModelPackagingJobDescription' => '<string>',
        'ModelPackagingMethod' => '<string>',
        'ModelPackagingOutputDetails' => [
            'Greengrass' => [
                'ComponentName' => '<string>',
                'ComponentVersion' => '<string>',
                'ComponentVersionArn' => '<string>',
            ],
        ],
        'ModelVersion' => '<string>',
        'ProjectName' => '<string>',
        'Status' => 'CREATED|RUNNING|SUCCEEDED|FAILED',
        'StatusMessage' => '<string>',
    ],
]

Result Details

Members
ModelPackagingDescription
Type: ModelPackagingDescription structure

The description of the model packaging job.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

DescribeProject

$result = $client->describeProject([/* ... */]);
$promise = $client->describeProjectAsync([/* ... */]);

Describes an Amazon Lookout for Vision project.

This operation requires permissions to perform the lookoutvision:DescribeProject operation.

Parameter Syntax

$result = $client->describeProject([
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ProjectName
Required: Yes
Type: string

The name of the project that you want to describe.

Result Syntax

[
    'ProjectDescription' => [
        'CreationTimestamp' => <DateTime>,
        'Datasets' => [
            [
                'CreationTimestamp' => <DateTime>,
                'DatasetType' => '<string>',
                'Status' => 'CREATE_IN_PROGRESS|CREATE_COMPLETE|CREATE_FAILED|UPDATE_IN_PROGRESS|UPDATE_COMPLETE|UPDATE_FAILED_ROLLBACK_IN_PROGRESS|UPDATE_FAILED_ROLLBACK_COMPLETE|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED',
                'StatusMessage' => '<string>',
            ],
            // ...
        ],
        'ProjectArn' => '<string>',
        'ProjectName' => '<string>',
    ],
]

Result Details

Members
ProjectDescription
Type: ProjectDescription structure

The description of the project.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

DetectAnomalies

$result = $client->detectAnomalies([/* ... */]);
$promise = $client->detectAnomaliesAsync([/* ... */]);

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.

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.

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.

Parameter Syntax

$result = $client->detectAnomalies([
    'Body' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
    'ContentType' => '<string>', // REQUIRED
    'ModelVersion' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
Body
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The unencrypted image bytes that you want to analyze.

ContentType
Required: Yes
Type: string

The type of the image passed in Body. Valid values are image/png (PNG format images) and image/jpeg (JPG format images).

ModelVersion
Required: Yes
Type: string

The version of the model that you want to use.

ProjectName
Required: Yes
Type: string

The name of the project that contains the model version that you want to use.

Result Syntax

[
    'DetectAnomalyResult' => [
        'Anomalies' => [
            [
                'Name' => '<string>',
                'PixelAnomaly' => [
                    'Color' => '<string>',
                    'TotalPercentageArea' => <float>,
                ],
            ],
            // ...
        ],
        'AnomalyMask' => <string || resource || Psr\Http\Message\StreamInterface>,
        'Confidence' => <float>,
        'IsAnomalous' => true || false,
        'Source' => [
            'Type' => '<string>',
        ],
    ],
]

Result Details

Members
DetectAnomalyResult
Type: DetectAnomalyResult structure

The results of the DetectAnomalies operation.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ListDatasetEntries

$result = $client->listDatasetEntries([/* ... */]);
$promise = $client->listDatasetEntriesAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listDatasetEntries([
    'AfterCreationDate' => <integer || string || DateTime>,
    'AnomalyClass' => '<string>',
    'BeforeCreationDate' => <integer || string || DateTime>,
    'DatasetType' => '<string>', // REQUIRED
    'Labeled' => true || false,
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'ProjectName' => '<string>', // REQUIRED
    'SourceRefContains' => '<string>',
]);

Parameter Details

Members
AfterCreationDate
Type: timestamp (string|DateTime or anything parsable by strtotime)

Only includes entries after the specified date in the response. For example, 2020-06-23T00:00:00.

AnomalyClass
Type: string

Specify normal to include only normal images. Specify anomaly to only include anomalous entries. If you don't specify a value, Amazon Lookout for Vision returns normal and anomalous images.

BeforeCreationDate
Type: timestamp (string|DateTime or anything parsable by strtotime)

Only includes entries before the specified date in the response. For example, 2020-06-23T00:00:00.

DatasetType
Required: Yes
Type: string

The type of the dataset that you want to list. Specify train to list the training dataset. Specify test to list the test dataset. If you have a single dataset project, specify train.

Labeled
Type: boolean

Specify true to include labeled entries, otherwise specify false. If you don't specify a value, Lookout for Vision returns all entries.

MaxResults
Type: int

The 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.

NextToken
Type: string

If 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.

ProjectName
Required: Yes
Type: string

The name of the project that contains the dataset that you want to list.

SourceRefContains
Type: string

Perform 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 the source-ref key value matches *IMG_17*.

Result Syntax

[
    'DatasetEntries' => ['<string>', ...],
    'NextToken' => '<string>',
]

Result Details

Members
DatasetEntries
Type: Array of strings

A list of the entries (JSON Lines) within the dataset.

NextToken
Type: 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.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ListModelPackagingJobs

$result = $client->listModelPackagingJobs([/* ... */]);
$promise = $client->listModelPackagingJobsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listModelPackagingJobs([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

The 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.

NextToken
Type: 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.

ProjectName
Required: Yes
Type: string

The name of the project for which you want to list the model packaging jobs.

Result Syntax

[
    'ModelPackagingJobs' => [
        [
            'CreationTimestamp' => <DateTime>,
            'JobName' => '<string>',
            'LastUpdatedTimestamp' => <DateTime>,
            'ModelPackagingJobDescription' => '<string>',
            'ModelPackagingMethod' => '<string>',
            'ModelVersion' => '<string>',
            'ProjectName' => '<string>',
            'Status' => 'CREATED|RUNNING|SUCCEEDED|FAILED',
            'StatusMessage' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
ModelPackagingJobs
Type: Array of ModelPackagingJobMetadata structures

A list of the model packaging jobs created for the specified Amazon Lookout for Vision project.

NextToken
Type: 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.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ListModels

$result = $client->listModels([/* ... */]);
$promise = $client->listModelsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listModels([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

The 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.

NextToken
Type: string

If 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.

ProjectName
Required: Yes
Type: string

The name of the project that contains the model versions that you want to list.

Result Syntax

[
    'Models' => [
        [
            'CreationTimestamp' => <DateTime>,
            'Description' => '<string>',
            'ModelArn' => '<string>',
            'ModelVersion' => '<string>',
            'Performance' => [
                'F1Score' => <float>,
                'Precision' => <float>,
                'Recall' => <float>,
            ],
            'Status' => 'TRAINING|TRAINED|TRAINING_FAILED|STARTING_HOSTING|HOSTED|HOSTING_FAILED|STOPPING_HOSTING|SYSTEM_UPDATING|DELETING',
            'StatusMessage' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
Models
Type: Array of ModelMetadata structures

A list of model versions in the specified project.

NextToken
Type: 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.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ListProjects

$result = $client->listProjects([/* ... */]);
$promise = $client->listProjectsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listProjects([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

The 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.

NextToken
Type: string

If 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.

Result Syntax

[
    'NextToken' => '<string>',
    'Projects' => [
        [
            'CreationTimestamp' => <DateTime>,
            'ProjectArn' => '<string>',
            'ProjectName' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: 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.

Projects
Type: Array of ProjectMetadata structures

A list of projects in your AWS account.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Returns a list of tags attached to the specified Amazon Lookout for Vision model.

This operation requires permissions to perform the lookoutvision:ListTagsForResource operation.

Parameter Syntax

$result = $client->listTagsForResource([
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model for which you want to list tags.

Result Syntax

[
    'Tags' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Tags
Type: Array of Tag structures

A map of tag keys and values attached to the specified model.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

StartModel

$result = $client->startModel([/* ... */]);
$promise = $client->startModelAsync([/* ... */]);

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.

You are charged for the amount of time that the model is running. To stop a running model, call StopModel.

This operation requires permissions to perform the lookoutvision:StartModel operation.

Parameter Syntax

$result = $client->startModel([
    'ClientToken' => '<string>',
    'MaxInferenceUnits' => <integer>,
    'MinInferenceUnits' => <integer>, // REQUIRED
    'ModelVersion' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from StartModel. In this case, safely retry your call to StartModel by using the same ClientToken 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 to StartModel. An idempotency token is active for 8 hours.

MaxInferenceUnits
Type: int

The 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.

MinInferenceUnits
Required: Yes
Type: int

The 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.

ModelVersion
Required: Yes
Type: string

The version of the model that you want to start.

ProjectName
Required: Yes
Type: string

The name of the project that contains the model that you want to start.

Result Syntax

[
    'Status' => 'STARTING_HOSTING|HOSTED|HOSTING_FAILED|STOPPING_HOSTING|SYSTEM_UPDATING',
]

Result Details

Members
Status
Type: string

The current running status of the model.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ServiceQuotaExceededException:

A service quota was exceeded the allowed limit. For more information, see Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer Guide.

StartModelPackagingJob

$result = $client->startModelPackagingJob([/* ... */]);
$promise = $client->startModelPackagingJobAsync([/* ... */]);

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 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.

Parameter Syntax

$result = $client->startModelPackagingJob([
    'ClientToken' => '<string>',
    'Configuration' => [ // REQUIRED
        'Greengrass' => [ // REQUIRED
            'CompilerOptions' => '<string>',
            'ComponentDescription' => '<string>',
            'ComponentName' => '<string>', // REQUIRED
            'ComponentVersion' => '<string>',
            'S3OutputLocation' => [ // REQUIRED
                'Bucket' => '<string>', // REQUIRED
                'Prefix' => '<string>',
            ],
            'Tags' => [
                [
                    'Key' => '<string>', // REQUIRED
                    'Value' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'TargetDevice' => 'jetson_xavier',
            'TargetPlatform' => [
                'Accelerator' => 'NVIDIA',
                'Arch' => 'ARM64|X86_64', // REQUIRED
                'Os' => 'LINUX', // REQUIRED
            ],
        ],
    ],
    'Description' => '<string>',
    'JobName' => '<string>',
    'ModelVersion' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from StartModelPackagingJob. In this case, safely retry your call to StartModelPackagingJob by using the same ClientToken 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 to StartModelPackagingJob. An idempotency token is active for 8 hours.

Configuration
Required: Yes
Type: ModelPackagingConfiguration structure

The configuration for the model packaging job.

Description
Type: string

A description for the model packaging job.

JobName
Type: string

A name for the model packaging job. If you don't supply a value, the service creates a job name for you.

ModelVersion
Required: Yes
Type: string

The version of the model within the project that you want to package.

ProjectName
Required: Yes
Type: string

The name of the project which contains the version of the model that you want to package.

Result Syntax

[
    'JobName' => '<string>',
]

Result Details

Members
JobName
Type: 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.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ServiceQuotaExceededException:

A service quota was exceeded the allowed limit. For more information, see Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer Guide.

StopModel

$result = $client->stopModel([/* ... */]);
$promise = $client->stopModelAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->stopModel([
    'ClientToken' => '<string>',
    'ModelVersion' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientToken
Type: string

ClientToken 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 from StopModel. In this case, safely retry your call to StopModel by using the same ClientToken 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 to StopModel. An idempotency token is active for 8 hours.

ModelVersion
Required: Yes
Type: string

The version of the model that you want to stop.

ProjectName
Required: Yes
Type: string

The name of the project that contains the model that you want to stop.

Result Syntax

[
    'Status' => 'STARTING_HOSTING|HOSTED|HOSTING_FAILED|STOPPING_HOSTING|SYSTEM_UPDATING',
]

Result Details

Members
Status
Type: string

The status of the model.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->tagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'Tags' => [ // REQUIRED
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model to assign the tags.

Tags
Required: Yes
Type: Array of Tag structures

The key-value tags to assign to the model.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

ServiceQuotaExceededException:

A service quota was exceeded the allowed limit. For more information, see Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer Guide.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->untagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model from which you want to remove tags.

TagKeys
Required: Yes
Type: Array of strings

A list of the keys of the tags that you want to remove.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

UpdateDatasetEntries

$result = $client->updateDatasetEntries([/* ... */]);
$promise = $client->updateDatasetEntriesAsync([/* ... */]);

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.

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.

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.

Parameter Syntax

$result = $client->updateDatasetEntries([
    'Changes' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
    'ClientToken' => '<string>',
    'DatasetType' => '<string>', // REQUIRED
    'ProjectName' => '<string>', // REQUIRED
]);

Parameter Details

Members
Changes
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The entries to add to the dataset.

ClientToken
Type: string

ClientToken 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 from UpdateDatasetEntries. In this case, safely retry your call to UpdateDatasetEntries by using the same ClientToken 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 to UpdateDatasetEntries. An idempotency token is active for 8 hours.

DatasetType
Required: Yes
Type: string

The type of the dataset that you want to update. Specify train to update the training dataset. Specify test to update the test dataset. If you have a single dataset project, specify train.

ProjectName
Required: Yes
Type: string

The name of the project that contains the dataset that you want to update.

Result Syntax

[
    'Status' => 'CREATE_IN_PROGRESS|CREATE_COMPLETE|CREATE_FAILED|UPDATE_IN_PROGRESS|UPDATE_COMPLETE|UPDATE_FAILED_ROLLBACK_IN_PROGRESS|UPDATE_FAILED_ROLLBACK_COMPLETE|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED',
]

Result Details

Members
Status
Type: string

The status of the dataset update.

Errors

AccessDeniedException:

You are not authorized to perform the action.

InternalServerException:

Amazon Lookout for Vision experienced a service issue. Try your call again.

ValidationException:

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

ConflictException:

The update or deletion of a resource caused an inconsistent state.

ResourceNotFoundException:

The resource could not be found.

ThrottlingException:

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

Shapes

AccessDeniedException

Description

You are not authorized to perform the action.

Members
Message
Required: Yes
Type: string

Anomaly

Description

Information about an anomaly type found on an image by an image segmentation model. For more information, see DetectAnomalies.

Members
Name
Type: string

The name of an anomaly type found in an image. Name maps to an anomaly type in the training dataset, apart from the anomaly type background. The service automatically inserts the background anomaly type into the response from DetectAnomalies.

PixelAnomaly
Type: PixelAnomaly structure

Information about the pixel mask that covers an anomaly type.

ConflictException

Description

The update or deletion of a resource caused an inconsistent state.

Members
Message
Required: Yes
Type: string
ResourceId
Required: Yes
Type: string

The ID of the resource.

ResourceType
Required: Yes
Type: string

The type of the resource.

DatasetDescription

Description

The description for a dataset. For more information, see DescribeDataset.

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The Unix timestamp for the time and date that the dataset was created.

DatasetType
Type: string

The type of the dataset. The value train represents a training dataset or single dataset project. The value test represents a test dataset.

ImageStats
Type: DatasetImageStats structure

Statistics about the images in a dataset.

LastUpdatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The Unix timestamp for the date and time that the dataset was last updated.

ProjectName
Type: string

The name of the project that contains the dataset.

Status
Type: string

The status of the dataset.

StatusMessage
Type: string

The status message for the dataset.

DatasetGroundTruthManifest

Description

Location information about a manifest file. You can use a manifest file to create a dataset.

Members
S3Object
Type: InputS3Object structure

The S3 bucket location for the manifest file.

DatasetImageStats

Description

Statistics about the images in a dataset.

Members
Anomaly
Type: int

the total number of images labeled as an anomaly.

Labeled
Type: int

The total number of labeled images.

Normal
Type: int

The total number of images labeled as normal.

Total
Type: int

The total number of images in the dataset.

DatasetMetadata

Description

Summary information for an Amazon Lookout for Vision dataset. For more information, see DescribeDataset and ProjectDescription.

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The Unix timestamp for the date and time that the dataset was created.

DatasetType
Type: string

The type of the dataset.

Status
Type: string

The status for the dataset.

StatusMessage
Type: string

The status message for the dataset.

DatasetSource

Description

Information about the location of a manifest file that Amazon Lookout for Vision uses to to create a dataset.

Members
GroundTruthManifest
Type: DatasetGroundTruthManifest structure

Location information for the manifest file.

DetectAnomalyResult

Description

The prediction results from a call to DetectAnomalies. DetectAnomalyResult includes classification information for the prediction (IsAnomalous and Confidence). If the model you use is an image segementation model, DetectAnomalyResult also includes segmentation information (Anomalies and AnomalyMask). Classification information is calculated separately from segmentation information and you shouldn't assume a relationship between them.

Members
Anomalies
Type: Array of Anomaly structures

If the model is an image segmentation model, Anomalies contains a list of anomaly types found in the image. There is one entry for each type of anomaly found (even if multiple instances of an anomaly type exist on the image). The first element in the list is always an anomaly type representing the image background ('background') and shouldn't be considered an anomaly. Amazon Lookout for Vision automatically add the background anomaly type to the response, and you don't need to declare a background anomaly type in your dataset.

If the list has one entry ('background'), no anomalies were found on the image.

An image classification model doesn't return an Anomalies list.

AnomalyMask
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

If the model is an image segmentation model, AnomalyMask contains pixel masks that covers all anomaly types found on the image. Each anomaly type has a different mask color. To map a color to an anomaly type, see the color field of the PixelAnomaly object.

An image classification model doesn't return an Anomalies list.

Confidence
Type: float

The confidence that Lookout for Vision has in the accuracy of the classification in IsAnomalous.

IsAnomalous
Type: boolean

True if Amazon Lookout for Vision classifies the image as containing an anomaly, otherwise false.

Source
Type: ImageSource structure

The source of the image that was analyzed. direct means that the images was supplied from the local computer. No other values are supported.

GreengrassConfiguration

Description

Configuration information for the AWS IoT Greengrass component created in a model packaging job. For more information, see StartModelPackagingJob.

You can't specify a component with the same ComponentName and Componentversion as an existing component with the same component name and component version.

Members
CompilerOptions
Type: string

Additional compiler options for the Greengrass component. Currently, only NVIDIA Graphics Processing Units (GPU) and CPU accelerators are supported. If you specify TargetDevice, don't specify CompilerOptions.

For more information, see Compiler options in the Amazon Lookout for Vision Developer Guide.

ComponentDescription
Type: string

A description for the AWS IoT Greengrass component.

ComponentName
Required: Yes
Type: string

A name for the AWS IoT Greengrass component.

ComponentVersion
Type: string

A Version for the AWS IoT Greengrass component. If you don't provide a value, a default value of Model Version.0.0 is used.

S3OutputLocation
Required: Yes
Type: S3Location structure

An S3 location in which Lookout for Vision stores the component artifacts.

Tags
Type: Array of Tag structures

A set of tags (key-value pairs) that you want to attach to the AWS IoT Greengrass component.

TargetDevice
Type: string

The target device for the model. Currently the only supported value is jetson_xavier. If you specify TargetDevice, you can't specify TargetPlatform.

TargetPlatform
Type: TargetPlatform structure

The target platform for the model. If you specify TargetPlatform, you can't specify TargetDevice.

GreengrassOutputDetails

Description

Information about the AWS IoT Greengrass component created by a model packaging job.

Members
ComponentName
Type: string

The name of the component.

ComponentVersion
Type: string

The version of the component.

ComponentVersionArn
Type: string

The Amazon Resource Name (ARN) of the component.

ImageSource

Description

The source for an image.

Members
Type
Type: string

The type of the image.

InputS3Object

Description

Amazon S3 Location information for an input manifest file.

Members
Bucket
Required: Yes
Type: string

The Amazon S3 bucket that contains the manifest.

Key
Required: Yes
Type: string

The name and location of the manifest file withiin the bucket.

VersionId
Type: string

The version ID of the bucket.

InternalServerException

Description

Amazon Lookout for Vision experienced a service issue. Try your call again.

Members
Message
Required: Yes
Type: string
RetryAfterSeconds
Type: int

The period of time, in seconds, before the operation can be retried.

ModelDescription

Description

Describes an Amazon Lookout for Vision model.

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The unix timestamp for the date and time that the model was created.

Description
Type: string

The description for the model.

EvaluationEndTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The unix timestamp for the date and time that the evaluation ended.

EvaluationManifest
Type: OutputS3Object structure

The S3 location where Amazon Lookout for Vision saves the manifest file that was used to test the trained model and generate the performance scores.

EvaluationResult
Type: OutputS3Object structure

The S3 location where Amazon Lookout for Vision saves the performance metrics.

KmsKeyId
Type: string

The identifer for the AWS Key Management Service (AWS KMS) key that was used to encrypt the model during training.

MaxInferenceUnits
Type: int

The maximum number of inference units Amazon Lookout for Vision uses to auto-scale the model. For more information, see StartModel.

MinInferenceUnits
Type: int

The minimum number of inference units used by the model. For more information, see StartModel

ModelArn
Type: string

The Amazon Resource Name (ARN) of the model.

ModelVersion
Type: string

The version of the model

OutputConfig
Type: OutputConfig structure

The S3 location where Amazon Lookout for Vision saves model training files.

Performance
Type: ModelPerformance structure

Performance metrics for the model. Created during training.

Status
Type: string

The status of the model.

StatusMessage
Type: string

The status message for the model.

ModelMetadata

Description

Describes an Amazon Lookout for Vision model.

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The unix timestamp for the date and time that the model was created.

Description
Type: string

The description for the model.

ModelArn
Type: string

The Amazon Resource Name (ARN) of the model.

ModelVersion
Type: string

The version of the model.

Performance
Type: ModelPerformance structure

Performance metrics for the model. Not available until training has successfully completed.

Status
Type: string

The status of the model.

StatusMessage
Type: string

The status message for the model.

ModelPackagingConfiguration

Description

Configuration information for a Amazon Lookout for Vision model packaging job. For more information, see StartModelPackagingJob.

Members
Greengrass
Required: Yes
Type: GreengrassConfiguration structure

Configuration information for the AWS IoT Greengrass component in a model packaging job.

ModelPackagingDescription

Description

Information about a model packaging job. For more information, see DescribeModelPackagingJob.

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The Unix timestamp for the time and date that the model packaging job was created.

JobName
Type: string

The name of the model packaging job.

LastUpdatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The Unix timestamp for the time and date that the model packaging job was last updated.

ModelPackagingConfiguration
Type: ModelPackagingConfiguration structure

The configuration information used in the model packaging job.

ModelPackagingJobDescription
Type: string

The description for the model packaging job.

ModelPackagingMethod
Type: string

The AWS service used to package the job. Currently Lookout for Vision can package jobs with AWS IoT Greengrass.

ModelPackagingOutputDetails
Type: ModelPackagingOutputDetails structure

Information about the output of the model packaging job. For more information, see DescribeModelPackagingJob.

ModelVersion
Type: string

The version of the model used in the model packaging job.

ProjectName
Type: string

The name of the project that's associated with a model that's in the model package.

Status
Type: string

The status of the model packaging job.

StatusMessage
Type: string

The status message for the model packaging job.

ModelPackagingJobMetadata

Description

Metadata for a model packaging job. For more information, see ListModelPackagingJobs.

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The Unix timestamp for the time and date that the model packaging job was created.

JobName
Type: string

The name of the model packaging job.

LastUpdatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The Unix timestamp for the time and date that the model packaging job was last updated.

ModelPackagingJobDescription
Type: string

The description for the model packaging job.

ModelPackagingMethod
Type: string

The AWS service used to package the job. Currently Lookout for Vision can package jobs with AWS IoT Greengrass.

ModelVersion
Type: string

The version of the model that is in the model package.

ProjectName
Type: string

The project that contains the model that is in the model package.

Status
Type: string

The status of the model packaging job.

StatusMessage
Type: string

The status message for the model packaging job.

ModelPackagingOutputDetails

Description

Information about the output from a model packaging job.

Members
Greengrass
Type: GreengrassOutputDetails structure

Information about the AWS IoT Greengrass component in a model packaging job.

ModelPerformance

Description

Information about the evaluation performance of a trained model.

Members
F1Score
Type: float

The overall F1 score metric for the trained model.

Precision
Type: float

The overall precision metric value for the trained model.

Recall
Type: float

The overall recall metric value for the trained model.

OutputConfig

Description

The S3 location where Amazon Lookout for Vision saves model training files.

Members
S3Location
Required: Yes
Type: S3Location structure

The S3 location for the output.

OutputS3Object

Description

The S3 location where Amazon Lookout for Vision saves training output.

Members
Bucket
Required: Yes
Type: string

The bucket that contains the training output.

Key
Required: Yes
Type: string

The location of the training output in the bucket.

PixelAnomaly

Description

Information about the pixels in an anomaly mask. For more information, see Anomaly. PixelAnomaly is only returned by image segmentation models.

Members
Color
Type: string

A hex color value for the mask that covers an anomaly type. Each anomaly type has a different mask color. The color maps to the color of the anomaly type used in the training dataset.

TotalPercentageArea
Type: float

The percentage area of the image that the anomaly type covers.

ProjectDescription

Description

Describe an Amazon Lookout for Vision project. For more information, see DescribeProject.

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The unix timestamp for the date and time that the project was created.

Datasets
Type: Array of DatasetMetadata structures

A list of datasets in the project.

ProjectArn
Type: string

The Amazon Resource Name (ARN) of the project.

ProjectName
Type: string

The name of the project.

ProjectMetadata

Description

Metadata about an Amazon Lookout for Vision project.

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The unix timestamp for the date and time that the project was created.

ProjectArn
Type: string

The Amazon Resource Name (ARN) of the project.

ProjectName
Type: string

The name of the project.

ResourceNotFoundException

Description

The resource could not be found.

Members
Message
Required: Yes
Type: string
ResourceId
Required: Yes
Type: string

The ID of the resource.

ResourceType
Required: Yes
Type: string

The type of the resource.

S3Location

Description

Information about the location of training output or the output of a model packaging job.

Members
Bucket
Required: Yes
Type: string

The S3 bucket that contains the training or model packaging job output. If you are training a model, the bucket must in your AWS account. If you use an S3 bucket for a model packaging job, the S3 bucket must be in the same AWS Region and AWS account in which you use AWS IoT Greengrass.

Prefix
Type: string

The path of the folder, within the S3 bucket, that contains the output.

ServiceQuotaExceededException

Description

A service quota was exceeded the allowed limit. For more information, see Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer Guide.

Members
Message
Required: Yes
Type: string
QuotaCode
Required: Yes
Type: string

The quota code.

ResourceId
Type: string

The ID of the resource.

ResourceType
Type: string

The type of the resource.

ServiceCode
Required: Yes
Type: string

The service code.

Tag

Description

A key and value pair that is attached to the specified Amazon Lookout for Vision model.

Members
Key
Required: Yes
Type: string

The key of the tag that is attached to the specified model.

Value
Required: Yes
Type: string

The value of the tag that is attached to the specified model.

TargetPlatform

Description

The platform on which a model runs on an AWS IoT Greengrass core device.

Members
Accelerator
Type: string

The target accelerator for the model. Currently, Amazon Lookout for Vision only supports NVIDIA (Nvidia graphics processing unit) and CPU accelerators. If you specify NVIDIA as an accelerator, you must also specify the gpu-code, trt-ver, and cuda-ver compiler options. If you don't specify an accelerator, Lookout for Vision uses the CPU for compilation and we highly recommend that you use the GreengrassConfiguration$CompilerOptions field. For example, you can use the following compiler options for CPU:

  • mcpu: CPU micro-architecture. For example, {'mcpu': 'skylake-avx512'}

  • mattr: CPU flags. For example, {'mattr': ['+neon', '+vfpv4']}

Arch
Required: Yes
Type: string

The target architecture for the model. The currently supported architectures are X86_64 (64-bit version of the x86 instruction set) and ARM_64 (ARMv8 64-bit CPU).

Os
Required: Yes
Type: string

The target operating system for the model. Linux is the only operating system that is currently supported.

ThrottlingException

Description

Amazon Lookout for Vision is temporarily unable to process the request. Try your call again.

Members
Message
Required: Yes
Type: string
QuotaCode
Type: string

The quota code.

RetryAfterSeconds
Type: int

The period of time, in seconds, before the operation can be retried.

ServiceCode
Type: string

The service code.

ValidationException

Description

An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid.

Members
Message
Required: Yes
Type: string