Skip to main content
Resource Center/Bare Metal Management (Plus)/Bare Metal Management Operations
POSTBare Metal Management OperationsSince 3.4.0SynchronousAuth Required

AddPreconfigurationTemplate

AddPreconfigurationTemplate

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.

    • nameStringRequired

      The name of the preconfigured template.

    • descriptionString

      Optional. The detailed description of the template.

    • distributionStringRequired

      The distribution of the operating system.

    • typeStringRequired

      The type of the template.

    • contentStringRequired

      The content of the template.

    • resourceUuidString

      Optional. The UUID of the template.

  • 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.

  • inventoryPreconfigurationTemplateInventoryRequired

    See inventory

    • uuidStringRequired

      The UUID of the preconfigured template.

    • nameStringRequired

      The name of the template.

    • descriptionStringRequired

      The detailed description of the preconfigured template.

    • distributionStringRequired

      The distribution of the operating system.

    • typeStringRequired

      The type of the template.

    • contentStringRequired

      The content of the template.

    • md5sumStringRequired

      The MD5 value of the template.

    • isPredefinedBooleanRequired

      Indicates whether the system of the template was predefined.

    • stateStringRequired

      The state of the template.

    • createDateTimestampRequired

      The time when the template was created.

    • lastOpDateTimestampRequired

      The time when the template was last modified.

Endpoint

POST/zstack/v1/baremetal/preconfigurations

/zstack/v1/baremetal/preconfigurations

Operation ID

AddPreconfigurationTemplate

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/baremetal/preconfigurations' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","distribution":"<distribution>","type":"<type>","content":"<content>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "0bfb87d3a9c842bbbf509a4b7eb6e3b2", "name": "centos_7_x86_64_mini_v1.cfg", "description": "centos-7-minimal kickstart file", "distribution": "centos-7-x86_64", "type": "kickstart", "content": "...", "md5sum": "0447e03f5a6747c0984842b5ee117a21", "isPredefined": false, "state": "Enabled", "createDate": "Jan 11, 2019 10:38:59 AM", "lastOpDate": "Jan 11, 2019 10:38:59 AM" } }

Change History

This API has no change history records yet.

View all change history