All Products
Search
Document Center

PolarDB:CheckKMSAuthorized

Last Updated:Mar 21, 2024

Queries whether a user is authorized to use Key Management Service (KMS).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
polardb:CheckKMSAuthorizedRead
  • DBCluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region.

Note You can call the DescribeRegions operation to query all regions that are available for your account, such as the region IDs.
cn-hangzhou
DBClusterIdstringYes

The cluster ID.

Note You can call the DescribeDBClusters operation to query the information of all clusters that are deployed in a specific region, such as the cluster IDs.
pc-************
TDERegionstringNo

The region in which the TDE key resides.

cn-beijing

Response parameters

ParameterTypeDescriptionExample
object
AuthorizationStateinteger

Indicates whether the cluster is authorized to use KMS. Valid values:

  • 0: no.
  • 1: yes.
0
RequestIdstring

The request ID.

A7E6A8FD-C50B-46B2-BA85-D8B8D3******
RoleArnstring

The Alibaba Cloud Resource Name (ARN) of the RAM role. A RAM role is a virtual identity that you can create within your Alibaba Cloud account. For more information, see RAM role overview.

acs:ram::1406926*****:role/aliyunrdsinstanceencryptiondefaultrole
DBClusterIdstring

The cluster ID.

pc-************

Examples

Sample success responses

JSONformat

{
  "AuthorizationState": 0,
  "RequestId": "A7E6A8FD-C50B-46B2-BA85-D8B8D3******",
  "RoleArn": "acs:ram::1406926*****:role/aliyunrdsinstanceencryptiondefaultrole",
  "DBClusterId": "pc-************"
}

Error codes

HTTP status codeError codeError messageDescription
403UnsupportedKmsService.NotEnabledKMS service is not enabled.Key Management Service is not enabled.
404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 404 change
    delete Error Codes: 403