Querying Resources Aggregated in the Cross-Account Resource View of CloudCMDB
Function
This API is used to query and filter the resources aggregated in the cross-account resource view of CloudCMDB after a view is created.
URI
GET /v1/resource/views/resources
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
Yes |
Integer |
Definition Number of items displayed on each page when the pagination query is performed. Constraints N/A Range The value can be customized. The value range is 1 to 500. Default value N/A |
|
offset |
No |
String |
Definition Offset from which the query starts. Constraints N/A Range 0 to 2147483647 Default value 0 |
|
view_id |
Yes |
String |
Definition View ID. Constraints N/A Range The value is a string. It contains 1 to 32 characters. Default value N/A |
|
marker |
No |
String |
Definition Pagination query parameter, which is the last ID of the request on the previous page. Constraints N/A Range N/A Default value N/A |
|
provider |
No |
String |
Definition Cloud service name. Constraints N/A Range The value is a string. The value can be ecs, cce, or rds. Default value N/A |
|
type |
No |
String |
Definition Resource type. Constraints N/A Range There are many resource types. Select a resource type based on the actual service. The common resource types are as follows:
Default value N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Array of data objects |
Definition Resource data aggregated in a view. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition Unique ID. Range N/A |
|
view_id |
String |
Definition View ID. Range The value is a string. It contains 1 to 32 characters. |
|
rms_resource_id |
String |
Definition The value corresponds to the ID value in the rms_resource collection. Range N/A |
|
resource_id |
String |
Definition Resource ID, which is the ID of the resource in the view management module of a cross-account resource. Range The value is a string. It contains 36 characters. |
|
domain_id |
String |
Definition ID of the tenant to which a user logs in. Range N/A |
|
name |
String |
Definition Name of the resource in the view. Range The value is a string. It contains 3 to 50 characters. |
|
ep_id |
String |
Definition Enterprise project ID. Range Select a project ID that is available inEnterprise Management. |
|
ep_name |
String |
Definition Enterprise project name. Range N/A |
|
project_id |
String |
Definition Project ID in OpenStack. Range N/A |
|
provider |
String |
Definition Cloud service name. Range The value is a string. It contains 1 to 64 characters. |
|
type |
String |
Definition Resource type. Range There are many resource types. Select a resource type based on the actual service. The common resource types are as follows:
|
|
region_id |
String |
Definition Region ID. Range The value is a string. It contains 0 to 64 characters. |
|
tags |
Array of tags objects |
Definition The key-value pair of a tag. Range N/A |
|
properties |
Object |
Definition Additional field information of a storage resource, which is usually used for display and filtering. Range N/A |
|
ingest_properties |
Object |
Definition Data collection attribute, which describes the additional information recorded when the view system collects the resource. Range N/A |
|
agent_id |
String |
Definition ID of the UniAgent. Range N/A |
|
agent_state |
String |
Definition UniAgent status. Range
|
|
inner_ip |
String |
Definition Internal IP address of the resource. Range N/A |
|
associated_group_list |
Object |
Definition List of bound resource group information. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Definition The tag key. Range A tag key can contain up to 128 characters. It cannot start with sys or a space, and cannot end with a space. Only letters, digits, spaces, and the following special characters are allowed: _ . : = + - @ |
|
value |
String |
Definition The tag value. Range A tag value can contain a maximum of 255 characters. It cannot start or end with a space. Only letters, digits, spaces, and the following special characters are allowed: _ . : / = + - @ |
Example Requests
Query resources aggregated in the cross-account resource view of CloudCMDB.
GET https://{Endpoint}/v1/resource/views/resources
Example Responses
Status code: 200
Resources aggregated in the cross-account resource view of CloudCMDB are queried.
{
"data" : [ {
"id" : "674034ed9de91350a4753232",
"view_id" : "674034ec9de91350a4753230",
"rms_resource_id" : "6569f4f04552f23e97babff3",
"resource_id" : "0228b9bb-7567-49ca-9707-4d851a863ec4",
"domain_id" : "dc2d76541f754d68a4c8d150262d92c2",
"name" : "runbook-test-0088ab2 deleted by mistake",
"ep_id" : "9d414beb-88b7-4ea8-9e61-1ebb64876849",
"ep_name" : "COC",
"project_id" : "10a6c23c2a1044779794798beb067c94",
"provider" : "ecs",
"type" : "cloudservers",
"region_id" : "string",
"tags" : [ {
"key" : "FASA",
"value" : "gdsa"
}, {
"key" : "ID3",
"value" : "123456789"
}, {
"key" : "ID",
"value" : "123456789"
}, {
"key" : "43243",
"value" : "45RT"
}, {
"key" : "ID2",
"value" : "123456789"
} ],
"properties" : {
"accessIpv4" : "",
"hostName" : "runbook-test-0088",
"addresses" : [ {
"OsExtIpsType" : "fixed",
"OsExtIpsPortId" : "1f653e40-423d-4df0-b539-16c3cfd2a2bd",
"addr" : "192.168.0.94",
"version" : 4,
"OsExtIpsMacAddr" : "fa:16:3e:f0:48:a6",
"primary" : true
} ],
"accessIpv6" : "",
"metadata" : {
"chargingMode" : "0",
"meteringImageType" : "gold",
"imageName" : "Public-CAD-HCE-BaseTemplate-2.0.2312.1-x86_64-Standard",
"meteringImageId" : "5086e876-a5c2-4d45-a734-1e0c0f664730",
"meteringResourcesPerCode" : "s6.small.1.linux",
"vpcId" : "44cec12a-3d51-4101-962e-c973fc4ea948",
"osBit" : "64",
"osType" : "Linux",
"ecmResStatus" : ""
},
"OsExtStsVmState" : "stopped",
"configDrive" : "",
"OsExtStsPowerState" : 4,
"hostId" : "387bf199de0b370202251e0db98291285b8b5849b5df74bec036abae",
"securityGroup" : [ {
"name" : "default",
"id" : "9e262f72-2f9a-4534-8a56-412710913895"
} ],
"ExtVolumesAttached" : [ {
"bootIndex" : "0",
"id" : "f85d484e-f502-43e2-9f99-3add086884ef",
"device" : "/dev/vda"
} ],
"userId" : "9fec03ee5b1040818b91bef6e16213df",
"flavor" : {
"disk" : "0",
"name" : "s6.small.1",
"id" : "s6.small.1",
"vcpus" : "1",
"ram" : "1024"
},
"osextsrvattr" : {
"hostName" : "runbook-test-0088",
"kernelId" : "",
"ramdiskId" : "",
"reservationId" : "r-lljtv8ct",
"instanceName" : "instance-008def4e",
"host" : "dd9e17d37e277347b5c29e6ee04c9f5e2aafe6e4a84596c541c48179",
"rootDeviceName" : "/dev/vda",
"hypervisorHostName" : "c3a03e89b2504db22be4a695b862662205800ca4ac466a8f8d177e60",
"launchIndex" : 0
},
"OsDcfDiskConfig" : "MANUAL",
"hostStatus" : "UP",
"OsSrvUsgLaunchedAt" : "2023-06-27T08:35:10.000000",
"OsExtAz" : "string",
"locked" : false,
"status" : "SHUTOFF",
"schedulerHints" : { }
},
"ingest_properties" : null,
"agent_id" : null,
"agent_state" : null,
"inner_ip" : null,
"associated_group_list" : null
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Resources aggregated in the cross-account resource view of CloudCMDB are queried. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot