Add receiver update api document
This patch add receiver update api interface to api development document. Change-Id: Id4c89ae6edc788308cad937a5f9a1abe8f65cbd3 Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
This commit is contained in:
parent
40adf92e11
commit
0edce1c2c5
|
@ -1208,6 +1208,14 @@ receiver_action:
|
|||
The action to initiate when the receiver is triggered. A valid value
|
||||
should be the name of an action that can be applied on a cluster.
|
||||
|
||||
receiver_action_req:
|
||||
type: string
|
||||
in: body
|
||||
required: False
|
||||
description: |
|
||||
The action to initiate when the receiver is triggered. A valid value
|
||||
should be the name of an action that can be applied on a cluster.
|
||||
|
||||
receiver_actor:
|
||||
type: object
|
||||
in: body
|
||||
|
|
|
@ -199,6 +199,78 @@ Response Example
|
|||
:language: javascript
|
||||
|
||||
|
||||
Updates a receiver
|
||||
==================
|
||||
|
||||
.. rest_method: PATCH /v1/receivers/{receiver_id}
|
||||
|
||||
min_version: 1.7
|
||||
|
||||
Updates a receiver.
|
||||
|
||||
Response Codes
|
||||
--------------
|
||||
|
||||
.. rest_status_code:: success status.yaml
|
||||
|
||||
- 200
|
||||
|
||||
.. rest_status_code:: error status.yaml
|
||||
|
||||
- 400
|
||||
- 401
|
||||
- 403
|
||||
- 404
|
||||
- 503
|
||||
|
||||
Request Parameters
|
||||
------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- OpenStack-API-Version: microversion
|
||||
- receiver_id: receiver_id_url
|
||||
- receiver: receiver
|
||||
- name: name_req
|
||||
- action: receiver_action_req
|
||||
- params: receiver_params_req
|
||||
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: samples/receiver-update-request.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- X-OpenStack-Request-Id: request_id
|
||||
- receiver: receiver
|
||||
- action: receiver_action
|
||||
- actor: receiver_actor
|
||||
- channel: receiver_channel
|
||||
- cluster_id: cluster_id
|
||||
- created_at: created_at
|
||||
- domain: domain
|
||||
- id: receiver_id
|
||||
- name: name
|
||||
- params: receiver_params
|
||||
- project: project
|
||||
- type: receiver_type
|
||||
- updated_at: updated_at
|
||||
- user: user
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/receiver-update-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Delete receiver
|
||||
===============
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"reciever": {
|
||||
"name": "new-name",
|
||||
"action": "CLUSTER_SCALE_OUT",
|
||||
"params": {
|
||||
"count": "2"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"receiver": {
|
||||
"action": "CLUSTER_SCALE_OUT",
|
||||
"actor": {
|
||||
"trust_id": [
|
||||
"6dc6d336e3fc4c0a951b5698cd1236d9"
|
||||
]
|
||||
},
|
||||
"channel": {
|
||||
"alarm_url": "http://node1:8778/v1/webhooks/e03dd2e5-8f2e-4ec1-8c6a-74ba891e5422/trigger?V=1&count=2"
|
||||
},
|
||||
"cluster_id": "ae63a10b-4a90-452c-aef1-113a0b255ee3",
|
||||
"created_at": "2015-06-27T05:09:43",
|
||||
"domain": "Default",
|
||||
"id": "573aa1ba-bf45-49fd-907d-6b5d6e6adfd3",
|
||||
"name": "new-name",
|
||||
"params": {
|
||||
"count": "2"
|
||||
},
|
||||
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
|
||||
"type": "webhook",
|
||||
"updated_at": "2016-03-11T05:10:11",
|
||||
"user": "b4ad2d6e18cc2b9c48049f6dbe8a5b3c"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue