import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const modelDeployment = await client.models.deployments.retrieve('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>"
}
Gets the details of a deployment
This API can be used to get information about a single deployment by ID. To use this API, pass in the id
that was returned from your Create Deployment API call as a path parameter.
Review the response schema to see the fields that will be returned.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const modelDeployment = await client.models.deployments.retrieve('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
.