1
0
forked from docs/doc-exports
doc-exports/docs/config/api-ref/rms_04_0112.html
Wei, Hongmin da6ca4fb3c Config API First Version
Reviewed-by: Ziuzko, Alevtina <alevtina.ziuzko@t-systems.com>
Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com>
Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
2024-08-22 10:49:27 +00:00

26 KiB

Querying resource overview recorded by the resource recorder

Function

Querying resource overview recorded by the resource recorder in the current account

Calling Method

For details, see Calling APIs.

URI

GET /v1/resource-manager/domains/{domain_id}/tracked-resources/summary

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Specifies tags.

Maximum: 36

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

name

No

String

Specifies the resource name.

Maximum: 256

type

No

Array

Specifies resource types in the format of provider.type.

Array Length: 1 - 100

region_id

No

Array

Specifies the regions.

Array Length: 1 - 10

ep_id

No

Array

Specifies enterprise project IDs.

Array Length: 1 - 10

project_id

No

Array

Specifies the project ID.

Array Length: 1 - 10

tags

No

Array

Specifies tags. The format is key or key=value.

Array Length: 1 - 5

resource_deleted

No

Boolean

Indicating whether deleted resources need to be returned. This parameter is set to false by default.

Default: false

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

Specifies the invoker's token.

X-Security-Token

No

String

Security token (session token) for temporary security credentials. This parameter is mandatory when you make an API call using temporary security credentials.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

items

Array of ResourceSummaryResponseItem objects

Specifies the list of resource summary information.

Table 5 ResourceSummaryResponseItem

Parameter

Type

Description

provider

String

Specifies the cloud service name.

types

Array of types objects

Specifies the resource type list.

Table 6 types

Parameter

Type

Description

type

String

Specifies the resource type.

regions

Array of regions objects

Specifies the regions.

Table 7 regions

Parameter

Type

Description

region_id

String

Specifies the region ID.

count

Long

Specifies the number of resources of this type in the current region.

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

error_msg

String

Specifies the error message.

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

error_msg

String

Specifies the error message.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

error_msg

String

Specifies the error message.

Example Requests

Querying resource overview recorded by the resource recorder in the current account

GET https://{endpoint}/v1/resource-manager/domains/{domain_id}/tracked-resources/summary

Example Responses

Status code: 200

Successful Operation

[ {
  "provider" : "ecs",
  "types" : [ {
    "type" : "buckets",
    "regions" : [ {
      "region_id" : "regionid1",
      "count" : 5
    } ]
  } ]
} ]

Status Codes

Status Code

Description

200

Successful Operation

400

Invalid Param Supplied

403

Authentication Failed

500

Internal Error

Error Codes

See Error Codes.