Skip to main content
Resource Center/CloudFormation Operations
POSTCloudFormation OperationsSince 2.5.0SynchronousAuth Required

PreviewResourceStack

PreviewResourceStack

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • typeString

      Optional.

    • templateContentString

      Optional. The template content.

    • uuidString

      Optional. The template UUID.

    • parametersString

      Optional. The parameters in the stack. The parameters are JSON strings.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • previewPreviewResourceStructRequired

    See preview.

    • conditionsMapRequired

      The action results of the conditions.

    • actionsListRequired

      See actions.

      • resourceNameStringRequired

        The resource type.

      • actionNameStringRequired

        The action name.

      • roundintRequired

        The round (), counting from '0'.

      • inDegreeSetRequired

        The dependency action list.

      • actionsObjectRequired

        The action parameters.

Endpoint

POST/zstack/v1/cloudformation/stack/preview

/zstack/v1/cloudformation/stack/preview

Operation ID

PreviewResourceStack

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/cloudformation/stack/preview' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"type":"<type>","templateContent":"<templateContent>","uuid":"<uuid>","parameters":"<parameters>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "preview": { "actions": [ { "resourceName": "WebServer1", "actionName": "org.zstack.sdk.CreateVmInstanceAction", "round": 0.0, "inDegree": [], "actions": { "name": "vm", "instanceOfferingUuid": "f524c10459ce32f0b70a1c0878769b2d", "imageUuid": "66296cfc1c6d36fa8405788cb2fb85a0", "l3NetworkUuids": [ "e99fce59e6463758aef45bdfc5579203" ], "strategy": "InstantStart", "timeout": -1.0, "pollingInterval": -1.0 } } ], "conditions": { "WithDataVolume": false } } }

Change History

This API has no change history records yet.

View all change history