Updated on 2026-10-22 GMT+08:00

Deleting a Service Discovery Rule

Function

This API is used to delete a service discovery rule.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    aom:discoveryRule:delete

    Write

    -

    -

    -

    -

URI

DELETE /v1/{project_id}/inv/servicediscoveryrules

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which can be obtained from the console or by calling an API. For details, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

appRulesIds

Yes

Array of strings

Discovery rule ID. Multiple IDs need to be separated by commas (,). The parameter cannot be empty.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM. For details, see Obtaining a Token.

Content-Type

Yes

String

Message body type or format. Content type, which is application/json.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

errorCode

String

Response code.

errorMessage

String

Response message.

responseStatus

Integer

Response status code (no longer used).

id

Array of strings

Service discovery rule ID list. This parameter is used during cross-AZ configuration synchronization.

Example Requests

Delete a service discovery rule with a specified ID.

https://{Endpoint}/v1/{project_id}/inv/servicediscoveryrules?appRulesIds=b788349e-62b2-xxxx-xxxx-02c611d59801

Example Responses

Status code: 200

{
  "errorCode" : "SVCSTG.INV.2000000",
  "errorMessage" : null,
  "id" : [ ]
}

Status code: 400

{
  "errorCode" : "SVCSTG.INV.40000118",
  "errorMessage" : "Request param is invalid"
}

Status code: 404

{
  "errorCode" : "SVCSTG.INV.4040000",
  "errorMessage" : "Inventory does not exists",
  "id" : [ ]
}

Status code: 500

{
  "errorCode" : "APM.00000500",
  "errorMessage" : "Internal Server Error"
}

Status Codes

Status Code

Description

200

OK: The request is successful.

400

Bad Request: The request is invalid. The client should not repeat the request without modifications.

401

Unauthorized: The authentication information is incorrect or invalid.

403

Forbidden: The request is rejected. The server has received the request and understood it, but the server refuses to respond to it. The client should not repeat the request without modifications.

404

Not Found: The requested resource could not be found. The client should not repeat this request without modification.

500

Internal Server Error: The server is able to receive the request but unable to understand the request.

503

Unauthorized: The authentication information is incorrect or invalid.

Error Codes

See Error Codes.