Help Center/ Config/ CLI Reference/ CLI Command Reference
Updated on 2026-09-15 GMT+08:00

CLI Command Reference

Resource Inventory

API Name

Command

Description

Operation

Querying Resources of a Specific Type

hcloud RMS ListResources

This API is used to query all your resources of a specific type and you must have the rms:resources:list permission. For example, to query ECSs whose resource type is ecs.cloudservers in RMS, you must set provider to ecs and type to cloudservers in the request. For details about supported services and resource types, see "Supported Services and Regions" (https://console.huaweicloud.com/rms/#/resources/supported).

Go debug

Querying Providers

hcloud RMS ListProviders

This API is used to query providers, resources, and regions supported by RMS.

Go debug

Querying a Resource

hcloud RMS ShowResourceById

This API is used to query details about a resource based on its ID. You must have the rms:resources:get permissions. For example, to query ECSs whose resource type is ecs.cloudservers in RMS, you must set provider to ecs and type to cloudservers in the request. For details about supported services and resource types, see "Supported Services and Regions" (https://console.huaweicloud.com/rms/#/resources/supported).

Go debug

Querying All Resources Under Your Account

hcloud RMS ListAllResources

This API is used to query all resources under your account and you must have the rms:resources:list permissions.

Go debug

Querying a Resource Under Your Account

hcloud RMS ShowResourceDetail

This API is used to query a resource under your account.

Go debug

Querying Resource Tags

hcloud RMS ListAllTags

This API is used to query all resource tags under your account.

Go debug

Querying the Number of Resources

hcloud RMS CountAllResources

This API is used to query the number of resources.

Go debug

Querying a Resource Summary

hcloud RMS CollectAllResourcesSummary

This API is used to query a resource summary.

Go debug

Resource Recorder

API Name

Command

Description

Operation

Querying the Resource Recorder

hcloud RMS ShowTrackerConfig

This API is used to query details about the resource recorder.

Go debug

Deleting the Resource Recorder

hcloud RMS DeleteTrackerConfig

This API is used to delete the resource recorder.

Go debug

Creating or Modifying the Resource Recorder

hcloud RMS CreateTrackerConfig

This API is used to create or modify the resource recorder. Only one resource recorder can exist.

Go debug

Resource Relationships

API Name

Command

Description

Operation

Querying Resource Relationships

hcloud RMS ShowResourceRelations

This API is used to query relationships between the resource with a specific ID and other resources. You can set direction to in or out.

Go debug

Querying Details About Resource Relationships

hcloud RMS ShowResourceRelationsDetail

This API is used to query the relationship between a resource and other resources by the resource ID. The relationship direction can be in or out. An IAM user needs to have the rms:resources:getRelation permissions to call this API.

Go debug

Resource History

API Name

Command

Description

Operation

Querying Change Records of a Resource

hcloud RMS ShowResourceHistory

This API is used to query change records of a resource and its relationships with other resources.

Go debug

Region Management

API Name

Command

Description

Operation

Querying Regions

hcloud RMS ListRegions

This API is used to query regions.

Go debug

Compliance

API Name

Command

Description

Operation

Querying Built-in Policies

hcloud RMS ListBuiltInPolicyDefinitions

This API is used to query built-in policies.

Go debug

Querying a Built-in Policy

hcloud RMS ShowBuiltInPolicyDefinition

This API is used to query a built-in policy based on the policy ID.

Go debug

Adding a Policy Assignment

hcloud RMS CreatePolicyAssignments

This API is used to add a policy assignment.

Go debug

Querying All Policy Assignments

hcloud RMS ListPolicyAssignments

This API is used to query all policy assignments.

Go debug

Modifying a Policy Assignment

hcloud RMS UpdatePolicyAssignment

This API is used to modify a policy assignment.

Go debug

Querying a Policy Assignment

hcloud RMS ShowPolicyAssignment

This API is used to query a policy assignment based on its ID.

Go debug

Deleting a Policy Assignment

hcloud RMS DeletePolicyAssignment

This API is used to delete a policy assignment based on its ID.

Go debug

Enabling a policy Assignment

hcloud RMS EnablePolicyAssignment

This API is used to enable a policy assignment based on its ID.

Go debug

Disabling a Policy Assignment

hcloud RMS DisablePolicyAssignment

This API is used to disable a policy assignment based on its ID.

Go debug

Running a Resource Compliance Evaluation

hcloud RMS RunEvaluationByPolicyAssignmentId

This API is used to run a resource compliance evaluation based on a policy assignment ID.

Go debug

Querying the Evaluation Status of a Policy Assignment

hcloud RMS ShowEvaluationStateByAssignmentId

This API is used to query the evaluation status of a policy assignment based on the policy assignment ID.

Go debug

Querying the Compliance Result of a Resource

hcloud RMS ListPolicyStatesByResourceId

This API is used to query the compliance result of a resource based on the resource ID.

Go debug

Querying the Compliance Result of a Policy Assignment

hcloud RMS ListPolicyStatesByAssignmentId

This API is used to query all compliance results of resources evaluated based on a policy assignment ID.

Go debug

Querying All Compliance Results of Resources Under a User

hcloud RMS ListPolicyStatesByDomainId

This API is used to query all compliance results of resources under an account.

Go debug

Updating the Compliance Result of a Policy Assignment

hcloud RMS UpdatePolicyState

This API is used to update compliance result of resources under an account.

Go debug

Creating or Updating an Organization Assignment

hcloud RMS CreateOrganizationPolicyAssignment

This API is used to create or update an organization assignment.

Go debug

Querying Organization Assignments

hcloud RMS ListOrganizationPolicyAssignments

This API is used to query organization assignments.

Go debug

Querying a Specific Organization Assignment

hcloud RMS ShowOrganizationPolicyAssignment

This API is used to query a specific organization assignment.

Go debug

Deleting an Organization Assignment

hcloud RMS DeleteOrganizationPolicyAssignment

This API is used to delete an organization assignment.

Go debug

Querying Statuses of Organization Assignments

hcloud RMS ShowOrganizationPolicyAssignmentStatuses

This API is used to querying statuses of organization assignments.

Go debug

Querying Details About the Assignment Statuses of Each Member Account in an Organization

hcloud RMS ShowOrganizationPolicyAssignmentDetailedStatus

This API is used to querying details about the assignment statuses of each member account in an organization.

Go debug

Advanced Queries

API Name

Command

Description

Operation

Running an Advanced Query

hcloud RMS RunQuery

Run Resource Query Language

Go debug

Creating an Advanced Query

hcloud RMS CreateStoredQuery

Create Resource Query Language

Go debug

Listing Advanced Queries

hcloud RMS ListStoredQueries

List Resource Query Language

Go debug

Querying an Advanced Query

hcloud RMS ShowStoredQuery

Show Resource Query Language

Go debug

Updating an Advanced Query

hcloud RMS UpdateStoredQuery

Update Resource Query Language

Go debug

Deleting an Advanced Query

hcloud RMS DeleteStoredQuery

Select resources by SQL

Go debug

List Advanced Query Schemas

hcloud RMS ListSchemas

List Schemas

Go debug

Resource Aggregators

API Name

Command

Description

Operation

Creating a Resource Aggregator

hcloud RMS CreateConfigurationAggregator

This API is used to create a resource aggregator.

Go debug

Querying Resource Aggregators

hcloud RMS ListConfigurationAggregators

This API is used to query resource aggregators.

Go debug

Querying a Specific Resource Aggregator

hcloud RMS ShowConfigurationAggregator

This API is used to query a specific resource aggregator.

Go debug

Updating a Resource Aggregator

hcloud RMS UpdateConfigurationAggregator

This API is used to update a resource aggregator.

Go debug

Deleting a Resource Aggregator

hcloud RMS DeleteConfigurationAggregator

This API is used to delete a resource aggregator.

Go debug

Querying the Status of a Specific Resource Aggregator Account

hcloud RMS ShowConfigurationAggregatorSourcesStatus

This API is used to query the status of a specific resource aggregator account. The status can be authorized or unauthorized. If the status is unauthorized, the status information contains an error code or message.

Go debug

Authorizing a Resource Aggregator Account

hcloud RMS CreateAggregationAuthorization

This API is used to authorize a resource aggregator account to collect data from source accounts.

Go debug

Querying Authorized Resource Aggregators Accounts

hcloud RMS ListAggregationAuthorizations

This API is used to query authorized resource aggregator accounts.

Go debug

Deleting Authorization for a Resource Aggregator Account

hcloud RMS DeleteAggregationAuthorization

This API is used to delete authorization for a specific resource aggregator account.

Go debug

Querying All Pending Aggregation Requests

hcloud RMS ListPendingAggregationRequests

This API is used to query all pending aggregation requests.

Go debug

Deleting Pending Authorization Requests

hcloud RMS DeletePendingAggregationRequest

This API is used to delete pending authorization requests.

Go debug

Querying the Number of Resources of a Resource Aggregator Account

hcloud RMS ShowAggregateDiscoveredResourceCounts

This API is used to query the number of resources of a resource aggregator account. The number can be counted by filter and GroupByKey.

Go debug

Querying Resources of a Resource Aggregator Account

hcloud RMS ListAggregateDiscoveredResources

This API is used to query resources of a resource aggregator account.

Go debug

Querying Details About a Specific Resource in a Source Account

hcloud RMS ShowAggregateResourceConfig

This API is used to query details about a specific resource in a source account.

Go debug

Performing an Advanced Query on a Specific Aggregator

hcloud RMS RunAggregateResourceQuery

This API is used to perform an advanced query on a specific aggregator.

Go debug

Querying the Compliance Overview of One or More Source Accounts in an Aggregator

hcloud RMS ShowAggregatePolicyStateComplianceSummary

This API is used to query the number of compliant and non-compliant rules of one or more accounts in the aggregator.

Go debug

Querying Aggregated Assignments

hcloud RMS ListAggregateComplianceByPolicyAssignment

This API is used to query aggregated assignments. For an assignment, the numbers of both compliant and non-compliant resources are included.

Go debug

Querying Evaluation Results of Aggregated Resources

hcloud RMS ShowAggregateComplianceDetailsByPolicyAssignment

This API is used to query resources evaluated by a specified aggregated assignment and their compliance statuses. An evaluation result contains the evaluated resource and its compliance status.

Go debug

Querying Details About a Specified Aggregated Assignment

hcloud RMS ShowAggregatePolicyAssignmentDetail

This API is used to query details about a specified aggregated assignment.

Go debug