Creates a new BuildTrigger
. This API is experimental.
Arguments
projectId
string
Required. ID of the project for which to configure automatic builds.
parent
string
The parent resource where this trigger will be created. Format: projects/{project}/locations/{location}
body
object ( BuildTrigger
)
Required.
Raised exceptions
ConnectionError
HttpError
TimeoutError
TypeError
ValueError
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
- create : call : googleapis.cloudbuild.v1.projects.triggers.create args : projectId : ... parent : ... 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 : createResult
JSON
[ { "create" : { "call" : "googleapis.cloudbuild.v1.projects.triggers.create" , "args" : { "projectId" : "..." , "parent" : "..." , "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" : "createResult" } } ]

