Resource Center/CloudFormation Operations
GETCloudFormation OperationsSince 2.5.0SynchronousAuth Required
QueryStackTemplate
QueryStackTemplate
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
This API requires no request parameters.
Responses
Endpoint
GET/zstack/v1/cloudformation/template
/zstack/v1/cloudformation/template
Request Example
curl -X GET 'http://{host}/zstack/v1/cloudformation/template' -H 'Authorization: OAuth {sessionUuid}'
Response Example
200{ "inventories": [ { "uuid": "5c1bb041907e3f29a27c7818e7fd07de", "name": "test", "description": "description", "type": "zstack", "version": "2018-06-18", "state": true, "content": "{ \"ZStackTemplateFormatVersion\" : \"2018-06-18\", \"Description\": \"Example for create a group vm instance in zstack.\", \"Parameters\" : { \"imageUuid\": { \"Type\" : \"String\", \"Description\": \"Image Uuid, represents the image resource to startup one vm instance\" }, \"instanceOfferingUuid\": { \"Type\": \"String\", \"Description\": \"The instance offering uuid\" }, \"l3NetworkUuid\": { \"Type\": \"String\", \"Description\": \"The l3 network uuid\" }, \"DiskOfferingUuid\": { \"Type\": \"String\", \"Description\": \"DiskOffering for empty disk\" }, \"PrimaryStorageUuid\": { \"Type\": \"String\", \"Description\": \"primarystorage for initial disk\" }, \"HostUuid\": { \"Type\": \"String\", \"Description\": \"host for initial disk\" } }, \"Resources\" : { \"WebServer1\": { \"Type\": \"ZStack::Resource::VmInstance\", \"Properties\": { \"name\" : \"vm\", \"imageUuid\" : {\"Ref\": \"imageUuid\"}, \"instanceOfferingUuid\": {\"Ref\": \"instanceOfferingUuid\"}, \"l3NetworkUuids\": [{\"Ref\": \"l3NetworkUuid\"}] }, \"DeletionPolicy\": \"Retain\" }, \"WebServer2\": { \"Type\": \"ZStack::Resource::VmInstance\", \"Properties\": { \"name\" : \"vm-2\", \"imageUuid\" : {\"Ref\": \"imageUuid\"}, \"instanceOfferingUuid\": {\"Ref\": \"instanceOfferingUuid\"}, \"l3NetworkUuids\": [{\"Ref\": \"l3NetworkUuid\"}] }, \"DependsOn\": [{\"Ref\": \"WebServer1\"}] }, \"EmptyVolume\": { \"Type\": \"ZStack::Resource::DataVolume\", \"Properties\": { \"name\" : \"empty-volume\", \"diskOfferingUuid\": {\"Ref\": \"DiskOfferingUuid\"}, \"primaryStorageUuid\": {\"Ref\": \"PrimaryStorageUuid\"}, \"systemTags\": [{\"Fn::Join\": [\"::\", [\"localStorage\", \"hostUuid\", {\"Ref\": \"HostUuid\"}]]}] }, \"DependsOn\": [{\"Ref\": \"WebServer2\"}] }, \"AttachDataVolumeToVm\": { \"Type\": \"ZStack::Action::AttachDataVolumeToVm\", \"Properties\": { \"vmInstanceUuid\": {\"Fn::GetAtt\" : [\"WebServer1\", \"uuid\"]}, \"volumeUuid\": {\"Fn::GetAtt\" : [\"EmptyVolume\", \"uuid\"]} } } }, \"Outputs\": { \"VmInstance\": { \"Description\" : \"print vm instance\", \"Value\" : {\"Ref\": \"WebServer1\"} } }}" } ] }Change History
This API has no change history records yet.
