Merge "api-ref - stack actions"
This commit is contained in:
commit
403f07c256
|
@ -380,6 +380,12 @@ with_detail:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
# variables in body
|
# variables in body
|
||||||
|
action:
|
||||||
|
description: |
|
||||||
|
The last action executed on the stack.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
adopt_stack_data:
|
adopt_stack_data:
|
||||||
description: |
|
description: |
|
||||||
Existing resources data to adopt a stack. Data returned by abandon
|
Existing resources data to adopt a stack. Data returned by abandon
|
||||||
|
@ -615,6 +621,12 @@ disable_rollback:
|
||||||
required: false
|
required: false
|
||||||
default: True
|
default: True
|
||||||
type: boolean
|
type: boolean
|
||||||
|
encrypted_param_names:
|
||||||
|
description: |
|
||||||
|
A list of parameter names whose values are encrypted.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
engine_id:
|
engine_id:
|
||||||
description: |
|
description: |
|
||||||
The UUID of the engine service.
|
The UUID of the engine service.
|
||||||
|
@ -667,6 +679,12 @@ event_links:
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: array
|
type: array
|
||||||
|
event_sinks:
|
||||||
|
description: |
|
||||||
|
A list of event sinks.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
event_time:
|
event_time:
|
||||||
description: |
|
description: |
|
||||||
The date and time when the event was created. The date and time stamp
|
The date and time when the event was created. The date and time stamp
|
||||||
|
@ -910,6 +928,12 @@ outputs:
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: array
|
type: array
|
||||||
|
parameter_defaults:
|
||||||
|
description: |
|
||||||
|
A map of parameters and their default values defined for the stack.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
ParameterGroups:
|
ParameterGroups:
|
||||||
description: |
|
description: |
|
||||||
A list of parameter groups. Each group contains a
|
A list of parameter groups. Each group contains a
|
||||||
|
@ -1000,6 +1024,12 @@ parameters:
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: object
|
type: object
|
||||||
|
parameters_show:
|
||||||
|
description: |
|
||||||
|
A map of parameters defined for the stack.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
parent:
|
parent:
|
||||||
description: |
|
description: |
|
||||||
The stack ID of the parent stack, if this is a nested stack.
|
The stack ID of the parent stack, if this is a nested stack.
|
||||||
|
@ -1112,6 +1142,13 @@ resource_properties:
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: object
|
type: object
|
||||||
|
resource_registry:
|
||||||
|
description: |
|
||||||
|
A map containing customized resource definitions. This map contains at
|
||||||
|
least a dict of ``resources`` registered for the stack.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
resource_status:
|
resource_status:
|
||||||
description: |
|
description: |
|
||||||
The status of the resource.
|
The status of the resource.
|
||||||
|
@ -1433,8 +1470,7 @@ support_status:
|
||||||
type: object
|
type: object
|
||||||
suspend:
|
suspend:
|
||||||
description: |
|
description: |
|
||||||
Specify the ``suspend`` action in the request
|
Specify the ``suspend`` action in the request body.
|
||||||
body.
|
|
||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -260,8 +260,8 @@ Response Example
|
||||||
This operation does not return a response body.
|
This operation does not return a response body.
|
||||||
|
|
||||||
|
|
||||||
Mark a resource unhealthy
|
Mark a resource as unhealthy
|
||||||
===========================
|
============================
|
||||||
|
|
||||||
.. rest_method:: PATCH /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/resources/{resource_name}
|
.. rest_method:: PATCH /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/resources/{resource_name}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"encrypted_param_names": [],
|
||||||
|
"event_sinks": [],
|
||||||
|
"parameter_defaults": {},
|
||||||
|
"parameters": {},
|
||||||
|
"resource_registry": {
|
||||||
|
"resources": {}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
{
|
||||||
|
"action": "SUSPEND",
|
||||||
|
"environment": {
|
||||||
|
"event_sinks": [],
|
||||||
|
"parameter_defaults": {},
|
||||||
|
"parameters": {},
|
||||||
|
"resource_registry": {
|
||||||
|
"resources": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"files": {},
|
||||||
|
"id": "da778f26-6d25-4634-9531-d438188e48fd",
|
||||||
|
"name": "s1",
|
||||||
|
"project_id": "369166a68a3a49b78b4e138531556e55",
|
||||||
|
"resources": {
|
||||||
|
"random": {
|
||||||
|
"action": "SUSPEND",
|
||||||
|
"metadata": {},
|
||||||
|
"name": "random",
|
||||||
|
"resource_data": {
|
||||||
|
"value": "wCPWWoGJH5SZKtNFAgqGcbiWokCkRgam"
|
||||||
|
},
|
||||||
|
"resource_id": "s1-random-pzuzs6pbjhho",
|
||||||
|
"status": "COMPLETE",
|
||||||
|
"type": "OS::Heat::RandomString"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stack_user_project_id": "a4e6fd443f5b4d4694331ff441ad2397",
|
||||||
|
"status": "COMPLETE",
|
||||||
|
"tags": null,
|
||||||
|
"template": {
|
||||||
|
"heat_template_version": "2014-10-16",
|
||||||
|
"outputs": {
|
||||||
|
"result": {
|
||||||
|
"value": {
|
||||||
|
"get_attr": [
|
||||||
|
"random",
|
||||||
|
"value"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"str_length": {
|
||||||
|
"default": 32,
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resources": {
|
||||||
|
"random": {
|
||||||
|
"properties": {
|
||||||
|
"length": {
|
||||||
|
"get_param": "str_length"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "OS::Heat::RandomString"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"file:///home/username/hello.sh": "#!/bin/sh\necho hello\n"
|
||||||
|
}
|
|
@ -4,8 +4,8 @@
|
||||||
Stack actions
|
Stack actions
|
||||||
=============
|
=============
|
||||||
|
|
||||||
Performs non-lifecycle operations on the stack. Specify the action
|
Performs non-lifecycle operations on the stack. Specify the action in the
|
||||||
in the request body.
|
request body.
|
||||||
|
|
||||||
Suspend stack
|
Suspend stack
|
||||||
=============
|
=============
|
||||||
|
@ -14,17 +14,27 @@ Suspend stack
|
||||||
|
|
||||||
Suspends a stack.
|
Suspends a stack.
|
||||||
|
|
||||||
Normal response codes: 200
|
Response Codes
|
||||||
Error response codes:
|
--------------
|
||||||
|
|
||||||
Request
|
.. rest_status_code:: success status.yaml
|
||||||
-------
|
|
||||||
|
- 200
|
||||||
|
|
||||||
|
.. rest_status_code:: error status.yaml
|
||||||
|
|
||||||
|
- 400
|
||||||
|
- 401
|
||||||
|
- 404
|
||||||
|
|
||||||
|
Request Parameters
|
||||||
|
------------------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
- tenant_id: tenant_id
|
- tenant_id: tenant_id
|
||||||
- stack_id: stack_id_url
|
|
||||||
- stack_name: stack_name_url
|
- stack_name: stack_name_url
|
||||||
|
- stack_id: stack_id_url
|
||||||
- suspend: suspend
|
- suspend: suspend
|
||||||
|
|
||||||
Request Example
|
Request Example
|
||||||
|
@ -33,6 +43,13 @@ Request Example
|
||||||
.. literalinclude:: samples/stack-action-suspend-request.json
|
.. literalinclude:: samples/stack-action-suspend-request.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
Response Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- X-Openstack-Request-Id: request_id
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -46,17 +63,27 @@ Resume stack
|
||||||
|
|
||||||
Resumes a suspended stack.
|
Resumes a suspended stack.
|
||||||
|
|
||||||
Normal response codes: 200
|
Response Codes
|
||||||
Error response codes:
|
--------------
|
||||||
|
|
||||||
Request
|
.. rest_status_code:: success status.yaml
|
||||||
-------
|
|
||||||
|
- 200
|
||||||
|
|
||||||
|
.. rest_status_code:: error status.yaml
|
||||||
|
|
||||||
|
- 400
|
||||||
|
- 401
|
||||||
|
- 404
|
||||||
|
|
||||||
|
Request Parameters
|
||||||
|
------------------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
- tenant_id: tenant_id
|
- tenant_id: tenant_id
|
||||||
- stack_id: stack_id_url
|
|
||||||
- stack_name: stack_name_url
|
- stack_name: stack_name_url
|
||||||
|
- stack_id: stack_id_url
|
||||||
- resume: resume
|
- resume: resume
|
||||||
|
|
||||||
Request Example
|
Request Example
|
||||||
|
@ -65,6 +92,13 @@ Request Example
|
||||||
.. literalinclude:: samples/stack-action-resume-request.json
|
.. literalinclude:: samples/stack-action-resume-request.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
Response Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- X-Openstack-Request-Id: request_id
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -78,17 +112,27 @@ Cancel stack update
|
||||||
|
|
||||||
Cancels a currently running update of a stack.
|
Cancels a currently running update of a stack.
|
||||||
|
|
||||||
Normal response codes: 200
|
Response Codes
|
||||||
Error response codes:
|
--------------
|
||||||
|
|
||||||
Request
|
.. rest_status_code:: success status.yaml
|
||||||
-------
|
|
||||||
|
- 200
|
||||||
|
|
||||||
|
.. rest_status_code:: error status.yaml
|
||||||
|
|
||||||
|
- 400
|
||||||
|
- 401
|
||||||
|
- 404
|
||||||
|
|
||||||
|
Request Parameters
|
||||||
|
------------------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
- tenant_id: tenant_id
|
- tenant_id: tenant_id
|
||||||
- stack_id: stack_id_url
|
|
||||||
- stack_name: stack_name_url
|
- stack_name: stack_name_url
|
||||||
|
- stack_id: stack_id_url
|
||||||
- cancel_update: cancel_update
|
- cancel_update: cancel_update
|
||||||
|
|
||||||
Request Example
|
Request Example
|
||||||
|
@ -97,6 +141,13 @@ Request Example
|
||||||
.. literalinclude:: samples/stack-action-cancel-update-request.json
|
.. literalinclude:: samples/stack-action-cancel-update-request.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
Response Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- X-Openstack-Request-Id: request_id
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -110,17 +161,27 @@ Check stack resources
|
||||||
|
|
||||||
Checks whether the resources are in expected states for a stack.
|
Checks whether the resources are in expected states for a stack.
|
||||||
|
|
||||||
Normal response codes: 200
|
Response Codes
|
||||||
Error response codes:
|
--------------
|
||||||
|
|
||||||
Request
|
.. rest_status_code:: success status.yaml
|
||||||
-------
|
|
||||||
|
- 200
|
||||||
|
|
||||||
|
.. rest_status_code:: error status.yaml
|
||||||
|
|
||||||
|
- 400
|
||||||
|
- 401
|
||||||
|
- 404
|
||||||
|
|
||||||
|
Request Parameters
|
||||||
|
------------------
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
- tenant_id: tenant_id
|
- tenant_id: tenant_id
|
||||||
- stack_id: stack_id_url
|
|
||||||
- stack_name: stack_name_url
|
- stack_name: stack_name_url
|
||||||
|
- stack_id: stack_id_url
|
||||||
- check: check
|
- check: check
|
||||||
|
|
||||||
Request Example
|
Request Example
|
||||||
|
@ -129,6 +190,13 @@ Request Example
|
||||||
.. literalinclude:: samples/stack-action-check-request.json
|
.. literalinclude:: samples/stack-action-check-request.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
Response Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- X-Openstack-Request-Id: request_id
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -676,6 +676,64 @@ Response Example
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Export stack
|
||||||
|
============
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/export
|
||||||
|
|
||||||
|
Gets the stack data in JSON format.
|
||||||
|
|
||||||
|
Response Codes
|
||||||
|
--------------
|
||||||
|
|
||||||
|
.. rest_status_code:: success status.yaml
|
||||||
|
|
||||||
|
- 200
|
||||||
|
|
||||||
|
.. rest_status_code:: error status.yaml
|
||||||
|
|
||||||
|
- 400
|
||||||
|
- 401
|
||||||
|
- 404
|
||||||
|
- 409
|
||||||
|
- 500
|
||||||
|
|
||||||
|
Request Parameters
|
||||||
|
------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- tenant_id: tenant_id
|
||||||
|
- stack_name: stack_name_url
|
||||||
|
- stack_id: stack_id_url
|
||||||
|
|
||||||
|
Response Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The body of the response contains a map of file names and file contents.
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- X-Openstack-Reqeuest-Id: request_id
|
||||||
|
- action: action
|
||||||
|
- environment: stack_environment
|
||||||
|
- files: stack_files
|
||||||
|
- id: stack_id
|
||||||
|
- name: stack_name
|
||||||
|
- project_id: project_id
|
||||||
|
- resources: resources
|
||||||
|
- stack_user_project_id: stack_stack_user_project_id
|
||||||
|
- status: stack_status
|
||||||
|
- tags: stack_tags
|
||||||
|
- template: stack_template
|
||||||
|
|
||||||
|
Response Example
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/stack-export-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
Get stack template
|
Get stack template
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
@ -723,3 +781,98 @@ Response Example
|
||||||
|
|
||||||
.. literalinclude:: samples/template-show-response.json
|
.. literalinclude:: samples/template-show-response.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Get stack environment
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/environment
|
||||||
|
|
||||||
|
Gets the environment for a stack.
|
||||||
|
|
||||||
|
Response Codes
|
||||||
|
--------------
|
||||||
|
|
||||||
|
.. rest_status_code:: success status.yaml
|
||||||
|
|
||||||
|
- 200
|
||||||
|
|
||||||
|
.. rest_status_code:: error status.yaml
|
||||||
|
|
||||||
|
- 400
|
||||||
|
- 401
|
||||||
|
- 404
|
||||||
|
- 500
|
||||||
|
|
||||||
|
Request Parameters
|
||||||
|
------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- tenant_id: tenant_id
|
||||||
|
- stack_name: stack_name_url
|
||||||
|
- stack_id: stack_id_url
|
||||||
|
|
||||||
|
Response Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- X-Openstack-Reqeuest-Id: request_id
|
||||||
|
- encrypted_param_names: encrypted_param_names
|
||||||
|
- event_sinks: event_sinks
|
||||||
|
- parameter_defaults: parameter_defaults
|
||||||
|
- parameters: parameters
|
||||||
|
- resource_registry: resource_registry
|
||||||
|
|
||||||
|
Response Example
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/stack-environment-show-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Get stack files
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/files
|
||||||
|
|
||||||
|
Gets the files associated with a stack.
|
||||||
|
|
||||||
|
Response Codes
|
||||||
|
--------------
|
||||||
|
|
||||||
|
.. rest_status_code:: success status.yaml
|
||||||
|
|
||||||
|
- 200
|
||||||
|
|
||||||
|
.. rest_status_code:: error status.yaml
|
||||||
|
|
||||||
|
- 400
|
||||||
|
- 401
|
||||||
|
- 404
|
||||||
|
- 500
|
||||||
|
|
||||||
|
Request Parameters
|
||||||
|
------------------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- tenant_id: tenant_id
|
||||||
|
- stack_name: stack_name_url
|
||||||
|
- stack_id: stack_id_url
|
||||||
|
|
||||||
|
Response Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The body of the response contains a map of file names and file contents.
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- X-Openstack-Reqeuest-Id: request_id
|
||||||
|
|
||||||
|
Response Example
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/stack-files-show-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
Loading…
Reference in New Issue