Official Python client library for Google Cloud Privileged Access Manager (PAM), enabling just-in-time, time-bound, and approval-based access to critical Google Cloud resources. As of version 0.4.0 (2025-03-03), the library is in pre-GA (beta) state with stable API surface. Requires Python >=3.9. Release cadence: approximately monthly.
pip install google-cloud-privilegedaccessmanagerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize client and list entitlements. Requires Application Default Credentials (ADC) set up via `gcloud auth application-default login` or a service account key file.
Use `from google.cloud import privilegedaccessmanager` for the client; use `from google.cloud.privilegedaccessmanager_v1 import Entitlement, Grant` for models.
Replace any `google.cloud.privilegedaccessmanager_v1beta1` imports with the equivalent GA module `google.cloud.privilegedaccessmanager_v1`.
Always set the location in the parent path, e.g., `projects/my-project/locations/us-central1`.
Pin version in requirements: `google-cloud-privilegedaccessmanager==0.4.0`.
Use `from google.cloud import privilegedaccessmanager` then `client = privilegedaccessmanager.PrivilegedAccessManagerClient()`.
Grant the necessary roles via `gcloud projects add-iam-policy-binding PROJECT_ID --member='serviceAccount:YOUR_SA' --role='roles/privilegedaccessmanager.admin'`.
Set the GOOGLE_CLOUD_PROJECT environment variable or explicitly pass a project ID in the parent string.