El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying BMS Details

Updated on 2022-02-22 GMT+08:00

Function

This API is used to query BMS details.

The information that can be queried includes the BMS billing mode and whether the BMS is frozen.

URI

GET /v1/{project_id}/baremetalservers/{server_id}

Table 1 lists the parameters.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

server_id

Yes

Specifies the BMS ID.

You can obtain the BMS ID from the BMS console or using the Querying BMSs (Native OpenStack API) API.

Request Message

  • Request parameters

    None

  • Example request
    1
    GET https://{BMS Endpoint}/v1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/53206ed0-56de-4d6b-b7ee-ffc62ca26f43
    

Response Message

  • Response parameters

    Parameter

    Type

    Description

    server

    Object

    Specifies BMS information. For details, see Table 2.

    Table 2 server field data structure description

    Parameter

    Type

    Description

    id

    String

    Specifies the BMS ID in UUID format.

    user_id

    String

    Specifies the ID of the user to which the BMS belongs. The value is in UUID format.

    name

    String

    Specifies the BMS name.

    created

    String

    Specifies the time when the BMS was created.

    The timestamp format is YYYY-MM-DDTHH:MM:SSZ (ISO 8601), for example, 2019-05-22T03:30:52Z.

    updated

    String

    Specifies the time when the BMS was updated.

    The timestamp format is YYYY-MM-DDTHH:MM:SSZ (ISO 8601), for example, 2019-05-22T04:30:52Z.

    tenant_id

    String

    Specifies the ID of the tenant owning the BMS. The value is in UUID format.

    This parameter specifies the same meaning as project_id.

    hostId

    String

    Specifies the host ID of the BMS.

    addresses

    Object

    Specifies network addresses of the BMS. For details, see Table 3.

    key_name

    String

    Specifies the key pair that is used to authenticate the BMS.

    image

    Object

    Specifies the BMS image. For details, see Table 5.

    flavor

    Object

    Specifies the BMS flavor. For details, see Table 7.

    security_groups

    Array of objects

    Specifies the security groups to which the BMS belongs. For details, see Table 8.

    accessIPv4

    String

    This is a reserved attribute.

    accessIPv6

    String

    This is a reserved attribute.

    status

    String

    Specifies the BMS status.

    Value range:

    • ACTIVE: Running, Stopping, Deleting
    • BUILD: Creating
    • ERROR: Faulty
    • HARD_REBOOT: Forcibly Restarting
    • REBOOT: Restarting
    • SHUTOFF: Stopped, Starting, Deleting, Rebuilding, Reinstalling OS, OS Reinstallation Failed

    progress

    Integer

    This is a reserved attribute.

    config_drive

    String

    Specifies whether to configure the config drive partition for the BMS.

    The value can be True or an empty string.

    metadata

    Object

    Specifies the BMS metadata. For details, see Table 12.

    NOTE:

    Metadata includes system default fields and the fields set by users.

    OS-EXT-STS:task_state

    String

    Specifies the task status of the BMS. This is an extended attribute. Examples:

    • rebooting: The BMS is being restarted.
    • reboot_started: The BMS is normally restarted.
    • reboot_started_hard: The BMS is forcibly restarted.
    • powering-off: The BMS is being powered off.
    • powering-on: The BMS is being powered on.
    • rebuilding: The BMS is being rebuilt.
    • scheduling: The BMS is being scheduled.
    • deleting: The BMS is being deleted.

    OS-EXT-STS:vm_state

    String

    Specifies the stable BMS status. This is an extended attribute. Examples:

    • active: The BMS is running.
    • shutoff: The BMS is stopped.
    • suspended: The BMS is suspended.
    • reboot: The BMS is restarted.

    OS-EXT-SRV-ATTR:host

    String

    Specifies the host name of the BMS. This is an extended attribute.

    OS-EXT-SRV-ATTR:instance_name

    String

    Specifies the BMS alias. This is an extended attribute.

    OS-EXT-STS:power_state

    Integer

    Specifies the power status of the BMS. This is an extended attribute. Examples:

    • 0: indicates NO STATE.
    • 1: indicates RUNNING.
    • 4: indicates SHUTDOWN.

    OS-EXT-SRV-ATTR:hypervisor_hostname

    String

    Specifies the name of the host on which the BMS is deployed.

    OS-EXT-AZ:availability_zone

    String

    Specifies the AZ where the BMS is located.

    OS-DCF:diskConfig

    String

    Specifies the disk configuration. This is an extended attribute. The value can be:

    • MANUAL: The API uses the partitioning scheme in the image and the file system to create a BMS. If the target flavor has a large disk, the API does not partition the remaining disk space.
    • AUTO: The API uses a single partition with the same size as the disk of the target flavor to create a BMS. The API automatically adjusts the file system to adapt to the entire partition.

    fault

    Object

    Specifies the cause of the BMS fault. For details, see Table 9.

    OS-SRV-USG:launched_at

    String

    Specifies the time when the BMS was started.

    The timestamp format is ISO 8601, for example, 2019-05-22T03:23:59.000000.

    OS-SRV-USG:terminated_at

    String

    Specifies the time when the BMS was deleted.

    The timestamp format is ISO 8601, for example, 2019-05-22T04:23:59.000000.

    os-extended-volumes:volumes_attached

    Array of objects

    Specifies the disks attached to the BMS. For details, see Table 10.

    description

    String

    Specifies BMS information.

    host_status

    String

    Specifies the status of the host that accommodates the BMS.

    • UP: The nova-compute status is normal.
    • UNKNOWN: The nova-compute status is unknown.
    • DOWN: the nova-compute status is abnormal.
    • MAINTENANCE: The nova-compute is in the maintenance state.
    • Empty string: The BMS does not have host information.

    OS-EXT-SRV-ATTR:hostname

    String

    Specifies the hostname of the BMS.

    OS-EXT-SRV-ATTR:reservation_id

    String

    Specifies the reserved BMS IDs in the batch creation scenario.

    When BMSs are created in a batch, they have the same reservation_id.

    OS-EXT-SRV-ATTR:launch_index

    Integer

    Specifies the BMS startup sequence in the batch creation scenario.

    OS-EXT-SRV-ATTR:kernel_id

    String

    Specifies the UUID of the kernel image when the AMI image is used. In other scenarios, leave this parameter blank.

    OS-EXT-SRV-ATTR:ramdisk_id

    String

    Specifies the UUID of the Ramdisk image when the AMI image is used. In other scenarios, leave this parameter blank.

    OS-EXT-SRV-ATTR:root_device_name

    String

    Specifies the device name of the BMS system disk, for example, /dev/sda.

    OS-EXT-SRV-ATTR:user_data

    String

    Specifies the user_data specified during BMS creation. The value is encoded using Base64 or an empty string.

    locked

    Boolean

    Specifies whether the BMS is locked.

    • true: The BMS is locked.
    • false: The BMS is not locked.

    tags

    Array of strings

    Specifies tags of the BMS.

    os:scheduler_hints

    Object

    Specifies scheduling information of the BMS. For details, see Table 11.

    sys_tags

    Array of objects

    Specifies system tags of the BMS. For details, see Table 13.

    Table 3 addresses field data structure description

    Parameter

    Type

    Description

    vpc_id

    Array of objects

    Specifies the network to which the BMS belongs.

    • key: indicates the ID of the VPC used by the BMS.
    • value: indicates the network details. For details, see Table 4.
    Table 4 address field data structure description

    Parameter

    Type

    Description

    version

    Integer

    Specifies the IP address version.

    • 4: indicates IPv4.
    • 6: indicates IPv6.

    addr

    String

    Specifies the IP address.

    OS-EXT-IPS:type

    String

    Specifies the IP address type.

    • fixed: indicates the private IP address.
    • floating: indicates the EIP.

    OS-EXT-IPS-MAC:mac_addr

    String

    Specifies the MAC address.

    OS-EXT-IPS:port_id

    String

    Specifies the port ID corresponding to the IP address.

    Table 5 image field data structure description

    Parameter

    Type

    Description

    id

    String

    Specifies the image ID in UUID format.

    name

    String

    Specifies the image name.

    __os_type

    String

    Specifies the image type.

    The value can be:

    • Linux (including SUSE, Red Hat, CentOS, Oracle Linux, EulerOS, and Ubuntu)
    • Windows
    • Other (ESXi)

    links

    Array of objects

    Specifies shortcut links of the image. For details, see Table 6.

    Table 6 links field data structure description

    Parameter

    Type

    Description

    rel

    String

    Specifies the shortcut link marker name.

    href

    String

    Specifies the corresponding shortcut link.

    Table 7 flavor field data structure description

    Parameter

    Type

    Description

    id

    String

    Specifies the flavor ID of the BMS.

    name

    String

    Specifies the flavor name of the BMS.

    disk

    String

    Specifies the system disk size in the BMS flavor. The value 0 indicates that the disk size is not limited.

    vcpus

    String

    Specifies the number of CPU cores in the BMS flavor.

    ram

    String

    Specifies the memory size (MB) in the BMS flavor.

    Table 8 security_groups field data structure description

    Parameter

    Type

    Description

    name

    String

    Specifies the security group name.

    Table 9 fault field data structure description

    Parameter

    Type

    Description

    message

    String

    Specifies the fault information.

    code

    Integer

    Specifies the fault code.

    details

    String

    Specifies the fault details.

    created

    String

    Specifies the time when the fault occurred. The time is in ISO 8601 format.

    Table 10 os-extended-volumes:volumes_attached field data structure description

    Parameter

    Type

    Description

    id

    String

    Specifies the disk ID in UUID format.

    delete_on_termination

    String

    Specifies whether to delete the disk when deleting the BMS.

    • true: Yes
    • false: No

    bootIndex

    String

    Specifies whether it is a boot disk. 0 specifies a boot disk, and -1 specifies a non-boot disk.

    device

    String

    Specifies the device name of the disk, for example, /dev/sdb.

    Table 11 os:scheduler_hints field data structure description

    Parameter

    Type

    Description

    dec_baremetal

    String

    Specifies whether to create the BMS in a DeC. The value can be share or dedicate.

    Table 12 metadata field data structure description

    Parameter

    Type

    Description

    chargingMode

    String

    Specifies the billing type of the BMS.

    1: yearly/monthly billing mode (pre-paid)

    metering.order_id

    String

    Specifies the order ID for a yearly/monthly BMS.

    metering.product_id

    String

    Specifies the product ID for a yearly/monthly BMS.

    vpc_id

    String

    Specifies the ID of the VPC where the BMS is located.

    metering.image_id

    String

    Specifies the image ID of the BMS.

    metering.imagetype

    String

    Specifies the image type. The following types are supported:

    • Public image: The value is gold.
    • Private image: The value is private.
    • Shared image: The value is shared.

    baremetalPortIDList

    String

    Specifies NICs of the BMS.

    metering.resourcespeccode

    String

    Specifies the flavor code of the BMS in {Flavor ID}.{os_type} format, for example, physical.o2.medium.linux.

    metering.resourcetype

    String

    Specifies the resource type of the BMS. The value is __type_baremetal.

    image_name

    String

    Specifies the image name of the BMS.

    op_svc_userid

    String

    Specifies the user ID. You can obtain the user ID from My Credential on the management console.

    os_type

    String

    Specifies the OS type. The value can be Linux or Windows.

    __bms_support_evs

    String

    Specifies whether the BMS supports EVS disks.

    os_bit

    String

    Specifies the number of bits in the OS: 32 or 64.

    Table 13 sys_tags field data structure description

    Parameter

    Type

    Description

    key

    String

    Specifies the key of a system tag. The value is _sys_enterprise_project_id, indicating an enterprise project ID.

    value

    String

    Specifies the system tag value.

  • Example response
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    {
        "server": {
            "id": "53206ed0-56de-4d6b-b7ee-ffc62ca26f43",
            "name": "bms-test",
            "addresses": {
                "5849fdf1-9d79-4589-80c2-fe557990c417": [
                    {
                        "version": "4",
                        "addr": "192.168.1.216",
                        "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:25:56:c3",
                        "OS-EXT-IPS:port_id": "9e62503b-094e-4c6e-bc95-f10bbfb455d5",
                        "OS-EXT-IPS:type": "fixed"
                    },
                    {
                        "version": "4",
                        "addr": "10.154.72.77",
                        "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:25:56:c3",
                        "OS-EXT-IPS:port_id": "9e62503b-094e-4c6e-bc95-f10bbfb455d5",
                        "OS-EXT-IPS:type": "floating"
                    }
                ]
            },
            "flavor": {
                "disk": "9309",
                "vcpus": "32",
                "ram": "193047",
                "id": "physical.o2.medium",
                "name": "physical.o2.medium"
            },
            "accessIPv4": "",
            "accessIPv6": "",
            "status": "ACTIVE",
            "progress": 0,
            "hostId": "cd243addb5d2c64e89218180b7a3ed95abe6882e81c337cc563137df",
            "updated": "2018-09-18T09:29:44Z",
            "created": "2018-09-18T02:43:26Z",
            "metadata": {
                "metering.order_id": "CS1809181040HCFC2",
                "metering.image_id": "8589958c-6bc7-40c6-b81b-3fe4cd2e3d85",
                "baremetalPortIDList": "[9e62503b-094e-4c6e-bc95-f10bbfb455d5]",
                "metering.resourcespeccode": "physical.o2.medium.linux",
                "regionId": "region_id",
                "image_name": "redhat_7_2",
                "op_svc_userid": "745973c535ec4d4caba86f6f9419ff6d",
                "metering.resourcetype": "__type_baremetal",
                "agency_name": "CES_test",
                "metering.product_id": "00301-74069-0--0",
                "os_bit": "64",
                "vpc_id": "5849fdf1-9d79-4589-80c2-fe557990c417",
                "os_type": "Linux",
                "chargingMode": "1"
            },
            "tags": [
                "__type_baremetal"
            ],
            "description": "bms-6e18",
            "locked": false,
            "image": {
                "id": "8589958c-6bc7-40c6-b81b-3fe4cd2e3d85"
            },
            "config_drive": "",
            "tenant_id": "bbf1946d374b44a0a2a95533562ba954",
            "user_id": "3fc5ab2b0c544979abcaafd86edd80e6",
            "OS-EXT-STS:power_state": 1,
            "OS-EXT-STS:vm_state": "active",
            "OS-EXT-SRV-ATTR:host": "bms.dc1",
            "OS-EXT-SRV-ATTR:instance_name": "instance-00154f94",
            "OS-EXT-SRV-ATTR:hypervisor_hostname": "nova002@2",
            "OS-DCF:diskConfig": "MANUAL",
            "OS-EXT-AZ:availability_zone": "az-dc-1",
            "os:scheduler_hints": {},
            "OS-EXT-SRV-ATTR:root_device_name": "/dev/sda",
            "OS-EXT-SRV-ATTR:ramdisk_id": "",
            "enterprise_project_id": "2c7b6d77-9013-4d74-a221-2f612fc56372",
            "OS-EXT-SRV-ATTR:user_data": "IyEvYmluL2Jhc2gKZWNobyAncm9vdDokNiRtTGM1REEkN3IvWFVZaEI0VG1YZ0FCT1F2SE4wOHNoWTVZcDYzUXFDTTVyMHpmWjhJLkJlNW92UlU2QW85a25QNlZUVnhkckF5RTJtdC40S0NxcXBBNUVuUVppNC4nIHwgY2hwYXNzd2QgLWU7",
            "OS-SRV-USG:launched_at": "2018-09-18T02:46:07.954587",
            "OS-EXT-SRV-ATTR:kernel_id": "",
            "OS-EXT-SRV-ATTR:launch_index": 0,
            "host_status": "UP",
            "OS-EXT-SRV-ATTR:reservation_id": "r-08tuyo8v",
            "OS-EXT-SRV-ATTR:hostname": "bms-6e18",
            "sys_tags": [
                {
                    "key": "_sys_enterprise_project_id",
                    "value": "2c7b6d77-9013-4d74-a221-2f612fc56372"
                }
            ]
        }
    }
    

Returned Values

Normal values

Returned Values

Description

200

The server has successfully processed the request.

For details about other returned values, see Status Codes.

Error Codes

See Error Codes.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback