class ProjectsTriggers extends Resource (View source)

The "triggers" collection of methods.

Typical usage is:

 $cloudbuildService = new Google\Service\CloudBuild(...);
 $triggers = $cloudbuildService->projects_triggers;

Methods

create(string $projectId, BuildTrigger $postBody, array $optParams = [])

Creates a new BuildTrigger. This API is experimental. (triggers.create)

delete(string $projectId, string $triggerId, array $optParams = [])

Deletes a BuildTrigger by its project ID and trigger ID. This API is experimental. (triggers.delete)

get(string $projectId, string $triggerId, array $optParams = [])

Returns information about a BuildTrigger. This API is experimental.

listProjectsTriggers(string $projectId, array $optParams = [])

Lists existing BuildTriggers. This API is experimental.

patch(string $projectId, string $triggerId, BuildTrigger $postBody, array $optParams = [])

Updates a BuildTrigger by its project ID and trigger ID. This API is experimental. (triggers.patch)

run(string $projectId, string $triggerId, RepoSource $postBody, array $optParams = [])

Runs a BuildTrigger at a particular source revision. To run a regional or global trigger, use the POST request that includes the location endpoint in the path (ex.

webhook(string $projectId, string $trigger, HttpBody $postBody, array $optParams = [])

ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger. (triggers.webhook)

Details

BuildTrigger create(string $projectId, BuildTrigger $postBody, array $optParams = [])

Creates a new BuildTrigger. This API is experimental. (triggers.create)

Parameters

string $projectId

Required. ID of the project for which to configure automatic builds.

BuildTrigger $postBody
array $optParams

Optional parameters.

Return Value

BuildTrigger

CloudbuildEmpty delete(string $projectId, string $triggerId, array $optParams = [])

Deletes a BuildTrigger by its project ID and trigger ID. This API is experimental. (triggers.delete)

Parameters

string $projectId

Required. ID of the project that owns the trigger.

string $triggerId

Required. ID of the BuildTrigger to delete.

array $optParams

Optional parameters.

Return Value

CloudbuildEmpty

BuildTrigger get(string $projectId, string $triggerId, array $optParams = [])

Returns information about a BuildTrigger. This API is experimental.

(triggers.get)

Parameters

string $projectId

Required. ID of the project that owns the trigger.

string $triggerId

Required. Identifier (id or name) of the BuildTrigger to get.

array $optParams

Optional parameters.

Return Value

BuildTrigger

ListBuildTriggersResponse listProjectsTriggers(string $projectId, array $optParams = [])

Lists existing BuildTriggers. This API is experimental.

(triggers.listProjectsTriggers)

Parameters

string $projectId

Required. ID of the project for which to list BuildTriggers.

array $optParams

Optional parameters.

Return Value

ListBuildTriggersResponse

BuildTrigger patch(string $projectId, string $triggerId, BuildTrigger $postBody, array $optParams = [])

Updates a BuildTrigger by its project ID and trigger ID. This API is experimental. (triggers.patch)

Parameters

string $projectId

Required. ID of the project that owns the trigger.

string $triggerId

Required. ID of the BuildTrigger to update.

BuildTrigger $postBody
array $optParams

Optional parameters.

Return Value

BuildTrigger

Operation run(string $projectId, string $triggerId, RepoSource $postBody, array $optParams = [])

Runs a BuildTrigger at a particular source revision. To run a regional or global trigger, use the POST request that includes the location endpoint in the path (ex.

v1/projects/{projectId}/locations/{region}/triggers/{triggerId}:run). The POST request that does not include the location endpoint in the path can only be used when running global triggers. (triggers.run)

Parameters

string $projectId

Required. ID of the project.

string $triggerId

Required. ID of the trigger.

RepoSource $postBody
array $optParams

Optional parameters.

Return Value

Operation

ReceiveTriggerWebhookResponse webhook(string $projectId, string $trigger, HttpBody $postBody, array $optParams = [])

ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger. (triggers.webhook)

Parameters

string $projectId

Project in which the specified trigger lives

string $trigger

Name of the trigger to run the payload against

HttpBody $postBody
array $optParams

Optional parameters.

Return Value

ReceiveTriggerWebhookResponse