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

CreateBaremetalInstance

CreateBaremetalInstance

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 bare metal instance.

    • descriptionString

      Optional. The detailed description of the bare metal instance.

    • chassisUuidStringRequired

      The UUID of the bare metal chassis.

    • imageUuidStringRequired

      The image UUID.

    • templateUuidString

      Optional. The UUID of the preconfigured template.

    • usernameString

      Optional. The system user of the bare metal instance.

    • passwordString

      Optional. The password of the bare metal instance.

    • nicCfgsMap

      Optional. The network configurations of the bare metal instance.

    • bondingCfgsMap

      Optional. The network bonding configurations of the bare metal instance.

    • customConfigurationsMap

      Optional. The custom configurations of the bare metal instance.

    • strategyString

      Optional. The strategy used to create the bare metal instance.

    • resourceUuidString

      The resource UUID. If you specify this parameter, the value of this parameter is the UUID of the bare metal instance.

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

  • inventoryBaremetalInstanceInventoryRequired

    See inventory

    • uuidStringRequired

      The UUID of the bare metal instance.

    • nameStringRequired

      The name of the bare metal instance.

    • descriptionStringRequired

      The detailed description of the bare metal instance.

    • zoneUuidStringRequired

      The zone UUID.

    • clusterUuidStringRequired

      The cluster UUID.

    • pxeServerUuidStringRequired

      No description provided.

    • chassisUuidStringRequired

      The UUID of the bare metal chassis.

    • imageUuidStringRequired

      The image UUID.

    • platformStringRequired

      The system platform.

    • stateStringRequired

      当前状态。

    • statusStringRequired

      状态信息。

    • createDateTimestampRequired

      The time when the bare metal instance was created.

    • lastOpDateTimestampRequired

      The time when the bare metal instance was last modified.

    • bmNicsListRequired

      See bmNics

      • uuidStringRequired

        The UUID of the NIC of the bare metal instance.

      • baremetalInstanceUuidStringRequired

        The UUID of the bare metal instance.

      • l3NetworkUuidStringRequired

        The L3 network UUID.

      • macStringRequired

        The MAC address of the bare metal instance.

      • ipStringRequired

        The IP address of the bare metal instance.

      • netmaskStringRequired

        The netmask of the bare metal instance.

      • gatewayStringRequired

        The gateway of the bare metal instance.

      • metadataStringRequired

        附加元数据。

      • pxeBooleanRequired

        Indicates whether the bare metal instance is PXE boot by using its NIC.

      • createDateTimestampRequired

        The time when the bare metal instance was created.

      • lastOpDateTimestampRequired

        The time when the bare metal instance was last modified.

Endpoint

POST/zstack/v1/baremetal/instances

/zstack/v1/baremetal/instances

Operation ID

CreateBaremetalInstance

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/baremetal/instances' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","chassisUuid":"<chassisUuid>","imageUuid":"<imageUuid>","templateUuid":"<templateUuid>","username":"<username>","password":"<password>","nicCfgs":{},"bondingCfgs":{},"customConfigurations":{},"strategy":"<strategy>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "1dc13c821a713f7fbfa7dd754f100a73", "name": "BM-1", "description": "This is a baremetal instance.", "zoneUuid": "0f67724b4dc5397ea39751fda57c4ce6", "clusterUuid": "7921d51dba31317e8c09d50e44abd010", "chassisUuid": "5183b18300e43aa784a643b86a9772b7", "imageUuid": "a39b3870f3ae393cadcc3b4cfb454653", "platform": "Linux", "state": "Created", "status": "Unprovisioned", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "bmNics": [ { "uuid": "006915f4766c32ee8b09bf951dd43264", "baremetalInstanceUuid": "1dc13c821a713f7fbfa7dd754f100a73", "l3NetworkUuid": "1fa935a68b4e312aa482df27b3b759a5", "mac": "6c:b3:11:1b:0b:1e", "ip": "192.168.0.10", "netmask": "255.255.255.0", "gateway": "192.168.0.1", "pxe": false } ] } }

Change History

This API has no change history records yet.

View all change history