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). | |
| Querying Providers | hcloud RMS ListProviders | This API is used to query providers, resources, and regions supported by RMS. | |
| 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). | |
| 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. | |
| Querying a Resource Under Your Account | hcloud RMS ShowResourceDetail | This API is used to query a resource under your account. | |
| Querying Resource Tags | hcloud RMS ListAllTags | This API is used to query all resource tags under your account. | |
| Querying the Number of Resources | hcloud RMS CountAllResources | This API is used to query the number of resources. | |
| Querying a Resource Summary | hcloud RMS CollectAllResourcesSummary | This API is used to query a resource summary. |
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. | |
| Deleting the Resource Recorder | hcloud RMS DeleteTrackerConfig | This API is used to delete the resource recorder. | |
| 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. |
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. | |
| 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. |
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. |
Region Management
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Regions | hcloud RMS ListRegions | This API is used to query regions. |
Compliance
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying Built-in Policies | hcloud RMS ListBuiltInPolicyDefinitions | This API is used to query built-in policies. | |
| Querying a Built-in Policy | hcloud RMS ShowBuiltInPolicyDefinition | This API is used to query a built-in policy based on the policy ID. | |
| Adding a Policy Assignment | hcloud RMS CreatePolicyAssignments | This API is used to add a policy assignment. | |
| Querying All Policy Assignments | hcloud RMS ListPolicyAssignments | This API is used to query all policy assignments. | |
| Modifying a Policy Assignment | hcloud RMS UpdatePolicyAssignment | This API is used to modify a policy assignment. | |
| Querying a Policy Assignment | hcloud RMS ShowPolicyAssignment | This API is used to query a policy assignment based on its ID. | |
| Deleting a Policy Assignment | hcloud RMS DeletePolicyAssignment | This API is used to delete a policy assignment based on its ID. | |
| Enabling a policy Assignment | hcloud RMS EnablePolicyAssignment | This API is used to enable a policy assignment based on its ID. | |
| Disabling a Policy Assignment | hcloud RMS DisablePolicyAssignment | This API is used to disable a policy assignment based on its ID. | |
| Running a Resource Compliance Evaluation | hcloud RMS RunEvaluationByPolicyAssignmentId | This API is used to run a resource compliance evaluation based on a policy assignment ID. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| Updating the Compliance Result of a Policy Assignment | hcloud RMS UpdatePolicyState | This API is used to update compliance result of resources under an account. | |
| Creating or Updating an Organization Assignment | hcloud RMS CreateOrganizationPolicyAssignment | This API is used to create or update an organization assignment. | |
| Querying Organization Assignments | hcloud RMS ListOrganizationPolicyAssignments | This API is used to query organization assignments. | |
| Querying a Specific Organization Assignment | hcloud RMS ShowOrganizationPolicyAssignment | This API is used to query a specific organization assignment. | |
| Deleting an Organization Assignment | hcloud RMS DeleteOrganizationPolicyAssignment | This API is used to delete an organization assignment. | |
| Querying Statuses of Organization Assignments | hcloud RMS ShowOrganizationPolicyAssignmentStatuses | This API is used to querying statuses of organization assignments. | |
| 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. |
Advanced Queries
| API Name | Command | Description | Operation |
|---|---|---|---|
| Running an Advanced Query | hcloud RMS RunQuery | Run Resource Query Language | |
| Creating an Advanced Query | hcloud RMS CreateStoredQuery | Create Resource Query Language | |
| Listing Advanced Queries | hcloud RMS ListStoredQueries | List Resource Query Language | |
| Querying an Advanced Query | hcloud RMS ShowStoredQuery | Show Resource Query Language | |
| Updating an Advanced Query | hcloud RMS UpdateStoredQuery | Update Resource Query Language | |
| Deleting an Advanced Query | hcloud RMS DeleteStoredQuery | Select resources by SQL | |
| List Advanced Query Schemas | hcloud RMS ListSchemas | List Schemas |
Resource Aggregators
| API Name | Command | Description | Operation |
|---|---|---|---|
| Creating a Resource Aggregator | hcloud RMS CreateConfigurationAggregator | This API is used to create a resource aggregator. | |
| Querying Resource Aggregators | hcloud RMS ListConfigurationAggregators | This API is used to query resource aggregators. | |
| Querying a Specific Resource Aggregator | hcloud RMS ShowConfigurationAggregator | This API is used to query a specific resource aggregator. | |
| Updating a Resource Aggregator | hcloud RMS UpdateConfigurationAggregator | This API is used to update a resource aggregator. | |
| Deleting a Resource Aggregator | hcloud RMS DeleteConfigurationAggregator | This API is used to delete a resource aggregator. | |
| 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. | |
| Authorizing a Resource Aggregator Account | hcloud RMS CreateAggregationAuthorization | This API is used to authorize a resource aggregator account to collect data from source accounts. | |
| Querying Authorized Resource Aggregators Accounts | hcloud RMS ListAggregationAuthorizations | This API is used to query authorized resource aggregator accounts. | |
| Deleting Authorization for a Resource Aggregator Account | hcloud RMS DeleteAggregationAuthorization | This API is used to delete authorization for a specific resource aggregator account. | |
| Querying All Pending Aggregation Requests | hcloud RMS ListPendingAggregationRequests | This API is used to query all pending aggregation requests. | |
| Deleting Pending Authorization Requests | hcloud RMS DeletePendingAggregationRequest | This API is used to delete pending authorization requests. | |
| 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. | |
| Querying Resources of a Resource Aggregator Account | hcloud RMS ListAggregateDiscoveredResources | This API is used to query resources of a resource aggregator account. | |
| 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. | |
| Performing an Advanced Query on a Specific Aggregator | hcloud RMS RunAggregateResourceQuery | This API is used to perform an advanced query on a specific aggregator. | |
| 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. | |
| 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. | |
| 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. | |
| Querying Details About a Specified Aggregated Assignment | hcloud RMS ShowAggregatePolicyAssignmentDetail | This API is used to query details about a specified aggregated assignment. |
What is your overall rating for this page?
Thank 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