Send feedback
Method: googleapis.cloudbuild.v1.projects.locations.triggers.patch
Stay organized with collections
Save and categorize content based on your preferences.
Updates a BuildTrigger
by its project ID and trigger ID. This API is
experimental.
Arguments
Parameters
resourceName
string
Required. The Trigger
name with format: projects/{project}/locations/{location}/triggers/{trigger}
, where {trigger} is a unique identifier generated by the service.
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.locations.triggers.patch
args :
resourceName : ...
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.locations.triggers.patch" ,
"args" : {
"resourceName" : "..." ,
"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"
}
}
]
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Method: googleapis.cloudbuild.v1.projects.locations.triggers.patch\n\nUpdates a `BuildTrigger` by its project ID and trigger ID. This API is\nexperimental.\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`BuildTrigger`](/workflows/docs/reference/googleapis/cloudbuild/v1/Overview#BuildTrigger).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/build/docs/api/reference/rest/v1/projects.locations.triggers/patch). \n\n### YAML\n\n```yaml\n- patch:\n call: googleapis.cloudbuild.v1.projects.locations.triggers.patch\n args:\n resourceName: ...\n projectId: ...\n triggerId: ...\n body:\n approvalConfig:\n approvalRequired: ...\n autodetect: ...\n build:\n artifacts:\n images: ...\n objects:\n location: ...\n paths: ...\n availableSecrets:\n inline: ...\n secretManager: ...\n images: ...\n logsBucket: ...\n options:\n diskSizeGb: ...\n dynamicSubstitutions: ...\n env: ...\n logStreamingOption: ...\n logging: ...\n machineType: ...\n pool:\n name: ...\n requestedVerifyOption: ...\n secretEnv: ...\n sourceProvenanceHash: ...\n substitutionOption: ...\n volumes: ...\n workerPool: ...\n queueTtl: ...\n secrets: ...\n serviceAccount: ...\n source:\n repoSource:\n branchName: ...\n commitSha: ...\n dir: ...\n invertRegex: ...\n projectId: ...\n repoName: ...\n substitutions: ...\n tagName: ...\n storageSource:\n bucket: ...\n generation: ...\n object: ...\n storageSourceManifest:\n bucket: ...\n generation: ...\n object: ...\n steps: ...\n substitutions: ...\n tags: ...\n timeout: ...\n description: ...\n disabled: ...\n filename: ...\n filter: ...\n gitFileSource:\n path: ...\n repoType: ...\n revision: ...\n uri: ...\n github:\n enterpriseConfigResourceName: ...\n installationId: ...\n name: ...\n owner: ...\n pullRequest:\n branch: ...\n commentControl: ...\n invertRegex: ...\n push:\n branch: ...\n invertRegex: ...\n tag: ...\n ignoredFiles: ...\n includedFiles: ...\n name: ...\n pubsubConfig:\n serviceAccountEmail: ...\n state: ...\n topic: ...\n resourceName: ...\n serviceAccount: ...\n sourceToBuild:\n ref: ...\n repoType: ...\n uri: ...\n substitutions: ...\n tags: ...\n triggerTemplate: ...\n webhookConfig:\n secret: ...\n state: ...\n result: patchResult\n```\n\n### JSON\n\n```json\n[\n {\n \"patch\": {\n \"call\": \"googleapis.cloudbuild.v1.projects.locations.triggers.patch\",\n \"args\": {\n \"resourceName\": \"...\",\n \"projectId\": \"...\",\n \"triggerId\": \"...\",\n \"body\": {\n \"approvalConfig\": {\n \"approvalRequired\": \"...\"\n },\n \"autodetect\": \"...\",\n \"build\": {\n \"artifacts\": {\n \"images\": \"...\",\n \"objects\": {\n \"location\": \"...\",\n \"paths\": \"...\"\n }\n },\n \"availableSecrets\": {\n \"inline\": \"...\",\n \"secretManager\": \"...\"\n },\n \"images\": \"...\",\n \"logsBucket\": \"...\",\n \"options\": {\n \"diskSizeGb\": \"...\",\n \"dynamicSubstitutions\": \"...\",\n \"env\": \"...\",\n \"logStreamingOption\": \"...\",\n \"logging\": \"...\",\n \"machineType\": \"...\",\n \"pool\": {\n \"name\": \"...\"\n },\n \"requestedVerifyOption\": \"...\",\n \"secretEnv\": \"...\",\n \"sourceProvenanceHash\": \"...\",\n \"substitutionOption\": \"...\",\n \"volumes\": \"...\",\n \"workerPool\": \"...\"\n },\n \"queueTtl\": \"...\",\n \"secrets\": \"...\",\n \"serviceAccount\": \"...\",\n \"source\": {\n \"repoSource\": {\n \"branchName\": \"...\",\n \"commitSha\": \"...\",\n \"dir\": \"...\",\n \"invertRegex\": \"...\",\n \"projectId\": \"...\",\n \"repoName\": \"...\",\n \"substitutions\": \"...\",\n \"tagName\": \"...\"\n },\n \"storageSource\": {\n \"bucket\": \"...\",\n \"generation\": \"...\",\n \"object\": \"...\"\n },\n \"storageSourceManifest\": {\n \"bucket\": \"...\",\n \"generation\": \"...\",\n \"object\": \"...\"\n }\n },\n \"steps\": \"...\",\n \"substitutions\": \"...\",\n \"tags\": \"...\",\n \"timeout\": \"...\"\n },\n \"description\": \"...\",\n \"disabled\": \"...\",\n \"filename\": \"...\",\n \"filter\": \"...\",\n \"gitFileSource\": {\n \"path\": \"...\",\n \"repoType\": \"...\",\n \"revision\": \"...\",\n \"uri\": \"...\"\n },\n \"github\": {\n \"enterpriseConfigResourceName\": \"...\",\n \"installationId\": \"...\",\n \"name\": \"...\",\n \"owner\": \"...\",\n \"pullRequest\": {\n \"branch\": \"...\",\n \"commentControl\": \"...\",\n \"invertRegex\": \"...\"\n },\n \"push\": {\n \"branch\": \"...\",\n \"invertRegex\": \"...\",\n \"tag\": \"...\"\n }\n },\n \"ignoredFiles\": \"...\",\n \"includedFiles\": \"...\",\n \"name\": \"...\",\n \"pubsubConfig\": {\n \"serviceAccountEmail\": \"...\",\n \"state\": \"...\",\n \"topic\": \"...\"\n },\n \"resourceName\": \"...\",\n \"serviceAccount\": \"...\",\n \"sourceToBuild\": {\n \"ref\": \"...\",\n \"repoType\": \"...\",\n \"uri\": \"...\"\n },\n \"substitutions\": \"...\",\n \"tags\": \"...\",\n \"triggerTemplate\": \"...\",\n \"webhookConfig\": {\n \"secret\": \"...\",\n \"state\": \"...\"\n }\n }\n },\n \"result\": \"patchResult\"\n }\n }\n]\n```"]]