Yandex Cloud
Поиск
Связаться с экспертомПопробовать бесплатно
  • Кейсы
  • Документация
  • Блог
  • Все сервисы
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Neurosupport
    • Yandex Cloud Detection and Response
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • GOST Gateway
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • SourceCraft
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • Статус работы сервисов
  • Marketplace
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Yandex Cloud Trust
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Акции и free tier
  • Кейсы
  • Документация
  • Блог
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ООО «Яндекс.Облако»
Yandex BareMetal
    • Все инструкции
    • Обзор сервиса
    • Интеграции с другими сервисами Yandex Cloud
      • Обзор
      • Готовые конфигурации серверов
      • Своя конфигурация сервера
      • Конфигурация сервера по запросу
      • Обзор
      • Публичная сеть
      • Приватная сеть
      • DHCP
      • MC-LAG
      • Ограничения в сетях BareMetal
      • Обзор
      • Образы
      • Управление доступом
      • Дополнительные настройки серверов
      • Консоль управления
        • Аутентификация в API
            • Overview
              • Overview
              • GetServer
              • ListServers
              • CreateServer
              • BatchCreateServers
              • UpdateServer
              • DeleteServer
              • PowerOffServer
              • PowerOnServer
              • RebootServer
              • ReinstallServer
              • RenewServerRental
              • ListServerOperations
      • Метрики Monitoring
    • Квоты и лимиты
  • Правила тарификации
  • История изменений
  • Вопросы и ответы

В этой статье:

  • HTTP request
  • Body parameters
  • Server
  • OsSettings
  • LockboxSecret
  • Storage
  • StoragePartition
  • Disk
  • Raid
  • NetworkInterface
  • PrivateNetworkInterface
  • VLANSubinterface
  • PublicNetworkInterface
  • NativeSubnet
  • NewNativeSubnet
  • UserConfiguration
  • UserCPU
  • DiskDriveConfiguration
  • UserRAM
  • Response
  • Status
  1. Концепции
  2. Настройка и управление
  3. Справочник API
  4. API v2
  5. REST (англ.)
  6. Server
  7. UpdateServer

BareMetal API, REST: Server.UpdateServer

Статья создана
Yandex Cloud
Обновлена 1 июля 2026 г.
Открыть в Markdown
  • HTTP request
  • Body parameters
  • Server
  • OsSettings
  • LockboxSecret
  • Storage
  • StoragePartition
  • Disk
  • Raid
  • NetworkInterface
  • PrivateNetworkInterface
  • VLANSubinterface
  • PublicNetworkInterface
  • NativeSubnet
  • NewNativeSubnet
  • UserConfiguration
  • UserCPU
  • DiskDriveConfiguration
  • UserRAM
  • Response
  • Status

Updates the specified server.

https://google.aip.dev/130 --)

HTTP requestHTTP request

PATCH https://baremetal.api.cloud.yandex.net/baremetal/v2/clouds/{server.cloud_id}/folders/{server.folder_id}/servers/{server.server_id}

Body parametersBody parameters

{
  "server": {
    "serverId": "string",
    "cloudId": "string",
    "folderId": "string",
    "name": "string",
    "description": "string",
    "hardwarePoolId": "string",
    "state": "string",
    "osSettings": {
      "imageId": "string",
      "sshPublicKey": "string",
      // Includes only one of the fields `sshPublicKeyText`, `userSshId`
      "sshPublicKeyText": "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
      "storages": [
        {
          "partitions": [
            {
              "type": "string",
              "sizeBytes": "string",
              "mountPoint": "string"
            }
          ],
          // Includes only one of the fields `disk`, `raid`
          "disk": {
            "id": "string",
            "type": "string",
            "sizeBytes": "string"
          },
          "raid": {
            "type": "string",
            "disks": [
              {
                "id": "string",
                "type": "string",
                "sizeBytes": "string"
              }
            ]
          }
          // end of the list of possible fields
        }
      ]
    },
    "rentalPeriodStartTime": "string",
    "rentalPeriodId": "string",
    "nextRentalPeriodId": "string",
    "rentalPeriodEndTime": "string",
    "networkInterfaces": [
      {
        "networkInterfaceId": "string",
        "macAddress": "string",
        // Includes only one of the fields `privateInterface`, `publicInterface`
        "privateInterface": {
          "nativeSubnetId": "string",
          "ipAddress": "string",
          "macLimit": "string",
          "vlanSubinterfaces": [
            {
              "taggedSubnetId": "string",
              "ipAddress": "string",
              "macLimit": "string"
            }
          ]
        },
        "publicInterface": {
          "ipAddress": "string",
          "nativeSubnetId": "string",
          "macLimit": "string",
          "internetTrafficPlan": "string",
          // Includes only one of the fields `nativeSubnet`, `newNativeSubnet`
          "nativeSubnet": {
            "subnetId": "string"
          },
          "newNativeSubnet": {
            "addressingType": "string"
          }
          // end of the list of possible fields
        },
        // end of the list of possible fields
        "configurationNetworkInterfaceId": "string"
      }
    ],
    "prolongationState": "string",
    "disks": [
      {
        "id": "string",
        "type": "string",
        "sizeBytes": "string"
      }
    ],
    // Includes only one of the fields `customConfiguration`, `stockConfigurationId`
    "customConfiguration": {
      "configurationId": "string",
      "name": "string",
      "cpu": {
        "id": "string",
        "name": "string",
        "vendor": "string",
        "physicalCores": "string",
        "frequencyMhz": "string",
        "count": "string",
        "threads": "string"
      },
      "diskDrives": [
        {
          "type": "string",
          "count": "string",
          "sizeBytes": "string"
        }
      ],
      "ram": {
        "id": "string",
        "sizeBytes": "string"
      }
    },
    "stockConfigurationId": "string",
    // end of the list of possible fields
    "createTime": "string",
    "updateTime": "string",
    "annotations": "object"
  },
  "updateMask": "string"
}

Field

Description

server

Server

The server object to be updated

updateMask

string (field-mask)

A comma-separated names off ALL fields to be updated.
Only the specified fields will be changed. The others will be left untouched.
If the field is specified in updateMask and no value for that field was sent in the request,
the field's value will be reset to the default. The default value for most fields is null or 0.

If updateMask is not sent in the request, all fields' values will be updated.
Fields specified in the request will be updated to provided values.
The rest of the fields will be reset to the default.

ServerServer

A Server resource.

Field

Description

serverId

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.
The display name is unique within the folder.

description

string

Description of the server.

hardwarePoolId

string

ID of the hardware pool that the server belongs to.

The maximum string length in characters is 20.

state

enum (State)

State of the server.

  • PROVISIONING: Server is waiting for to be allocated from the hardware pool.
  • STOPPING: Server is being stopped.
  • STOPPED: Server has been stopped.
  • STARTING: Server is being started.
  • RESTARTING: Server is being restarted.
  • ERROR: Server encountered a problem and cannot operate.
  • DELETING: Server is being deleted.
  • REINSTALLING: Server operating system is being reinstalled.
  • UPDATING: Server is being updated.
  • QUARANTINED: Server has been quarantined
  • RUNNING: Server is running normally

osSettings

OsSettings

Operating system specific settings of the server. Optional, will be empty if the server is
provisioned without an operating system.

rentalPeriodStartTime

string (date-time)

Timestamp indicating the start date and time of the server's rental period. Optional, may be
unset initially and should be set when the rental actually starts.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

rentalPeriodId

string

A period of time for which a Bare Metal Server is rented.

nextRentalPeriodId

string

A period of time for which a Bare Metal Server will be changed on after ending of current rental period.

The maximum string length in characters is 20.

rentalPeriodEndTime

string (date-time)

Timestamp indicating the end date and time of the server's rental period. Optional, may be
unset initially and should be set when the rental actually starts.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

networkInterfaces[]

NetworkInterface

Array of network interfaces that are attached to the instance.

The number of elements must be in the range 1-2.

prolongationState

enum (ProlongationState)

Prolongation state of the server's rent.

  • AUTO_RENEW: The rent will automatically be renewed at the end of the current period.
  • NON_RENEWAL: The rent will not be renewed at the end of the current period.

disks[]

Disk

Array of disks that are attached to the server.

customConfiguration

UserConfiguration

Custom configuration.

Includes only one of the fields customConfiguration, stockConfigurationId.

Configuration of the server.

One of elements is required for server creation

stockConfigurationId

string

ID of the stock configuration.

Includes only one of the fields customConfiguration, stockConfigurationId.

Configuration of the server.

One of elements is required for server creation

createTime

string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

updateTime

string (date-time)

Update timestamp.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

annotations

object (map<string, string>)

Resource labels as key:value pairs.

The maximum string length in characters for each value is 63. The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]*. Each value must match the regular expression [-_0-9a-z]*. No more than 64 per resource.

OsSettingsOsSettings

Field

Description

imageId

string

ID of the image that the server was created from.

sshPublicKey

string

Public SSH key of the server.

sshPublicKeyText

string

Public SSH key for the server.

Input only field.

The maximum string length in characters is 20000.

Includes only one of the fields sshPublicKeyText, userSshId.

Root user SSH key.

Input only field. One of elements is required.

userSshId

string

ID of the user SSH key to use for the server.

Input only field. To get the user SSH key ID, use a yandex.cloud.organizationmanager.v1.UserSshKeyService.List request.

The maximum string length in characters is 50.

Includes only one of the fields sshPublicKeyText, userSshId.

Root user SSH key.

Input only field. One of elements is required.

passwordPlainText

string

Raw password.

Input only field.

The minimum string length in characters is 6.

Includes only one of the fields passwordPlainText, passwordLockboxSecret.

Password for the server.

Input only field. One of elements is required.

passwordLockboxSecret

LockboxSecret

Reference to the Lockbox secret used to obtain the password.

Input only field.

Includes only one of the fields passwordPlainText, passwordLockboxSecret.

Password for the server.

Input only field. One of elements is required.

storages[]

Storage

List of storages.

If not specified, the default value based on the selected configuration will be used as the field value.

LockboxSecretLockboxSecret

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.
If omitted, the current version of the secret will be used.

key

string

Required field. The key used to access a specific secret entry.

StorageStorage

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[]

StoragePartition

Array of partitions created on the storage.

disk

Disk

Disk storage.

Includes only one of the fields disk, raid.

Storage type.

raid

Raid

RAID storage.

Includes only one of the fields disk, raid.

Storage type.

StoragePartitionStoragePartition

Field

Description

type

enum (StoragePartitionType)

Partition type.

  • EXT4: ext4 file system partition type.
  • SWAP: Swap partition type.
  • EXT3: ext3 file system partition type.
  • XFS: XFS file system partition type.

sizeBytes

string (int64)

Size of the storage partition.

mountPoint

string

Storage mount point.

DiskDisk

Disk.

Field

Description

id

string

ID of the disk.

type

enum (DiskDriveType)

Type of the disk drive.

  • HDD: Hard disk drive.
  • SSD: Solid state drive.
  • NVME: NVMe Solid state drive.

sizeBytes

string (int64)

Size of the disk.

RaidRaid

RAID storage.

Field

Description

type

enum (RaidType)

RAID type.

  • RAID0: RAID0 configuration.
  • RAID1: RAID1 configuration.
  • RAID10: RAID10 configuration.

disks[]

Disk

Array of disks in the RAID configuration.

NetworkInterfaceNetworkInterface

Field

Description

networkInterfaceId

string

ID of the network interface.

Should not be specified when creating a server.

macAddress

string

MAC address that is assigned to the network interface.

privateInterface

PrivateNetworkInterface

Private interface.

Includes only one of the fields privateInterface, publicInterface.

Type of the network interface.

One of elements is required.

publicInterface

PublicNetworkInterface

Public interface.

Includes only one of the fields privateInterface, publicInterface.

Type of the network interface.

One of elements is required.

configurationNetworkInterfaceId

string

ID of the configuration network interface that determines the network interface configuration.
The configuration network interface defines available modes (public/private) and other properties
for the network interface. This field is optional. If not specified, the configuration will be
chosen automatically on the server side based on availability. It is recommended to specify this
field for deterministic behavior. To get the configuration interface ID, use a
[ConfigurationService.ListConfigurationNetworkInterface] request or examine the network_interfaces
field in [ConfigurationService.GetConfiguration] response.

PrivateNetworkInterfacePrivateNetworkInterface

Field

Description

nativeSubnetId

string

ID of the private subnet which is used as native subnet for interface.

ipAddress

string

IPv4 address that is assigned to the server for this network interface.

macLimit

string (int64)

Limit of MAC addresses in the native subnet.

vlanSubinterfaces[]

VLANSubinterface

Array of VLAN subinterfaces. Additional tagged subnets for the interface.

VLANSubinterfaceVLANSubinterface

Field

Description

taggedSubnetId

string

ID of the private subnet which is used as tagged subnet for interface.

ipAddress

string

IPv4 address that is assigned to the VLAN subinterface.

macLimit

string (int64)

Limit of MAC addresses in the tagged subnet.

PublicNetworkInterfacePublicNetworkInterface

Field

Description

ipAddress

string

IPv4 address that is assigned to the server for this network interface.

nativeSubnetId

string

ID of the public subnet which is used as native subnet for interface.

macLimit

string (int64)

Limit of MAC addresses in the native subnet.

internetTrafficPlan

enum (InternetTrafficPlan)

Internet traffic plan. Defines how much data can be transfered with server interface.

  • PLAN_10TB: 10 terabyte of data per day.
  • PLAN_100TB: 100 terabyte of data per day.

nativeSubnet

NativeSubnet

Use existing native subnet.

Includes only one of the fields nativeSubnet, newNativeSubnet.

Native subnet configuration.

Input only field. One of elements is required.

newNativeSubnet

NewNativeSubnet

Create new native subnet.

Includes only one of the fields nativeSubnet, newNativeSubnet.

Native subnet configuration.

Input only field. One of elements is required.

NativeSubnetNativeSubnet

Configuration for using existing native subnet.

Field

Description

subnetId

string

ID of the existing public subnet.

NewNativeSubnetNewNativeSubnet

Configuration for creating new native subnet.

Field

Description

addressingType

enum (AddressingType)

Addressing type (DHCP | Static).

  • DHCP: DHCP addressing.
  • STATIC: Static addressing.

UserConfigurationUserConfiguration

Field

Description

configurationId

string

ID of the configuration.

name

string

Name of the configuration.

cpu

UserCPU

CPU configuration.

diskDrives[]

DiskDriveConfiguration

Array of disk drive configurations.

ram

UserRAM

Random-access memory (RAM).

UserCPUUserCPU

CPU configuration.

Field

Description

id

string

ID of the CPU from configurator.

name

string

Name of the CPU.

vendor

string

Vendor of the CPU.

physicalCores

string (int64)

Number of physical cores per CPU (socket).

frequencyMhz

string (int64)

Frequency of the CPU in megahertz (MHz).

count

string (int64)

Number of cpu.

threads

string (int64)

Number of threads (logical cores) per CPU (socket).

DiskDriveConfigurationDiskDriveConfiguration

Field

Description

type

enum (DiskDriveType)

Type of the disk drive.

  • HDD: Hard disk drive.
  • SSD: Solid state drive.
  • NVME: NVMe Solid state drive.

count

string (int64)

Number of disk drives.

sizeBytes

string (int64)

Size of a single disk drive.

UserRAMUserRAM

Field

Description

id

string

ID of the RAM from configurator.

sizeBytes

string (int64)

Ram size.

ResponseResponse

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": "boolean",
  "metadata": "object",
  // Includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": "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 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

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 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

done

boolean

If the value is false, it means the operation is still in progress.
If true, the operation is completed, and either error or response is available.

metadata

object

Service-specific metadata associated with the operation.
It typically contains the ID of the target resource that the operation is performed on.
Any method that returns a long-running operation should document the metadata type, if any.

error

Status

The error result of the operation in case of failure or cancellation.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

response

object

The normal response of the operation in case of success.
If the original method returns no data on success, such as Delete,
the response is google.protobuf.Empty.
If the original method is the standard Create/Update,
the response should be the target resource of the operation.
Any method that returns a long-running operation should document the response type, if any.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

StatusStatus

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.

Была ли статья полезна?

Предыдущая
BatchCreateServers
Следующая
DeleteServer
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ООО «Яндекс.Облако»