import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const modelDeployment = await client.models.deployments.update('model_instance_id', 'deployment_id');
console.log(modelDeployment.id);
{
"name": "<string>",
"model_creation_parameters": {},
"model_endpoint_id": "<string>",
"model_instance_id": "<string>",
"vendor_configuration": {
"min_workers": 0,
"max_workers": 1,
"per_worker": 10,
"vendor": "LAUNCH"
},
"deployment_metadata": {},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"status": "<string>"
}
Updates a deployment
This API can be used to update the deployment that matches the ID that was passed in as a path parameter. To use this API, pass in the id
that was returned from your Create Deployment API call as a path parameter.
Review the request schema to see the fields that can be updated.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const modelDeployment = await client.models.deployments.update('model_instance_id', 'deployment_id');
console.log(modelDeployment.id);
{
"name": "<string>",
"model_creation_parameters": {},
"model_endpoint_id": "<string>",
"model_instance_id": "<string>",
"vendor_configuration": {
"min_workers": 0,
"max_workers": 1,
"per_worker": 10,
"vendor": "LAUNCH"
},
"deployment_metadata": {},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"status": "<string>"
}
Successful Response
The response is of type object
.