Grant permissions to a RAM user

Updated at:

To access EMR Workflow as a RAM user and perform operations such as creating and deleting workspaces, provisioning new scheduling resource groups, and binding or unbinding clusters or cluster templates, you must grant the required permissions to the RAM user.

Prerequisites

You have a RAM user. For detailed instructions, see Create a RAM user.

Procedure

Console operations

  1. Log on to the RAM console with your Alibaba Cloud account (main account).

  2. In the left-side navigation pane, choose Identities > Users.

  3. On the Users page, find the required RAM user, and click Add Permissions in the Actions column. You can also select multiple RAM users and click Add Permissions in the lower part of the page to grant permissions to the RAM users at a time.

  4. In the Add Authorization panel, add the AliyunEMRWorkflowAdmin policy to the RAM user.

    Parameter

    Description

    Scope

    Select the scope of the permissions:

    • Entire cloud account: The policy applies within the current Alibaba Cloud account.

    • Specified resource group: The policy applies only within the specified resource group.

    Principal

    The identity that receives the permissions. By default, this is the current RAM user, but you can also add other RAM users.

    Select Permissions

    Search for and select the AliyunEMRWorkflowAdmin policy under system policy.

    Contents of the AliyunEMRWorkflowAdmin policy

    {
        "Version": "1",
        "Statement": [
            {
                "Action": [
                    "emrstudio:CreateWfWorkspace",
                    "emrstudio:DeleteWfWorkspace",
                    "emrstudio:CreateResourceGroup",
                    "emrstudio:ListSupportToBindVSwitches",
                    "emrstudio:ListSupportToBindClusterTemplates",
                    "emrstudio:ListSupportToBindClusters",
                    "emrstudio:ListBoundClusterTemplates",
                    "emrstudio:ListBoundClusters",
                    "emrstudio:QueryResourceGroupListPaging",
                    "emrstudio:GetResourceGroup",
                    "emrstudio:ListAssociatedWorkspaces",
                    "emrstudio:DeleteResourceGroup",
                    "emrstudio:UnindClusterTemplate",
                    "emrstudio:BindClusterTemplate",
                    "emrstudio:UnbindCluster",
                    "emrstudio:BindCluster",
                    "emrstudio:DisAssociateResourceGroupWithWorkspace",
                    "emrstudio:AssociateResourceGroupWithWorkspace",
                    "emrstudio:StartService",
                    "emrstudio:ListSupportClusterTypes",
                    "emrstudio:ListAvailableVSwitchZones",
                    "emrstudio:GetMetricData",
                    "emrstudio:GetMetricConfig"
                ],
                "Effect": "Allow",
                "Resource": "*"
            }
        ]
    }
  5. Click OK.

  6. Click Close.

API operations

  1. Log on to the RAM console with the Alibaba Cloud account (main account) that owns the RAM user.

  2. Create a custom policy named AliyunEmrWorkflowPolicyForApi.

    1. In the left-side navigation pane, choose Permission Settings > policies.

    2. Click Create policy.

    3. On the Create Policy page, click the Script tab.

    4. Enter the following policy content, and then click OK.

      {
          "Version": "1",
          "Statement": [
              {
                  "Effect": "Allow",
                  "Action": [
                      "emrstudio:*"
                  ],
                  "Resource": "acs:emrstudio:*:*:*"
              }
          ]
      }
    5. Enter AliyunEmrWorkflowPolicyForApi as the policy name, and then click OK.

  3. Grant permissions to the RAM user.

    1. In the left-side navigation pane, choose Identities > Users.

    2. On the User page, find the target RAM user, and then click Add Permission in the Actions column.

      image

      You can also select multiple RAM users and click Add Permission below the user list to grant permissions to multiple users at once.

    3. In the Add Authorization panel, add the AliyunEmrWorkflowPolicyForApi policy to the RAM user.

      Parameter

      Description

      Scope

      Leave the scope set to the default, Account level, which applies the policy to the entire Alibaba Cloud account.

      Principal

      The identity that receives the permissions. By default, this is the current RAM user, but you can also add other RAM users.

      Select Permissions

      Search for and select the AliyunEmrWorkflowPolicyForApi policy under custom policies.

  4. Click OK.

  5. Click Close.