create_or_update_consumer
Create or update a consumer in APISIX with username, description, labels, and plugins via the APISIX-MCP server, ensuring accurate consumer management.
Instructions
Create a consumer, if the consumer already exists, it will be updated
Input Schema
Name | Required | Description | Default |
---|---|---|---|
desc | No | consumer description | |
group_id | No | consumer group id | |
labels | No | consumer labels | |
plugins | No | consumer plugins | |
username | Yes | consumer username |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"desc": {
"description": "consumer description",
"type": "string"
},
"group_id": {
"description": "consumer group id",
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "consumer labels",
"type": "object"
},
"plugins": {
"additionalProperties": true,
"description": "consumer plugins",
"properties": {
"_meta": {
"additionalProperties": false,
"properties": {
"disable": {
"default": false,
"description": "control whether the plugin is enabled",
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
},
"username": {
"description": "consumer username",
"type": "string"
}
},
"required": [
"username"
],
"type": "object"
}