[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# View resource maintenances by using the API\n\nYou can use the Unified Maintenance API to return information about maintenance on your resources.\n\nThis document describes how to use Cloud Shell to call the\nUnified Maintenance API to return resource maintenance.\n\nTo view upcoming and historical maintenance activities in Cloud Hub,\nsee [View maintenance activities](/hub/docs/maintenance).\n\nBefore you begin\n----------------\n\nBefore you view maintenance on your resources using\nUnified Maintenance, verify that Unified Maintenance supports your\n[resource types](/unified-maintenance/docs/supported-services).\n\nFilters\n-------\n\nYou can filter which maintenance activities are returned by several parameters:\n\n- State (`SUCCEEDED`, or `STARTED`, for example)\n- Resource name\n- Resource location\n- Resource type\n- Maintenance name\n- Maintenance start time\n- Maintenance end time\n\nFor more information, see\n[Unified Maintenance API](/unified-maintenance/docs/reference/rest/v1beta/projects.locations.resourceMaintenances/list) documentation.\n\nView resource maintenances\n--------------------------\n\nYou can use the Unified Maintenance API to return maintenance activity\ninformation for a Google Cloud project.\n\nTo list all maintenance activities:\n\n1. Go to Cloud Shell.\n\n\n [Go to Cloud Shell](https://console.cloud.google.com/shell)\n\n \u003cbr /\u003e\n\n2. Run the command:\n\n curl \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type:\n application/json\" \\\n https://maintenance.googleapis.com/v1beta/projects/\u003cvar label=\"project ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar label=\"location\" translate=\"no\"\u003eLOCATION\u003c/var\u003e/resourceMaintenances\n\n Replace:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The project ID of your project.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: Region or zone containing your project. Set to `global`, `region`, or `-` (to match all locations).\n3. Unified Maintenance returns information about resource maintenances for\n your specified project.\n\n### View maintenances for a resource\n\nYou can use the Unified Maintenance API to return maintenances for a\nspecified resource.\n\nTo filter and print maintenances for a specified resource:\n\n1. Go to Cloud Shell.\n\n\n [Go to Cloud Shell](https://console.cloud.google.com/shell)\n\n \u003cbr /\u003e\n\n2. Run the command:\n\n curl \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type:\n application/json\" \\\n https://maintenance.googleapis.com/v1beta/projects/\u003cvar label=\"project ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar label=\"location\" translate=\"no\"\u003eLOCATION\u003c/var\u003e/resourceMaintenances?filter=FILTER=%22\u003cvar label=\"resource name\" translate=\"no\"\u003eRESOURCE_NAME\u003c/var\u003e%22\n\n Replace:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The project ID of your project.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: Region or zone containing your project. Set to `global`, `region`, or `-` (to match all locations).\n - \u003cvar translate=\"no\"\u003eRESOURCE_NAME\u003c/var\u003e: The full resource name of your resource.\n\n| **Note:** For target resources that are regional and global, the location of `ResourceMaintenance` is always the same as the target resource location. \n| For target resources that are zonal, the `ResourceMaintenance` location is a region corresponding to the zone of target resource. For example, for a Cloud SQL instance in the `us-west1-a` zone, the `ResourceMaintenance` is in the `us-west1` region.\n\nWhat's next\n-----------\n\n- Learn how to [configure alerts and notifications](/unified-maintenance/docs/configure-alerts-and-notifications) based on different webhooks.\n- Use Unified Maintenance to [reschedule or perform on-demand updates](/unified-maintenance/docs/reschedule-and-on-demand-updates)."]]