class ProjectsLocationsTriggers extends Resource (View source)

The "triggers" collection of methods.

Typical usage is:

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

Methods

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

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

delete(string $name, array $optParams = [])

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

get(string $name, array $optParams = [])

Returns information about a BuildTrigger. This API is experimental.

listProjectsLocationsTriggers(string $parent, array $optParams = [])

Lists existing BuildTriggers. This API is experimental.

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

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

run(string $name, RunBuildTriggerRequest $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 $name, 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 $parent, BuildTrigger $postBody, array $optParams = [])

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

Parameters

string $parent

The parent resource where this trigger will be created. Format: projects/{project}/locations/{location}

BuildTrigger $postBody
array $optParams

Optional parameters.

Return Value

BuildTrigger

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

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

Parameters

string $name

The name of the Trigger to delete. Format: projects/{project}/locations/{location}/triggers/{trigger}

array $optParams

Optional parameters.

Return Value

CloudbuildEmpty

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

Returns information about a BuildTrigger. This API is experimental.

(triggers.get)

Parameters

string $name

The name of the Trigger to retrieve. Format: projects/{project}/locations/{location}/triggers/{trigger}

array $optParams

Optional parameters.

Return Value

BuildTrigger

ListBuildTriggersResponse listProjectsLocationsTriggers(string $parent, array $optParams = [])

Lists existing BuildTriggers. This API is experimental.

(triggers.listProjectsLocationsTriggers)

Parameters

string $parent

The parent of the collection of Triggers. Format: projects/{project}/locations/{location}

array $optParams

Optional parameters.

Return Value

ListBuildTriggersResponse

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

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

Parameters

string $resourceName

The Trigger name with format: projects/{project}/locations/{location}/triggers/{trigger}, where {trigger} is a unique identifier generated by the service.

BuildTrigger $postBody
array $optParams

Optional parameters.

Return Value

BuildTrigger

Operation run(string $name, RunBuildTriggerRequest $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 $name

The name of the Trigger to run. Format: projects/{project}/locations/{location}/triggers/{trigger}

RunBuildTriggerRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

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

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

Parameters

string $name

The name of the ReceiveTriggerWebhook to retrieve. Format: projects/{project}/locations/{location}/triggers/{trigger}

HttpBody $postBody
array $optParams

Optional parameters.

Return Value

ReceiveTriggerWebhookResponse