DescribeCostCheckResults

Updated at:

Queries the overview of aggregated cost optimization results for check items.

Operation description

This operation is incompatible with the Go SDK. To use the Go SDK, call the DescribeAdvicesFlatPage API.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

advisor:DescribeCostCheckResults

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Product

string

No

The code of the cloud service.

ecs

CheckIds

array

No

The list of check item IDs.

string

No

The list of check item IDs.

EcsCostLowUtilizationCheck

Severity

integer

No

The severity level. Valid values:

  • 1: Warning.

  • 2: Critical.

1

ResourceName

string

No

The name of the resource.

SYNC_********_TASK

RegionIds

array

No

The set of region IDs. This parameter is an array.

string

No

The list of region IDs. This is a filter condition for the query. Multiple values are supported and separated by commas (,). By default, all regions are queried.

[\"ap-southeast-1\"]

ResourceIds

array

No

The list of resource IDs. A maximum of 100 IDs are supported.

string

No

The list of IDs of the Anti-DDoS Pro and Anti-DDoS Premium instances in the Chinese mainland to query.

[\"Create-cpdprod\"]

AssumeAliyunIdList

array

No

The collection of IDs of the member accounts to query.

integer

No

The collection of IDs of the member accounts to query.

[180*********100]

GroupBy

string

No

The dimension for grouping. Valid values:

  • Category: Groups by category. This is the default value.

  • Product: Groups by cloud service.

Category

TagKeys

array

No

The list of tag keys that meet the conditions.

string

No

The list of tag key details.

[{'TagKey': 'acs:tag:createdby', 'TagCount': 1}]

TagValues

array

No

The tag values.

string

No

The tag value.

{'TagValue': []}

TagList

array<object>

No

The list of tags.

object

No

The business tag.

TagKey

string

No

The tag key.

ERP

TagValue

array

No

The tag values.

string

No

The tag values.

1

ResourceGroupIdList

array

No

The filter for resource group IDs.

string

No

The resource group ID.

xxxx

CheckPlanId

integer

No

123456

ResourceId

string

No

Language

string

No

zh

Response elements

Element

Type

Description

Example

object

Schema of Response

Data

object

The query result object.

ResourceCount

integer

The resource count of each type.

76

AdviceResourceCount

integer

The number of inspected resources.

Inspected resource count

TotalCount

integer

The total number of entries.

4

WarningCount

integer

The number of warning events.

1

NormalCount

integer

The number of normal resources.

1

GroupBy

string

The dimension for grouping. Valid values:

  • Category: Groups by category. This is the default value.

  • Product: Groups by cloud service.

Category

ViewGroup

array<object>

The grouped display items.

array<object>

GroupCode

string

The group code. The value varies based on the GroupBy request parameter:

  • Product:

    • The code of the cloud service.

  • Category:

    • 21: Low resource utilization.

    • 22: Idle resources.

    • 23: Billing method.

22

GroupName

string

The name of the group.

aut***8ainRh1

GroupCount

integer

The number of items in the group.

0

GroupExpectedSavingCost

number

The estimated savings for the group.

1

CheckItems

array<object>

The name of the user-defined check configuration.

object

The text content when the description type of the check item risk is text.

Severity

integer

The severity level. Valid values:

  • 1: Warning.

  • 2: Critical.

1

AdviceCount

integer

The number of cloud service instances that meet the check rule.

100

Summary

string

The number of diagnostic suggestions for each cloud service, grouped by service.

true

Product

string

The code of the cloud service.

slb

Description

string

The description of the check item, including recommended actions and operation instructions.

The cloud disk was created more than the specified threshold days ago and is not attached to an instance

Tips

string

A brief summary of the check suggestion.

For idle cloud disks, consider releasing the instances based on your business needs. For more information, see Documentation

CheckId

string

The code of the check item.

EbsCostIdleCheck

Category

string

The category of the check item. Valid values:

  • 1: Security and compliance.

  • 2: Performance and efficiency.

  • 3: Business stability.

  • 4: Cost optimization.

  • 5: Service limits.

4

CheckName

string

The name of the check item.

Idle cloud disk resource check

AdviceResourceCount

integer

The inspected resource count.

1

CurrentCost

number

The current cost.

1

OptimizedCost

number

The optimized cost.

1

ExpectedSavingCost

number

The estimated savings.

1

RequestId

string

Id of the request

566331F9-****-550F-B745-A730331F97A9

Success

string

Indicates whether the request is successful.

True

Message

string

The error message.

OK

Code

string

The error code.

200

Examples

Success response

JSON format

{
  "Data": {
    "ResourceCount": 76,
    "AdviceResourceCount": 0,
    "TotalCount": 4,
    "WarningCount": 1,
    "NormalCount": 1,
    "GroupBy": "Category",
    "ViewGroup": [
      {
        "GroupCode": "22",
        "GroupName": "aut***8ainRh1",
        "GroupCount": 0,
        "GroupExpectedSavingCost": 1,
        "CheckItems": [
          {
            "Severity": 1,
            "AdviceCount": 100,
            "Summary": "true",
            "Product": "slb",
            "Description": "云盘创建时间超过设置的阈值天,未挂载实例",
            "Tips": "云盘闲置资源建议结合实际业务考虑对实例进行释放,参考文档。",
            "CheckId": "EbsCostIdleCheck",
            "Category": "4",
            "CheckName": "云盘闲置资源检查",
            "AdviceResourceCount": 1,
            "CurrentCost": 1,
            "OptimizedCost": 1,
            "ExpectedSavingCost": 1
          }
        ]
      }
    ]
  },
  "RequestId": "566331F9-****-550F-B745-A730331F97A9",
  "Success": "True",
  "Message": "OK",
  "Code": "200"
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError The request processing has failed due to some unknown error. A server error occurred.
403 Forbidden.NotActivated User has not activated Advisor Service. The user has not opened the Advisor product.
403 Rd.NoMasterRole Login account is not RD management or co-management role. Logon account is not RD management or co-management role
403 Rd.NoManagePermission The RD management account does not have the specified member account management permission. The RD management account does not have the specified member account management permission.
403 Forbidden.RAM User not authorized to operate on the specified resource, or this API doesn't support RAM. Authentication failed.
403 Forbidden.NotAuthorized User has not authorized Advisor to provide services.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.