ロールの設定
このドキュメントでは、ルート最適化の Identity and Access Management(IAM)のロールと権限について説明します。IAM を使用すると、特定のルート オプティマイゼーション リソースに対するアクセス権をきめ細かく設定し、他のリソースへのアクセスを防ぐことができます。IAM を使用すると、最小権限のセキュリティ原則を適用できます。この原則では、必要以上に多くの権限を付与しないことが規定されています。
プリンシパル(ユーザー、グループ、またはサービス アカウント)が Google Cloud API を呼び出す場合、そのプリンシパルにはリソースを使用するための適切な IAM 権限が必要です。プリンシパルに必要な権限を付与するには、プリンシパルに IAM ロールを付与します。
Google Cloud でのアクセス管理の概要を把握するには、IAM の概要をご覧ください。
プリンシパルがルート オプティマイゼーションにアクセスできるようにする事前定義された IAM ロールは次のとおりです。
-
Route Optimization Editor (roles/routeoptimization.editor)
: ユーザーまたはサービス アカウントに、プロジェクト内のルート最適化リソースに対する読み取りと書き込みのアクセス権を付与します。これには、OptimizeTours
と BatchOptimizeTours
を呼び出す機能や、GetOperation
を使用して長時間実行オペレーションを取得する機能が含まれます。
-
Route Optimization Viewer (roles/routeoptimization.viewer)
: プロジェクト内のルート最適化リソースへの読み取り専用アクセス権を付与します。このロールでは、OptimizeTours
を呼び出し、GetOperation
を使用して長時間実行オペレーションにアクセスできます。
ロールを割り当てるには、Cloud SDK を使用してプリンシパルのバインディングを作成します。
gcloud projects add-iam-policy-binding PROJECT \
--member user:someone@example.com \
--role roles/routeoptimization.editor
詳細については、
Google Cloud コンソールを使用して IAM ロールを付与するをご覧ください。
次のステップ
ロールを構成したら、OAuth トークンを作成する必要があります。
OAuth を使用する
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-12-03 UTC。
[null,null,["最終更新日 2024-12-03 UTC。"],[[["Route Optimization utilizes Identity and Access Management (IAM) to control access to its resources, enabling you to grant specific permissions to users, groups, or service accounts."],["IAM roles like `Route Optimization Editor` and `Route Optimization Viewer` provide predefined permission sets for managing and viewing Route Optimization resources."],["Users or service accounts need appropriate IAM permissions to interact with Google Cloud APIs and use Route Optimization features like `OptimizeTours` and `BatchOptimizeTours`."],["The principle of least privilege is enforced by IAM, ensuring that users have only the necessary permissions for their tasks."],["After role configuration, an OAuth token is required for authentication when using Route Optimization."]]],["IAM roles control access to Route Optimization resources. Principals require appropriate IAM permissions to use Google Cloud APIs. The `Route Optimization Editor` role grants read/write access, including calling `OptimizeTours`, `BatchOptimizeTours`, and `GetOperation`. The `Route Optimization Viewer` role offers read-only access, enabling `OptimizeTours` and `GetOperation`. Roles are assigned to principals through IAM bindings in the Cloud SDK using `gcloud`. After roles are configured, you must create an OAuth token.\n"]]