• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Heat
  5. Templates
  6. Get Stack Template

Get Stack Template

Function Description

This interface is used to query a stack template.

Interface Format

Method

URI

Description

GET

/v1/{tenant_id}/stacks/{stack_name}/{stack_id}/template

Queries a stack template.

Request Parameter

N/A

Response Parameter

Parameter

Type

Mandatory

Description

outputs

Dict

Yes

Specifies the template output.

parameters

Dict

Yes

Specifies the template input.

resources

Dict

Yes

Specifies the template resources.

Request Example

GET /v1/95d02433133a4c0a87ba6967474a2ad3/stacks/HeatStack/c89c4bb3-96cb-4a55-aafa-076a7939a306/template

Response Example

{
    "description": "Hello world HOT template that just defines a single server. Contains just base features to verify base HOT support.\n",
    "heat_template_version": "2013-05-23",
    "outputs": {
        "foo": {
            "description": "Show foo parameter value",
            "value": {
                "get_param": "foo"
            }
        }
    },
    "parameters": {
        "foo": {
            "default": "secret",
            "description": "Name of an existing key pair to use for the server",
            "hidden": true,
            "type": "string"
        }
    },
    "resources": {
        "random_key_name": {
            "properties": {
                "length": 8
            },
            "type": "OS::Heat::RandomString"
        }
    }
}

Returned Code

For details, see section Return Code Processing.