Help Center> ModelArts> API Reference> Service Management> Starting or Stopping a Service Instance on an Edge Node

Starting or Stopping a Service Instance on an Edge Node

Function

This API is used to start or stop a service instance on an edge node.

URI

PUT /v1/{project_id}/services/{service_id}/nodes/{node_id}/status

Table 1 describes the required parameters.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

service_id

Yes

String

Service ID

node_id

Yes

String

Node ID

Request Body

Table 2 describes the request parameters.
Table 2 Parameter description

Parameter

Mandatory

Type

Description

status

Yes

String

Service status. Possible values are as follows:

  • running: A node instance is started and running. Only node instances in the running status can be stopped.
  • stopped: A node instance is stopped: Only node instances in the stopped status can be started.

Response Body

None

Samples

The following shows how to start a service instance on an edge node.

  • Sample request
    PUT    https://endpoint/v1/{project_id}/services/{service_id}/nodes/{node_id}/status
    {
        "status": "running"
    }
  • Sample response
    {}

Status Code

For details about the status code, see Table 1.