すべてのプロダクト
Search
ドキュメントセンター

API Gateway:マイクロサービス統合のためのサービスにリンクされたロール-AliyunServiceRoleForApiGatewayIntegrateWithMicroservices

最終更新日:Jul 31, 2024

このトピックでは、Resource Access Management (RAM) ロールApiGateway - IntegrateWithMicroservicesが他のAlibaba Cloudサービス内のリソースにアクセスするために使用するサービスにリンクされたロールAliyunServiceRoleForApiGatewayIntegrateWithMicroservicesについて説明します。

背景

ApiGateway - IntegrateWithMicroservicesは、API Gatewayがエンタープライズ分散アプリケーションサービス (EDAS) およびマイクロサービスエンジン (MSE) のリソースにアクセスするために使用するRAMロールです。 サービスにリンクされたロールの詳細については、「サービスにリンクされたロール」をご参照ください。

シナリオ

EDASタイプのバックエンドサービスを作成する場合、EDASタイプのバックエンドサービスをインポートする場合、またはEDASからAPIをインポートする場合、API Gatewayは、システムがサービスにリンクされたロールを作成することを求めます。 システム要求を承認すると、システムは自動的にサービスにリンクされたロールを作成し、そのロールにポリシーをアタッチします。 このように、API Gatewayは他のクラウドサービスのリソースにアクセスする権限を持ちます。

AliyunServiceRoleForApiGatewayIntegrateWithMicroservicesの説明

ロール名: AliyunServiceRoleForApiGatewayIntegrateWithMicroservices 役割ポリシー: AliyunServiceRolePolicyForApiGatewayIntegrateWithMicroservices ポリシーの内容:

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "edas:ReadApplication",
        "edas:ReadNamespace",
        "edas:ReadService"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "mse:ListAnsServices",
        "mse:ListAnsInstances",
        "mse:ListClusters",
        "mse:QueryInstancesInfo",
        "mse:QueryClusterInfo"
      ],
      "Resource": "*"
    },
    {
      "Action": "ram:DeleteServiceLinkedRole",
      "Resource": "*",
      "Effect": "Allow",
      "Condition": {
        "StringEquals": {
          "ram:ServiceName": "microservice-integration.apigateway.aliyuncs.com"
        }
      }
    }
  ]
}

AliyunServiceRoleForApiGatewayIntegrateWithMicroservicesを削除

サービスにリンクされたロールを削除する場合は、まずこのロールに依存するバックエンドサービスを削除する必要があります。 手順:

  1. API Gatewayコンソールにログインします。 左側のナビゲーションウィンドウで、[APIの管理] > [バックエンドサービス] を選択します。

  2. [バックエンドサービス] ページで、[タイプ] ドロップダウンリストから [EDAS] を選択し、EDASタイプのバックエンドサービスを除外します。 次に、削除するサービスを見つけて、[操作] 列の [削除] をクリックします。

  3. RAM コンソール にログインします。 左側のナビゲーションウィンドウで、[アイデンティティ] > [ロール] を選択します。 ロールAliyunServiceRoleForApiGatewayIntegrateWithMicroservicesを見つけ、[操作] 列の [ロールの削除] をクリックします。

よくある質問

RAMユーザーとして自动的にAliyunServiceRoleForApiGatewayIntegrateWithMicroservicesが作成されないのはなぜですか?

必要な権限がありません。 RAMアカウントが属するAlibaba Cloudアカウントの所有者に、次のポリシーをアタッチするよう要求できます。

{

{
    "Statement": [
        {
            "Action": "ram:CreateServiceLinkedRole",
            "Resource": "*",
            "Effect": "Allow",
            "Condition": {
                "StringEquals": {
                    "ram:ServiceName": "microservice-integration.apigateway.aliyuncs.com"
                }
            }
        }
    ],
    "Version": "1"
}