Class CloudBuildClient

public abstract class CloudBuildClient

CloudBuild client wrapper, for convenient use.

Inheritance

Object > CloudBuildClient

Derived Types

Namespace

Google.Cloud.CloudBuild.V1

Assembly

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
TypeDescription
OperationsClient

CreateBuildOperationsClient

public virtual OperationsClient CreateBuildOperationsClient { get; }

The long-running operations client for CreateBuild.

Property Value
TypeDescription
OperationsClient

CreateWorkerPoolOperationsClient

public virtual OperationsClient CreateWorkerPoolOperationsClient { get; }

The long-running operations client for CreateWorkerPool.

Property Value
TypeDescription
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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default CloudBuild scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default CloudBuild scopes are:

DeleteWorkerPoolOperationsClient

public virtual OperationsClient DeleteWorkerPoolOperationsClient { get; }

The long-running operations client for DeleteWorkerPool.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual CloudBuild.CloudBuildClient GrpcClient { get; }

The underlying gRPC CloudBuild client

Property Value
TypeDescription
CloudBuild.CloudBuildClient

RetryBuildOperationsClient

public virtual OperationsClient RetryBuildOperationsClient { get; }

The long-running operations client for RetryBuild.

Property Value
TypeDescription
OperationsClient

RunBuildTriggerOperationsClient

public virtual OperationsClient RunBuildTriggerOperationsClient { get; }

The long-running operations client for RunBuildTrigger.

Property Value
TypeDescription
OperationsClient

UpdateWorkerPoolOperationsClient

public virtual OperationsClient UpdateWorkerPoolOperationsClient { get; }

The long-running operations client for UpdateWorkerPool.

Property Value
TypeDescription
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 LRO will be analogous to the LRO returned from a CreateBuild call.

If rejected, the returned LRO will be immediately done.

Parameters
TypeNameDescription
ApproveBuildRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Build, BuildOperationMetadata>

The RPC response.

Example
// 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 LRO will be analogous to the LRO returned from a CreateBuild call.

If rejected, the returned LRO will be immediately done.

Parameters
TypeNameDescription
Stringname

Required. Name of the target build. For example: "projects/{$project_id}/builds/{$build_id}"

ApprovalResultapprovalResult

Approval decision and metadata.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Build, BuildOperationMetadata>

The RPC response.

Example
// 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 LRO will be analogous to the LRO returned from a CreateBuild call.

If rejected, the returned LRO will be immediately done.

Parameters
TypeNameDescription
ApproveBuildRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

A Task containing the RPC response.

Example
// 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 LRO will be analogous to the LRO returned from a CreateBuild call.

If rejected, the returned LRO will be immediately done.

Parameters
TypeNameDescription
ApproveBuildRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

A Task containing the RPC response.

Example
// 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 LRO will be analogous to the LRO returned from a CreateBuild call.

If rejected, the returned LRO will be immediately done.

Parameters
TypeNameDescription
Stringname

Required. Name of the target build. For example: "projects/{$project_id}/builds/{$build_id}"

ApprovalResultapprovalResult

Approval decision and metadata.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

A Task containing the RPC response.

Example
// 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 LRO will be analogous to the LRO returned from a CreateBuild call.

If rejected, the returned LRO will be immediately done.

Parameters
TypeNameDescription
Stringname

Required. Name of the target build. For example: "projects/{$project_id}/builds/{$build_id}"

ApprovalResultapprovalResult

Approval decision and metadata.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

A Task containing the RPC response.

Example
// 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(CancelBuildRequest, CallSettings)

public virtual Build CancelBuild(CancelBuildRequest request, CallSettings callSettings = null)

Cancels a build in progress.

Parameters
TypeNameDescription
CancelBuildRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Build

The RPC response.

Example
// 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, String, CallSettings)

public virtual Build CancelBuild(string projectId, string id, CallSettings callSettings = null)

Cancels a build in progress.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project.

Stringid

Required. ID of the build.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Build

The RPC response.

Example
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Build response = cloudBuildClient.CancelBuild(projectId, id);

CancelBuildAsync(CancelBuildRequest, CallSettings)

public virtual Task<Build> CancelBuildAsync(CancelBuildRequest request, CallSettings callSettings = null)

Cancels a build in progress.

Parameters
TypeNameDescription
CancelBuildRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Build>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
CancelBuildRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Build>

A Task containing the RPC response.

Example
// 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, String, CallSettings)

public virtual Task<Build> CancelBuildAsync(string projectId, string id, CallSettings callSettings = null)

Cancels a build in progress.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project.

Stringid

Required. ID of the build.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Build>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
StringprojectId

Required. ID of the project.

Stringid

Required. ID of the build.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Build>

A Task containing the RPC response.

Example
// 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);

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
TypeDescription
CloudBuildClient

The created CloudBuildClient.

CreateAsync(CancellationToken)

public static Task<CloudBuildClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a CloudBuildClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudBuildClientBuilder.

Parameter
TypeNameDescription
CancellationTokencancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<CloudBuildClient>

The task representing the created CloudBuildClient.

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
TypeNameDescription
CreateBuildRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Build, BuildOperationMetadata>

The RPC response.

Example
// 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, 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
TypeNameDescription
StringprojectId

Required. ID of the project.

Buildbuild

Required. Build resource to create.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Build, BuildOperationMetadata>

The RPC response.

Example
// 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(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
TypeNameDescription
CreateBuildRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
CreateBuildRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

A Task containing the RPC response.

Example
// 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, 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
TypeNameDescription
StringprojectId

Required. ID of the project.

Buildbuild

Required. Build resource to create.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
StringprojectId

Required. ID of the project.

Buildbuild

Required. Build resource to create.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

A Task containing the RPC response.

Example
// 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;
}

CreateBuildTrigger(CreateBuildTriggerRequest, CallSettings)

public virtual BuildTrigger CreateBuildTrigger(CreateBuildTriggerRequest request, CallSettings callSettings = null)

Creates a new BuildTrigger.

This API is experimental.

Parameters
TypeNameDescription
CreateBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BuildTrigger

The RPC response.

Example
// 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, BuildTrigger, CallSettings)

public virtual BuildTrigger CreateBuildTrigger(string projectId, BuildTrigger trigger, CallSettings callSettings = null)

Creates a new BuildTrigger.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

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

BuildTriggertrigger

Required. BuildTrigger to create.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BuildTrigger

The RPC response.

Example
// 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(CreateBuildTriggerRequest, CallSettings)

public virtual Task<BuildTrigger> CreateBuildTriggerAsync(CreateBuildTriggerRequest request, CallSettings callSettings = null)

Creates a new BuildTrigger.

This API is experimental.

Parameters
TypeNameDescription
CreateBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BuildTrigger>

A Task containing the RPC response.

Example
// 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.

This API is experimental.

Parameters
TypeNameDescription
CreateBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BuildTrigger>

A Task containing the RPC response.

Example
// 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, BuildTrigger, CallSettings)

public virtual Task<BuildTrigger> CreateBuildTriggerAsync(string projectId, BuildTrigger trigger, CallSettings callSettings = null)

Creates a new BuildTrigger.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

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

BuildTriggertrigger

Required. BuildTrigger to create.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BuildTrigger>

A Task containing the RPC response.

Example
// 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.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

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

BuildTriggertrigger

Required. BuildTrigger to create.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BuildTrigger>

A Task containing the RPC response.

Example
// 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);

CreateWorkerPool(LocationName, WorkerPool, String, CallSettings)

public virtual Operation<WorkerPool, CreateWorkerPoolOperationMetadata> CreateWorkerPool(LocationName parent, WorkerPool workerPool, string workerPoolId, CallSettings callSettings = null)

Creates a WorkerPool.

Parameters
TypeNameDescription
LocationNameparent

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

WorkerPoolworkerPool

Required. WorkerPool resource to create.

StringworkerPoolId

Required. Immutable. The ID to use for the WorkerPool, which will become the final component of the resource name.

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<WorkerPool, CreateWorkerPoolOperationMetadata>

The RPC response.

Example
// 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
TypeNameDescription
CreateWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<WorkerPool, CreateWorkerPoolOperationMetadata>

The RPC response.

Example
// 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
TypeNameDescription
Stringparent

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

WorkerPoolworkerPool

Required. WorkerPool resource to create.

StringworkerPoolId

Required. Immutable. The ID to use for the WorkerPool, which will become the final component of the resource name.

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<WorkerPool, CreateWorkerPoolOperationMetadata>

The RPC response.

Example
// 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
TypeNameDescription
LocationNameparent

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

WorkerPoolworkerPool

Required. WorkerPool resource to create.

StringworkerPoolId

Required. Immutable. The ID to use for the WorkerPool, which will become the final component of the resource name.

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
LocationNameparent

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

WorkerPoolworkerPool

Required. WorkerPool resource to create.

StringworkerPoolId

Required. Immutable. The ID to use for the WorkerPool, which will become the final component of the resource name.

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
CreateWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
CreateWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
Stringparent

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

WorkerPoolworkerPool

Required. WorkerPool resource to create.

StringworkerPoolId

Required. Immutable. The ID to use for the WorkerPool, which will become the final component of the resource name.

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
Stringparent

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

WorkerPoolworkerPool

Required. WorkerPool resource to create.

StringworkerPoolId

Required. Immutable. The ID to use for the WorkerPool, which will become the final component of the resource name.

This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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(DeleteBuildTriggerRequest, CallSettings)

public virtual void DeleteBuildTrigger(DeleteBuildTriggerRequest request, CallSettings callSettings = null)

Deletes a BuildTrigger by its project ID and trigger ID.

This API is experimental.

Parameters
TypeNameDescription
DeleteBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Example
// 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, String, CallSettings)

public virtual void DeleteBuildTrigger(string projectId, string triggerId, CallSettings callSettings = null)

Deletes a BuildTrigger by its project ID and trigger ID.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project that owns the trigger.

StringtriggerId

Required. ID of the BuildTrigger to delete.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
cloudBuildClient.DeleteBuildTrigger(projectId, triggerId);

DeleteBuildTriggerAsync(DeleteBuildTriggerRequest, CallSettings)

public virtual Task DeleteBuildTriggerAsync(DeleteBuildTriggerRequest request, CallSettings callSettings = null)

Deletes a BuildTrigger by its project ID and trigger ID.

This API is experimental.

Parameters
TypeNameDescription
DeleteBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.

This API is experimental.

Parameters
TypeNameDescription
DeleteBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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, String, CallSettings)

public virtual Task DeleteBuildTriggerAsync(string projectId, string triggerId, CallSettings callSettings = null)

Deletes a BuildTrigger by its project ID and trigger ID.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project that owns the trigger.

StringtriggerId

Required. ID of the BuildTrigger to delete.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project that owns the trigger.

StringtriggerId

Required. ID of the BuildTrigger to delete.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
CloudBuildClient cloudBuildClient = await CloudBuildClient.CreateAsync();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
await cloudBuildClient.DeleteBuildTriggerAsync(projectId, triggerId);

DeleteWorkerPool(DeleteWorkerPoolRequest, CallSettings)

public virtual Operation<Empty, DeleteWorkerPoolOperationMetadata> DeleteWorkerPool(DeleteWorkerPoolRequest request, CallSettings callSettings = null)

Deletes a WorkerPool.

Parameters
TypeNameDescription
DeleteWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteWorkerPoolOperationMetadata>

The RPC response.

Example
// 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
TypeNameDescription
WorkerPoolNamename

Required. The name of the WorkerPool to delete. Format: projects/{project}/locations/{workerPool}/workerPools/{workerPool}.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteWorkerPoolOperationMetadata>

The RPC response.

Example
// 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
TypeNameDescription
Stringname

Required. The name of the WorkerPool to delete. Format: projects/{project}/locations/{workerPool}/workerPools/{workerPool}.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteWorkerPoolOperationMetadata>

The RPC response.

Example
// 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
TypeNameDescription
DeleteWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
DeleteWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
WorkerPoolNamename

Required. The name of the WorkerPool to delete. Format: projects/{project}/locations/{workerPool}/workerPools/{workerPool}.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
WorkerPoolNamename

Required. The name of the WorkerPool to delete. Format: projects/{project}/locations/{workerPool}/workerPools/{workerPool}.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
Stringname

Required. The name of the WorkerPool to delete. Format: projects/{project}/locations/{workerPool}/workerPools/{workerPool}.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
Stringname

Required. The name of the WorkerPool to delete. Format: projects/{project}/locations/{workerPool}/workerPools/{workerPool}.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>>

A Task containing the RPC response.

Example
// 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(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
TypeNameDescription
GetBuildRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Build

The RPC response.

Example
// 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, 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
TypeNameDescription
StringprojectId

Required. ID of the project.

Stringid

Required. ID of the build.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Build

The RPC response.

Example
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string id = "";
// Make the request
Build response = cloudBuildClient.GetBuild(projectId, id);

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
TypeNameDescription
GetBuildRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Build>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
GetBuildRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Build>

A Task containing the RPC response.

Example
// 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, 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
TypeNameDescription
StringprojectId

Required. ID of the project.

Stringid

Required. ID of the build.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Build>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
StringprojectId

Required. ID of the project.

Stringid

Required. ID of the build.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Build>

A Task containing the RPC response.

Example
// 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);

GetBuildTrigger(GetBuildTriggerRequest, CallSettings)

public virtual BuildTrigger GetBuildTrigger(GetBuildTriggerRequest request, CallSettings callSettings = null)

Returns information about a BuildTrigger.

This API is experimental.

Parameters
TypeNameDescription
GetBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BuildTrigger

The RPC response.

Example
// 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, String, CallSettings)

public virtual BuildTrigger GetBuildTrigger(string projectId, string triggerId, CallSettings callSettings = null)

Returns information about a BuildTrigger.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project that owns the trigger.

StringtriggerId

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

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BuildTrigger

The RPC response.

Example
// Create client
CloudBuildClient cloudBuildClient = CloudBuildClient.Create();
// Initialize request argument(s)
string projectId = "";
string triggerId = "";
// Make the request
BuildTrigger response = cloudBuildClient.GetBuildTrigger(projectId, triggerId);

GetBuildTriggerAsync(GetBuildTriggerRequest, CallSettings)

public virtual Task<BuildTrigger> GetBuildTriggerAsync(GetBuildTriggerRequest request, CallSettings callSettings = null)

Returns information about a BuildTrigger.

This API is experimental.

Parameters
TypeNameDescription
GetBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BuildTrigger>

A Task containing the RPC response.

Example
// 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.

This API is experimental.

Parameters
TypeNameDescription
GetBuildTriggerRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BuildTrigger>

A Task containing the RPC response.

Example
// 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, String, CallSettings)

public virtual Task<BuildTrigger> GetBuildTriggerAsync(string projectId, string triggerId, CallSettings callSettings = null)

Returns information about a BuildTrigger.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project that owns the trigger.

StringtriggerId

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

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BuildTrigger>

A Task containing the RPC response.

Example
// 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.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project that owns the trigger.

StringtriggerId

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

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BuildTrigger>

A Task containing the RPC response.

Example
// 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);

GetWorkerPool(GetWorkerPoolRequest, CallSettings)

public virtual WorkerPool GetWorkerPool(GetWorkerPoolRequest request, CallSettings callSettings = null)

Returns details of a WorkerPool.

Parameters
TypeNameDescription
GetWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
WorkerPool

The RPC response.

Example
// 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
TypeNameDescription
WorkerPoolNamename

Required. The name of the WorkerPool to retrieve. Format: projects/{project}/locations/{location}/workerPools/{workerPool}.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
WorkerPool

The RPC response.

Example
// 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
TypeNameDescription
Stringname

Required. The name of the WorkerPool to retrieve. Format: projects/{project}/locations/{location}/workerPools/{workerPool}.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
WorkerPool

The RPC response.

Example
// 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
TypeNameDescription
GetWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<WorkerPool>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
GetWorkerPoolRequestrequest

The request object containing all of the parameters for the API call.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<WorkerPool>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
WorkerPoolNamename

Required. The name of the WorkerPool to retrieve. Format: projects/{project}/locations/{location}/workerPools/{workerPool}.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<WorkerPool>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
WorkerPoolNamename

Required. The name of the WorkerPool to retrieve. Format: projects/{project}/locations/{location}/workerPools/{workerPool}.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<WorkerPool>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
Stringname

Required. The name of the WorkerPool to retrieve. Format: projects/{project}/locations/{location}/workerPools/{workerPool}.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<WorkerPool>

A Task containing the RPC response.

Example
// 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
TypeNameDescription
Stringname

Required. The name of the WorkerPool to retrieve. Format: projects/{project}/locations/{location}/workerPools/{workerPool}.

CancellationTokencancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<WorkerPool>

A Task containing the RPC response.

Example
// 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);

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
TypeNameDescription
ListBuildsRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListBuildsResponse, Build>

A pageable sequence of Build resources.

Example
// 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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListBuildsResponse, Build> ListBuilds(string projectId, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists previously requested builds.

Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project.

Stringfilter

The raw filter text to constrain the results.

StringpageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

Nullable<Int32>pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListBuildsResponse, Build>

A pageable sequence of Build resources.

Example
// 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
TypeNameDescription
ListBuildsRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListBuildsResponse, Build>

A pageable asynchronous sequence of Build resources.

Example
// 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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListBuildsResponse, Build> ListBuildsAsync(string projectId, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists previously requested builds.

Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.

Parameters
TypeNameDescription
StringprojectId

Required. ID of the project.

Stringfilter

The raw filter text to constrain the results.

StringpageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

Nullable<Int32>pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListBuildsResponse, Build>

A pageable asynchronous sequence of Build resources.

Example
// 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;

ListBuildTriggers(ListBuildTriggersRequest, CallSettings)

public virtual PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggers(ListBuildTriggersRequest request, CallSettings callSettings = null)

Lists existing BuildTriggers.

This API is experimental.

Parameters
TypeNameDescription
ListBuildTriggersRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListBuildTriggersResponse, BuildTrigger>

A pageable sequence of BuildTrigger resources.

Example
// 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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggers(string projectId, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists existing BuildTriggers.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

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

StringpageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

Nullable<Int32>pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListBuildTriggersResponse, BuildTrigger>

A pageable sequence of BuildTrigger resources.

Example
// 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.

This API is experimental.

Parameters
TypeNameDescription
ListBuildTriggersRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger>

A pageable asynchronous sequence of BuildTrigger resources.

Example
// 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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggersAsync(string projectId, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists existing BuildTriggers.

This API is experimental.

Parameters
TypeNameDescription
StringprojectId

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

StringpageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

Nullable<Int32>pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger>

A pageable asynchronous sequence of BuildTrigger resources.

Example
// 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;

ListWorkerPools(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPools(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists WorkerPools.

Parameters
TypeNameDescription
LocationNameparent

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

StringpageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

Nullable<Int32>pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListWorkerPoolsResponse, WorkerPool>

A pageable sequence of WorkerPool resources.

Example
// 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
TypeNameDescription
ListWorkerPoolsRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListWorkerPoolsResponse, WorkerPool>

A pageable sequence of WorkerPool resources.

Example
// 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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPools(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists WorkerPools.

Parameters
TypeNameDescription
Stringparent

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

StringpageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

Nullable<Int32>pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListWorkerPoolsResponse, WorkerPool>

A pageable sequence of WorkerPool resources.

Example
// 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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPoolsAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists WorkerPools.

Parameters
TypeNameDescription
LocationNameparent

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

StringpageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

Nullable<Int32>pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool>

A pageable asynchronous sequence of WorkerPool resources.

Example
// 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
TypeNameDescription
ListWorkerPoolsRequestrequest

The request object containing all of the parameters for the API call.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool>

A pageable asynchronous sequence of WorkerPool resources.

Example
// 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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool> ListWorkerPoolsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists WorkerPools.

Parameters
TypeNameDescription
Stringparent

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

StringpageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

Nullable<Int32>pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListWorkerPoolsResponse, WorkerPool>

A pageable asynchronous sequence of WorkerPool resources.

Example
// 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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Build, BuildOperationMetadata>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Build, BuildOperationMetadata>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<WorkerPool, CreateWorkerPoolOperationMetadata>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<WorkerPool, CreateWorkerPoolOperationMetadata>>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteWorkerPoolOperationMetadata>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteWorkerPoolOperationMetadata>>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Build, BuildOperationMetadata>

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
TypeNameDescription
StringoperationName

The name of a previously invoked operation. Must not be null or empty.

CallSettingscallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Build, BuildOperationMetadata>>

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