Updated on 2024-10-30 GMT+08:00

Enabling or Disabling a Plug-in

Function

This API is used to enable or disable a plug-in.

URI

PUT /v2/{project_id}/instances/{instance_id}/rabbitmq/plugins

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

instance_id

Yes

String

Instance ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

enable

No

Boolean

Whether to enable the plug-in.

plugins

No

String

Plug-ins. Separated multiple plug-ins with commas (,).

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

Background task ID.

Example Requests

Enabling the rabbitmq_federation and rabbitmq_shovel plug-ins

PUT https://{endpoint}/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins

{
  "enable" : true,
  "plugins" : "rabbitmq_federation,rabbitmq_shovel"
}

Example Responses

Status code: 200

The plug-in is enabled or disabled successfully.

{
  "job_id" : "8abfa7b27437db8f01744ea8ad4f245e"
}

Status Codes

Status Code

Description

200

The plug-in is enabled or disabled successfully.

Error Codes

See Error Codes.