All Products
Search
Document Center

AnalyticDB:GetADBSparkNecessaryRAMPermissions

Last Updated:Nov 10, 2025

View the Spark basic permission diagnosis report of the current user.

Operation description

The API diagnosis report contains whether the current user has all permissions required by the AnalyticDB for Spark related features. The scope of the permissions may exceed the minimum requirements of the business. The diagnostic report of the current API is used to quickly initialize the environment of AnalyticDB for Spark. If fine-grained permission configuration is needed, see Configure fine-grained permissions in AnalyDB for Spark.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
adb:GetADBSparkNecessaryRAMPermissionsget
*DBCluster
acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The cluster ID.

Note You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL clusters within a region.
amv-bp1r053byu48p****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

642F3512-C628-5D0C-8815-F6670C****
Dataobject

The returned result.

Passedboolean

Check whether the use has the basic permissions to use Analytic DB for Spark.

  • true: The check is passed and the basic permissions are granted.
  • false: The check fails and some permissions are missing.
true
DeniedDetailobject

When permission check fails, returns diagnostic information related to permission check failure.

ResourceOwnerIdstring

The ID of the resource owner.

11685695632****
Actionstring

The name of the RAM action that failed the authentication.

ListSparkApps
PrincipalTypestring

The identity type of the current user. Valid values:

  • SubUser: a RAM user
  • AssumedRoleUser: a RAM role
SubUser
ResourceAuthTargetInfostring

Authentication object information, can be the current user's RAM account ID, or the role information corresponding to the current visitor.

223345695632****
PolicyTypestring

The type of the policy that causes the access denied error.

  • ControlPolicy: control policy
  • SessionPolicy: Temporary Token additional permission policy
  • AssumeRolePolicy: RAM role trust policy
  • AccountLevelIdentityBasedPolicy: Principal policy within account authorization scope, including custom policies and system policies
  • ResourceGroupLevelIdentityBasedPolicy: Principal policy within resource group authorization scope, including custom policies and system policies.
ControlPolicy
NoPermissionTypestring

The type of the policy denial. Valid values:

  • ImplicitDeny: Resource owner has not configured relevant permission policies for the current user, default denial of unauthorized operations.
  • ExplicitDeny: RAM policies configured by the resource owner explicitly deny the current user access to corresponding resources
ImplicitDeny
Suggestionstring

Based on diagnostic information, recommends configurations for customers to perform in the RAM system.

Grant the system RAM policy 'AliyunADBDeveloperAccess' to current RAM user can quickly solve this issue.

Examples

Sample success responses

JSONformat

{
  "RequestId": "642F3512-C628-5D0C-8815-F6670C****",
  "Data": {
    "Passed": true,
    "DeniedDetail": {
      "ResourceOwnerId": "11685695632****",
      "Action": "ListSparkApps",
      "PrincipalType": "SubUser",
      "ResourceAuthTargetInfo": "223345695632****\n",
      "PolicyType": "ControlPolicy",
      "NoPermissionType": "ImplicitDeny"
    },
    "Suggestion": "Grant the system RAM policy 'AliyunADBDeveloperAccess' to current RAM user can quickly solve this issue."
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Spark.InvalidParameterSpark parameter is not valid, please check error info: %s.Spark parameter error, error message: %s.
400Spark.InvalidStateThe object of the operation is in an invalid state: %sThe operation object is invalid.

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