Updated on 2024-04-16 GMT+08:00

Querying Services Supported by TMS

Function

You can use this API to query services supported by TMS.

URI

GET /v1.0/tms/providers

Table 1 Query parameters

Parameter

Mandatory

Type

Description

locale

No

String

Specifies the display language.

limit

No

Integer

The maximum queries supported. The value 10 is used by default if this parameter is not set. The value range is 1 to 200.

offset

No

Integer

Specifies the index position, which starts from the next data record specified by offset. The value must be a number and cannot be negative. The default value is 0.

provider

No

String

Specifies the cloud service name.

Request

Table 2 Header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. TMS is a global service. So you need to set scope to domain when calling an IAM API to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response

Status code: 200

Table 3 Body parameters

Parameter

Type

Description

providers

Array of ProviderResponseBody objects

Specifies the cloud services

total_count

Integer

Specifies the total cloud services supported.

Table 4 ProviderResponseBody

Parameter

Type

Description

provider

String

Specifies the cloud service name.

provider_i18n_display_name

String

Specifies the display name of the resource. You can set the language by setting the **locale** parameter.

resource_types

Array of ResourceTypeBody objects

Specifies the resource type.

Table 5 ResourceTypeBody

Parameter

Type

Description

resource_type

String

Specifies the resource type.

resource_type_i18n_display_name

String

Specifies the display name of the resource type. You can set the language by setting the **locale** parameter.

regions

Array of strings

Specifies the supported regions.

global

Boolean

Specifies whether the resource is a global resource.

Example Request

Querying supported services by TMS

GET https://{Endpoint}/v1.0/tms/providers?locale=en-us&limit=200

Example Response

Status code: 200

Successful operation

{
  "providers" : [ {
    "provider" : "evs",
    "provider_i18n_display_name" : "Elastic Volume Service",
    "resource_types" : {
      "resource_type_i18n_display_name" : "EVS-Disk",
      "global" : false,
      "resource_type" : "disk",
      "regions" : [ "regionId1" ]
    }
  } ],
  "total_count" : 1
}

Status Codes

See Status Codes.

Error Codes

See Error Codes.