Class ProjectsResource.LocationsResource.TriggersResource
The "triggers" collection of methods.
Inherited Members
Namespace: Google.Apis.CloudBuild.v1
Assembly: Google.Apis.CloudBuild.v1.dll
Syntax
public class ProjectsResource.LocationsResource.TriggersResource
Constructors
TriggersResource(IClientService)
Constructs a new resource.
Declaration
public TriggersResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Create(BuildTrigger, string)
Creates a new BuildTrigger. Note: This method only creates triggers in the "global" region when
using the legacy resource path projects/{project_id}/triggers. For all regions, use the regional
resource path: projects/{project_id}/locations/{location}/triggers.
Declaration
public virtual ProjectsResource.LocationsResource.TriggersResource.CreateRequest Create(BuildTrigger body, string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildTrigger | body | The body of the request. |
| string | parent | The parent resource where this trigger will be created. Format:
|
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.TriggersResource.CreateRequest |
Delete(string)
Deletes a BuildTrigger by its project ID and trigger ID. Note: This method only deletes triggers
in the "global" region when using the legacy resource path
projects/{project_id}/triggers/{trigger_id}. For all regions, use the regional resource path:
projects/{project_id}/locations/{location}/triggers/{trigger_id}.
Declaration
public virtual ProjectsResource.LocationsResource.TriggersResource.DeleteRequest Delete(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.TriggersResource.DeleteRequest |
Get(string)
Returns information about a BuildTrigger. Note: This method only gets triggers in the "global"
region when using the legacy resource path projects/{project_id}/triggers/{trigger_id}. For all
regions, use the regional resource path:
projects/{project_id}/locations/{location}/triggers/{trigger_id}.
Declaration
public virtual ProjectsResource.LocationsResource.TriggersResource.GetRequest Get(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.TriggersResource.GetRequest |
List(string)
Lists existing BuildTriggers. Note: This method only lists triggers in the "global" region when
using the legacy resource path projects/{project_id}/triggers. For all regions, use the regional
resource path: projects/{project_id}/locations/{location}/triggers.
Declaration
public virtual ProjectsResource.LocationsResource.TriggersResource.ListRequest List(string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | The parent of the collection of |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.TriggersResource.ListRequest |
Patch(BuildTrigger, string)
Updates a BuildTrigger by its project ID and trigger ID. Note: This method only updates triggers
in the "global" region when using the legacy resource path
projects/{project_id}/triggers/{trigger_id}. For all regions, use the regional resource path:
projects/{project_id}/locations/{location}/triggers/{trigger_id}.
Declaration
public virtual ProjectsResource.LocationsResource.TriggersResource.PatchRequest Patch(BuildTrigger body, string resourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildTrigger | body | The body of the request. |
| string | resourceName | The |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.TriggersResource.PatchRequest |
Run(RunBuildTriggerRequest, string)
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.
Declaration
public virtual ProjectsResource.LocationsResource.TriggersResource.RunRequest Run(RunBuildTriggerRequest body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| RunBuildTriggerRequest | body | The body of the request. |
| string | name | The name of the |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.TriggersResource.RunRequest |
Webhook(HttpBody, string)
ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.
Declaration
public virtual ProjectsResource.LocationsResource.TriggersResource.WebhookRequest Webhook(HttpBody body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpBody | body | The body of the request. |
| string | name | The name of the |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.TriggersResource.WebhookRequest |