HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //proc/3485769/root/lib/google-cloud-sdk/lib/surface/builds/approve.yaml
- release_tracks: [BETA]
  command_type: GENERIC
  help_text:
    brief: Approve a pending build.
    description: Approve a pending build.
    examples: |
      To approve a pending build with its ID, run:

        $ {command} build-id

      To approve multiple pending builds, run the command in a for loop:

        $ for i in $(cat build-ids.txt); do {command} $i; done

  request:
    collection: cloudbuild.projects.builds
    api_version: v1
    method: approve
    static_fields:
      approveBuildRequest.approvalResult.decision: APPROVED
  arguments:
    resource:
      help_text: "Build."
      spec: !REF googlecloudsdk.command_lib.cloudbuild.resources:build

    params:
    - api_field: approveBuildRequest.approvalResult.comment
      arg_name: comment
      help_text: Optional comment to annotate the build's approval.
    - api_field: approveBuildRequest.approvalResult.url
      arg_name: url
      help_text: Optional URL to annotate the build's approval.

- release_tracks: [ALPHA]
  command_type: GENERIC
  help_text:
    brief: Approve a pending build.
    description: Approve a pending build.
    examples: |
      To approve a pending build with its ID, run:

        $ {command} projects/{project-id}/locations/{location}/builds/{build-id}

      To approve multiple pending builds, run the command in a for loop:

        $ for i in $(cat builds.txt); do {command} $i; done

  request:
    collection: cloudbuild.projects.locations.builds
    api_version: v1
    method: approve
    static_fields:
      approveBuildRequest.approvalResult.decision: APPROVED
  arguments:
    resource:
      help_text: "Build."
      spec: !REF googlecloudsdk.command_lib.cloudbuild.regional_approval:build

    params:
    - api_field: approveBuildRequest.approvalResult.comment
      arg_name: comment
      help_text: Optional comment to annotate the build's approval.
    - api_field: approveBuildRequest.approvalResult.url
      arg_name: url
      help_text: Optional URL to annotate the build's approval.