{"id":4957,"library":"google-cloud-appengine-admin","title":"Google Cloud App Engine Admin API","description":"The `google-cloud-appengine-admin` client library for Python allows developers to programmatically manage their Google App Engine applications, including services, versions, instances, and certificates. It is an actively maintained, stable client, part of the larger `google-cloud-python` monorepo, receiving regular updates. The current version is 1.17.0, and it adheres to Google Cloud's client library release cadence.","status":"active","version":"1.17.0","language":"en","source_language":"en","source_url":"https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-appengine-admin","tags":["google cloud","app engine","admin","gcp","cloud administration"],"install":[{"cmd":"pip install google-cloud-appengine-admin","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core library for Google Cloud API clients, handles request/response, retries, etc.","package":"google-api-core","optional":false},{"reason":"Handles authentication with Google Cloud services.","package":"google-auth","optional":false},{"reason":"Used for serializing structured data.","package":"protobuf","optional":false},{"reason":"Provides the gRPC transport for API calls. Included with 'google-api-core[grpc]'.","package":"grpcio","optional":false}],"imports":[{"note":"For explicit versioning, it's recommended to import from `appengine_admin_v1` to ensure you are using the v1 API.","wrong":"from google.cloud.appengine_admin import AppEngineAdminClient","symbol":"AppEngineAdminClient","correct":"from google.cloud import appengine_admin_v1"},{"note":"Accesses specific API message types, like `types.Application` or `types.Service`.","symbol":"types","correct":"from google.cloud.appengine_admin_v1 import types"}],"quickstart":{"code":"import os\nfrom google.cloud import appengine_admin_v1\n\n# Ensure GOOGLE_CLOUD_PROJECT environment variable is set\n# For local development, ensure GOOGLE_APPLICATION_CREDENTIALS is set\n# or a service account key is available and has necessary permissions (e.g., App Engine Admin).\n\nproject_id = os.environ.get(\"GOOGLE_CLOUD_PROJECT\", \"your-gcp-project-id\")\n\ndef list_app_engine_applications(project_id: str):\n    \"\"\"Lists all App Engine applications in the specified project.\"\"\"\n    if project_id == \"your-gcp-project-id\":\n        print(\"Please set the GOOGLE_CLOUD_PROJECT environment variable or replace 'your-gcp-project-id' with your actual project ID.\")\n        return\n\n    try:\n        # Create a client\n        client = appengine_admin_v1.AppEngineAdminClient()\n\n        # The `list_applications` method lists applications associated with the authenticated project.\n        applications = client.list_applications()\n\n        print(f\"App Engine Applications in project '{project_id}':\")\n        found_any = False\n        for app in applications:\n            print(f\"- {app.name} (ID: {app.id}) - Auth Domain: {app.auth_domain})\")\n            found_any = True\n        if not found_any:\n            print(\"No applications found or the App Engine Admin API is not enabled/permissions are insufficient.\")\n\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n        print(\"Ensure the 'App Engine Admin API' is enabled in your GCP project and your credentials have sufficient permissions (e.g., App Engine Admin role).\")\n\nif __name__ == \"__main__\":\n    list_app_engine_applications(project_id)\n","lang":"python","description":"This quickstart demonstrates how to initialize the `AppEngineAdminClient` and list all App Engine applications associated with your Google Cloud project. It relies on standard Google Cloud authentication mechanisms (e.g., `GOOGLE_APPLICATION_CREDENTIALS` environment variable or default credentials). Ensure the App Engine Admin API is enabled in your project and the authenticated principal has the necessary permissions (e.g., `roles/appengine.appAdmin`)."},"warnings":[{"fix":"Upgrade your Python environment to Python 3.9 or newer. Consider migrating App Engine applications from Python 2.7 to Python 3 runtimes as older runtimes are being deprecated.","message":"Python 2.x and older Python 3.x versions are no longer supported. The library requires Python >= 3.9.","severity":"breaking","affected_versions":"<1.17.0 (for Python <3.9)"},{"fix":"Ensure the App Engine Admin API is enabled in the Google Cloud Console. Use `GOOGLE_APPLICATION_CREDENTIALS` for service account keys or configure `gcloud` for user authentication. Grant the necessary IAM roles to your service account or user.","message":"Authentication and authorization are critical. You must enable the App Engine Admin API in your GCP project and provide credentials with appropriate permissions (e.g., `roles/appengine.appAdmin` or `roles/owner`). Additionally, specific OAuth 2.0 scopes like `https://www.googleapis.com/auth/appengine.admin` may be required.","severity":"gotcha","affected_versions":"All"},{"fix":"Migrate your App Engine applications to newer, supported runtimes (e.g., Python 3). This is an App Engine platform-level change, not directly a client library breaking change, but critical for users managing App Engine applications.","message":"The underlying Google App Engine Gen 1 runtimes (e.g., Python 2.7, Java 8) are being deprecated and will no longer be supported after January 31, 2026. While the client library may still function, deployments on these runtimes will cease, and security updates will stop.","severity":"deprecated","affected_versions":"App Engine applications on Gen 1 runtimes"},{"fix":"Refer to the client library documentation for the exact format of resource names required by each method (e.g., `client.get_application(name='apps/' + project_id)`).","message":"Google Cloud resources often use specific 'resource name' formats (e.g., `projects/PROJECT_ID/locations/LOCATION_ID/applications/APPLICATION_ID`). Ensure you construct these names correctly when making API calls that require them.","severity":"gotcha","affected_versions":"All"},{"fix":"Ensure all `google-cloud-` dependencies are installed together using a single `pip install -t lib/ -r requirements.txt` command and start with an empty `lib/` directory. For App Engine Flexible, dependencies are installed automatically from `requirements.txt`.","message":"When deploying Python applications to App Engine Standard environment, vendoring dependencies using `pip install -t lib/` can lead to dependency conflicts if not handled carefully, especially when multiple `google-cloud-` libraries share namespaces.","severity":"gotcha","affected_versions":"App Engine Standard deployments"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}