public abstract class CloudBuildClientReference documentation and code samples for the Cloud Build v1 API class CloudBuildClient.
CloudBuild client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.CloudBuild.V1Assembly
Google.Cloud.CloudBuild.V1.dll
Remarks
Creates and manages builds on Google Cloud Platform.
The main concept used by this API is a Build, which describes the location
of the source to build, how to build the source, and where to store the
built artifacts, if any.
A user can list previously-requested builds or get builds by their ID to determine the status of the build.
Properties
ApproveBuildOperationsClient
public virtual OperationsClient ApproveBuildOperationsClient { get; }The long-running operations client for ApproveBuild.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
CreateBuildOperationsClient
public virtual OperationsClient CreateBuildOperationsClient { get; }The long-running operations client for CreateBuild.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
CreateWorkerPoolOperationsClient
public virtual OperationsClient CreateWorkerPoolOperationsClient { get; }The long-running operations client for CreateWorkerPool.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the CloudBuild service, which is a host of "cloudbuild.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default CloudBuild scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default CloudBuild scopes are:
DeleteWorkerPoolOperationsClient
public virtual OperationsClient DeleteWorkerPoolOperationsClient { get; }The long-running operations client for DeleteWorkerPool.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public virtual CloudBuild.CloudBuildClient GrpcClient { get; }The underlying gRPC CloudBuild client
| Property Value | |
|---|---|
| Type | Description |
CloudBuildCloudBuildClient |
|
RetryBuildOperationsClient
public virtual OperationsClient RetryBuildOperationsClient { get; }The long-running operations client for RetryBuild.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
RunBuildTriggerOperationsClient
public virtual OperationsClient RunBuildTriggerOperationsClient { get; }The long-running operations client for RunBuildTrigger.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }The service metadata associated with this client type.
| Property Value | |
|---|---|
| Type | Description |
ServiceMetadata |
|
UpdateWorkerPoolOperationsClient
public virtual OperationsClient UpdateWorkerPoolOperationsClient { get; }The long-running operations client for UpdateWorkerPool.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
Methods
ApproveBuild(ApproveBuildRequest, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> ApproveBuild(ApproveBuildRequest request, CallSettings callSettings = null)Approves or rejects a pending build.
If approved, the returned long-running operation (LRO) will be analogous to the LRO returned from a CreateBuild call.
If rejected, the returned LRO will be immediately done.
| Parameters | |
|---|---|
| Name | Description |
request |
ApproveBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
ApproveBuildRequest request = new ApproveBuildRequest
{
Name = "",
ApprovalResult = new ApprovalResult(),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.ApproveBuild(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceApproveBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
ApproveBuild(string, ApprovalResult, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> ApproveBuild(string name, ApprovalResult approvalResult, CallSettings callSettings = null)Approves or rejects a pending build.
If approved, the returned long-running operation (LRO) will be analogous to the LRO returned from a CreateBuild call.
If rejected, the returned LRO will be immediately done.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the target build. For example: "projects/{$project_id}/builds/{$build_id}" |
approvalResult |
ApprovalResultApproval decision and metadata. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "";
ApprovalResult approvalResult = new ApprovalResult();
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.ApproveBuild(name, approvalResult);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceApproveBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
ApproveBuildAsync(ApproveBuildRequest, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> ApproveBuildAsync(ApproveBuildRequest request, CallSettings callSettings = null)Approves or rejects a pending build.
If approved, the returned long-running operation (LRO) will be analogous to the LRO returned from a CreateBuild call.
If rejected, the returned LRO will be immediately done.
| Parameters | |
|---|---|
| Name | Description |
request |
ApproveBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ApproveBuildRequest request = new ApproveBuildRequest
{
Name = "",
ApprovalResult = new ApprovalResult(),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.ApproveBuildAsync(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceApproveBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
ApproveBuildAsync(ApproveBuildRequest, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> ApproveBuildAsync(ApproveBuildRequest request, CancellationToken cancellationToken)Approves or rejects a pending build.
If approved, the returned long-running operation (LRO) will be analogous to the LRO returned from a CreateBuild call.
If rejected, the returned LRO will be immediately done.
| Parameters | |
|---|---|
| Name | Description |
request |
ApproveBuildRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ApproveBuildRequest request = new ApproveBuildRequest
{
Name = "",
ApprovalResult = new ApprovalResult(),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.ApproveBuildAsync(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceApproveBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
ApproveBuildAsync(string, ApprovalResult, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> ApproveBuildAsync(string name, ApprovalResult approvalResult, CallSettings callSettings = null)Approves or rejects a pending build.
If approved, the returned long-running operation (LRO) will be analogous to the LRO returned from a CreateBuild call.
If rejected, the returned LRO will be immediately done.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the target build. For example: "projects/{$project_id}/builds/{$build_id}" |
approvalResult |
ApprovalResultApproval decision and metadata. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "";
ApprovalResult approvalResult = new ApprovalResult();
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.ApproveBuildAsync(name, approvalResult);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceApproveBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
ApproveBuildAsync(string, ApprovalResult, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> ApproveBuildAsync(string name, ApprovalResult approvalResult, CancellationToken cancellationToken)Approves or rejects a pending build.
If approved, the returned long-running operation (LRO) will be analogous to the LRO returned from a CreateBuild call.
If rejected, the returned LRO will be immediately done.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Name of the target build. For example: "projects/{$project_id}/builds/{$build_id}" |
approvalResult |
ApprovalResultApproval decision and metadata. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "";
ApprovalResult approvalResult = new ApprovalResult();
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.ApproveBuildAsync(name, approvalResult);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceApproveBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CancelBuild(BuildName, CallSettings)
public virtual Build CancelBuild(BuildName name, CallSettings callSettings = null)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Build |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Build response = cloudBuildClient.CancelBuild(name);
CancelBuild(CancelBuildRequest, CallSettings)
public virtual Build CancelBuild(CancelBuildRequest request, CallSettings callSettings = null)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Build |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
CancelBuildRequest request = new CancelBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Build response = cloudBuildClient.CancelBuild(request);
CancelBuild(string, CallSettings)
public virtual Build CancelBuild(string name, CallSettings callSettings = null)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Build |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Build response = cloudBuildClient.CancelBuild(name);
CancelBuild(string, string, CallSettings)
public virtual Build CancelBuild(string projectId, string id, CallSettings callSettings = null)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. ID of the build. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Build |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Build response = cloudBuildClient.CancelBuild(projectId, id);
CancelBuildAsync(BuildName, CallSettings)
public virtual Task<Build> CancelBuildAsync(BuildName name, CallSettings callSettings = null)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Build response = await cloudBuildClient.CancelBuildAsync(name);
CancelBuildAsync(BuildName, CancellationToken)
public virtual Task<Build> CancelBuildAsync(BuildName name, CancellationToken cancellationToken)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Build response = await cloudBuildClient.CancelBuildAsync(name);
CancelBuildAsync(CancelBuildRequest, CallSettings)
public virtual Task<Build> CancelBuildAsync(CancelBuildRequest request, CallSettings callSettings = null)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
CancelBuildRequest request = new CancelBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Build response = await cloudBuildClient.CancelBuildAsync(request);
CancelBuildAsync(CancelBuildRequest, CancellationToken)
public virtual Task<Build> CancelBuildAsync(CancelBuildRequest request, CancellationToken cancellationToken)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelBuildRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
CancelBuildRequest request = new CancelBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Build response = await cloudBuildClient.CancelBuildAsync(request);
CancelBuildAsync(string, CallSettings)
public virtual Task<Build> CancelBuildAsync(string name, CallSettings callSettings = null)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Build response = await cloudBuildClient.CancelBuildAsync(name);
CancelBuildAsync(string, string, CallSettings)
public virtual Task<Build> CancelBuildAsync(string projectId, string id, CallSettings callSettings = null)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. ID of the build. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Build response = await cloudBuildClient.CancelBuildAsync(projectId, id);
CancelBuildAsync(string, string, CancellationToken)
public virtual Task<Build> CancelBuildAsync(string projectId, string id, CancellationToken cancellationToken)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. ID of the build. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Build response = await cloudBuildClient.CancelBuildAsync(projectId, id);
CancelBuildAsync(string, CancellationToken)
public virtual Task<Build> CancelBuildAsync(string name, CancellationToken cancellationToken)Cancels a build in progress.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Build response = await cloudBuildClient.CancelBuildAsync(name);
Create()
public static CloudBuildClient Create()Synchronously creates a CloudBuildClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudBuildClientBuilder.
| Returns | |
|---|---|
| Type | Description |
CloudBuildClient |
The created CloudBuildClient. |
CreateAsync(CancellationToken)
public static Task<CloudBuildClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a CloudBuildClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudBuildClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskCloudBuildClient |
The task representing the created CloudBuildClient. |
CreateBuild(LocationName, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> CreateBuild(LocationName parent, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameThe parent resource where this build will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.CreateBuild(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceCreateBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuild(ProjectName, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> CreateBuild(ProjectName parent, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
ProjectNameThe parent resource where this build will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.CreateBuild(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceCreateBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuild(CreateBuildRequest, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> CreateBuild(CreateBuildRequest request, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
request |
CreateBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
CreateBuildRequest request = new CreateBuildRequest
{
ProjectId = "",
Build = new Build(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.CreateBuild(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceCreateBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuild(string, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> CreateBuild(string parent, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
stringThe parent resource where this build will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.CreateBuild(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceCreateBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuild(string, Build, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> CreateBuild(string projectId, Build build, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
build |
BuildRequired. Build resource to create. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
Build build = new Build();
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.CreateBuild(projectId, build);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceCreateBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(LocationName, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(LocationName parent, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameThe parent resource where this build will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(LocationName, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(LocationName parent, CancellationToken cancellationToken)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameThe parent resource where this build will be created.
Format: |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(ProjectName, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(ProjectName parent, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
ProjectNameThe parent resource where this build will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(ProjectName, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(ProjectName parent, CancellationToken cancellationToken)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
ProjectNameThe parent resource where this build will be created.
Format: |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(CreateBuildRequest, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(CreateBuildRequest request, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
request |
CreateBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
CreateBuildRequest request = new CreateBuildRequest
{
ProjectId = "",
Build = new Build(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(CreateBuildRequest, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(CreateBuildRequest request, CancellationToken cancellationToken)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
request |
CreateBuildRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
CreateBuildRequest request = new CreateBuildRequest
{
ProjectId = "",
Build = new Build(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(string, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(string parent, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
stringThe parent resource where this build will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(string, Build, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(string projectId, Build build, CallSettings callSettings = null)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
build |
BuildRequired. Build resource to create. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
Build build = new Build();
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(projectId, build);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(string, Build, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(string projectId, Build build, CancellationToken cancellationToken)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
build |
BuildRequired. Build resource to create. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
Build build = new Build();
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(projectId, build);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildAsync(string, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(string parent, CancellationToken cancellationToken)Starts a build with the specified configuration.
This method returns a long-running Operation, which includes the build
ID. Pass the build ID to GetBuild to determine the build status (such as
SUCCESS or FAILURE).
| Parameters | |
|---|---|
| Name | Description |
parent |
stringThe parent resource where this build will be created.
Format: |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.CreateBuildAsync(parent);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
CreateBuildTrigger(LocationName, CallSettings)
public virtual BuildTrigger CreateBuildTrigger(LocationName parent, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameThe parent resource where this trigger will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
BuildTrigger response = cloudBuildClient.CreateBuildTrigger(parent);
CreateBuildTrigger(ProjectName, CallSettings)
public virtual BuildTrigger CreateBuildTrigger(ProjectName parent, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
ProjectNameThe parent resource where this trigger will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
BuildTrigger response = cloudBuildClient.CreateBuildTrigger(parent);
CreateBuildTrigger(CreateBuildTriggerRequest, CallSettings)
public virtual BuildTrigger CreateBuildTrigger(CreateBuildTriggerRequest request, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
CreateBuildTriggerRequest request = new CreateBuildTriggerRequest
{
ProjectId = "",
Trigger = new BuildTrigger(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
BuildTrigger response = cloudBuildClient.CreateBuildTrigger(request);
CreateBuildTrigger(string, CallSettings)
public virtual BuildTrigger CreateBuildTrigger(string parent, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringThe parent resource where this trigger will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
BuildTrigger response = cloudBuildClient.CreateBuildTrigger(parent);
CreateBuildTrigger(string, BuildTrigger, CallSettings)
public virtual BuildTrigger CreateBuildTrigger(string projectId, BuildTrigger trigger, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project for which to configure automatic builds. |
trigger |
BuildTriggerRequired. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
BuildTrigger trigger = new BuildTrigger();
// Make the request
BuildTrigger response = cloudBuildClient.CreateBuildTrigger(projectId, trigger);
CreateBuildTriggerAsync(LocationName, CallSettings)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(LocationName parent, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameThe parent resource where this trigger will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(parent);
CreateBuildTriggerAsync(LocationName, CancellationToken)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(LocationName parent, CancellationToken cancellationToken)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameThe parent resource where this trigger will be created.
Format: |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(parent);
CreateBuildTriggerAsync(ProjectName, CallSettings)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(ProjectName parent, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
ProjectNameThe parent resource where this trigger will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(parent);
CreateBuildTriggerAsync(ProjectName, CancellationToken)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(ProjectName parent, CancellationToken cancellationToken)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
ProjectNameThe parent resource where this trigger will be created.
Format: |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(parent);
CreateBuildTriggerAsync(CreateBuildTriggerRequest, CallSettings)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(CreateBuildTriggerRequest request, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
CreateBuildTriggerRequest request = new CreateBuildTriggerRequest
{
ProjectId = "",
Trigger = new BuildTrigger(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(request);
CreateBuildTriggerAsync(CreateBuildTriggerRequest, CancellationToken)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(CreateBuildTriggerRequest request, CancellationToken cancellationToken)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateBuildTriggerRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
CreateBuildTriggerRequest request = new CreateBuildTriggerRequest
{
ProjectId = "",
Trigger = new BuildTrigger(),
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(request);
CreateBuildTriggerAsync(string, CallSettings)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(string parent, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringThe parent resource where this trigger will be created.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(parent);
CreateBuildTriggerAsync(string, BuildTrigger, CallSettings)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(string projectId, BuildTrigger trigger, CallSettings callSettings = null)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project for which to configure automatic builds. |
trigger |
BuildTriggerRequired. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
BuildTrigger trigger = new BuildTrigger();
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(projectId, trigger);
CreateBuildTriggerAsync(string, BuildTrigger, CancellationToken)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(string projectId, BuildTrigger trigger, CancellationToken cancellationToken)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project for which to configure automatic builds. |
trigger |
BuildTriggerRequired. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
BuildTrigger trigger = new BuildTrigger();
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(projectId, trigger);
CreateBuildTriggerAsync(string, CancellationToken)
public virtual Task<BuildTrigger> CreateBuildTriggerAsync(string parent, CancellationToken cancellationToken)Creates a new BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringThe parent resource where this trigger will be created.
Format: |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
BuildTrigger response = await cloudBuildClient.CreateBuildTriggerAsync(parent);
CreateWorkerPool(LocationName, WorkerPool, string, CallSettings)
public virtual Operation<WorkerPool, CreateWorkerPoolOperationMetadata> CreateWorkerPool(LocationName parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource where this worker pool will be created.
Format: |
workerPool |
WorkerPoolRequired. |
workerPoolId |
stringRequired. Immutable. The ID to use for the This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationWorkerPoolCreateWorkerPoolOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkerPool workerPool = new WorkerPool();
string workerPoolId = "";
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = cloudBuildClient.CreateWorkerPool(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceCreateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPool(CreateWorkerPoolRequest, CallSettings)
public virtual Operation<WorkerPool, CreateWorkerPoolOperationMetadata> CreateWorkerPool(CreateWorkerPoolRequest request, CallSettings callSettings = null)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateWorkerPoolRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationWorkerPoolCreateWorkerPoolOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
CreateWorkerPoolRequest request = new CreateWorkerPoolRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
WorkerPool = new WorkerPool(),
WorkerPoolId = "",
ValidateOnly = false,
};
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = cloudBuildClient.CreateWorkerPool(request);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceCreateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPool(string, WorkerPool, string, CallSettings)
public virtual Operation<WorkerPool, CreateWorkerPoolOperationMetadata> CreateWorkerPool(string parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource where this worker pool will be created.
Format: |
workerPool |
WorkerPoolRequired. |
workerPoolId |
stringRequired. Immutable. The ID to use for the This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationWorkerPoolCreateWorkerPoolOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
WorkerPool workerPool = new WorkerPool();
string workerPoolId = "";
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = cloudBuildClient.CreateWorkerPool(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceCreateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(LocationName, WorkerPool, string, CallSettings)
public virtual Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>> CreateWorkerPoolAsync(LocationName parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource where this worker pool will be created.
Format: |
workerPool |
WorkerPoolRequired. |
workerPoolId |
stringRequired. Immutable. The ID to use for the This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolCreateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkerPool workerPool = new WorkerPool();
string workerPoolId = "";
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = await cloudBuildClient.CreateWorkerPoolAsync(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(LocationName, WorkerPool, string, CancellationToken)
public virtual Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>> CreateWorkerPoolAsync(LocationName parent, WorkerPool workerPool, string workerPoolId, CancellationToken cancellationToken)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource where this worker pool will be created.
Format: |
workerPool |
WorkerPoolRequired. |
workerPoolId |
stringRequired. Immutable. The ID to use for the This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolCreateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
WorkerPool workerPool = new WorkerPool();
string workerPoolId = "";
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = await cloudBuildClient.CreateWorkerPoolAsync(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(CreateWorkerPoolRequest, CallSettings)
public virtual Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>> CreateWorkerPoolAsync(CreateWorkerPoolRequest request, CallSettings callSettings = null)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateWorkerPoolRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolCreateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
CreateWorkerPoolRequest request = new CreateWorkerPoolRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
WorkerPool = new WorkerPool(),
WorkerPoolId = "",
ValidateOnly = false,
};
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = await cloudBuildClient.CreateWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(CreateWorkerPoolRequest, CancellationToken)
public virtual Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>> CreateWorkerPoolAsync(CreateWorkerPoolRequest request, CancellationToken cancellationToken)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateWorkerPoolRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolCreateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
CreateWorkerPoolRequest request = new CreateWorkerPoolRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
WorkerPool = new WorkerPool(),
WorkerPoolId = "",
ValidateOnly = false,
};
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = await cloudBuildClient.CreateWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(string, WorkerPool, string, CallSettings)
public virtual Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>> CreateWorkerPoolAsync(string parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource where this worker pool will be created.
Format: |
workerPool |
WorkerPoolRequired. |
workerPoolId |
stringRequired. Immutable. The ID to use for the This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolCreateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
WorkerPool workerPool = new WorkerPool();
string workerPoolId = "";
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = await cloudBuildClient.CreateWorkerPoolAsync(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
CreateWorkerPoolAsync(string, WorkerPool, string, CancellationToken)
public virtual Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>> CreateWorkerPoolAsync(string parent, WorkerPool workerPool, string workerPoolId, CancellationToken cancellationToken)Creates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource where this worker pool will be created.
Format: |
workerPool |
WorkerPoolRequired. |
workerPoolId |
stringRequired. Immutable. The ID to use for the This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolCreateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
WorkerPool workerPool = new WorkerPool();
string workerPoolId = "";
// Make the request
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> response = await cloudBuildClient.CreateWorkerPoolAsync(parent, workerPool, workerPoolId);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, CreateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceCreateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
DeleteBuildTrigger(BuildTriggerName, CallSettings)
public virtual void DeleteBuildTrigger(BuildTriggerName name, CallSettings callSettings = null)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildTriggerNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
BuildTriggerName name = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]");
// Make the request
cloudBuildClient.DeleteBuildTrigger(name);
DeleteBuildTrigger(DeleteBuildTriggerRequest, CallSettings)
public virtual void DeleteBuildTrigger(DeleteBuildTriggerRequest request, CallSettings callSettings = null)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
DeleteBuildTriggerRequest request = new DeleteBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
cloudBuildClient.DeleteBuildTrigger(request);
DeleteBuildTrigger(string, CallSettings)
public virtual void DeleteBuildTrigger(string name, CallSettings callSettings = null)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/triggers/[TRIGGER]";
// Make the request
cloudBuildClient.DeleteBuildTrigger(name);
DeleteBuildTrigger(string, string, CallSettings)
public virtual void DeleteBuildTrigger(string projectId, string triggerId, CallSettings callSettings = null)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. ID of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
cloudBuildClient.DeleteBuildTrigger(projectId, triggerId);
DeleteBuildTriggerAsync(BuildTriggerName, CallSettings)
public virtual Task DeleteBuildTriggerAsync(BuildTriggerName name, CallSettings callSettings = null)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildTriggerNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildTriggerName name = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]");
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(name);
DeleteBuildTriggerAsync(BuildTriggerName, CancellationToken)
public virtual Task DeleteBuildTriggerAsync(BuildTriggerName name, CancellationToken cancellationToken)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildTriggerNameThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildTriggerName name = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]");
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(name);
DeleteBuildTriggerAsync(DeleteBuildTriggerRequest, CallSettings)
public virtual Task DeleteBuildTriggerAsync(DeleteBuildTriggerRequest request, CallSettings callSettings = null)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
DeleteBuildTriggerRequest request = new DeleteBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(request);
DeleteBuildTriggerAsync(DeleteBuildTriggerRequest, CancellationToken)
public virtual Task DeleteBuildTriggerAsync(DeleteBuildTriggerRequest request, CancellationToken cancellationToken)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteBuildTriggerRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
DeleteBuildTriggerRequest request = new DeleteBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(request);
DeleteBuildTriggerAsync(string, CallSettings)
public virtual Task DeleteBuildTriggerAsync(string name, CallSettings callSettings = null)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/triggers/[TRIGGER]";
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(name);
DeleteBuildTriggerAsync(string, string, CallSettings)
public virtual Task DeleteBuildTriggerAsync(string projectId, string triggerId, CallSettings callSettings = null)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. ID of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(projectId, triggerId);
DeleteBuildTriggerAsync(string, string, CancellationToken)
public virtual Task DeleteBuildTriggerAsync(string projectId, string triggerId, CancellationToken cancellationToken)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. ID of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(projectId, triggerId);
DeleteBuildTriggerAsync(string, CancellationToken)
public virtual Task DeleteBuildTriggerAsync(string name, CancellationToken cancellationToken)Deletes a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/triggers/[TRIGGER]";
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(name);
DeleteWorkerPool(DeleteWorkerPoolRequest, CallSettings)
public virtual Operation<Empty, DeleteWorkerPoolOperationMetadata> DeleteWorkerPool(DeleteWorkerPoolRequest request, CallSettings callSettings = null)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteWorkerPoolRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyDeleteWorkerPoolOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
DeleteWorkerPoolRequest request = new DeleteWorkerPoolRequest
{
WorkerPoolName = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
Etag = "",
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = cloudBuildClient.DeleteWorkerPool(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceDeleteWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPool(WorkerPoolName, CallSettings)
public virtual Operation<Empty, DeleteWorkerPoolOperationMetadata> DeleteWorkerPool(WorkerPoolName name, CallSettings callSettings = null)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
WorkerPoolNameRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyDeleteWorkerPoolOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
WorkerPoolName name = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = cloudBuildClient.DeleteWorkerPool(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceDeleteWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPool(string, CallSettings)
public virtual Operation<Empty, DeleteWorkerPoolOperationMetadata> DeleteWorkerPool(string name, CallSettings callSettings = null)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyDeleteWorkerPoolOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = cloudBuildClient.DeleteWorkerPool(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceDeleteWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(DeleteWorkerPoolRequest, CallSettings)
public virtual Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>> DeleteWorkerPoolAsync(DeleteWorkerPoolRequest request, CallSettings callSettings = null)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteWorkerPoolRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyDeleteWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
DeleteWorkerPoolRequest request = new DeleteWorkerPoolRequest
{
WorkerPoolName = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
Etag = "",
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = await cloudBuildClient.DeleteWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(DeleteWorkerPoolRequest, CancellationToken)
public virtual Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>> DeleteWorkerPoolAsync(DeleteWorkerPoolRequest request, CancellationToken cancellationToken)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteWorkerPoolRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyDeleteWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
DeleteWorkerPoolRequest request = new DeleteWorkerPoolRequest
{
WorkerPoolName = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
Etag = "",
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = await cloudBuildClient.DeleteWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(WorkerPoolName, CallSettings)
public virtual Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>> DeleteWorkerPoolAsync(WorkerPoolName name, CallSettings callSettings = null)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
WorkerPoolNameRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyDeleteWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
WorkerPoolName name = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = await cloudBuildClient.DeleteWorkerPoolAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(WorkerPoolName, CancellationToken)
public virtual Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>> DeleteWorkerPoolAsync(WorkerPoolName name, CancellationToken cancellationToken)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
WorkerPoolNameRequired. The name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyDeleteWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
WorkerPoolName name = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = await cloudBuildClient.DeleteWorkerPoolAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>> DeleteWorkerPoolAsync(string name, CallSettings callSettings = null)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyDeleteWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = await cloudBuildClient.DeleteWorkerPoolAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteWorkerPoolAsync(string, CancellationToken)
public virtual Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>> DeleteWorkerPoolAsync(string name, CancellationToken cancellationToken)Deletes a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyDeleteWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
Operation<Empty, DeleteWorkerPoolOperationMetadata> response = await cloudBuildClient.DeleteWorkerPoolAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceDeleteWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetBuild(BuildName, CallSettings)
public virtual Build GetBuild(BuildName name, CallSettings callSettings = null)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Build |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Build response = cloudBuildClient.GetBuild(name);
GetBuild(GetBuildRequest, CallSettings)
public virtual Build GetBuild(GetBuildRequest request, CallSettings callSettings = null)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
request |
GetBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Build |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
GetBuildRequest request = new GetBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Build response = cloudBuildClient.GetBuild(request);
GetBuild(string, CallSettings)
public virtual Build GetBuild(string name, CallSettings callSettings = null)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Build |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Build response = cloudBuildClient.GetBuild(name);
GetBuild(string, string, CallSettings)
public virtual Build GetBuild(string projectId, string id, CallSettings callSettings = null)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. ID of the build. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Build |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Build response = cloudBuildClient.GetBuild(projectId, id);
GetBuildAsync(BuildName, CallSettings)
public virtual Task<Build> GetBuildAsync(BuildName name, CallSettings callSettings = null)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Build response = await cloudBuildClient.GetBuildAsync(name);
GetBuildAsync(BuildName, CancellationToken)
public virtual Task<Build> GetBuildAsync(BuildName name, CancellationToken cancellationToken)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Build response = await cloudBuildClient.GetBuildAsync(name);
GetBuildAsync(GetBuildRequest, CallSettings)
public virtual Task<Build> GetBuildAsync(GetBuildRequest request, CallSettings callSettings = null)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
request |
GetBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
GetBuildRequest request = new GetBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Build response = await cloudBuildClient.GetBuildAsync(request);
GetBuildAsync(GetBuildRequest, CancellationToken)
public virtual Task<Build> GetBuildAsync(GetBuildRequest request, CancellationToken cancellationToken)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
request |
GetBuildRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
GetBuildRequest request = new GetBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Build response = await cloudBuildClient.GetBuildAsync(request);
GetBuildAsync(string, CallSettings)
public virtual Task<Build> GetBuildAsync(string name, CallSettings callSettings = null)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Build response = await cloudBuildClient.GetBuildAsync(name);
GetBuildAsync(string, string, CallSettings)
public virtual Task<Build> GetBuildAsync(string projectId, string id, CallSettings callSettings = null)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. ID of the build. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Build response = await cloudBuildClient.GetBuildAsync(projectId, id);
GetBuildAsync(string, string, CancellationToken)
public virtual Task<Build> GetBuildAsync(string projectId, string id, CancellationToken cancellationToken)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. ID of the build. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Build response = await cloudBuildClient.GetBuildAsync(projectId, id);
GetBuildAsync(string, CancellationToken)
public virtual Task<Build> GetBuildAsync(string name, CancellationToken cancellationToken)Returns information about a previously requested build.
The Build that is returned includes its status (such as SUCCESS,
FAILURE, or WORKING), and timing information.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuild |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Build response = await cloudBuildClient.GetBuildAsync(name);
GetBuildTrigger(BuildTriggerName, CallSettings)
public virtual BuildTrigger GetBuildTrigger(BuildTriggerName name, CallSettings callSettings = null)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildTriggerNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
BuildTriggerName name = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]");
// Make the request
BuildTrigger response = cloudBuildClient.GetBuildTrigger(name);
GetBuildTrigger(GetBuildTriggerRequest, CallSettings)
public virtual BuildTrigger GetBuildTrigger(GetBuildTriggerRequest request, CallSettings callSettings = null)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
request |
GetBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
GetBuildTriggerRequest request = new GetBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
BuildTrigger response = cloudBuildClient.GetBuildTrigger(request);
GetBuildTrigger(string, CallSettings)
public virtual BuildTrigger GetBuildTrigger(string name, CallSettings callSettings = null)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/triggers/[TRIGGER]";
// Make the request
BuildTrigger response = cloudBuildClient.GetBuildTrigger(name);
GetBuildTrigger(string, string, CallSettings)
public virtual BuildTrigger GetBuildTrigger(string projectId, string triggerId, CallSettings callSettings = null)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. Identifier ( |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
BuildTrigger response = cloudBuildClient.GetBuildTrigger(projectId, triggerId);
GetBuildTriggerAsync(BuildTriggerName, CallSettings)
public virtual Task<BuildTrigger> GetBuildTriggerAsync(BuildTriggerName name, CallSettings callSettings = null)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildTriggerNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildTriggerName name = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]");
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(name);
GetBuildTriggerAsync(BuildTriggerName, CancellationToken)
public virtual Task<BuildTrigger> GetBuildTriggerAsync(BuildTriggerName name, CancellationToken cancellationToken)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildTriggerNameThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildTriggerName name = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]");
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(name);
GetBuildTriggerAsync(GetBuildTriggerRequest, CallSettings)
public virtual Task<BuildTrigger> GetBuildTriggerAsync(GetBuildTriggerRequest request, CallSettings callSettings = null)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
request |
GetBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
GetBuildTriggerRequest request = new GetBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(request);
GetBuildTriggerAsync(GetBuildTriggerRequest, CancellationToken)
public virtual Task<BuildTrigger> GetBuildTriggerAsync(GetBuildTriggerRequest request, CancellationToken cancellationToken)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
request |
GetBuildTriggerRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
GetBuildTriggerRequest request = new GetBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(request);
GetBuildTriggerAsync(string, CallSettings)
public virtual Task<BuildTrigger> GetBuildTriggerAsync(string name, CallSettings callSettings = null)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/triggers/[TRIGGER]";
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(name);
GetBuildTriggerAsync(string, string, CallSettings)
public virtual Task<BuildTrigger> GetBuildTriggerAsync(string projectId, string triggerId, CallSettings callSettings = null)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. Identifier ( |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(projectId, triggerId);
GetBuildTriggerAsync(string, string, CancellationToken)
public virtual Task<BuildTrigger> GetBuildTriggerAsync(string projectId, string triggerId, CancellationToken cancellationToken)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. Identifier ( |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(projectId, triggerId);
GetBuildTriggerAsync(string, CancellationToken)
public virtual Task<BuildTrigger> GetBuildTriggerAsync(string name, CancellationToken cancellationToken)Returns information about a BuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/triggers/[TRIGGER]";
// Make the request
BuildTrigger response = await cloudBuildClient.GetBuildTriggerAsync(name);
GetDefaultServiceAccount(DefaultServiceAccountName, CallSettings)
public virtual DefaultServiceAccount GetDefaultServiceAccount(DefaultServiceAccountName name, CallSettings callSettings = null)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
name |
DefaultServiceAccountNameRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
DefaultServiceAccount |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
DefaultServiceAccountName name = DefaultServiceAccountName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
DefaultServiceAccount response = cloudBuildClient.GetDefaultServiceAccount(name);
GetDefaultServiceAccount(GetDefaultServiceAccountRequest, CallSettings)
public virtual DefaultServiceAccount GetDefaultServiceAccount(GetDefaultServiceAccountRequest request, CallSettings callSettings = null)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
request |
GetDefaultServiceAccountRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
DefaultServiceAccount |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
GetDefaultServiceAccountRequest request = new GetDefaultServiceAccountRequest
{
DefaultServiceAccountName = DefaultServiceAccountName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
DefaultServiceAccount response = cloudBuildClient.GetDefaultServiceAccount(request);
GetDefaultServiceAccount(string, CallSettings)
public virtual DefaultServiceAccount GetDefaultServiceAccount(string name, CallSettings callSettings = null)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
DefaultServiceAccount |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/defaultServiceAccount";
// Make the request
DefaultServiceAccount response = cloudBuildClient.GetDefaultServiceAccount(name);
GetDefaultServiceAccountAsync(DefaultServiceAccountName, CallSettings)
public virtual Task<DefaultServiceAccount> GetDefaultServiceAccountAsync(DefaultServiceAccountName name, CallSettings callSettings = null)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
name |
DefaultServiceAccountNameRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskDefaultServiceAccount |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
DefaultServiceAccountName name = DefaultServiceAccountName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
DefaultServiceAccount response = await cloudBuildClient.GetDefaultServiceAccountAsync(name);
GetDefaultServiceAccountAsync(DefaultServiceAccountName, CancellationToken)
public virtual Task<DefaultServiceAccount> GetDefaultServiceAccountAsync(DefaultServiceAccountName name, CancellationToken cancellationToken)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
name |
DefaultServiceAccountNameRequired. The name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskDefaultServiceAccount |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
DefaultServiceAccountName name = DefaultServiceAccountName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
DefaultServiceAccount response = await cloudBuildClient.GetDefaultServiceAccountAsync(name);
GetDefaultServiceAccountAsync(GetDefaultServiceAccountRequest, CallSettings)
public virtual Task<DefaultServiceAccount> GetDefaultServiceAccountAsync(GetDefaultServiceAccountRequest request, CallSettings callSettings = null)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
request |
GetDefaultServiceAccountRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskDefaultServiceAccount |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
GetDefaultServiceAccountRequest request = new GetDefaultServiceAccountRequest
{
DefaultServiceAccountName = DefaultServiceAccountName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
DefaultServiceAccount response = await cloudBuildClient.GetDefaultServiceAccountAsync(request);
GetDefaultServiceAccountAsync(GetDefaultServiceAccountRequest, CancellationToken)
public virtual Task<DefaultServiceAccount> GetDefaultServiceAccountAsync(GetDefaultServiceAccountRequest request, CancellationToken cancellationToken)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
request |
GetDefaultServiceAccountRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskDefaultServiceAccount |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
GetDefaultServiceAccountRequest request = new GetDefaultServiceAccountRequest
{
DefaultServiceAccountName = DefaultServiceAccountName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
DefaultServiceAccount response = await cloudBuildClient.GetDefaultServiceAccountAsync(request);
GetDefaultServiceAccountAsync(string, CallSettings)
public virtual Task<DefaultServiceAccount> GetDefaultServiceAccountAsync(string name, CallSettings callSettings = null)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskDefaultServiceAccount |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/defaultServiceAccount";
// Make the request
DefaultServiceAccount response = await cloudBuildClient.GetDefaultServiceAccountAsync(name);
GetDefaultServiceAccountAsync(string, CancellationToken)
public virtual Task<DefaultServiceAccount> GetDefaultServiceAccountAsync(string name, CancellationToken cancellationToken)Returns the DefaultServiceAccount used by the project.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskDefaultServiceAccount |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/defaultServiceAccount";
// Make the request
DefaultServiceAccount response = await cloudBuildClient.GetDefaultServiceAccountAsync(name);
GetWorkerPool(GetWorkerPoolRequest, CallSettings)
public virtual WorkerPool GetWorkerPool(GetWorkerPoolRequest request, CallSettings callSettings = null)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
GetWorkerPoolRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WorkerPool |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
GetWorkerPoolRequest request = new GetWorkerPoolRequest
{
WorkerPoolName = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
};
// Make the request
WorkerPool response = cloudBuildClient.GetWorkerPool(request);
GetWorkerPool(WorkerPoolName, CallSettings)
public virtual WorkerPool GetWorkerPool(WorkerPoolName name, CallSettings callSettings = null)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
WorkerPoolNameRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WorkerPool |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
WorkerPoolName name = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
WorkerPool response = cloudBuildClient.GetWorkerPool(name);
GetWorkerPool(string, CallSettings)
public virtual WorkerPool GetWorkerPool(string name, CallSettings callSettings = null)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WorkerPool |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
WorkerPool response = cloudBuildClient.GetWorkerPool(name);
GetWorkerPoolAsync(GetWorkerPoolRequest, CallSettings)
public virtual Task<WorkerPool> GetWorkerPoolAsync(GetWorkerPoolRequest request, CallSettings callSettings = null)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
GetWorkerPoolRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
GetWorkerPoolRequest request = new GetWorkerPoolRequest
{
WorkerPoolName = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
};
// Make the request
WorkerPool response = await cloudBuildClient.GetWorkerPoolAsync(request);
GetWorkerPoolAsync(GetWorkerPoolRequest, CancellationToken)
public virtual Task<WorkerPool> GetWorkerPoolAsync(GetWorkerPoolRequest request, CancellationToken cancellationToken)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
GetWorkerPoolRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
GetWorkerPoolRequest request = new GetWorkerPoolRequest
{
WorkerPoolName = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]"),
};
// Make the request
WorkerPool response = await cloudBuildClient.GetWorkerPoolAsync(request);
GetWorkerPoolAsync(WorkerPoolName, CallSettings)
public virtual Task<WorkerPool> GetWorkerPoolAsync(WorkerPoolName name, CallSettings callSettings = null)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
WorkerPoolNameRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
WorkerPoolName name = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
WorkerPool response = await cloudBuildClient.GetWorkerPoolAsync(name);
GetWorkerPoolAsync(WorkerPoolName, CancellationToken)
public virtual Task<WorkerPool> GetWorkerPoolAsync(WorkerPoolName name, CancellationToken cancellationToken)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
WorkerPoolNameRequired. The name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
WorkerPoolName name = WorkerPoolName.FromProjectLocationWorkerPool("[PROJECT]", "[LOCATION]", "[WORKER_POOL]");
// Make the request
WorkerPool response = await cloudBuildClient.GetWorkerPoolAsync(name);
GetWorkerPoolAsync(string, CallSettings)
public virtual Task<WorkerPool> GetWorkerPoolAsync(string name, CallSettings callSettings = null)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
WorkerPool response = await cloudBuildClient.GetWorkerPoolAsync(name);
GetWorkerPoolAsync(string, CancellationToken)
public virtual Task<WorkerPool> GetWorkerPoolAsync(string name, CancellationToken cancellationToken)Returns details of a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskWorkerPool |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/workerPools/[WORKER_POOL]";
// Make the request
WorkerPool response = await cloudBuildClient.GetWorkerPoolAsync(name);
ListBuildTriggers(ListBuildTriggersRequest, CallSettings)
public virtual PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggers(ListBuildTriggersRequest request, CallSettings callSettings = null)Lists existing BuildTriggers.
| Parameters | |
|---|---|
| Name | Description |
request |
ListBuildTriggersRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListBuildTriggersResponseBuildTrigger |
A pageable sequence of BuildTrigger resources. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
ListBuildTriggersRequest request = new ListBuildTriggersRequest
{
ProjectId = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> response = cloudBuildClient.ListBuildTriggers(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (BuildTrigger item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBuildTriggersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (BuildTrigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BuildTrigger> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BuildTrigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListBuildTriggers(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggers(string projectId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists existing BuildTriggers.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project for which to list BuildTriggers. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListBuildTriggersResponseBuildTrigger |
A pageable sequence of BuildTrigger resources. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
// Make the request
PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> response = cloudBuildClient.ListBuildTriggers(projectId);
// Iterate over all response items, lazily performing RPCs as required
foreach (BuildTrigger item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBuildTriggersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (BuildTrigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BuildTrigger> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BuildTrigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListBuildTriggersAsync(ListBuildTriggersRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggersAsync(ListBuildTriggersRequest request, CallSettings callSettings = null)Lists existing BuildTriggers.
| Parameters | |
|---|---|
| Name | Description |
request |
ListBuildTriggersRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListBuildTriggersResponseBuildTrigger |
A pageable asynchronous sequence of BuildTrigger resources. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ListBuildTriggersRequest request = new ListBuildTriggersRequest
{
ProjectId = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> response = cloudBuildClient.ListBuildTriggersAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BuildTrigger item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBuildTriggersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (BuildTrigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BuildTrigger> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BuildTrigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListBuildTriggersAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggersAsync(string projectId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists existing BuildTriggers.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project for which to list BuildTriggers. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListBuildTriggersResponseBuildTrigger |
A pageable asynchronous sequence of BuildTrigger resources. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
// Make the request
PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> response = cloudBuildClient.ListBuildTriggersAsync(projectId);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BuildTrigger item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBuildTriggersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (BuildTrigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BuildTrigger> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BuildTrigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListBuilds(ListBuildsRequest, CallSettings)
public virtual PagedEnumerable<ListBuildsResponse, Build> ListBuilds(ListBuildsRequest request, CallSettings callSettings = null)Lists previously requested builds.
Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
| Parameters | |
|---|---|
| Name | Description |
request |
ListBuildsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListBuildsResponseBuild |
A pageable sequence of Build resources. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
ListBuildsRequest request = new ListBuildsRequest
{
ProjectId = "",
Filter = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListBuildsResponse, Build> response = cloudBuildClient.ListBuilds(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Build item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBuildsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Build item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Build> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Build item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListBuilds(string, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListBuildsResponse, Build> ListBuilds(string projectId, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists previously requested builds.
Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
filter |
stringThe raw filter text to constrain the results. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListBuildsResponseBuild |
A pageable sequence of Build resources. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string filter = "";
// Make the request
PagedEnumerable<ListBuildsResponse, Build> response = cloudBuildClient.ListBuilds(projectId, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Build item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBuildsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Build item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Build> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Build item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListBuildsAsync(ListBuildsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListBuildsResponse, Build> ListBuildsAsync(ListBuildsRequest request, CallSettings callSettings = null)Lists previously requested builds.
Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
| Parameters | |
|---|---|
| Name | Description |
request |
ListBuildsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListBuildsResponseBuild |
A pageable asynchronous sequence of Build resources. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ListBuildsRequest request = new ListBuildsRequest
{
ProjectId = "",
Filter = "",
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListBuildsResponse, Build> response = cloudBuildClient.ListBuildsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Build item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBuildsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Build item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Build> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Build item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListBuildsAsync(string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListBuildsResponse, Build> ListBuildsAsync(string projectId, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists previously requested builds.
Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
filter |
stringThe raw filter text to constrain the results. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListBuildsResponseBuild |
A pageable asynchronous sequence of Build resources. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string filter = "";
// Make the request
PagedAsyncEnumerable<ListBuildsResponse, Build> response = cloudBuildClient.ListBuildsAsync(projectId, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Build item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBuildsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Build item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Build> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Build item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListWorkerPools(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPools(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists WorkerPools.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent of the collection of |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListWorkerPoolsResponseWorkerPool |
A pageable sequence of WorkerPool resources. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> response = cloudBuildClient.ListWorkerPools(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (WorkerPool item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWorkerPoolsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (WorkerPool item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkerPool> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkerPool item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListWorkerPools(ListWorkerPoolsRequest, CallSettings)
public virtual PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPools(ListWorkerPoolsRequest request, CallSettings callSettings = null)Lists WorkerPools.
| Parameters | |
|---|---|
| Name | Description |
request |
ListWorkerPoolsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListWorkerPoolsResponseWorkerPool |
A pageable sequence of WorkerPool resources. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
ListWorkerPoolsRequest request = new ListWorkerPoolsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> response = cloudBuildClient.ListWorkerPools(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (WorkerPool item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWorkerPoolsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (WorkerPool item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkerPool> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkerPool item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListWorkerPools(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPools(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists WorkerPools.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent of the collection of |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListWorkerPoolsResponseWorkerPool |
A pageable sequence of WorkerPool resources. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> response = cloudBuildClient.ListWorkerPools(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (WorkerPool item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWorkerPoolsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (WorkerPool item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkerPool> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkerPool item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListWorkerPoolsAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPoolsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists WorkerPools.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent of the collection of |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListWorkerPoolsResponseWorkerPool |
A pageable asynchronous sequence of WorkerPool resources. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> response = cloudBuildClient.ListWorkerPoolsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((WorkerPool item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListWorkerPoolsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (WorkerPool item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkerPool> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkerPool item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListWorkerPoolsAsync(ListWorkerPoolsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPoolsAsync(ListWorkerPoolsRequest request, CallSettings callSettings = null)Lists WorkerPools.
| Parameters | |
|---|---|
| Name | Description |
request |
ListWorkerPoolsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListWorkerPoolsResponseWorkerPool |
A pageable asynchronous sequence of WorkerPool resources. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ListWorkerPoolsRequest request = new ListWorkerPoolsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> response = cloudBuildClient.ListWorkerPoolsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((WorkerPool item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListWorkerPoolsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (WorkerPool item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkerPool> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkerPool item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListWorkerPoolsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPoolsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists WorkerPools.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent of the collection of |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListWorkerPoolsResponseWorkerPool |
A pageable asynchronous sequence of WorkerPool resources. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> response = cloudBuildClient.ListWorkerPoolsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((WorkerPool item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListWorkerPoolsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (WorkerPool item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<WorkerPool> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (WorkerPool item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceApproveBuild(string, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> PollOnceApproveBuild(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of ApproveBuild.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The result of polling the operation. |
PollOnceApproveBuildAsync(string, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> PollOnceApproveBuildAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
ApproveBuild.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A task representing the result of polling the operation. |
PollOnceCreateBuild(string, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> PollOnceCreateBuild(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of CreateBuild.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The result of polling the operation. |
PollOnceCreateBuildAsync(string, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> PollOnceCreateBuildAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
CreateBuild.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A task representing the result of polling the operation. |
PollOnceCreateWorkerPool(string, CallSettings)
public virtual Operation<WorkerPool, CreateWorkerPoolOperationMetadata> PollOnceCreateWorkerPool(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of CreateWorkerPool.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationWorkerPoolCreateWorkerPoolOperationMetadata |
The result of polling the operation. |
PollOnceCreateWorkerPoolAsync(string, CallSettings)
public virtual Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>> PollOnceCreateWorkerPoolAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
CreateWorkerPool.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolCreateWorkerPoolOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteWorkerPool(string, CallSettings)
public virtual Operation<Empty, DeleteWorkerPoolOperationMetadata> PollOnceDeleteWorkerPool(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of DeleteWorkerPool.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyDeleteWorkerPoolOperationMetadata |
The result of polling the operation. |
PollOnceDeleteWorkerPoolAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>> PollOnceDeleteWorkerPoolAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
DeleteWorkerPool.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyDeleteWorkerPoolOperationMetadata |
A task representing the result of polling the operation. |
PollOnceRetryBuild(string, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> PollOnceRetryBuild(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of RetryBuild.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The result of polling the operation. |
PollOnceRetryBuildAsync(string, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> PollOnceRetryBuildAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
RetryBuild.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A task representing the result of polling the operation. |
PollOnceRunBuildTrigger(string, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> PollOnceRunBuildTrigger(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of RunBuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The result of polling the operation. |
PollOnceRunBuildTriggerAsync(string, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> PollOnceRunBuildTriggerAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
RunBuildTrigger.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A task representing the result of polling the operation. |
PollOnceUpdateWorkerPool(string, CallSettings)
public virtual Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> PollOnceUpdateWorkerPool(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of UpdateWorkerPool.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationWorkerPoolUpdateWorkerPoolOperationMetadata |
The result of polling the operation. |
PollOnceUpdateWorkerPoolAsync(string, CallSettings)
public virtual Task<Operation<WorkerPool, UpdateWorkerPoolOperationMetadata>> PollOnceUpdateWorkerPoolAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
UpdateWorkerPool.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolUpdateWorkerPoolOperationMetadata |
A task representing the result of polling the operation. |
ReceiveTriggerWebhook(ReceiveTriggerWebhookRequest, CallSettings)
public virtual ReceiveTriggerWebhookResponse ReceiveTriggerWebhook(ReceiveTriggerWebhookRequest request, CallSettings callSettings = null)ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.
| Parameters | |
|---|---|
| Name | Description |
request |
ReceiveTriggerWebhookRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
ReceiveTriggerWebhookResponse |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
ReceiveTriggerWebhookRequest request = new ReceiveTriggerWebhookRequest
{
Body = new HttpBody(),
ProjectId = "",
Trigger = "",
Secret = "",
Name = "",
};
// Make the request
ReceiveTriggerWebhookResponse response = cloudBuildClient.ReceiveTriggerWebhook(request);
ReceiveTriggerWebhookAsync(ReceiveTriggerWebhookRequest, CallSettings)
public virtual Task<ReceiveTriggerWebhookResponse> ReceiveTriggerWebhookAsync(ReceiveTriggerWebhookRequest request, CallSettings callSettings = null)ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.
| Parameters | |
|---|---|
| Name | Description |
request |
ReceiveTriggerWebhookRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskReceiveTriggerWebhookResponse |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ReceiveTriggerWebhookRequest request = new ReceiveTriggerWebhookRequest
{
Body = new HttpBody(),
ProjectId = "",
Trigger = "",
Secret = "",
Name = "",
};
// Make the request
ReceiveTriggerWebhookResponse response = await cloudBuildClient.ReceiveTriggerWebhookAsync(request);
ReceiveTriggerWebhookAsync(ReceiveTriggerWebhookRequest, CancellationToken)
public virtual Task<ReceiveTriggerWebhookResponse> ReceiveTriggerWebhookAsync(ReceiveTriggerWebhookRequest request, CancellationToken cancellationToken)ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.
| Parameters | |
|---|---|
| Name | Description |
request |
ReceiveTriggerWebhookRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskReceiveTriggerWebhookResponse |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
ReceiveTriggerWebhookRequest request = new ReceiveTriggerWebhookRequest
{
Body = new HttpBody(),
ProjectId = "",
Trigger = "",
Secret = "",
Name = "",
};
// Make the request
ReceiveTriggerWebhookResponse response = await cloudBuildClient.ReceiveTriggerWebhookAsync(request);
RetryBuild(BuildName, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> RetryBuild(BuildName name, CallSettings callSettings = null)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.RetryBuild(name);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceRetryBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuild(RetryBuildRequest, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> RetryBuild(RetryBuildRequest request, CallSettings callSettings = null)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
request |
RetryBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
RetryBuildRequest request = new RetryBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.RetryBuild(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceRetryBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuild(string, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> RetryBuild(string name, CallSettings callSettings = null)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.RetryBuild(name);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceRetryBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuild(string, string, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> RetryBuild(string projectId, string id, CallSettings callSettings = null)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. Build ID of the original build. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.RetryBuild(projectId, id);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceRetryBuild(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuildAsync(BuildName, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(BuildName name, CallSettings callSettings = null)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RetryBuildAsync(name);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRetryBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuildAsync(BuildName, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(BuildName name, CancellationToken cancellationToken)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
name |
BuildNameThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
BuildName name = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]");
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RetryBuildAsync(name);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRetryBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuildAsync(RetryBuildRequest, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(RetryBuildRequest request, CallSettings callSettings = null)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
request |
RetryBuildRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
RetryBuildRequest request = new RetryBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RetryBuildAsync(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRetryBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuildAsync(RetryBuildRequest, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(RetryBuildRequest request, CancellationToken cancellationToken)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
request |
RetryBuildRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
RetryBuildRequest request = new RetryBuildRequest
{
ProjectId = "",
Id = "",
BuildName = BuildName.FromProjectBuild("[PROJECT]", "[BUILD]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RetryBuildAsync(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRetryBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuildAsync(string, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(string name, CallSettings callSettings = null)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RetryBuildAsync(name);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRetryBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuildAsync(string, string, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(string projectId, string id, CallSettings callSettings = null)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. Build ID of the original build. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RetryBuildAsync(projectId, id);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRetryBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuildAsync(string, string, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(string projectId, string id, CancellationToken cancellationToken)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
id |
stringRequired. Build ID of the original build. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RetryBuildAsync(projectId, id);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRetryBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RetryBuildAsync(string, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(string name, CancellationToken cancellationToken)Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
| Parameters | |
|---|---|
| Name | Description |
name |
stringThe name of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/builds/[BUILD]";
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RetryBuildAsync(name);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRetryBuildAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RunBuildTrigger(RunBuildTriggerRequest, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> RunBuildTrigger(RunBuildTriggerRequest request, CallSettings callSettings = null)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.
| Parameters | |
|---|---|
| Name | Description |
request |
RunBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
RunBuildTriggerRequest request = new RunBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
Source = new RepoSource(),
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.RunBuildTrigger(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceRunBuildTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RunBuildTrigger(string, string, RepoSource, CallSettings)
public virtual Operation<Build, BuildOperationMetadata> RunBuildTrigger(string projectId, string triggerId, RepoSource source, CallSettings callSettings = null)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.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
triggerId |
stringRequired. ID of the trigger. |
source |
RepoSourceSource to build against this trigger. Branch and tag names cannot consist of regular expressions. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBuildBuildOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
RepoSource source = new RepoSource();
// Make the request
Operation<Build, BuildOperationMetadata> response = cloudBuildClient.RunBuildTrigger(projectId, triggerId, source);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceRunBuildTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RunBuildTriggerAsync(RunBuildTriggerRequest, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> RunBuildTriggerAsync(RunBuildTriggerRequest request, CallSettings callSettings = null)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.
| Parameters | |
|---|---|
| Name | Description |
request |
RunBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
RunBuildTriggerRequest request = new RunBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
Source = new RepoSource(),
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RunBuildTriggerAsync(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRunBuildTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RunBuildTriggerAsync(RunBuildTriggerRequest, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> RunBuildTriggerAsync(RunBuildTriggerRequest request, CancellationToken cancellationToken)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.
| Parameters | |
|---|---|
| Name | Description |
request |
RunBuildTriggerRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
RunBuildTriggerRequest request = new RunBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
Source = new RepoSource(),
BuildTriggerName = BuildTriggerName.FromProjectTrigger("[PROJECT]", "[TRIGGER]"),
};
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RunBuildTriggerAsync(request);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRunBuildTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RunBuildTriggerAsync(string, string, RepoSource, CallSettings)
public virtual Task<Operation<Build, BuildOperationMetadata>> RunBuildTriggerAsync(string projectId, string triggerId, RepoSource source, CallSettings callSettings = null)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.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
triggerId |
stringRequired. ID of the trigger. |
source |
RepoSourceSource to build against this trigger. Branch and tag names cannot consist of regular expressions. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
RepoSource source = new RepoSource();
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RunBuildTriggerAsync(projectId, triggerId, source);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRunBuildTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
RunBuildTriggerAsync(string, string, RepoSource, CancellationToken)
public virtual Task<Operation<Build, BuildOperationMetadata>> RunBuildTriggerAsync(string projectId, string triggerId, RepoSource source, CancellationToken cancellationToken)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.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project. |
triggerId |
stringRequired. ID of the trigger. |
source |
RepoSourceSource to build against this trigger. Branch and tag names cannot consist of regular expressions. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBuildBuildOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
RepoSource source = new RepoSource();
// Make the request
Operation<Build, BuildOperationMetadata> response = await cloudBuildClient.RunBuildTriggerAsync(projectId, triggerId, source);
// Poll until the returned long-running operation is complete
Operation<Build, BuildOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Build result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Build, BuildOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceRunBuildTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Build retrievedResult = retrievedResponse.Result;
}
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
| Returns | |
|---|---|
| Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateBuildTrigger(UpdateBuildTriggerRequest, CallSettings)
public virtual BuildTrigger UpdateBuildTrigger(UpdateBuildTriggerRequest request, CallSettings callSettings = null)Updates a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
UpdateBuildTriggerRequest request = new UpdateBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
Trigger = new BuildTrigger(),
UpdateMask = new FieldMask(),
};
// Make the request
BuildTrigger response = cloudBuildClient.UpdateBuildTrigger(request);
UpdateBuildTrigger(string, string, BuildTrigger, CallSettings)
public virtual BuildTrigger UpdateBuildTrigger(string projectId, string triggerId, BuildTrigger trigger, CallSettings callSettings = null)Updates a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. ID of the |
trigger |
BuildTriggerRequired. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BuildTrigger |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
BuildTrigger trigger = new BuildTrigger();
// Make the request
BuildTrigger response = cloudBuildClient.UpdateBuildTrigger(projectId, triggerId, trigger);
UpdateBuildTriggerAsync(UpdateBuildTriggerRequest, CallSettings)
public virtual Task<BuildTrigger> UpdateBuildTriggerAsync(UpdateBuildTriggerRequest request, CallSettings callSettings = null)Updates a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateBuildTriggerRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
UpdateBuildTriggerRequest request = new UpdateBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
Trigger = new BuildTrigger(),
UpdateMask = new FieldMask(),
};
// Make the request
BuildTrigger response = await cloudBuildClient.UpdateBuildTriggerAsync(request);
UpdateBuildTriggerAsync(UpdateBuildTriggerRequest, CancellationToken)
public virtual Task<BuildTrigger> UpdateBuildTriggerAsync(UpdateBuildTriggerRequest request, CancellationToken cancellationToken)Updates a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateBuildTriggerRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
UpdateBuildTriggerRequest request = new UpdateBuildTriggerRequest
{
ProjectId = "",
TriggerId = "",
Trigger = new BuildTrigger(),
UpdateMask = new FieldMask(),
};
// Make the request
BuildTrigger response = await cloudBuildClient.UpdateBuildTriggerAsync(request);
UpdateBuildTriggerAsync(string, string, BuildTrigger, CallSettings)
public virtual Task<BuildTrigger> UpdateBuildTriggerAsync(string projectId, string triggerId, BuildTrigger trigger, CallSettings callSettings = null)Updates a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. ID of the |
trigger |
BuildTriggerRequired. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
BuildTrigger trigger = new BuildTrigger();
// Make the request
BuildTrigger response = await cloudBuildClient.UpdateBuildTriggerAsync(projectId, triggerId, trigger);
UpdateBuildTriggerAsync(string, string, BuildTrigger, CancellationToken)
public virtual Task<BuildTrigger> UpdateBuildTriggerAsync(string projectId, string triggerId, BuildTrigger trigger, CancellationToken cancellationToken)Updates a BuildTrigger by its project ID and trigger ID.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringRequired. ID of the project that owns the trigger. |
triggerId |
stringRequired. ID of the |
trigger |
BuildTriggerRequired. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBuildTrigger |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
BuildTrigger trigger = new BuildTrigger();
// Make the request
BuildTrigger response = await cloudBuildClient.UpdateBuildTriggerAsync(projectId, triggerId, trigger);
UpdateWorkerPool(UpdateWorkerPoolRequest, CallSettings)
public virtual Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> UpdateWorkerPool(UpdateWorkerPoolRequest request, CallSettings callSettings = null)Updates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateWorkerPoolRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationWorkerPoolUpdateWorkerPoolOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
UpdateWorkerPoolRequest request = new UpdateWorkerPoolRequest
{
WorkerPool = new WorkerPool(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> response = cloudBuildClient.UpdateWorkerPool(request);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceUpdateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPool(WorkerPool, FieldMask, CallSettings)
public virtual Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> UpdateWorkerPool(WorkerPool workerPool, FieldMask updateMask, CallSettings callSettings = null)Updates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
workerPool |
WorkerPoolRequired. The The |
updateMask |
FieldMaskOptional. A mask specifying which fields in |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationWorkerPoolUpdateWorkerPoolOperationMetadata |
The RPC response. |
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
WorkerPool workerPool = new WorkerPool();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> response = cloudBuildClient.UpdateWorkerPool(workerPool, updateMask);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> retrievedResponse = cloudBuildClient.PollOnceUpdateWorkerPool(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(UpdateWorkerPoolRequest, CallSettings)
public virtual Task<Operation<WorkerPool, UpdateWorkerPoolOperationMetadata>> UpdateWorkerPoolAsync(UpdateWorkerPoolRequest request, CallSettings callSettings = null)Updates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateWorkerPoolRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolUpdateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
UpdateWorkerPoolRequest request = new UpdateWorkerPoolRequest
{
WorkerPool = new WorkerPool(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> response = await cloudBuildClient.UpdateWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(UpdateWorkerPoolRequest, CancellationToken)
public virtual Task<Operation<WorkerPool, UpdateWorkerPoolOperationMetadata>> UpdateWorkerPoolAsync(UpdateWorkerPoolRequest request, CancellationToken cancellationToken)Updates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateWorkerPoolRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolUpdateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
UpdateWorkerPoolRequest request = new UpdateWorkerPoolRequest
{
WorkerPool = new WorkerPool(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> response = await cloudBuildClient.UpdateWorkerPoolAsync(request);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(WorkerPool, FieldMask, CallSettings)
public virtual Task<Operation<WorkerPool, UpdateWorkerPoolOperationMetadata>> UpdateWorkerPoolAsync(WorkerPool workerPool, FieldMask updateMask, CallSettings callSettings = null)Updates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
workerPool |
WorkerPoolRequired. The The |
updateMask |
FieldMaskOptional. A mask specifying which fields in |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolUpdateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
WorkerPool workerPool = new WorkerPool();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> response = await cloudBuildClient.UpdateWorkerPoolAsync(workerPool, updateMask);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}
UpdateWorkerPoolAsync(WorkerPool, FieldMask, CancellationToken)
public virtual Task<Operation<WorkerPool, UpdateWorkerPoolOperationMetadata>> UpdateWorkerPoolAsync(WorkerPool workerPool, FieldMask updateMask, CancellationToken cancellationToken)Updates a WorkerPool.
| Parameters | |
|---|---|
| Name | Description |
workerPool |
WorkerPoolRequired. The The |
updateMask |
FieldMaskOptional. A mask specifying which fields in |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationWorkerPoolUpdateWorkerPoolOperationMetadata |
A Task containing the RPC response. |
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
WorkerPool workerPool = new WorkerPool();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> response = await cloudBuildClient.UpdateWorkerPoolAsync(workerPool, updateMask);
// Poll until the returned long-running operation is complete
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
WorkerPool result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<WorkerPool, UpdateWorkerPoolOperationMetadata> retrievedResponse = await cloudBuildClient.PollOnceUpdateWorkerPoolAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
WorkerPool retrievedResult = retrievedResponse.Result;
}