All Products
Search
Document Center

Hologres:Service-linked role for Hologres

Last Updated:Jun 18, 2024

A service-linked role is a RAM role whose trusted entity is an Alibaba Cloud service. Service-linked roles can implement authorized access across Alibaba Cloud services. If you want to use Hologres to access MaxCompute, you must create the service-linked role AliyunServiceRoleForHologresIdentityMgmt. This topic describes how to create the service-linked role AliyunServiceRoleForHologresIdentityMgmt and grant permissions to the service-linked role. This topic also describes how to view and delete the service-linked role.

For more information, see Service-linked roles.

Introduction to AliyunServiceRoleForHologresIdentityMgmt

Description

  • Service name: identity.hologres.aliyuncs.com.

  • Role name: AliyunServiceRoleForHologresIdentityMgmt.

  • Role description: Hologres uses the service-linked role to access your resources in MaxCompute.

Create the service-linked role AliyunServiceRoleForHologresIdentityMgmt and grant permissions to the role

You can use one of the following methods to create the service-linked role AliyunServiceRoleForHologresIdentityMgmt and grant permissions to the role:

Note

If you want to use a RAM user to create the service-linked role AliyunServiceRoleForHologresIdentityMgmt, you must grant the CreateServiceLinkedRole permission to the RAM user. For more information, see the "Permissions required to create and delete a service-linked role" section in Service-linked roles.

New instances

On the Hologres instance buy page, click Create Service-linked Role and grant permissions to the service-linked role.image

Existing instances

If you do not need to purchase an instance or upgrade an instance, you can go to the RAM Quick Authorization page or call an API operation to create the service-linked role and grant permissions to the role.

  • Log on to the Hologres console and go to the RAM Quick Authorization page to grant permissions to the service-linked role.

  • Call an API operation.

    1. Log on to OpenAPI Portal.

    2. On the Parameters tab, set ServiceName to identity.hologres.aliyuncs.com.

    3. Click Initiate Call.

      After the API operation is successfully called, you can view the service-linked role in the Resource Access Management (RAM) console.image

View permissions

You can perform the following steps to view the permissions of the created service-linked role AliyunServiceRoleForHologresIdentityMgmt.

  1. Log on to the RAM console by using your Alibaba Cloud account or as a RAM user that has administrative permissions.

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

  3. On the Roles page, search for AliyunServiceRoleForHologresIdentityMgmt and click the name of the role.

  4. On the Permissions tab, click the policy that is displayed.

  5. On the Policy Document tab, view details of the policy.

    Note

    You can only view the policy for the service-linked role AliyunServiceRoleForHologresIdentityMgmt. You cannot modify the policy.

Delete the service-linked role

To prohibit Hologres from accessing MaxCompute, you can delete the service-linked role AliyunServiceRoleForHologresIdentityMgmt in the RAM console. For more information, see Delete a RAM role.

Note
  • When you delete the service-linked role AliyunServiceRoleForHologresIdentityMgmt, the permissions that are granted to the service-linked role are also revoked.

  • If you want to use a RAM user to delete the service-linked role, you must grant the DeleteServiceLinkedRole permission to the RAM user. For more information, see the "Permissions required to create and delete a service-linked role" section in Service-linked roles.

FAQ

  • Question 1: When I click Create Service-linked Role on the Hologres instance buy page, the following message is displayed: "The user does not have the permissions to create service-linked roles. Contact the Alibaba Cloud account or the permission administrator to authorize the user." What do I do?

    Solution: Use your Alibaba Cloud account to grant the CreateServiceLinkedRole permission to the RAM user. For more information, see Service-linked roles.

  • Question 2: When I access MaxCompute foreign tables in Hologres, one of the following error messages is displayed. What do I do?

    • Error message 1: ERROR: Fail to access foreign data as user 1063806044629636, AliyunServiceRoleForHologresIdentityMgmt does not exist.

    • Error message 2: ErrorMessage=ODPS-0420095: Access Denied - Authorization Failed [4111], You have NO privilege \'odps:ActOnBehalfOfAnotherUser\' on {acs:odps:regions_id:xxxxxx:users/default/aliyun/xxxxxx. Not pass by ram permission check.

    Solution: Grant permissions to the service-linked role AliyunServiceRoleForHologresIdentityMgmt again. You can follow the steps of granting permissions for existing instances in the Hologres console in Create the service-linked role AliyunServiceRoleForHologresIdentityMgmt and grant permissions to the role of this topic.