Method: googleapis.cloudbuild.v1.projects.triggers.patch

Updates a BuildTrigger by its project ID and trigger ID. This API is experimental.

Arguments

Parameters
projectId

string

Required. ID of the project that owns the trigger.

triggerId

string

Required. ID of the BuildTrigger to update.

body

object (BuildTrigger)

Required.

Raised exceptions

Exceptions
ConnectionError In case of a network problem (such as DNS failure or refused connection).
HttpError If the response status is >= 400 (excluding 429 and 503).
TimeoutError If a long-running operation takes longer to finish than the specified timeout limit.
TypeError If an operation or function receives an argument of the wrong type.
ValueError If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout.

Response

If successful, the response contains an instance of BuildTrigger.

Subworkflow snippet

Some fields might be optional or required. To identify required fields, refer to the API documentation.

YAML

- patch:
    call: googleapis.cloudbuild.v1.projects.triggers.patch
    args:
        projectId: ...
        triggerId: ...
        body:
            approvalConfig:
                approvalRequired: ...
            autodetect: ...
            build:
                artifacts:
                    images: ...
                    objects:
                        location: ...
                        paths: ...
                availableSecrets:
                    inline: ...
                    secretManager: ...
                images: ...
                logsBucket: ...
                options:
                    diskSizeGb: ...
                    dynamicSubstitutions: ...
                    env: ...
                    logStreamingOption: ...
                    logging: ...
                    machineType: ...
                    pool:
                        name: ...
                    requestedVerifyOption: ...
                    secretEnv: ...
                    sourceProvenanceHash: ...
                    substitutionOption: ...
                    volumes: ...
                    workerPool: ...
                queueTtl: ...
                secrets: ...
                serviceAccount: ...
                source:
                    repoSource:
                        branchName: ...
                        commitSha: ...
                        dir: ...
                        invertRegex: ...
                        projectId: ...
                        repoName: ...
                        substitutions: ...
                        tagName: ...
                    storageSource:
                        bucket: ...
                        generation: ...
                        object: ...
                    storageSourceManifest:
                        bucket: ...
                        generation: ...
                        object: ...
                steps: ...
                substitutions: ...
                tags: ...
                timeout: ...
            description: ...
            disabled: ...
            filename: ...
            filter: ...
            gitFileSource:
                path: ...
                repoType: ...
                revision: ...
                uri: ...
            github:
                enterpriseConfigResourceName: ...
                installationId: ...
                name: ...
                owner: ...
                pullRequest:
                    branch: ...
                    commentControl: ...
                    invertRegex: ...
                push:
                    branch: ...
                    invertRegex: ...
                    tag: ...
            ignoredFiles: ...
            includedFiles: ...
            name: ...
            pubsubConfig:
                serviceAccountEmail: ...
                state: ...
                topic: ...
            resourceName: ...
            serviceAccount: ...
            sourceToBuild:
                ref: ...
                repoType: ...
                uri: ...
            substitutions: ...
            tags: ...
            triggerTemplate: ...
            webhookConfig:
                secret: ...
                state: ...
    result: patchResult

JSON

[
  {
    "patch": {
      "call": "googleapis.cloudbuild.v1.projects.triggers.patch",
      "args": {
        "projectId": "...",
        "triggerId": "...",
        "body": {
          "approvalConfig": {
            "approvalRequired": "..."
          },
          "autodetect": "...",
          "build": {
            "artifacts": {
              "images": "...",
              "objects": {
                "location": "...",
                "paths": "..."
              }
            },
            "availableSecrets": {
              "inline": "...",
              "secretManager": "..."
            },
            "images": "...",
            "logsBucket": "...",
            "options": {
              "diskSizeGb": "...",
              "dynamicSubstitutions": "...",
              "env": "...",
              "logStreamingOption": "...",
              "logging": "...",
              "machineType": "...",
              "pool": {
                "name": "..."
              },
              "requestedVerifyOption": "...",
              "secretEnv": "...",
              "sourceProvenanceHash": "...",
              "substitutionOption": "...",
              "volumes": "...",
              "workerPool": "..."
            },
            "queueTtl": "...",
            "secrets": "...",
            "serviceAccount": "...",
            "source": {
              "repoSource": {
                "branchName": "...",
                "commitSha": "...",
                "dir": "...",
                "invertRegex": "...",
                "projectId": "...",
                "repoName": "...",
                "substitutions": "...",
                "tagName": "..."
              },
              "storageSource": {
                "bucket": "...",
                "generation": "...",
                "object": "..."
              },
              "storageSourceManifest": {
                "bucket": "...",
                "generation": "...",
                "object": "..."
              }
            },
            "steps": "...",
            "substitutions": "...",
            "tags": "...",
            "timeout": "..."
          },
          "description": "...",
          "disabled": "...",
          "filename": "...",
          "filter": "...",
          "gitFileSource": {
            "path": "...",
            "repoType": "...",
            "revision": "...",
            "uri": "..."
          },
          "github": {
            "enterpriseConfigResourceName": "...",
            "installationId": "...",
            "name": "...",
            "owner": "...",
            "pullRequest": {
              "branch": "...",
              "commentControl": "...",
              "invertRegex": "..."
            },
            "push": {
              "branch": "...",
              "invertRegex": "...",
              "tag": "..."
            }
          },
          "ignoredFiles": "...",
          "includedFiles": "...",
          "name": "...",
          "pubsubConfig": {
            "serviceAccountEmail": "...",
            "state": "...",
            "topic": "..."
          },
          "resourceName": "...",
          "serviceAccount": "...",
          "sourceToBuild": {
            "ref": "...",
            "repoType": "...",
            "uri": "..."
          },
          "substitutions": "...",
          "tags": "...",
          "triggerTemplate": "...",
          "webhookConfig": {
            "secret": "...",
            "state": "..."
          }
        }
      },
      "result": "patchResult"
    }
  }
]