Class PipelineServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build();
TrainingPipeline response =
pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline);
}
Note: close() needs to be called on the PipelineServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
CreateTrainingPipeline |
Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTrainingPipeline |
Gets a TrainingPipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTrainingPipelines |
Lists TrainingPipelines in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTrainingPipeline |
Deletes a TrainingPipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelTrainingPipeline |
Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to `CANCELLED`. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreatePipelineJob |
Creates a PipelineJob. A PipelineJob will run immediately when created. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetPipelineJob |
Gets a PipelineJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListPipelineJobs |
Lists PipelineJobs in a Location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeletePipelineJob |
Deletes a PipelineJob. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchDeletePipelineJobs |
Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are deleted. If it succeeds, all of the PipelineJobs are deleted. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelPipelineJob |
Cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1.PipelineService.GetPipelineJob] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a [PipelineJob.error][google.cloud.aiplatform.v1.PipelineJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [PipelineJob.state][google.cloud.aiplatform.v1.PipelineJob.state] is set to `CANCELLED`. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchCancelPipelineJobs |
Batch cancel PipelineJobs. Firstly the server will check if all the jobs are in non-terminal states, and skip the jobs that are already terminated. If the operation failed, none of the pipeline jobs are cancelled. The server will poll the states of all the pipeline jobs periodically to check the cancellation status. This operation will return an LRO. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of PipelineServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
PipelineServiceSettings pipelineServiceSettings =
PipelineServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
PipelineServiceClient pipelineServiceClient =
PipelineServiceClient.create(pipelineServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
PipelineServiceSettings pipelineServiceSettings =
PipelineServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
PipelineServiceClient pipelineServiceClient =
PipelineServiceClient.create(pipelineServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPipelineServiceClient(PipelineServiceSettings settings) Constructs an instance of PipelineServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) Batch cancel PipelineJobs.batchCancelPipelineJobsAsync(LocationName parent, List<String> names) Batch cancel PipelineJobs.batchCancelPipelineJobsAsync(String parent, List<String> names) Batch cancel PipelineJobs.Batch cancel PipelineJobs.final OperationCallable<BatchCancelPipelineJobsRequest,BatchCancelPipelineJobsResponse, BatchCancelPipelineJobsOperationMetadata> Batch cancel PipelineJobs.Batch deletes PipelineJobs The Operation is atomic.batchDeletePipelineJobsAsync(LocationName parent, List<String> names) Batch deletes PipelineJobs The Operation is atomic.batchDeletePipelineJobsAsync(String parent, List<String> names) Batch deletes PipelineJobs The Operation is atomic.Batch deletes PipelineJobs The Operation is atomic.final OperationCallable<BatchDeletePipelineJobsRequest,BatchDeletePipelineJobsResponse, DeleteOperationMetadata> Batch deletes PipelineJobs The Operation is atomic.final voidCancels a PipelineJob.final voidCancels a PipelineJob.final voidcancelPipelineJob(String name) Cancels a PipelineJob.final UnaryCallable<CancelPipelineJobRequest,com.google.protobuf.Empty> Cancels a PipelineJob.final voidCancels a TrainingPipeline.final voidCancels a TrainingPipeline.final voidcancelTrainingPipeline(String name) Cancels a TrainingPipeline.final UnaryCallable<CancelTrainingPipelineRequest,com.google.protobuf.Empty> Cancels a TrainingPipeline.final voidclose()static final PipelineServiceClientcreate()Constructs an instance of PipelineServiceClient with default settings.static final PipelineServiceClientcreate(PipelineServiceSettings settings) Constructs an instance of PipelineServiceClient, using the given settings.static final PipelineServiceClientcreate(PipelineServiceStub stub) Constructs an instance of PipelineServiceClient, using the given stub for making calls.final PipelineJobCreates a PipelineJob.final PipelineJobcreatePipelineJob(LocationName parent, PipelineJob pipelineJob, String pipelineJobId) Creates a PipelineJob.final PipelineJobcreatePipelineJob(String parent, PipelineJob pipelineJob, String pipelineJobId) Creates a PipelineJob.Creates a PipelineJob.final TrainingPipelineCreates a TrainingPipeline.final TrainingPipelinecreateTrainingPipeline(LocationName parent, TrainingPipeline trainingPipeline) Creates a TrainingPipeline.final TrainingPipelinecreateTrainingPipeline(String parent, TrainingPipeline trainingPipeline) Creates a TrainingPipeline.Creates a TrainingPipeline.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a PipelineJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a PipelineJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deletePipelineJobAsync(String name) Deletes a PipelineJob.Deletes a PipelineJob.final OperationCallable<DeletePipelineJobRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a PipelineJob.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a TrainingPipeline.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a TrainingPipeline.final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> Deletes a TrainingPipeline.Deletes a TrainingPipeline.final OperationCallable<DeleteTrainingPipelineRequest,com.google.protobuf.Empty, DeleteOperationMetadata> Deletes a TrainingPipeline.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PipelineJobgetPipelineJob(GetPipelineJobRequest request) Gets a PipelineJob.final PipelineJobGets a PipelineJob.final PipelineJobgetPipelineJob(String name) Gets a PipelineJob.Gets a PipelineJob.final PipelineServiceSettingsgetStub()final TrainingPipelineGets a TrainingPipeline.final TrainingPipelineGets a TrainingPipeline.final TrainingPipelinegetTrainingPipeline(String name) Gets a TrainingPipeline.Gets a TrainingPipeline.booleanbooleanlistLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listPipelineJobs(ListPipelineJobsRequest request) Lists PipelineJobs in a Location.listPipelineJobs(LocationName parent) Lists PipelineJobs in a Location.listPipelineJobs(String parent) Lists PipelineJobs in a Location.Lists PipelineJobs in a Location.Lists PipelineJobs in a Location.Lists TrainingPipelines in a Location.listTrainingPipelines(LocationName parent) Lists TrainingPipelines in a Location.listTrainingPipelines(String parent) Lists TrainingPipelines in a Location.Lists TrainingPipelines in a Location.final UnaryCallable<ListTrainingPipelinesRequest,PipelineServiceClient.ListTrainingPipelinesPagedResponse> Lists TrainingPipelines in a Location.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.
-
Constructor Details
-
PipelineServiceClient
Constructs an instance of PipelineServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
PipelineServiceClient
-
-
Method Details
-
create
Constructs an instance of PipelineServiceClient with default settings.- Throws:
IOException
-
create
public static final PipelineServiceClient create(PipelineServiceSettings settings) throws IOException Constructs an instance of PipelineServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of PipelineServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(PipelineServiceSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
createTrainingPipeline
public final TrainingPipeline createTrainingPipeline(LocationName parent, TrainingPipeline trainingPipeline) Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build(); TrainingPipeline response = pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline); }- Parameters:
parent- Required. The resource name of the Location to create the TrainingPipeline in. Format: `projects/{project}/locations/{location}`trainingPipeline- Required. The TrainingPipeline to create.- Throws:
ApiException- if the remote call fails
-
createTrainingPipeline
public final TrainingPipeline createTrainingPipeline(String parent, TrainingPipeline trainingPipeline) Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build(); TrainingPipeline response = pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline); }- Parameters:
parent- Required. The resource name of the Location to create the TrainingPipeline in. Format: `projects/{project}/locations/{location}`trainingPipeline- Required. The TrainingPipeline to create.- Throws:
ApiException- if the remote call fails
-
createTrainingPipeline
Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { CreateTrainingPipelineRequest request = CreateTrainingPipelineRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTrainingPipeline(TrainingPipeline.newBuilder().build()) .build(); TrainingPipeline response = pipelineServiceClient.createTrainingPipeline(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createTrainingPipelineCallable
public final UnaryCallable<CreateTrainingPipelineRequest,TrainingPipeline> createTrainingPipelineCallable()Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { CreateTrainingPipelineRequest request = CreateTrainingPipelineRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTrainingPipeline(TrainingPipeline.newBuilder().build()) .build(); ApiFuture<TrainingPipeline> future = pipelineServiceClient.createTrainingPipelineCallable().futureCall(request); // Do something. TrainingPipeline response = future.get(); } -
getTrainingPipeline
Gets a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); TrainingPipeline response = pipelineServiceClient.getTrainingPipeline(name); }- Parameters:
name- Required. The name of the TrainingPipeline resource. Format: `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`- Throws:
ApiException- if the remote call fails
-
getTrainingPipeline
Gets a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]").toString(); TrainingPipeline response = pipelineServiceClient.getTrainingPipeline(name); }- Parameters:
name- Required. The name of the TrainingPipeline resource. Format: `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`- Throws:
ApiException- if the remote call fails
-
getTrainingPipeline
Gets a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { GetTrainingPipelineRequest request = GetTrainingPipelineRequest.newBuilder() .setName( TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") .toString()) .build(); TrainingPipeline response = pipelineServiceClient.getTrainingPipeline(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getTrainingPipelineCallable
public final UnaryCallable<GetTrainingPipelineRequest,TrainingPipeline> getTrainingPipelineCallable()Gets a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { GetTrainingPipelineRequest request = GetTrainingPipelineRequest.newBuilder() .setName( TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") .toString()) .build(); ApiFuture<TrainingPipeline> future = pipelineServiceClient.getTrainingPipelineCallable().futureCall(request); // Do something. TrainingPipeline response = future.get(); } -
listTrainingPipelines
public final PipelineServiceClient.ListTrainingPipelinesPagedResponse listTrainingPipelines(LocationName parent) Lists TrainingPipelines in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (TrainingPipeline element : pipelineServiceClient.listTrainingPipelines(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the TrainingPipelines from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listTrainingPipelines
public final PipelineServiceClient.ListTrainingPipelinesPagedResponse listTrainingPipelines(String parent) Lists TrainingPipelines in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (TrainingPipeline element : pipelineServiceClient.listTrainingPipelines(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the TrainingPipelines from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listTrainingPipelines
public final PipelineServiceClient.ListTrainingPipelinesPagedResponse listTrainingPipelines(ListTrainingPipelinesRequest request) Lists TrainingPipelines in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListTrainingPipelinesRequest request = ListTrainingPipelinesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); for (TrainingPipeline element : pipelineServiceClient.listTrainingPipelines(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listTrainingPipelinesPagedCallable
public final UnaryCallable<ListTrainingPipelinesRequest,PipelineServiceClient.ListTrainingPipelinesPagedResponse> listTrainingPipelinesPagedCallable()Lists TrainingPipelines in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListTrainingPipelinesRequest request = ListTrainingPipelinesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<TrainingPipeline> future = pipelineServiceClient.listTrainingPipelinesPagedCallable().futureCall(request); // Do something. for (TrainingPipeline element : future.get().iterateAll()) { // doThingsWith(element); } } -
listTrainingPipelinesCallable
public final UnaryCallable<ListTrainingPipelinesRequest,ListTrainingPipelinesResponse> listTrainingPipelinesCallable()Lists TrainingPipelines in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListTrainingPipelinesRequest request = ListTrainingPipelinesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListTrainingPipelinesResponse response = pipelineServiceClient.listTrainingPipelinesCallable().call(request); for (TrainingPipeline element : response.getTrainingPipelinesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deleteTrainingPipelineAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTrainingPipelineAsync(TrainingPipelineName name) Deletes a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); pipelineServiceClient.deleteTrainingPipelineAsync(name).get(); }- Parameters:
name- Required. The name of the TrainingPipeline resource to be deleted. Format: `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`- Throws:
ApiException- if the remote call fails
-
deleteTrainingPipelineAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTrainingPipelineAsync(String name) Deletes a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]").toString(); pipelineServiceClient.deleteTrainingPipelineAsync(name).get(); }- Parameters:
name- Required. The name of the TrainingPipeline resource to be deleted. Format: `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`- Throws:
ApiException- if the remote call fails
-
deleteTrainingPipelineAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTrainingPipelineAsync(DeleteTrainingPipelineRequest request) Deletes a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { DeleteTrainingPipelineRequest request = DeleteTrainingPipelineRequest.newBuilder() .setName( TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") .toString()) .build(); pipelineServiceClient.deleteTrainingPipelineAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteTrainingPipelineOperationCallable
public final OperationCallable<DeleteTrainingPipelineRequest,com.google.protobuf.Empty, deleteTrainingPipelineOperationCallable()DeleteOperationMetadata> Deletes a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { DeleteTrainingPipelineRequest request = DeleteTrainingPipelineRequest.newBuilder() .setName( TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") .toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = pipelineServiceClient.deleteTrainingPipelineOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteTrainingPipelineCallable
public final UnaryCallable<DeleteTrainingPipelineRequest,Operation> deleteTrainingPipelineCallable()Deletes a TrainingPipeline.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { DeleteTrainingPipelineRequest request = DeleteTrainingPipelineRequest.newBuilder() .setName( TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") .toString()) .build(); ApiFuture<Operation> future = pipelineServiceClient.deleteTrainingPipelineCallable().futureCall(request); // Do something. future.get(); } -
cancelTrainingPipeline
Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to `CANCELLED`.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { TrainingPipelineName name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]"); pipelineServiceClient.cancelTrainingPipeline(name); }- Parameters:
name- Required. The name of the TrainingPipeline to cancel. Format: `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`- Throws:
ApiException- if the remote call fails
-
cancelTrainingPipeline
Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to `CANCELLED`.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String name = TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]").toString(); pipelineServiceClient.cancelTrainingPipeline(name); }- Parameters:
name- Required. The name of the TrainingPipeline to cancel. Format: `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`- Throws:
ApiException- if the remote call fails
-
cancelTrainingPipeline
Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to `CANCELLED`.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { CancelTrainingPipelineRequest request = CancelTrainingPipelineRequest.newBuilder() .setName( TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") .toString()) .build(); pipelineServiceClient.cancelTrainingPipeline(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
cancelTrainingPipelineCallable
public final UnaryCallable<CancelTrainingPipelineRequest,com.google.protobuf.Empty> cancelTrainingPipelineCallable()Cancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to `CANCELLED`.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { CancelTrainingPipelineRequest request = CancelTrainingPipelineRequest.newBuilder() .setName( TrainingPipelineName.of("[PROJECT]", "[LOCATION]", "[TRAINING_PIPELINE]") .toString()) .build(); ApiFuture<Empty> future = pipelineServiceClient.cancelTrainingPipelineCallable().futureCall(request); // Do something. future.get(); } -
createPipelineJob
public final PipelineJob createPipelineJob(LocationName parent, PipelineJob pipelineJob, String pipelineJobId) Creates a PipelineJob. A PipelineJob will run immediately when created.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); PipelineJob pipelineJob = PipelineJob.newBuilder().build(); String pipelineJobId = "pipelineJobId-1711315914"; PipelineJob response = pipelineServiceClient.createPipelineJob(parent, pipelineJob, pipelineJobId); }- Parameters:
parent- Required. The resource name of the Location to create the PipelineJob in. Format: `projects/{project}/locations/{location}`pipelineJob- Required. The PipelineJob to create.pipelineJobId- The ID to use for the PipelineJob, which will become the final component of the PipelineJob name. If not provided, an ID will be automatically generated.This value should be less than 128 characters, and valid characters are `/[a-z][0-9]-/`.
- Throws:
ApiException- if the remote call fails
-
createPipelineJob
public final PipelineJob createPipelineJob(String parent, PipelineJob pipelineJob, String pipelineJobId) Creates a PipelineJob. A PipelineJob will run immediately when created.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); PipelineJob pipelineJob = PipelineJob.newBuilder().build(); String pipelineJobId = "pipelineJobId-1711315914"; PipelineJob response = pipelineServiceClient.createPipelineJob(parent, pipelineJob, pipelineJobId); }- Parameters:
parent- Required. The resource name of the Location to create the PipelineJob in. Format: `projects/{project}/locations/{location}`pipelineJob- Required. The PipelineJob to create.pipelineJobId- The ID to use for the PipelineJob, which will become the final component of the PipelineJob name. If not provided, an ID will be automatically generated.This value should be less than 128 characters, and valid characters are `/[a-z][0-9]-/`.
- Throws:
ApiException- if the remote call fails
-
createPipelineJob
Creates a PipelineJob. A PipelineJob will run immediately when created.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { CreatePipelineJobRequest request = CreatePipelineJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPipelineJob(PipelineJob.newBuilder().build()) .setPipelineJobId("pipelineJobId-1711315914") .build(); PipelineJob response = pipelineServiceClient.createPipelineJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createPipelineJobCallable
Creates a PipelineJob. A PipelineJob will run immediately when created.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { CreatePipelineJobRequest request = CreatePipelineJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPipelineJob(PipelineJob.newBuilder().build()) .setPipelineJobId("pipelineJobId-1711315914") .build(); ApiFuture<PipelineJob> future = pipelineServiceClient.createPipelineJobCallable().futureCall(request); // Do something. PipelineJob response = future.get(); } -
getPipelineJob
Gets a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { PipelineJobName name = PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]"); PipelineJob response = pipelineServiceClient.getPipelineJob(name); }- Parameters:
name- Required. The name of the PipelineJob resource. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`- Throws:
ApiException- if the remote call fails
-
getPipelineJob
Gets a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String name = PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString(); PipelineJob response = pipelineServiceClient.getPipelineJob(name); }- Parameters:
name- Required. The name of the PipelineJob resource. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`- Throws:
ApiException- if the remote call fails
-
getPipelineJob
Gets a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { GetPipelineJobRequest request = GetPipelineJobRequest.newBuilder() .setName(PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString()) .build(); PipelineJob response = pipelineServiceClient.getPipelineJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getPipelineJobCallable
Gets a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { GetPipelineJobRequest request = GetPipelineJobRequest.newBuilder() .setName(PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString()) .build(); ApiFuture<PipelineJob> future = pipelineServiceClient.getPipelineJobCallable().futureCall(request); // Do something. PipelineJob response = future.get(); } -
listPipelineJobs
public final PipelineServiceClient.ListPipelineJobsPagedResponse listPipelineJobs(LocationName parent) Lists PipelineJobs in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (PipelineJob element : pipelineServiceClient.listPipelineJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the PipelineJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listPipelineJobs
Lists PipelineJobs in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (PipelineJob element : pipelineServiceClient.listPipelineJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the Location to list the PipelineJobs from. Format: `projects/{project}/locations/{location}`- Throws:
ApiException- if the remote call fails
-
listPipelineJobs
public final PipelineServiceClient.ListPipelineJobsPagedResponse listPipelineJobs(ListPipelineJobsRequest request) Lists PipelineJobs in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListPipelineJobsRequest request = ListPipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); for (PipelineJob element : pipelineServiceClient.listPipelineJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listPipelineJobsPagedCallable
public final UnaryCallable<ListPipelineJobsRequest,PipelineServiceClient.ListPipelineJobsPagedResponse> listPipelineJobsPagedCallable()Lists PipelineJobs in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListPipelineJobsRequest request = ListPipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); ApiFuture<PipelineJob> future = pipelineServiceClient.listPipelineJobsPagedCallable().futureCall(request); // Do something. for (PipelineJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listPipelineJobsCallable
public final UnaryCallable<ListPipelineJobsRequest,ListPipelineJobsResponse> listPipelineJobsCallable()Lists PipelineJobs in a Location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListPipelineJobsRequest request = ListPipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setReadMask(FieldMask.newBuilder().build()) .build(); while (true) { ListPipelineJobsResponse response = pipelineServiceClient.listPipelineJobsCallable().call(request); for (PipelineJob element : response.getPipelineJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deletePipelineJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deletePipelineJobAsync(PipelineJobName name) Deletes a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { PipelineJobName name = PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]"); pipelineServiceClient.deletePipelineJobAsync(name).get(); }- Parameters:
name- Required. The name of the PipelineJob resource to be deleted. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`- Throws:
ApiException- if the remote call fails
-
deletePipelineJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deletePipelineJobAsync(String name) Deletes a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String name = PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString(); pipelineServiceClient.deletePipelineJobAsync(name).get(); }- Parameters:
name- Required. The name of the PipelineJob resource to be deleted. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`- Throws:
ApiException- if the remote call fails
-
deletePipelineJobAsync
public final OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deletePipelineJobAsync(DeletePipelineJobRequest request) Deletes a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { DeletePipelineJobRequest request = DeletePipelineJobRequest.newBuilder() .setName(PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString()) .build(); pipelineServiceClient.deletePipelineJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deletePipelineJobOperationCallable
public final OperationCallable<DeletePipelineJobRequest,com.google.protobuf.Empty, deletePipelineJobOperationCallable()DeleteOperationMetadata> Deletes a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { DeletePipelineJobRequest request = DeletePipelineJobRequest.newBuilder() .setName(PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString()) .build(); OperationFuture<Empty, DeleteOperationMetadata> future = pipelineServiceClient.deletePipelineJobOperationCallable().futureCall(request); // Do something. future.get(); } -
deletePipelineJobCallable
Deletes a PipelineJob.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { DeletePipelineJobRequest request = DeletePipelineJobRequest.newBuilder() .setName(PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString()) .build(); ApiFuture<Operation> future = pipelineServiceClient.deletePipelineJobCallable().futureCall(request); // Do something. future.get(); } -
batchDeletePipelineJobsAsync
public final OperationFuture<BatchDeletePipelineJobsResponse,DeleteOperationMetadata> batchDeletePipelineJobsAsync(LocationName parent, List<String> names) Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are deleted. If it succeeds, all of the PipelineJobs are deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); List<String> names = new ArrayList<>(); BatchDeletePipelineJobsResponse response = pipelineServiceClient.batchDeletePipelineJobsAsync(parent, names).get(); }- Parameters:
parent- Required. The name of the PipelineJobs' parent resource. Format: `projects/{project}/locations/{location}`names- Required. The names of the PipelineJobs to delete. A maximum of 32 PipelineJobs can be deleted in a batch. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`- Throws:
ApiException- if the remote call fails
-
batchDeletePipelineJobsAsync
public final OperationFuture<BatchDeletePipelineJobsResponse,DeleteOperationMetadata> batchDeletePipelineJobsAsync(String parent, List<String> names) Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are deleted. If it succeeds, all of the PipelineJobs are deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); List<String> names = new ArrayList<>(); BatchDeletePipelineJobsResponse response = pipelineServiceClient.batchDeletePipelineJobsAsync(parent, names).get(); }- Parameters:
parent- Required. The name of the PipelineJobs' parent resource. Format: `projects/{project}/locations/{location}`names- Required. The names of the PipelineJobs to delete. A maximum of 32 PipelineJobs can be deleted in a batch. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`- Throws:
ApiException- if the remote call fails
-
batchDeletePipelineJobsAsync
public final OperationFuture<BatchDeletePipelineJobsResponse,DeleteOperationMetadata> batchDeletePipelineJobsAsync(BatchDeletePipelineJobsRequest request) Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are deleted. If it succeeds, all of the PipelineJobs are deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { BatchDeletePipelineJobsRequest request = BatchDeletePipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllNames(new ArrayList<String>()) .build(); BatchDeletePipelineJobsResponse response = pipelineServiceClient.batchDeletePipelineJobsAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
batchDeletePipelineJobsOperationCallable
public final OperationCallable<BatchDeletePipelineJobsRequest,BatchDeletePipelineJobsResponse, batchDeletePipelineJobsOperationCallable()DeleteOperationMetadata> Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are deleted. If it succeeds, all of the PipelineJobs are deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { BatchDeletePipelineJobsRequest request = BatchDeletePipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllNames(new ArrayList<String>()) .build(); OperationFuture<BatchDeletePipelineJobsResponse, DeleteOperationMetadata> future = pipelineServiceClient.batchDeletePipelineJobsOperationCallable().futureCall(request); // Do something. BatchDeletePipelineJobsResponse response = future.get(); } -
batchDeletePipelineJobsCallable
public final UnaryCallable<BatchDeletePipelineJobsRequest,Operation> batchDeletePipelineJobsCallable()Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are deleted. If it succeeds, all of the PipelineJobs are deleted.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { BatchDeletePipelineJobsRequest request = BatchDeletePipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllNames(new ArrayList<String>()) .build(); ApiFuture<Operation> future = pipelineServiceClient.batchDeletePipelineJobsCallable().futureCall(request); // Do something. Operation response = future.get(); } -
cancelPipelineJob
Cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1.PipelineService.GetPipelineJob] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a [PipelineJob.error][google.cloud.aiplatform.v1.PipelineJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [PipelineJob.state][google.cloud.aiplatform.v1.PipelineJob.state] is set to `CANCELLED`.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { PipelineJobName name = PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]"); pipelineServiceClient.cancelPipelineJob(name); }- Parameters:
name- Required. The name of the PipelineJob to cancel. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`- Throws:
ApiException- if the remote call fails
-
cancelPipelineJob
Cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1.PipelineService.GetPipelineJob] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a [PipelineJob.error][google.cloud.aiplatform.v1.PipelineJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [PipelineJob.state][google.cloud.aiplatform.v1.PipelineJob.state] is set to `CANCELLED`.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String name = PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString(); pipelineServiceClient.cancelPipelineJob(name); }- Parameters:
name- Required. The name of the PipelineJob to cancel. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`- Throws:
ApiException- if the remote call fails
-
cancelPipelineJob
Cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1.PipelineService.GetPipelineJob] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a [PipelineJob.error][google.cloud.aiplatform.v1.PipelineJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [PipelineJob.state][google.cloud.aiplatform.v1.PipelineJob.state] is set to `CANCELLED`.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { CancelPipelineJobRequest request = CancelPipelineJobRequest.newBuilder() .setName(PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString()) .build(); pipelineServiceClient.cancelPipelineJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
cancelPipelineJobCallable
public final UnaryCallable<CancelPipelineJobRequest,com.google.protobuf.Empty> cancelPipelineJobCallable()Cancels a PipelineJob. Starts asynchronous cancellation on the PipelineJob. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1.PipelineService.GetPipelineJob] or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the PipelineJob is not deleted; instead it becomes a pipeline with a [PipelineJob.error][google.cloud.aiplatform.v1.PipelineJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [PipelineJob.state][google.cloud.aiplatform.v1.PipelineJob.state] is set to `CANCELLED`.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { CancelPipelineJobRequest request = CancelPipelineJobRequest.newBuilder() .setName(PipelineJobName.of("[PROJECT]", "[LOCATION]", "[PIPELINE_JOB]").toString()) .build(); ApiFuture<Empty> future = pipelineServiceClient.cancelPipelineJobCallable().futureCall(request); // Do something. future.get(); } -
batchCancelPipelineJobsAsync
public final OperationFuture<BatchCancelPipelineJobsResponse,BatchCancelPipelineJobsOperationMetadata> batchCancelPipelineJobsAsync(LocationName parent, List<String> names) Batch cancel PipelineJobs. Firstly the server will check if all the jobs are in non-terminal states, and skip the jobs that are already terminated. If the operation failed, none of the pipeline jobs are cancelled. The server will poll the states of all the pipeline jobs periodically to check the cancellation status. This operation will return an LRO.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); List<String> names = new ArrayList<>(); BatchCancelPipelineJobsResponse response = pipelineServiceClient.batchCancelPipelineJobsAsync(parent, names).get(); }- Parameters:
parent- Required. The name of the PipelineJobs' parent resource. Format: `projects/{project}/locations/{location}`names- Required. The names of the PipelineJobs to cancel. A maximum of 32 PipelineJobs can be cancelled in a batch. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`- Throws:
ApiException- if the remote call fails
-
batchCancelPipelineJobsAsync
public final OperationFuture<BatchCancelPipelineJobsResponse,BatchCancelPipelineJobsOperationMetadata> batchCancelPipelineJobsAsync(String parent, List<String> names) Batch cancel PipelineJobs. Firstly the server will check if all the jobs are in non-terminal states, and skip the jobs that are already terminated. If the operation failed, none of the pipeline jobs are cancelled. The server will poll the states of all the pipeline jobs periodically to check the cancellation status. This operation will return an LRO.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); List<String> names = new ArrayList<>(); BatchCancelPipelineJobsResponse response = pipelineServiceClient.batchCancelPipelineJobsAsync(parent, names).get(); }- Parameters:
parent- Required. The name of the PipelineJobs' parent resource. Format: `projects/{project}/locations/{location}`names- Required. The names of the PipelineJobs to cancel. A maximum of 32 PipelineJobs can be cancelled in a batch. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`- Throws:
ApiException- if the remote call fails
-
batchCancelPipelineJobsAsync
public final OperationFuture<BatchCancelPipelineJobsResponse,BatchCancelPipelineJobsOperationMetadata> batchCancelPipelineJobsAsync(BatchCancelPipelineJobsRequest request) Batch cancel PipelineJobs. Firstly the server will check if all the jobs are in non-terminal states, and skip the jobs that are already terminated. If the operation failed, none of the pipeline jobs are cancelled. The server will poll the states of all the pipeline jobs periodically to check the cancellation status. This operation will return an LRO.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { BatchCancelPipelineJobsRequest request = BatchCancelPipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllNames(new ArrayList<String>()) .build(); BatchCancelPipelineJobsResponse response = pipelineServiceClient.batchCancelPipelineJobsAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
batchCancelPipelineJobsOperationCallable
public final OperationCallable<BatchCancelPipelineJobsRequest,BatchCancelPipelineJobsResponse, batchCancelPipelineJobsOperationCallable()BatchCancelPipelineJobsOperationMetadata> Batch cancel PipelineJobs. Firstly the server will check if all the jobs are in non-terminal states, and skip the jobs that are already terminated. If the operation failed, none of the pipeline jobs are cancelled. The server will poll the states of all the pipeline jobs periodically to check the cancellation status. This operation will return an LRO.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { BatchCancelPipelineJobsRequest request = BatchCancelPipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllNames(new ArrayList<String>()) .build(); OperationFuture<BatchCancelPipelineJobsResponse, BatchCancelPipelineJobsOperationMetadata> future = pipelineServiceClient.batchCancelPipelineJobsOperationCallable().futureCall(request); // Do something. BatchCancelPipelineJobsResponse response = future.get(); } -
batchCancelPipelineJobsCallable
public final UnaryCallable<BatchCancelPipelineJobsRequest,Operation> batchCancelPipelineJobsCallable()Batch cancel PipelineJobs. Firstly the server will check if all the jobs are in non-terminal states, and skip the jobs that are already terminated. If the operation failed, none of the pipeline jobs are cancelled. The server will poll the states of all the pipeline jobs periodically to check the cancellation status. This operation will return an LRO.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { BatchCancelPipelineJobsRequest request = BatchCancelPipelineJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllNames(new ArrayList<String>()) .build(); ApiFuture<Operation> future = pipelineServiceClient.batchCancelPipelineJobsCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listLocations
public final PipelineServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : pipelineServiceClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,PipelineServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = pipelineServiceClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = pipelineServiceClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = pipelineServiceClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = pipelineServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = pipelineServiceClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = pipelineServiceClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = pipelineServiceClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = pipelineServiceClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = pipelineServiceClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointName.ofProjectLocationEndpointName( "[PROJECT]", "[LOCATION]", "[ENDPOINT]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = pipelineServiceClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-