Import component template from a file
This command imports component template from a JSON or YAML file format.
Request
PUT https://{hostname}:{port}
/cli/componentTemplate/import?{parameters}
Accept: {contentType}
Parameter | Type | Required | Description |
---|---|---|---|
processUpgradeType | string | false | Suppport values are UPGRADE_IF_EXISTS, CREATE_NEW_IF_EXISTS, FAIL_IF_DOESNT_EXIST, UPGRADE_IF_EXISTS, USE_EXISTING_IF_EXISTS. Default is UPGRADE_IF_EXISTS. |
disposition | string | true | create or update. |
Parameter | Type | Required | Description |
---|---|---|---|
Accept |
|
true |
Command to import component template from a JSON file
curl -k -u jsmith:passwd
-H "Content-Type: application/json"
-X PUT "https://deployserver.example.com:8443/cli/componentTemplate/import
?componentTemplate=componentTemplates
&processUpgradeType=FAIL_IF_DOESNT_EXIST
&disposition=update"
-d @importfilename.json
Response
{
"id": "1849bc16-e5e8-2705-58b1-33e021705448",
"securityResourceId": "1849bc16-e5b8-0d7f-b050-473e9b11e726",
"versionCount": 28,
"version": 28,
"path": "componentTemplates\/1849bc16-e5e8-2705-58b1-33e021705448",
"name": "componentTemplate",
"description": "",
"ignoreQualifiers": 2,
"componentType": "ZOS",
"sourceConfigPluginName": "Git",
"tags": [],
"active": true,
"created": 1669060456020,
"user": "jsmith",
"importConfigurationStrategy": "default"
}
Related CLI command: importComponentTemplate.