Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloudrun usage details

Hi All,

I have a requirement to identify whether a particular cloud run is being called / invoked in last 30 days. We deploy multiple versions of cloud runs in to out GCP projects and I need to identify the cloud runs that are not being invoked in last 30 days and then delete them accordingly from the project.

Can someone point me to if there are any api calls that can be done to identify them 

 

Regards,

Pradeep

1 1 128
1 REPLY 1

In the Managing services page, the section Deleting existing services, mentions deleting a service using Eventarc triggers. You can consult the Create a trigger for Cloud Run to check all the details.

As you talked about API calls, you can also use the gcloud eventarc triggers delete; or if you don’t want to use eventarc triggers, you can also use gcloud run services delete, with another trigger of your choice, like an HTTP request or Triggering from Pub/sub, etc.

Lastly, check the Rollbacks, gradual rollouts, and traffic migration page, to manage the traffic as you can’t Delete revisions if:

  • it is able to receive traffic,
  • it is the only revision of the service,
  • it is the latest revision of the service.