googleapis / googleapis/google-cloud-java
CloudRun - Support listing jobs with a label
- Lenguaje dominante
- Java
- Estrellas
- 2.1k
- Forks
- 1.2k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 154
Descripción
**Describe the solution you'd like**
We would like to be able to list CloudRun job using a filter.
Something like the following code snippet (which didn't work yet as there is no `setFilter()` method).
```java
var jobsClient = JobsClient.create();
var existingJob = jobsClient.listJobs(ListJobsRequest.newBuilder()
.setParent(String.format("projects/%s/locations/%s", projectId, region))
.setFilter("labels.key=value")
.build();
```
**Describe alternatives you've considered**
The alternative is to list all jobs and filter later.
However, this didn't scale if there were a lot of jobs.
**Additional context**
It is already possible via gcloud: `gcloud run jobs list --filter "labels.key=value"`.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.