Querying Offline Resources Associated with a Group
Function
This API is used to query the resource information related to a group after a group is associated with resources.
URI
GET /v1/group-resource-relations
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
application_id |
No |
String |
Definition ID of the application associated with the group. Constraints The application ID, group ID, and component ID cannot coexist. At least one of them must be specified. Range N/A Default value N/A |
|
component_id |
No |
String |
Definition ID of the component associated with the group. Constraints The application ID, group ID, and component ID cannot coexist. At least one of them must be specified. Range N/A Default value N/A |
|
group_id |
No |
String |
Definition Group ID. Constraints The application ID, group ID, and component ID cannot coexist. At least one of them must be specified. Range N/A Default value N/A |
|
vendor |
Yes |
String |
Definition Vendor information. Constraints N/A Range AWS: Amazon Web Services
Default value N/A |
|
type |
Yes |
String |
Definition Resource type. Constraints N/A Range Resource type. Select a resource type based on the actual service requirements. Common resource types are as follows:
Default value N/A |
|
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 |
|
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 |
|
resource_id_list |
No |
Array of strings |
Definition Resource ID list. Constraints N/A Range Resource ID list. The maximum value is 100. Default value N/A |
|
name |
No |
String |
Definition Cloud resource name. Constraints N/A Range It is user-defined. For details, see Bare Metal Server (BMS). Default value N/A |
|
region_id |
No |
String |
Definition Region ID list. Constraints N/A Range Region ID list. The maximum value is 100. Default value N/A |
|
az_id |
No |
String |
Definition AZ ID. Constraints N/A Range N/A Default value N/A |
|
ip_type |
No |
String |
Definition IP address type. Constraints N/A Range fixed: internal IP address floating: EIP Default value N/A |
|
ip |
No |
String |
Definition Cloud resource IP address. Constraints N/A Range Filtering results for IPv4 addresses, which are fuzzy matched. Default value N/A |
|
status |
No |
String |
Description: Cloud resource status. Constraints: N/A Value range: Select an ECS status by referring toECS. Default value: N/A |
|
agent_state |
No |
String |
Definition Agent status. Constraints N/A Range
Default value N/A |
|
image_name |
No |
String |
Definition Image name, which is used for fuzzy match. Constraints N/A Range N/A Default value N/A |
|
os_type |
No |
String |
Definition System type. Constraints N/A Range
Default value N/A |
|
tag |
No |
String |
Definition Cloud resource tag. Constraints A tag is in the format of "key.value". The maximum lengths of the key and value are 36 and 43 characters, respectively. Range The key of the tag can contain only letters, digits, underscores (), and hyphens (-). The value of the tag can contain only letters, digits, underscores (), hyphens (-), and periods (.). Default value N/A |
|
charging_mode |
No |
String |
Definition Cloud server billing mode. Constraints N/A Range Billing mode:
Default value N/A |
|
flavor_name |
No |
String |
Definition Flavor name. Constraints N/A Range N/A Default value N/A |
|
ip_list |
No |
Array of strings |
Definition IP address list. Constraints N/A Range List. The maximum value is 100. Default value N/A |
|
is_collected |
No |
Boolean |
Definition Whether to add it to favorites. Constraints N/A Range
Default value N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Array of data objects |
Definition Alibaba Cloud resource list. Range The list contains 0 to 500 items. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition UUID generated by CloudCMDB. Range N/A |
|
domain_id |
String |
Definition Tenant ID. Range The value is a string. It contains 32 characters. |
|
cmdb_resource_id |
String |
Definition UUID of the resource allocated by CloudCMDB. Range N/A |
|
group_id |
String |
Definition Group ID. Range The value is a string. It contains 24 characters. |
|
group_name |
String |
Definition Group name. Range The value is a string. It contains 3 to 60 characters. |
|
resource_id |
String |
Definition Resource ID. Range The value is a string. It contains 36 characters. |
|
name |
String |
Definition Resource name. Range The value is a string. It contains 3 to 50 characters. |
|
type |
String |
Definition Resource type. Range
|
|
is_delegated |
Boolean |
Definition Whether the resource is managed. Range
|
|
region_id |
String |
Definition Region ID. Range The value is a string. It contains 0 to 64 characters. |
|
inner_ip |
String |
Definition Internal IP address of the resource. Range N/A |
|
zone_id |
String |
Definition AZ ID. Range N/A |
|
is_host |
Boolean |
Definition Whether it is a host. Range
|
|
agent_id |
String |
Definition ID of the UniAgent. Range N/A |
|
agent_state |
String |
Definition UniAgent status. Range
|
|
datasource |
String |
Definition Cloud vendor account ID. Range The value is a string. It contains 0 to 24 characters. |
|
description |
String |
Definition Description. Range The value is a string. It contains 1 to 256 characters. |
|
properties |
Map<String,Object> |
Definition Attribute information. Range N/A |
|
ingest_properties |
Map<String,Object> |
Definition Data collection attribute, which describes the additional information recorded when the view system collects the resource. Range N/A |
|
xrn |
String |
Definition Device ID. Range The value is a string. It contains 3 to 50 characters. |
|
create_time |
String |
Definition Creation time. Range N/A |
|
update_time |
String |
Definition Update time. Range N/A |
Example Requests
Query the resources associated with a group.
GET https://{endpoint}/v1/group-resource-relations?type=VM&limit=10&offset=0&application_id=660557b2dc48844adc49eaa5&is_collected=false&vendor=OTHER
Example Responses
Status code: 200
The resources associated with the group are queried.
{
"data" : [ {
"id" : "123e4567-e89b-12d3-a456-426614174000",
"domain_id" : "00000000000000000000000000000000",
"cmdb_resource_id" : "123e4567-e89b-12d3-a456-426614174001",
"group_id" : "123e4567e89b12d3",
"group_name" : "Example Group",
"resource_id" : "123e4567-e89b-12d3-a456-426614174002",
"name" : "Example Resource",
"type" : "VM",
"is_delegated" : true,
"region_id" : "us-west-1",
"inner_ip" : "x.x.x.x",
"zone_id" : "us-west-1a",
"is_host" : true,
"agent_id" : "00000000000000000000000000000000",
"agent_state" : "ONLINE",
"datasource" : "123e4567",
"description" : "This is an example resource.",
"properties" : {
"key1" : {
"value" : "value1"
},
"key2" : {
"value" : "value2"
}
},
"ingest_properties" : {
"ingest_key1" : {
"ingest_value" : "ingest_value1"
}
},
"xrn" : "xrn:example:resource",
"create_time" : "2023-10-01T12:00:00Z",
"update_time" : "2023-10-01T12:00:00Z"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The resources associated with the group 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