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
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 Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| adb:GetADBSparkNecessaryRAMPermissions | get | *DBCluster acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| DBClusterId | string | Yes | 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
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 code | Error code | Error message | Description |
|---|---|---|---|
| 400 | Spark.InvalidParameter | Spark parameter is not valid, please check error info: %s. | Spark parameter error, error message: %s. |
| 400 | Spark.InvalidState | The object of the operation is in an invalid state: %s | The operation object is invalid. |
For a list of error codes, visit the Service error codes.
