psm stack import-template
Use this command to import a Stack template.
You cannot run psm stack import-template
on an existing template file unless the template version is updated to a higher value from the existing version. Existing stacks are not affected by this action.
Note:
The format and contents of the template file are automatically validated. Validation errors are provided in the output of this command. You can also validate a template file without importing it by issuing avalidate-template
command against the template file.
Syntax
psm stack import-template -f|--template filePath
[-u|--templateUrl url-for-stack-template
[-of|--output-format json|html|short]
Parameters
All parameters are required unless otherwise noted.
Parameter | Description |
---|---|
-f|--templatefilePath |
Fully qualified path, including filename, of the Stack template file. You can use either this parameter or --template-url .
|
—u|--template-url url-for-stack template |
(Optional) The URL to the location of the Stack template you want to import. You can use either this parameter or --template .
|
-of|--output-format json|html|short |
(Optional) Desired output format.
Accepted values: The default output format is the one you specified when using the |
|
(Optional) A boolean value that, when set to
true , makes the command behave synchronously; that is, it does not return until the submitted job is complete. The following message is displayed until the job is complete: Default: false |
Example
$ psm stack import-template -f myExampleTemplate.yaml -u -of json
{
"templateName":"myExampleTemplate",
"latestVersion":"1.0.0",
"description":"Sample application running against a database",
"createdOn":"2016-08-24T02:17:31.749+0000",
"createdBy":"somebody",
"links":[
{
"rel":"canonical",
"href":"http://example.com:7103//paas/api/v1.1/instancemgmt/somebody/templates/cst/instances/myExampleTemplate"
},
{
"rel":"self",
"href":"http://example.com:7103//paas/api/v1.1/instancemgmt/somebody/templates/cst/instances"
}
]
}