summaryrefslogtreecommitdiff
path: root/api-ref/source/v1/stack-templates.inc
blob: f686e2c0eb1bc1603c3169a9f715fe244ca45f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
.. -*- rst -*-

=========
Templates
=========




List resource types
===================

.. rest_method::  GET /v1/{tenant_id}/resource_types

Lists all supported template resource types.


Normal response codes: 200
Error response codes:401,400,


Request
-------

.. rest_parameters:: parameters.yaml

   - tenant_id: tenant_id
   - name: name
   - version: version
   - support_status: support_status
   - with_description: with_description


Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - template_versions: template_versions
   - type: type
   - version: version
   - description: resource_description


Response Example
----------------

.. literalinclude:: samples/resource-types-list-response.json
   :language: javascript






List template versions
======================

.. rest_method::  GET /v1/{tenant_id}/template_versions

Lists all available template versions.


Normal response codes: 200
Error response codes:404,500,401,400,


Request
-------

.. rest_parameters:: parameters.yaml

   - tenant_id: tenant_id




Response Example
----------------

.. literalinclude:: samples/template-versions-response.json
   :language: javascript








Validate template
=================

.. rest_method::  POST /v1/{tenant_id}/validate

Validates a template.


Normal response codes: 200
Error response codes:


Request
-------

.. rest_parameters:: parameters.yaml

   - environment: environment
   - template_url: template_url
   - template: template
   - tenant_id: tenant_id

Request Example
---------------

.. literalinclude:: samples/template-validate-request.json
   :language: javascript



Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - ParameterGroups: ParameterGroups
   - Description: Description
   - Parameters: Parameters



Response Example
----------------

.. literalinclude:: samples/template-validate-response.json
   :language: javascript




Show resource template
======================

.. rest_method::  GET /v1/{tenant_id}/resource_types/{type_name}/template

Shows the template representation for a resource type.

The returned template contains a single resource type. Each
resource property is mapped to a template parameter and each
resource attribute is mapped to a template output.

You can use these templates as a starting place for creating
customized, template-based resources or as examples of using the
particular resource in another template.

Use the ``template_type`` query parameter to specify the resource
template type. Default type is ``cfn``. The ``hot`` template type
is supported. For example:

::

   /v1/{tenant_id}/resource_types/{type_name}/template?template_type=cfn


Normal response codes: 200
Error response codes:404,401,400,


Request
-------

.. rest_parameters:: parameters.yaml

   - tenant_id: tenant_id
   - type_name: type_name


Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - Outputs: Outputs
   - HeatTemplateFormatVersion: HeatTemplateFormatVersion
   - Resources: Resources
   - Parameters: Parameters



Response Example
----------------

.. literalinclude:: samples/resource-type-template-response.json
   :language: javascript







Get stack template
==================

.. rest_method::  GET /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/template

Gets a template for a stack.


Normal response codes: 200
Error response codes:404,500,401,400,


Request
-------

.. rest_parameters:: parameters.yaml

   - stack_name: stack_name
   - tenant_id: tenant_id
   - stack_id: stack_id


Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - outputs: outputs
   - heat_template_version: heat_template_version
   - description: description
   - parameters: parameters
   - resources: resources



Response Example
----------------

.. literalinclude:: samples/template-show-response.json
   :language: javascript








Show resource schema
====================

.. rest_method::  GET /v1/{tenant_id}/resource_types/{type_name}

Shows the interface schema for a resource type.

A schema describes the properties that can be set on the resource,
their types, constraints, descriptions, and default values.
Additionally, the response shows the resource attributes and their
descriptions.


Normal response codes: 200
Error response codes:401,400,


Request
-------

.. rest_parameters:: parameters.yaml

   - tenant_id: tenant_id
   - type_name: type_name


Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - description: description
   - required: required
   - update_allowed: update_allowed
   - support_status: support_status
   - attributes: attributes
   - type: type
   - properties: properties
   - resource_type: resource_type



Response Example
----------------

.. literalinclude:: samples/resource-schema-response.json
   :language: javascript