- 0.53.0 (latest)
- 0.52.0
- 0.51.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.2
- 0.2.2
- 0.1.1
The interfaces provided are listed below, along with usage samples.
BatchServiceClient
Service Description: Google Batch Service. The service manages user submitted batch jobs and allocates Google Compute Engine VM instances to run the jobs.
Sample for BatchServiceClient:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Job job = Job.newBuilder().build();
String jobId = "jobId101296568";
Job response = batchServiceClient.createJob(parent, job, jobId);
}
Classes
AllocationPolicy
A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy
AllocationPolicy.Accelerator
Accelerator describes Compute Engine accelerators to be attached to VMs.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.Accelerator
AllocationPolicy.Accelerator.Builder
Accelerator describes Compute Engine accelerators to be attached to VMs.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.Accelerator
AllocationPolicy.AttachedDisk
A new or an existing persistent disk attached to a VM instance.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.AttachedDisk
AllocationPolicy.AttachedDisk.Builder
A new or an existing persistent disk attached to a VM instance.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.AttachedDisk
AllocationPolicy.Builder
A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy
AllocationPolicy.Disk
A new persistent disk.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.Disk
AllocationPolicy.Disk.Builder
A new persistent disk.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.Disk
AllocationPolicy.InstancePolicy
InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy
AllocationPolicy.InstancePolicy.Builder
InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy
AllocationPolicy.InstancePolicyOrTemplate
Either an InstancePolicy or an instance template.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplate
AllocationPolicy.InstancePolicyOrTemplate.Builder
Either an InstancePolicy or an instance template.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplate
AllocationPolicy.LocationPolicy
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy
AllocationPolicy.LocationPolicy.Builder
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy
AllocationPolicy.NetworkInterface
A network interface.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.NetworkInterface
AllocationPolicy.NetworkInterface.Builder
A network interface.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.NetworkInterface
AllocationPolicy.NetworkPolicy
NetworkPolicy describes VM instance network configurations.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy
AllocationPolicy.NetworkPolicy.Builder
NetworkPolicy describes VM instance network configurations.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy
BatchProto
BatchServiceClient
Service Description: Google Batch Service. The service manages user submitted batch jobs and allocates Google Compute Engine VM instances to run the jobs.
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 for illustrative purposes only.
// It may require modifications to work in your environment.
try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Job job = Job.newBuilder().build();
String jobId = "jobId101296568";
Job response = batchServiceClient.createJob(parent, job, jobId);
}
Note: close() needs to be called on the BatchServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns 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 BatchServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
BatchServiceSettings batchServiceSettings =
BatchServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
BatchServiceClient batchServiceClient = BatchServiceClient.create(batchServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
BatchServiceSettings batchServiceSettings =
BatchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
BatchServiceClient batchServiceClient = BatchServiceClient.create(batchServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
BatchServiceClient.ListJobsFixedSizeCollection
BatchServiceClient.ListJobsPage
BatchServiceClient.ListJobsPagedResponse
BatchServiceClient.ListTasksFixedSizeCollection
BatchServiceClient.ListTasksPage
BatchServiceClient.ListTasksPagedResponse
BatchServiceGrpc
Google Batch Service. The service manages user submitted batch jobs and allocates Google Compute Engine VM instances to run the jobs.
BatchServiceGrpc.BatchServiceBlockingStub
Google Batch Service. The service manages user submitted batch jobs and allocates Google Compute Engine VM instances to run the jobs.
BatchServiceGrpc.BatchServiceFutureStub
Google Batch Service. The service manages user submitted batch jobs and allocates Google Compute Engine VM instances to run the jobs.
BatchServiceGrpc.BatchServiceImplBase
Google Batch Service. The service manages user submitted batch jobs and allocates Google Compute Engine VM instances to run the jobs.
BatchServiceGrpc.BatchServiceStub
Google Batch Service. The service manages user submitted batch jobs and allocates Google Compute Engine VM instances to run the jobs.
BatchServiceSettings
Settings class to configure an instance of BatchServiceClient.
The default instance has everything set to sensible defaults:
- The default service address (batch.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of createJob to 30 seconds:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
BatchServiceSettings.Builder batchServiceSettingsBuilder = BatchServiceSettings.newBuilder();
batchServiceSettingsBuilder
.createJobSettings()
.setRetrySettings(
batchServiceSettingsBuilder
.createJobSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
BatchServiceSettings batchServiceSettings = batchServiceSettingsBuilder.build();
BatchServiceSettings.Builder
Builder for BatchServiceSettings.
ComputeResource
Compute resource requirements
Protobuf type google.cloud.batch.v1alpha.ComputeResource
ComputeResource.Builder
Compute resource requirements
Protobuf type google.cloud.batch.v1alpha.ComputeResource
CreateJobRequest
CreateJob Request.
Protobuf type google.cloud.batch.v1alpha.CreateJobRequest
CreateJobRequest.Builder
CreateJob Request.
Protobuf type google.cloud.batch.v1alpha.CreateJobRequest
DeleteJobRequest
DeleteJob Request.
Protobuf type google.cloud.batch.v1alpha.DeleteJobRequest
DeleteJobRequest.Builder
DeleteJob Request.
Protobuf type google.cloud.batch.v1alpha.DeleteJobRequest
Environment
An Environment describes a collection of environment variables to set when executing Tasks.
Protobuf type google.cloud.batch.v1alpha.Environment
Environment.Builder
An Environment describes a collection of environment variables to set when executing Tasks.
Protobuf type google.cloud.batch.v1alpha.Environment
Environment.KMSEnvMap
Protobuf type google.cloud.batch.v1alpha.Environment.KMSEnvMap
Environment.KMSEnvMap.Builder
Protobuf type google.cloud.batch.v1alpha.Environment.KMSEnvMap
GCS
Represents a Google Cloud Storage volume source config.
Protobuf type google.cloud.batch.v1alpha.GCS
GCS.Builder
Represents a Google Cloud Storage volume source config.
Protobuf type google.cloud.batch.v1alpha.GCS
GetJobRequest
GetJob Request.
Protobuf type google.cloud.batch.v1alpha.GetJobRequest
GetJobRequest.Builder
GetJob Request.
Protobuf type google.cloud.batch.v1alpha.GetJobRequest
GetTaskRequest
Request for a single Task by name.
Protobuf type google.cloud.batch.v1alpha.GetTaskRequest
GetTaskRequest.Builder
Request for a single Task by name.
Protobuf type google.cloud.batch.v1alpha.GetTaskRequest
Job
The Cloud Batch Job description.
Protobuf type google.cloud.batch.v1alpha.Job
Job.Builder
The Cloud Batch Job description.
Protobuf type google.cloud.batch.v1alpha.Job
JobDependency
JobDependency describes the state of other Jobs that the start of this Job depends on. All dependent Jobs must have been submitted in the same region.
Protobuf type google.cloud.batch.v1alpha.JobDependency
JobDependency.Builder
JobDependency describes the state of other Jobs that the start of this Job depends on. All dependent Jobs must have been submitted in the same region.
Protobuf type google.cloud.batch.v1alpha.JobDependency
JobName
JobName.Builder
Builder for projects/{project}/locations/{location}/jobs/{job}.
JobNotification
Notification configurations.
Protobuf type google.cloud.batch.v1alpha.JobNotification
JobNotification.Builder
Notification configurations.
Protobuf type google.cloud.batch.v1alpha.JobNotification
JobNotification.Message
Message details. Describe the attribute that a message should have. Without specified message attributes, no message will be sent by default.
Protobuf type google.cloud.batch.v1alpha.JobNotification.Message
JobNotification.Message.Builder
Message details. Describe the attribute that a message should have. Without specified message attributes, no message will be sent by default.
Protobuf type google.cloud.batch.v1alpha.JobNotification.Message
JobProto
JobStatus
Job status.
Protobuf type google.cloud.batch.v1alpha.JobStatus
JobStatus.Builder
Job status.
Protobuf type google.cloud.batch.v1alpha.JobStatus
JobStatus.InstanceStatus
VM instance status.
Protobuf type google.cloud.batch.v1alpha.JobStatus.InstanceStatus
JobStatus.InstanceStatus.Builder
VM instance status.
Protobuf type google.cloud.batch.v1alpha.JobStatus.InstanceStatus
JobStatus.TaskGroupStatus
Aggregated task status for a TaskGroup.
Protobuf type google.cloud.batch.v1alpha.JobStatus.TaskGroupStatus
JobStatus.TaskGroupStatus.Builder
Aggregated task status for a TaskGroup.
Protobuf type google.cloud.batch.v1alpha.JobStatus.TaskGroupStatus
LifecyclePolicy
LifecyclePolicy describes how to deal with task failures based on different conditions.
Protobuf type google.cloud.batch.v1alpha.LifecyclePolicy
LifecyclePolicy.ActionCondition
Conditions for actions to deal with task failures.
Protobuf type google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition
LifecyclePolicy.ActionCondition.Builder
Conditions for actions to deal with task failures.
Protobuf type google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition
LifecyclePolicy.Builder
LifecyclePolicy describes how to deal with task failures based on different conditions.
Protobuf type google.cloud.batch.v1alpha.LifecyclePolicy
ListJobsRequest
ListJob Request.
Protobuf type google.cloud.batch.v1alpha.ListJobsRequest
ListJobsRequest.Builder
ListJob Request.
Protobuf type google.cloud.batch.v1alpha.ListJobsRequest
ListJobsResponse
ListJob Response.
Protobuf type google.cloud.batch.v1alpha.ListJobsResponse
ListJobsResponse.Builder
ListJob Response.
Protobuf type google.cloud.batch.v1alpha.ListJobsResponse
ListTasksRequest
ListTasks Request.
Protobuf type google.cloud.batch.v1alpha.ListTasksRequest
ListTasksRequest.Builder
ListTasks Request.
Protobuf type google.cloud.batch.v1alpha.ListTasksRequest
ListTasksResponse
ListTasks Response.
Protobuf type google.cloud.batch.v1alpha.ListTasksResponse
ListTasksResponse.Builder
ListTasks Response.
Protobuf type google.cloud.batch.v1alpha.ListTasksResponse
LocationName
LocationName.Builder
Builder for projects/{project}/locations/{location}.
LogsPolicy
LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved.
Protobuf type google.cloud.batch.v1alpha.LogsPolicy
LogsPolicy.Builder
LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved.
Protobuf type google.cloud.batch.v1alpha.LogsPolicy
NFS
Represents an NFS server and remote path: <server>:<remote_path>
Protobuf type google.cloud.batch.v1alpha.NFS
NFS.Builder
Represents an NFS server and remote path: <server>:<remote_path>
Protobuf type google.cloud.batch.v1alpha.NFS
OperationMetadata
Represents the metadata of the long-running operation.
Protobuf type google.cloud.batch.v1alpha.OperationMetadata
OperationMetadata.Builder
Represents the metadata of the long-running operation.
Protobuf type google.cloud.batch.v1alpha.OperationMetadata
PD
Represents a GCP persistent disk
Protobuf type google.cloud.batch.v1alpha.PD
PD.Builder
Represents a GCP persistent disk
Protobuf type google.cloud.batch.v1alpha.PD
Runnable
Runnable describes instructions for executing a specific script or container as part of a Task.
Protobuf type google.cloud.batch.v1alpha.Runnable
Runnable.Barrier
Barrier runnable blocks until all tasks in a taskgroup reach it.
Protobuf type google.cloud.batch.v1alpha.Runnable.Barrier
Runnable.Barrier.Builder
Barrier runnable blocks until all tasks in a taskgroup reach it.
Protobuf type google.cloud.batch.v1alpha.Runnable.Barrier
Runnable.Builder
Runnable describes instructions for executing a specific script or container as part of a Task.
Protobuf type google.cloud.batch.v1alpha.Runnable
Runnable.Container
Container runnable.
Protobuf type google.cloud.batch.v1alpha.Runnable.Container
Runnable.Container.Builder
Container runnable.
Protobuf type google.cloud.batch.v1alpha.Runnable.Container
Runnable.Script
Script runnable.
Protobuf type google.cloud.batch.v1alpha.Runnable.Script
Runnable.Script.Builder
Script runnable.
Protobuf type google.cloud.batch.v1alpha.Runnable.Script
ServiceAccount
Carries information about a Google Cloud service account.
Protobuf type google.cloud.batch.v1alpha.ServiceAccount
ServiceAccount.Builder
Carries information about a Google Cloud service account.
Protobuf type google.cloud.batch.v1alpha.ServiceAccount
StatusEvent
Status event
Protobuf type google.cloud.batch.v1alpha.StatusEvent
StatusEvent.Builder
Status event
Protobuf type google.cloud.batch.v1alpha.StatusEvent
Task
A Cloud Batch task.
Protobuf type google.cloud.batch.v1alpha.Task
Task.Builder
A Cloud Batch task.
Protobuf type google.cloud.batch.v1alpha.Task
TaskExecution
This Task Execution field includes detail information for task execution procedures, based on StatusEvent types.
Protobuf type google.cloud.batch.v1alpha.TaskExecution
TaskExecution.Builder
This Task Execution field includes detail information for task execution procedures, based on StatusEvent types.
Protobuf type google.cloud.batch.v1alpha.TaskExecution
TaskGroup
A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters.
Protobuf type google.cloud.batch.v1alpha.TaskGroup
TaskGroup.Builder
A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters.
Protobuf type google.cloud.batch.v1alpha.TaskGroup
TaskGroupName
TaskGroupName.Builder
Builder for projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}.
TaskName
TaskName.Builder
Builder for projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}.
TaskProto
TaskSpec
Spec of a task
Protobuf type google.cloud.batch.v1alpha.TaskSpec
TaskSpec.Builder
Spec of a task
Protobuf type google.cloud.batch.v1alpha.TaskSpec
TaskStatus
Status of a task
Protobuf type google.cloud.batch.v1alpha.TaskStatus
TaskStatus.Builder
Status of a task
Protobuf type google.cloud.batch.v1alpha.TaskStatus
Volume
Volume and mount parameters to be associated with a TaskSpec. A TaskSpec might describe zero, one, or multiple volumes to be mounted as part of the task.
Protobuf type google.cloud.batch.v1alpha.Volume
Volume.Builder
Volume and mount parameters to be associated with a TaskSpec. A TaskSpec might describe zero, one, or multiple volumes to be mounted as part of the task.
Protobuf type google.cloud.batch.v1alpha.Volume
VolumeProto
Interfaces
AllocationPolicy.AcceleratorOrBuilder
AllocationPolicy.AttachedDiskOrBuilder
AllocationPolicy.DiskOrBuilder
AllocationPolicy.InstancePolicyOrBuilder
AllocationPolicy.InstancePolicyOrTemplateOrBuilder
AllocationPolicy.LocationPolicyOrBuilder
AllocationPolicy.NetworkInterfaceOrBuilder
AllocationPolicy.NetworkPolicyOrBuilder
AllocationPolicyOrBuilder
ComputeResourceOrBuilder
CreateJobRequestOrBuilder
DeleteJobRequestOrBuilder
Environment.KMSEnvMapOrBuilder
EnvironmentOrBuilder
GCSOrBuilder
GetJobRequestOrBuilder
GetTaskRequestOrBuilder
JobDependencyOrBuilder
JobNotification.MessageOrBuilder
JobNotificationOrBuilder
JobOrBuilder
JobStatus.InstanceStatusOrBuilder
JobStatus.TaskGroupStatusOrBuilder
JobStatusOrBuilder
LifecyclePolicy.ActionConditionOrBuilder
LifecyclePolicyOrBuilder
ListJobsRequestOrBuilder
ListJobsResponseOrBuilder
ListTasksRequestOrBuilder
ListTasksResponseOrBuilder
LogsPolicyOrBuilder
NFSOrBuilder
OperationMetadataOrBuilder
PDOrBuilder
Runnable.BarrierOrBuilder
Runnable.ContainerOrBuilder
Runnable.ScriptOrBuilder
RunnableOrBuilder
ServiceAccountOrBuilder
StatusEventOrBuilder
TaskExecutionOrBuilder
TaskGroupOrBuilder
TaskOrBuilder
TaskSpecOrBuilder
TaskStatusOrBuilder
VolumeOrBuilder
Enums
AllocationPolicy.AttachedDisk.AttachedCase
AllocationPolicy.Disk.DataSourceCase
AllocationPolicy.InstancePolicyOrTemplate.PolicyTemplateCase
AllocationPolicy.ProvisioningModel
Compute Engine VM instance provisioning model.
Protobuf enum google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel
Job.SchedulingPolicy
The order that TaskGroups are scheduled relative to each other. Not yet implemented.
Protobuf enum google.cloud.batch.v1alpha.Job.SchedulingPolicy
JobDependency.Type
Dependency type.
Protobuf enum google.cloud.batch.v1alpha.JobDependency.Type
JobNotification.Type
The message type.
Protobuf enum google.cloud.batch.v1alpha.JobNotification.Type
JobStatus.State
Valid Job states.
Protobuf enum google.cloud.batch.v1alpha.JobStatus.State
LifecyclePolicy.Action
Action on task failures based on different conditions.
Protobuf enum google.cloud.batch.v1alpha.LifecyclePolicy.Action
LogsPolicy.Destination
The destination (if any) for logs.
Protobuf enum google.cloud.batch.v1alpha.LogsPolicy.Destination
Runnable.ExecutableCase
Runnable.Script.CommandCase
TaskGroup.SchedulingPolicy
How Tasks in the TaskGroup should be scheduled relative to each other.
Protobuf enum google.cloud.batch.v1alpha.TaskGroup.SchedulingPolicy
TaskStatus.State
Task states.
Protobuf enum google.cloud.batch.v1alpha.TaskStatus.State