BareMetal API, REST: Server.Create
- HTTP request
- Body parameters
- NetworkInterfaceSpec
- PrivateSubnetNetworkInterface
- PublicSubnetNetworkInterface
- OsSettingsSpec
- Storage
- StoragePartition
- Disk
- Raid
- LockboxSecret
- Response
- CreateServerMetadata
- Status
- Server
- OsSettings
- Storage
- StoragePartition
- Disk
- Raid
- NetworkInterface
- PrivateSubnetNetworkInterface
- PublicSubnetNetworkInterface
Creates a server in the specified folder.
HTTP request
POST https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/servers
Body parameters
{
"folderId": "string",
"name": "string",
"description": "string",
"hardwarePoolId": "string",
"configurationId": "string",
"rentalPeriodId": "string",
"networkInterfaces": [
{
"id": "string",
// Includes only one of the fields `privateSubnet`, `publicSubnet`
"privateSubnet": {
"privateSubnetId": "string"
},
"publicSubnet": {
"publicSubnetId": "string"
}
// end of the list of possible fields
}
],
"osSettingsSpec": {
"imageId": "string",
"storages": [
{
"partitions": [
{
"type": "string",
"sizeGib": "string",
"mountPoint": "string"
}
],
// Includes only one of the fields `disk`, `raid`
"disk": {
"id": "string",
"type": "string",
"sizeGib": "string"
},
"raid": {
"type": "string",
"disks": [
{
"id": "string",
"type": "string",
"sizeGib": "string"
}
]
}
// end of the list of possible fields
}
],
// Includes only one of the fields `sshPublicKey`, `userSshId`
"sshPublicKey": "string",
"userSshId": "string",
// end of the list of possible fields
// Includes only one of the fields `passwordPlainText`, `passwordLockboxSecret`
"passwordPlainText": "string",
"passwordLockboxSecret": {
"secretId": "string",
"versionId": "string",
"key": "string"
}
// end of the list of possible fields
},
"labels": "object"
}
|
Field |
Description |
|
folderId |
string ID of the folder to create server in. To get the folder ID, use a yandex.cloud.resourcemanager.v1.FolderService.List request. |
|
name |
string Name of the server. |
|
description |
string Description of the server. |
|
hardwarePoolId |
string ID of the hardware pool that the server belongs to. To get the hardware pool ID, use a HardwarePoolService.List request. |
|
configurationId |
string ID of the configuration to use for the server. To get the configuration ID, use a ConfigurationService.List request. |
|
rentalPeriodId |
string A period of time for which the server is rented. To get the rental period ID, use a RentalPeriodService.List request. |
|
networkInterfaces[] |
Network configuration for the server. Specifies how the network interface is configured |
|
osSettingsSpec |
Operating system specific settings for provisioning the server. Optional, if omitted, the |
|
labels |
object (map<string, string>) Resource labels as |
NetworkInterfaceSpec
|
Field |
Description |
|
id |
string ID of the network interface. Should not be specified when creating a server. |
|
privateSubnet |
Private subnet. Includes only one of the fields Subnet that the network interface belongs to. |
|
publicSubnet |
Public subnet. Includes only one of the fields Subnet that the network interface belongs to. |
PrivateSubnetNetworkInterface
|
Field |
Description |
|
privateSubnetId |
string ID of the private subnet. |
PublicSubnetNetworkInterface
|
Field |
Description |
|
publicSubnetId |
string ID of the public subnet. A new ephemeral public subnet will be created if not specified. |
OsSettingsSpec
|
Field |
Description |
|
imageId |
string ID of the image that the server was created from. |
|
storages[] |
List of storages to be created on the server. If not specified, the default value based on the |
|
sshPublicKey |
string Public SSH key for the server. Includes only one of the fields Root user SSH key. |
|
userSshId |
string ID of the user SSH key to use for the server. To get the user SSH key ID, use a yandex.cloud.organizationmanager.v1.UserSshKeyService.List request. Includes only one of the fields Root user SSH key. |
|
passwordPlainText |
string Raw password. Includes only one of the fields Password for the server. |
|
passwordLockboxSecret |
Reference to the Lockbox secret used to obtain the password. Includes only one of the fields Password for the server. |
Storage
Storage, a OS-level storage entity used for creating partitions. For example, this could
represent a plain disk or a software RAID of disks.
|
Field |
Description |
|
partitions[] |
Array of partitions created on the storage. |
|
disk |
Disk storage. Includes only one of the fields Storage type. |
|
raid |
RAID storage. Includes only one of the fields Storage type. |
StoragePartition
|
Field |
Description |
|
type |
enum (StoragePartitionType) Partition type.
|
|
sizeGib |
string (int64) Size of the storage partition in gibibytes (2^30 bytes). |
|
mountPoint |
string Storage mount point. |
Disk
Disk.
|
Field |
Description |
|
id |
string ID of the disk. |
|
type |
enum (DiskDriveType) Type of the disk drive.
|
|
sizeGib |
string (int64) Size of the disk in gibibytes (2^30 bytes). |
Raid
RAID storage.
|
Field |
Description |
|
type |
enum (RaidType) RAID type.
|
|
disks[] |
Array of disks in the RAID configuration. |
LockboxSecret
|
Field |
Description |
|
secretId |
string Required field. The unique identifier for the lockbox secret that contains the user password. |
|
versionId |
string The unique identifier for the lockbox version. |
|
key |
string Required field. The key used to access a specific secret entry. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": {
"serverId": "string"
},
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"cloudId": "string",
"folderId": "string",
"name": "string",
"description": "string",
"zoneId": "string",
"hardwarePoolId": "string",
"status": "string",
"osSettings": {
"imageId": "string",
"sshPublicKey": "string",
"storages": [
{
"partitions": [
{
"type": "string",
"sizeGib": "string",
"mountPoint": "string"
}
],
// Includes only one of the fields `disk`, `raid`
"disk": {
"id": "string",
"type": "string",
"sizeGib": "string"
},
"raid": {
"type": "string",
"disks": [
{
"id": "string",
"type": "string",
"sizeGib": "string"
}
]
}
// end of the list of possible fields
}
]
},
"networkInterfaces": [
{
"id": "string",
"macAddress": "string",
"ipAddress": "string",
// Includes only one of the fields `privateSubnet`, `publicSubnet`
"privateSubnet": {
"privateSubnetId": "string"
},
"publicSubnet": {
"publicSubnetId": "string"
}
// end of the list of possible fields
}
],
"configurationId": "string",
"disks": [
{
"id": "string",
"type": "string",
"sizeGib": "string"
}
],
"createdAt": "string",
"labels": "object"
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CreateServerMetadata
|
Field |
Description |
|
serverId |
string ID of the server that is being created. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |
Server
A Server resource.
|
Field |
Description |
|
id |
string ID of the server. |
|
cloudId |
string ID of the cloud that the server belongs to. |
|
folderId |
string ID of the folder that the server belongs to. |
|
name |
string Name of the server. |
|
description |
string Description of the server. |
|
zoneId |
string ID of the availability zone where the server is resides. |
|
hardwarePoolId |
string ID of the hardware pool that the server belongs to. |
|
status |
enum (Status) Status of the server.
|
|
osSettings |
Operating system specific settings of the server. Optional, will be empty if the server is |
|
networkInterfaces[] |
Array of network interfaces that are attached to the instance. |
|
configurationId |
string ID of the configuration that was used to create the server. |
|
disks[] |
Array of disks that are attached to the server. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
labels |
object (map<string, string>) Resource labels as |
OsSettings
|
Field |
Description |
|
imageId |
string ID of the image that the server was created from. |
|
sshPublicKey |
string Public SSH key of the server. |
|
storages[] |
List of storages. |
Storage
Storage, a OS-level storage entity used for creating partitions. For example, this could
represent a plain disk or a software RAID of disks.
|
Field |
Description |
|
partitions[] |
Array of partitions created on the storage. |
|
disk |
Disk storage. Includes only one of the fields Storage type. |
|
raid |
RAID storage. Includes only one of the fields Storage type. |
StoragePartition
|
Field |
Description |
|
type |
enum (StoragePartitionType) Partition type.
|
|
sizeGib |
string (int64) Size of the storage partition in gibibytes (2^30 bytes). |
|
mountPoint |
string Storage mount point. |
Disk
Disk.
|
Field |
Description |
|
id |
string ID of the disk. |
|
type |
enum (DiskDriveType) Type of the disk drive.
|
|
sizeGib |
string (int64) Size of the disk in gibibytes (2^30 bytes). |
Raid
RAID storage.
|
Field |
Description |
|
type |
enum (RaidType) RAID type.
|
|
disks[] |
Array of disks in the RAID configuration. |
NetworkInterface
|
Field |
Description |
|
id |
string ID of the network interface. |
|
macAddress |
string MAC address that is assigned to the network interface. |
|
ipAddress |
string IPv4 address that is assigned to the server for this network interface. |
|
privateSubnet |
Private subnet. Includes only one of the fields Subnet that the network interface belongs to. |
|
publicSubnet |
Public subnet. Includes only one of the fields Subnet that the network interface belongs to. |
PrivateSubnetNetworkInterface
|
Field |
Description |
|
privateSubnetId |
string ID of the private subnet. |
PublicSubnetNetworkInterface
|
Field |
Description |
|
publicSubnetId |
string ID of the public subnet. A new ephemeral public subnet will be created if not specified. |