Google Cloud Platform · Arazzo Workflow

Google Cloud Platform Label Project and Poll Operation

Version 1.0.0

Read a project, patch its labels, poll the operation, then confirm the new labels.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub API ManagementCloud ComputingInfrastructurePlatform-as-a-ServiceArazzoWorkflows

Provider

google-cloud-platform

Workflows

label-project-and-poll
Set labels on a Google Cloud project and wait for the operation.
Reads the project, patches its labels, polls the operation until done, then re-reads to confirm.
4 steps inputs: labels, projectId outputs: newLabels, operationName, previousLabels
1
getBefore
Read the project to capture its existing labels before the change.
2
patchLabels
Patch the project labels with an update mask scoped to labels. Returns a long-running Operation whose name is used to poll.
3
pollOperation
Poll the patch operation by name until the done flag is true.
4
getAfter
Re-read the project to confirm the new labels took effect.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Google Cloud Platform Label Project and Poll Operation
  summary: Read a project, patch its labels, poll the operation, then confirm the new labels.
  description: >-
    Applies organizational labels to a project. Because project updates are
    asynchronous, the patch call with an updateMask scoped to labels returns a
    long-running Operation whose name is polled with operations.get until done,
    after which the project is re-read to confirm the labels. Every step spells
    out its request inline so the flow can be read and executed without opening
    the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: operationsApi
  url: ../openapi/google-cloud-platform-operations-api-openapi.yml
  type: openapi
- name: projectsApi
  url: ../openapi/google-cloud-platform-projects-api-openapi.yml
  type: openapi
workflows:
- workflowId: label-project-and-poll
  summary: Set labels on a Google Cloud project and wait for the operation.
  description: >-
    Reads the project, patches its labels, polls the operation until done, then
    re-reads to confirm.
  inputs:
    type: object
    required:
    - projectId
    - labels
    properties:
      projectId:
        type: string
        description: The project id to label (e.g. my-app-prod-123).
      labels:
        type: object
        description: The map of label key/value pairs to set on the project.
  steps:
  - stepId: getBefore
    description: >-
      Read the project to capture its existing labels before the change.
    operationId: cloudresourcemanager.projects.get
    parameters:
    - name: projectId
      in: path
      value: $inputs.projectId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      previousLabels: $response.body#/labels
  - stepId: patchLabels
    description: >-
      Patch the project labels with an update mask scoped to labels. Returns a
      long-running Operation whose name is used to poll.
    operationId: cloudresourcemanager.projects.patch
    parameters:
    - name: projectId
      in: path
      value: $inputs.projectId
    - name: updateMask
      in: query
      value: labels
    requestBody:
      contentType: application/json
      payload:
        labels: $inputs.labels
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      operationName: $response.body#/name
  - stepId: pollOperation
    description: >-
      Poll the patch operation by name until the done flag is true.
    operationId: cloudresourcemanager.operations.get
    parameters:
    - name: name
      in: path
      value: $steps.patchLabels.outputs.operationName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      done: $response.body#/done
    onSuccess:
    - name: operationComplete
      type: goto
      stepId: getAfter
      criteria:
      - context: $response.body
        condition: $.done == true
        type: jsonpath
    - name: stillRunning
      type: goto
      stepId: pollOperation
      criteria:
      - context: $response.body
        condition: $.done == false
        type: jsonpath
  - stepId: getAfter
    description: >-
      Re-read the project to confirm the new labels took effect.
    operationId: cloudresourcemanager.projects.get
    parameters:
    - name: projectId
      in: path
      value: $inputs.projectId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      newLabels: $response.body#/labels
  outputs:
    previousLabels: $steps.getBefore.outputs.previousLabels
    newLabels: $steps.getAfter.outputs.newLabels
    operationName: $steps.patchLabels.outputs.operationName

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/google-cloud-platform-label-project-and-poll-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.