- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
StopModelCommand
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.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { LookoutVisionClient, StopModelCommand } from "@aws-sdk/client-lookoutvision"; // ES Modules import
// const { LookoutVisionClient, StopModelCommand } = require("@aws-sdk/client-lookoutvision"); // CommonJS import
const client = new LookoutVisionClient(config);
const input = { // StopModelRequest
ProjectName: "STRING_VALUE", // required
ModelVersion: "STRING_VALUE", // required
ClientToken: "STRING_VALUE",
};
const command = new StopModelCommand(input);
const response = await client.send(command);
// { // StopModelResponse
// Status: "STARTING_HOSTING" || "HOSTED" || "HOSTING_FAILED" || "STOPPING_HOSTING" || "SYSTEM_UPDATING",
// };
StopModelCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ModelVersion Required | string | undefined | The version of the model that you want to stop. |
ProjectName Required | string | undefined | The name of the project that contains the model that you want to stop. |
ClientToken | string | undefined | ClientToken is an idempotency token that ensures a call to If you don't supply a value for An error occurs if the other input parameters are not the same as in the first request. Using a different value for |
StopModelCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Status | ModelHostingStatus | undefined | The status of the model. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You are not authorized to perform the action. |
ConflictException | client | The update or deletion of a resource caused an inconsistent state. |
InternalServerException | server | Amazon Lookout for Vision experienced a service issue. Try your call again. |
ResourceNotFoundException | client | The resource could not be found. |
ThrottlingException | client | Amazon Lookout for Vision is temporarily unable to process the request. Try your call again. |
ValidationException | client | An input validation error occured. For example, invalid characters in a project name, or if a pagination token is invalid. |
LookoutVisionServiceException | Base exception class for all service exceptions from LookoutVision service. |