• Native OpenStack API

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

Show Resource Template

Function Description

This interface is used to query a stack resource template.

Interface Format

Method

URI

Description

GET

/v1/{tenant_id}/resource_types/{type_name}/template

Queries a stack resource template.

Request Parameter

N/A

Response Parameter

Parameter

Type

Mandatory

Description

outputs

dict

Yes

Specifies the template output.

parameters

dict

Yes

Specifies parameters contained in the template.

resources

dict

Yes

Specifies the template resources.

Request Example

GET /v1/95d02433133a4c0a87ba6967474a2ad3/resource_types/OS%3A%3AHeat%3A%3ARandomString/template

Response Example

{
    "Outputs":{
        "value":{
            "Description":"The random string generated by this resource. This value is also available by referencing the resource.",
            "Value":"{"Fn::GetAtt": ["RandomString", "value"]}"
        },
        "show":{
            "Description":"Detailed information about resource.",
            "Value":"{"Fn::GetAtt": ["RandomString", "show"]}"
        }
    },
    "HeatTemplateFormatVersion":"2012-12-12",
    "Resources":{
        "RandomString":{
            "Type":"OS::Heat::RandomString",
            "Properties":{
                "length":{
                    "Ref":"length"
                },
                "salt":{
                    "Ref":"salt"
                },
                "character_sequences":{
                    "Fn::Split":[
                        ",",
                        {
                            "Ref":"character_sequences"
                        }
                    ]
                },
                "character_classes":{
                    "Fn::Split":[
                        ",",
                        {
                            "Ref":"character_classes"
                        }
                    ]
                },
                "sequence":{
                    "Ref":"sequence"
                }
            }
        }
    },
    "Description":"Initial template of RandomString",
    "Parameters":{
        "length":{
            "Default":32,
            "Type":"Number",
            "Description":"Length of the string to generate.",
            "MaxValue":512,
            "MinValue":1
        },
        "salt":{
            "Type":"String",
            "Description":"Value which can be set or changed on stack update to trigger the resource for replacement with a new random string. The salt value itself is ignored by the random generator."
        },
        "character_sequences":{
            "Type":"CommaDelimitedList",
            "Description":"A list of character sequences and their constraints to generate the random string from."
        },
        "character_classes":{
            "Default":[
                {
                    "class":"lettersdigits",
                    "min":1
                }
            ],
            "Type":"CommaDelimitedList",
            "Description":"A list of character class and their constraints to generate the random string from."
        },
        "sequence":{
            "Type":"String",
            "Description":"Sequence of characters to build the random string from.",
            "AllowedValues":[
                "lettersdigits",
                "letters",
                "lowercase",
                "uppercase",
                "digits",
                "hexdigits",
                "octdigits"
            ]
        }
    }
}

Returned Code

See section Return Code Processing.