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