Resource Center/CloudFormation Operations
PUTCloudFormation OperationsSince 2.5.0SynchronousAuth Required
UpdateStackTemplate
UpdateStackTemplate
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
uuidStringRequiredThe template UUID.
Body Fields
updatestacktemplateObjectRequiredupdatestacktemplate request body object.
nameStringOptional. The resource name.
descriptionStringOptional. The detailed description of the resource.
stateBooleanOptional. Whether the template is available.
templateContentStringOptional. The template content, which is a JSON string.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
PUT/zstack/v1/cloudformation/template/{uuid}/actions
/zstack/v1/cloudformation/template/{uuid}/actions
Request Example
curl -X PUT 'http://{host}/zstack/v1/cloudformation/template/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"updatestacktemplate":{"name":"<name>","description":"<description>","state":true,"templateContent":"<templateContent>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "600afd0b079b303385e5d04b4d560af1", "name": "stack", "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\", \"DefaultValue\" : \"instanceoffering-123\", \"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.
