All Products
Search
Document Center

PolarDB:DescribeApikeyAttribute

Last Updated:Oct 22, 2026

Queries the details of the API key.

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

polardb:DescribeApikeyAttribute

get

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ApiKey

string

Yes

The plaintext API key.

6c4b1f0317cd4fd7a5b446d3503d**

RegionId

string

Yes

The region ID.

cn-hangzhou

PageSize

integer

No

The number of entries per page. Valid values: 30, 50, and 100.

Default value: 30.

30

PageNumber

integer

No

The page number. Default value: 1.

1

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

F3322AFE-083E-4D77-A074-421301******

Items

array<object>

The list of consumer objects.

array<object>

The consumer object.

Consumer

object

The consumer information.

ConsumerId

string

The consumer ID.

c-71qh3pscbd3i

GwClusterId

string

The gateway instance ID.

pg-2ze5n62ef4s165***

Name

string

The consumer name.

test

ConsumerGroupId

string

The user group ID.

cg-bq6rcdjp02vt

ConsumerTag

string

The consumer tag.

test

ApiKey

string

The API key.

***

Status

string

The consumer status.

Enabled

CreateTime

string

The creation time. The format is YYYY-MM-DDTHH:mm:ssZ (UTC time).

2021-07-18T07:32:30Z

ModifyTime

string

The last modification time. The format is YYYY-MM-DDTHH:mm:ssZ (UTC time).

2026-04-10T01:48:25Z

UsageStatistics

array<object>

The usage statistics records for the consumer.

object

The usage statistics records for the consumer.

GwClusterId

string

The gateway instance ID.

pg-bp1ln7w98yrhzz7i2

DimensionType

string

The statistical dimension. The value is typically Consumer.

Consumer

DimensionRefId

string

The dimension reference ID, which is the consumer ID.

c-xxxxxx

TotalInputToken

string

The total number of input tokens.

10

TotalOutputToken

string

The total number of output tokens.

10

TotalCacheToken

string

The total number of cached tokens.

10

TotalCostPoints

string

The total number of consumed points.

10

MonthlyInputToken

string

The number of input tokens for the current month.

10

MonthlyOutputToken

string

The number of output tokens for the current month.

10

MonthlyCacheToken

string

The number of cached tokens for the current month.

10

MonthlyCostPoints

string

The number of consumed points for the current month.

10

TotalToken

string

The total number of tokens.

10

MonthlyToken

string

The number of tokens for the current month.

10

Examples

Success response

JSON format

{
  "RequestId": "F3322AFE-083E-4D77-A074-421301******",
  "Items": [
    {
      "Consumer": {
        "ConsumerId": "c-71qh3pscbd3i",
        "GwClusterId": "pg-2ze5n62ef4s165***",
        "Name": "test",
        "ConsumerGroupId": "cg-bq6rcdjp02vt",
        "ConsumerTag": "test",
        "ApiKey": "***",
        "Status": "Enabled",
        "CreateTime": "2021-07-18T07:32:30Z",
        "ModifyTime": "2026-04-10T01:48:25Z"
      },
      "UsageStatistics": [
        {
          "GwClusterId": "pg-bp1ln7w98yrhzz7i2",
          "DimensionType": "Consumer\n\n",
          "DimensionRefId": "c-xxxxxx",
          "TotalInputToken": "10",
          "TotalOutputToken": "10",
          "TotalCacheToken": "10",
          "TotalCostPoints": "10",
          "MonthlyInputToken": "10",
          "MonthlyOutputToken": "10",
          "MonthlyCacheToken": "10",
          "MonthlyCostPoints": "10",
          "TotalToken": "10",
          "MonthlyToken": "10"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.