modelarts-umn/api-ref/source/service_management/querying_dedicated_resource_pools.rst
otcbot[bot] aed5c3e2da
Update content (#36)
Changes to ma_api from doc-exports#14


This is an automatically created Pull Request for changes to ma_api in opentelekomcloud-docs/doc-exports#14.
Please do not edit it manually, since update to the original PR will overwrite local changes.
Original patch file, as well as complete rst archive,  can be found in the artifacts of the opentelekomcloud-docs/doc-exports#14

Reviewed-by: Beibei <None>
2022-05-23 16:21:56 +00:00

13 KiB

original_name

modelarts_03_0201.html

Querying Dedicated Resource Pools

Function

This API is used to query dedicated resource pools.

URI

GET /v1/{project_id}/clusters

Table 1 Parameters
Parameter Mandatory Type Description
project_id Yes String Project ID. For details about how to obtain the project ID, see Obtaining a Project ID <modelarts_03_0147>.
cluster_name No String Cluster name. By default, the cluster name is not filtered.
status No String Cluster status. By default, the status is not filtered.
offset No integer Start page of the paging list. Default value: 0
limit No integer Maximum number of records returned on each page. The default value is 1000. The recommended value ranges from 10 to 50.
sort_by No String

Sorting field. The options are as follows:

  • created_at: default value
  • cluster_name
order No String

Sorting mode. The options are as follows:

  • asc: ascending order
  • desc: descending order. The default value is desc.

Response Body

Table 2 Parameters
Parameter Type Description
total_count integer Total number of clusters that meet the search criteria when no paging is implemented
count integer Number of clusters in the query result. If offset and limit are not set, the values of count and total are the same.
clusters cluster array List of queried clusters. For details, see Table 3 <modelarts_03_0201__en-us_topic_0210524456_table3329335121912>.
Table 3 cluster parameters
Parameter Type Description
cluster_id String Cluster ID
cluster_name String Cluster name
description String Cluster remarks
tenant String Tenant to which a cluster belongs
project String Project to which a cluster belongs
owner String User to which a cluster belongs
created_at integer Time when a cluster is created, in milliseconds calculated from 1970.1.1 0:0:0 UTC
status String Cluster status. The value can be deploying, running, concerning, or abnormal.
nodes Object Node configuration. For details, see Table 4 <modelarts_03_0201__en-us_topic_0210524456_table1977248142212>.
allocatable_cpu_cores float Number of available CPU cores
allocatable_memory integer Number of available memory resources
allocatable_gpus float Number of available GPU cores
product_id String Product ID
order_id String Order ID
period_type String Subscription period type
period_num integer Number of subscription periods
Table 4 node parameters
Parameter Type Description
specification String Node specifications
count integer Number of nodes
available_count integer Number of available nodes

Samples

  • Sample request

    GET    https://endpoint/v1/{project_id}/clusters
  • Sample response

    {
          "total_count": 1,
          "count": 1,
          "clusters": [
            {
              "cluster_id": "ff808081673fbb3d01673fbb824d0000",
              "cluster_name": "my-cluster",
              "description": "",
              "tenant": "tenant_id",
              "project": "project_id",
              "owner": "owner_id",
              "created_at": 1574923077927,
              "status": "running",
              "nodes": {
                "specification": "modelarts.vm.cpu.8ud",
                "count": 1,
                "available_count": 1
              },
              "allocatable_cpu_cores": 5.5,
              "allocatable_memory": 4096,
              "allocatable_gpus": 0.5
            }
          ]
        }

Status Code

For details about the status code, see Table 1 <modelarts_03_0094__en-us_topic_0132773864_table1450010510213>.

Error Codes

See Error Codes <modelarts_03_0095>.