Privileged Access Manager 設定閲覧者は、組織、フォルダ、プロジェクトの Privileged Access Manager 設定を表示できます。Google Cloud CLI を使用して設定をプログラムでエクスポートすることもできます。
始める前に
Privileged Access Manager の設定を表示するために必要な権限を取得するには、組織、フォルダ、またはプロジェクトに対する次の IAM ロールを付与するよう管理者に依頼します。
-
設定を表示するには:
PAM 設定閲覧者 (
roles/privilegedaccessmanager.settingsViewer
)
ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。
これらの事前定義ロールには、Privileged Access Manager の設定を表示するために必要な権限が含まれています。必要とされる正確な権限については、「必要な権限」セクションを開いてご確認ください。
必要な権限
Privileged Access Manager の設定を表示するには、次の権限が必要です。
-
設定を表示するには:
-
privilegedaccessmanager.settings.get
-
privilegedaccessmanager.settings.fetchEffective
-
カスタムロールや他の事前定義ロールを使用して、これらの権限を取得することもできます。
設定を表示
コンソール
[Privileged Access Manager] ページに移動します。
Privileged Access Manager の設定を表示する組織、フォルダ、またはプロジェクトを選択します。
[Settings] タブをクリックします。
[設定] ページに、選択したリソースの Privileged Access Manager の設定の詳細が表示されます。
gcloud
リソースの次の設定を表示できます。
- リソースに直接設定された個々の設定。
リソースに設定されているか、親リソースから継承されている有効な設定。
リソースの個々の設定を表示する
gcloud alpha pam settings describe
コマンドは、Privileged Access Manager の設定を表示します。後述のコマンドデータを使用する前に、次のように置き換えます。
RESOURCE_TYPE
: 省略可。設定を取得するリソースタイプ。値organization
、folder
、またはproject
を使用します。RESOURCE_ID
:RESOURCE_TYPE
とともに使用します。利用資格を管理する Google Cloudプロジェクト、フォルダ、または組織の ID。プロジェクト ID は英数字からなる文字列です(例:my-project
)。フォルダ ID と組織 ID は数値です(例:123456789012
)。
次のコマンドを実行します。
Linux、macOS、Cloud Shell
gcloud alpha pam settings describe \ --location=global \ -- RESOURCE_TYPE=RESOURCE_ID \
Windows(PowerShell)
gcloud alpha pam settings describe ` --location=global ` -- RESOURCE_TYPE=RESOURCE_ID `
Windows(cmd.exe)
gcloud alpha pam settings describe ^ --location=global ^ -- RESOURCE_TYPE=RESOURCE_ID ^
次のようなレスポンスが返されます。
createTime: '2025-05-18T10:10:10.101010101Z' emailNotificationSettings: customNotificationBehavior: adminNotifications: grantActivated: ENABLED grantActivationFailed: DISABLED grantEnded: ENABLED grantExternallyModified: ENABLED approverNotifications: pendingApproval: ENABLED requesterNotifications: entitlementAssigned: ENABLED grantActivated: ENABLED grantExpired: ENABLED grantRevoked: ENABLED etag: "ZjlkNWZlMWUtNDlhYS00YjJjAYlzNWYtZWFkNGVjOWU3NWMkBwYRsottW5Md" name: RESOURCE_TYPE/RESOURCE_ID/locations/global/settings serviceAccountApproverSettings: enabled: true updateTime: '2025-05-18T10:10:10.101010101Z'
リソースの効果的な設定を表示する
gcloud alpha pam settings describe-effective
コマンドは、Privileged Access Manager の設定を表示します。後述のコマンドデータを使用する前に、次のように置き換えます。
RESOURCE_TYPE
: 省略可。設定を取得するリソースタイプ。値organization
、folder
、またはproject
を使用します。RESOURCE_ID
:RESOURCE_TYPE
とともに使用します。利用資格を管理する Google Cloudプロジェクト、フォルダ、または組織の ID。プロジェクト ID は英数字からなる文字列です(例:my-project
)。フォルダ ID と組織 ID は数値です(例:123456789012
)。
次のコマンドを実行します。
Linux、macOS、Cloud Shell
gcloud alpha pam settings describe-effective \ --location=global \ --RESOURCE_TYPE=RESOURCE_ID \
Windows(PowerShell)
gcloud alpha pam settings describe-effective ` --location=global ` --RESOURCE_TYPE=RESOURCE_ID `
Windows(cmd.exe)
gcloud alpha pam settings describe-effective ^ --location=global ^ --RESOURCE_TYPE=RESOURCE_ID ^
次のようなレスポンスが返されます。
emailNotificationSettings: customNotificationBehavior: adminNotifications: notifyGrantActivated: true notifyGrantActivationFailed: true notifyGrantEnded: true notifyGrantExternallyModified: true approverNotifications: notifyPendingApproval: true requesterNotifications: notifyEntitlementAssigned: true notifyEntitlementUpdated: true notifyGrantActivated: true notifyGrantActivationFailed: true notifyGrantEnded: true notifyGrantExpired: true notifyGrantExternallyModified: true notifyGrantRevoked: true parent: RESOURCE_TYPE/RESOURCE_ID/locations/global serviceAccountApproverSettings: {}
REST
リソースの次の設定を表示できます。
- リソースに直接設定された個々の設定。
リソースに設定されているか、親リソースから継承されている有効な設定。
リソースの個々の設定を表示する
Privileged Access Manager API の
getSettings
メソッドは、Privileged Access Manager の設定を表示します。リクエストのデータを使用する前に、次のように置き換えます。
SCOPE
: 設定を取得する組織、フォルダ、またはプロジェクト。organizations/ORGANIZATION_ID
、folders/FOLDER_ID
、projects/PROJECT_ID
の形式で指定します。プロジェクト ID は英数字からなる文字列です(例:my-project
)。フォルダ ID と組織 ID は数値です(例:123456789012
)。
HTTP メソッドと URL:
GET https://privilegedaccessmanager.googleapis.com/v1beta/SCOPE/locations/global/settings
リクエストを送信するには、次のいずれかのオプションを展開します。
次のような JSON レスポンスが返されます。
{ "createTime": "2025-05-18T10:10:10.101010101Z", "emailNotificationSettings": { "customNotificationBehavior": { "adminNotifications": { "grantActivated": "ENABLED", "grantActivationFailed": "DISABLED", "grantEnded": "ENABLED", "grantExternallyModified": "ENABLED" }, "approverNotifications": { "pendingApproval": "ENABLED" }, "requesterNotifications": { "entitlementAssigned": "ENABLED", "grantActivated": "ENABLED", "grantExpired": "ENABLED", "grantRevoked": "ENABLED" } } }, "etag": "\"ZjlkNWZlMWUtNDlhYS00YjJjAYlzNWYtZWFkNGVjOWU3NWMkBwYRsottW5Md\"", "name": "SCOPE/locations/global/settings", "serviceAccountApproverSettings": { "enabled": true }, "updateTime": "2025-05-18T10:10:10.101010101Z" }
リソースの効果的な設定を表示する
Privileged Access Manager API の
fetchEffectiveSettings
メソッドは、Privileged Access Manager の設定を表示します。リクエストのデータを使用する前に、次のように置き換えます。
SCOPE
: 設定を取得する組織、フォルダ、またはプロジェクト。organizations/ORGANIZATION_ID
、folders/FOLDER_ID
、projects/PROJECT_ID
の形式で指定します。プロジェクト ID は英数字からなる文字列です(例:my-project
)。フォルダ ID と組織 ID は数値です(例:123456789012
)。
HTTP メソッドと URL:
GET https://privilegedaccessmanager.googleapis.com/v1beta/SCOPE/locations/global:effectiveSettings
リクエストを送信するには、次のいずれかのオプションを展開します。
次のような JSON レスポンスが返されます。
{ "emailNotificationSettings": { "customNotificationBehavior": { "adminNotifications": { "notifyGrantActivated": "true", "notifyGrantActivationFailed": "true", "notifyGrantEnded": "true", "notifyGrantExternallyModified": "true" }, "approverNotifications": { "notifyPendingApproval": "true" }, "requesterNotifications": { "notifyEntitlementAssigned": "true", "notifyEntitlementUpdated": "true", "notifyGrantActivated": "true", "notifyGrantActivationFailed": "true", "notifyGrantEnded": "true", "notifyGrantExpired": "true", "notifyGrantExternallyModified": "true", "notifyGrantRevoked": "true" } } }, "parent": "SCOPE/locations/global", "serviceAccountApproverSettings": {} }
gcloud CLI を使用して設定をプログラムでエクスポートする
gcloud alpha pam settings export
コマンドは、特定のリソースの設定を取得してエクスポートします。
後述のコマンドデータを使用する前に、次のように置き換えます。
FILENAME
: 設定の内容をエクスポートするファイル名。RESOURCE_TYPE
: 省略可。対応するリソースが属するリソースタイプ。値organization
、folder
、またはproject
を使用します。RESOURCE_ID
:RESOURCE_TYPE
とともに使用します。利用資格を管理する Google Cloudプロジェクト、フォルダ、または組織の ID。プロジェクト ID は英数字からなる文字列です(例:my-project
)。フォルダ ID と組織 ID は数値です(例:123456789012
)。
次のコマンドを実行します。
Linux、macOS、Cloud Shell
gcloud alpha pam settings export \ --destination=FILENAME.yaml \ --location=global \ -- RESOURCE_TYPE=RESOURCE_ID
Windows(PowerShell)
gcloud alpha pam settings export ` --destination=FILENAME.yaml ` --location=global ` -- RESOURCE_TYPE=RESOURCE_ID
Windows(cmd.exe)
gcloud alpha pam settings export ^ --destination=FILENAME.yaml ^ --location=global ^ -- RESOURCE_TYPE=RESOURCE_ID
次のようなレスポンスが返されます。
Exported [RESOURCE_TYPE/RESOURCE_ID/locations/global/settings] to FILENAME.yaml.