
This patch splits the stacks.inc file into three files so that we can patch them separately. The original file contains API calls about stacks, stack snapshots and stack outputs, however, the latter two have every right to be documented separately. Change-Id: I3e3b71c914046939cd816c79359601e91791cf82
174 lines
3.2 KiB
ReStructuredText
174 lines
3.2 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
===============
|
|
Stack Snapshots
|
|
===============
|
|
|
|
Snapshot stack
|
|
==============
|
|
|
|
.. rest_method:: POST /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/snapshots
|
|
|
|
Takes a snapshot of all resources in a stack. All snapshots are deleted when the stack is deleted.
|
|
|
|
Normal response codes: 200
|
|
Error response codes:
|
|
|
|
Request Parameters
|
|
------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- name: name
|
|
- stack_name: stack_name
|
|
- tenant_id: tenant_id
|
|
- stack_id: stack_id
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: samples/stack-snapshot-request.json
|
|
:language: javascript
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- status: status
|
|
- name: name
|
|
- status_reason: status_reason
|
|
- creation_time: creation_time
|
|
- data: data
|
|
- id: id
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/stack-snapshot-response.json
|
|
:language: javascript
|
|
|
|
|
|
Show snapshot
|
|
=============
|
|
|
|
.. rest_method:: GET /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/snapshots/{snapshot_id}
|
|
|
|
Shows details for a snapshot.
|
|
|
|
|
|
Normal response codes: 200
|
|
Error response codes:
|
|
|
|
Request Parameters
|
|
------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- stack_name: stack_name
|
|
- tenant_id: tenant_id
|
|
- stack_id: stack_id
|
|
- snapshot_id: snapshot_id
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- status: status
|
|
- name: name
|
|
- status_reason: status_reason
|
|
- creation_time: creation_time
|
|
- snapshot: snapshot
|
|
- template: template
|
|
- project_id: project_id
|
|
- data: data
|
|
- id: id
|
|
- resources: resources
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/stack-show-snapshot-response.json
|
|
:language: javascript
|
|
|
|
List snapshots
|
|
==============
|
|
|
|
.. rest_method:: GET /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/snapshots
|
|
|
|
Lists snapshots for a stack.
|
|
|
|
Normal response codes: 200
|
|
Error response codes:
|
|
|
|
Request Parameters
|
|
------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- stack_name: stack_name
|
|
- tenant_id: tenant_id
|
|
- stack_id: stack_id
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- status: status
|
|
- name: name
|
|
- status_reason: status_reason
|
|
- creation_time: creation_time
|
|
- snapshots: snapshots
|
|
- data: data
|
|
- id: id
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/stack-snapshots-list-response.json
|
|
:language: javascript
|
|
|
|
|
|
Delete snapshot
|
|
===============
|
|
|
|
.. rest_method:: DELETE /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/snapshots/{snapshot_id}
|
|
|
|
Deletes a stack snapshot.
|
|
|
|
Error response codes:204,
|
|
|
|
Request Parameters
|
|
------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- stack_name: stack_name
|
|
- tenant_id: tenant_id
|
|
- stack_id: stack_id
|
|
- snapshot_id: snapshot_id
|
|
|
|
Restore snapshot
|
|
================
|
|
|
|
.. rest_method:: POST /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/snapshots/{snapshot_id}/restore
|
|
|
|
Restores a stack snapshot.
|
|
|
|
You can restore only active stacks from a snapshot. You must
|
|
recreate deleted stacks.
|
|
|
|
Error response codes:202,
|
|
|
|
Request Parameters
|
|
------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- stack_name: stack_name
|
|
- tenant_id: tenant_id
|
|
- stack_id: stack_id
|
|
- snapshot_id: snapshot_id
|