Stay organized with collections Save and categorize content based on your preferences.
var (
LogsPolicy_Destination_name = map[int32]string{
0: "DESTINATION_UNSPECIFIED",
1: "CLOUD_LOGGING",
2: "PATH",
}
LogsPolicy_Destination_value = map[string]int32{
"DESTINATION_UNSPECIFIED": 0,
"CLOUD_LOGGING": 1,
"PATH": 2,
}
)
Enum value maps for LogsPolicy_Destination.
JobStatus_State_name, JobStatus_State_valuevar (
JobStatus_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "QUEUED",
2: "SCHEDULED",
3: "RUNNING",
4: "SUCCEEDED",
5: "FAILED",
6: "DELETION_IN_PROGRESS",
7: "CANCELLATION_IN_PROGRESS",
8: "CANCELLED",
}
JobStatus_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"QUEUED": 1,
"SCHEDULED": 2,
"RUNNING": 3,
"SUCCEEDED": 4,
"FAILED": 5,
"DELETION_IN_PROGRESS": 6,
"CANCELLATION_IN_PROGRESS": 7,
"CANCELLED": 8,
}
)
Enum value maps for JobStatus_State.
JobNotification_Type_name, JobNotification_Type_valuevar (
JobNotification_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "JOB_STATE_CHANGED",
2: "TASK_STATE_CHANGED",
}
JobNotification_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"JOB_STATE_CHANGED": 1,
"TASK_STATE_CHANGED": 2,
}
)
Enum value maps for JobNotification_Type.
AllocationPolicy_ProvisioningModel_name, AllocationPolicy_ProvisioningModel_valuevar (
AllocationPolicy_ProvisioningModel_name = map[int32]string{
0: "PROVISIONING_MODEL_UNSPECIFIED",
1: "STANDARD",
2: "SPOT",
3: "PREEMPTIBLE",
}
AllocationPolicy_ProvisioningModel_value = map[string]int32{
"PROVISIONING_MODEL_UNSPECIFIED": 0,
"STANDARD": 1,
"SPOT": 2,
"PREEMPTIBLE": 3,
}
)
Enum value maps for AllocationPolicy_ProvisioningModel.
TaskGroup_SchedulingPolicy_name, TaskGroup_SchedulingPolicy_valuevar (
TaskGroup_SchedulingPolicy_name = map[int32]string{
0: "SCHEDULING_POLICY_UNSPECIFIED",
1: "AS_SOON_AS_POSSIBLE",
2: "IN_ORDER",
}
TaskGroup_SchedulingPolicy_value = map[string]int32{
"SCHEDULING_POLICY_UNSPECIFIED": 0,
"AS_SOON_AS_POSSIBLE": 1,
"IN_ORDER": 2,
}
)
Enum value maps for TaskGroup_SchedulingPolicy.
TaskStatus_State_name, TaskStatus_State_valuevar (
TaskStatus_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "PENDING",
2: "ASSIGNED",
3: "RUNNING",
4: "FAILED",
5: "SUCCEEDED",
6: "UNEXECUTED",
}
TaskStatus_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"PENDING": 1,
"ASSIGNED": 2,
"RUNNING": 3,
"FAILED": 4,
"SUCCEEDED": 5,
"UNEXECUTED": 6,
}
)
Enum value maps for TaskStatus_State.
LifecyclePolicy_Action_name, LifecyclePolicy_Action_valuevar (
LifecyclePolicy_Action_name = map[int32]string{
0: "ACTION_UNSPECIFIED",
1: "RETRY_TASK",
2: "FAIL_TASK",
}
LifecyclePolicy_Action_value = map[string]int32{
"ACTION_UNSPECIFIED": 0,
"RETRY_TASK": 1,
"FAIL_TASK": 2,
}
)
Enum value maps for LifecyclePolicy_Action.
File_google_cloud_batch_v1_batch_proto File_google_cloud_batch_v1_job_proto File_google_cloud_batch_v1_task_proto File_google_cloud_batch_v1_volume_proto Functions func RegisterBatchServiceServer AllocationPolicytype AllocationPolicy struct {
// Location where compute resources should be allocated for the Job.
Location *AllocationPolicy_LocationPolicy `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
// Describe instances that can be created by this AllocationPolicy.
// Only instances[0] is supported now.
Instances []*AllocationPolicy_InstancePolicyOrTemplate `protobuf:"bytes,8,rep,name=instances,proto3" json:"instances,omitempty"`
// Defines the service account for Batch-created VMs. If omitted, the [default
// Compute Engine service
// account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
// is used. Must match the service account specified in any used instance
// template configured in the Batch job.
//
// Includes the following fields:
// - email: The service account's email address. If not set, the default
// Compute Engine service account is used.
// - scopes: Additional OAuth scopes to grant the service account, beyond the
// default cloud-platform scope. (list of strings)
ServiceAccount *ServiceAccount `protobuf:"bytes,9,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"`
// Custom labels to apply to the job and all the Compute Engine resources
// that both are created by this allocation policy and support labels.
//
// Use labels to group and describe the resources they are applied to. Batch
// automatically applies predefined labels and supports multiple `labels`
// fields for each job, which each let you apply custom labels to various
// resources. Label names that start with "goog-" or "google-" are
// reserved for predefined labels. For more information about labels with
// Batch, see
// [Organize resources using
// labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The network policy.
//
// If you define an instance template in the `InstancePolicyOrTemplate` field,
// Batch will use the network settings in the instance template instead of
// this field.
Network *AllocationPolicy_NetworkPolicy `protobuf:"bytes,7,opt,name=network,proto3" json:"network,omitempty"`
// The placement policy.
Placement *AllocationPolicy_PlacementPolicy `protobuf:"bytes,10,opt,name=placement,proto3" json:"placement,omitempty"`
// Optional. Tags applied to the VM instances.
//
// The tags identify valid sources or targets for network firewalls.
// Each tag must be 1-63 characters long, and comply with
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
Tags []string `protobuf:"bytes,11,rep,name=tags,proto3" json:"tags,omitempty"`
// contains filtered or unexported fields
}
A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.
func (*AllocationPolicy) DescriptorDeprecated: Use AllocationPolicy.ProtoReflect.Descriptor instead.
func (*AllocationPolicy) GetInstances func (*AllocationPolicy) GetLabels func (*AllocationPolicy) GetLocation func (*AllocationPolicy) GetNetwork func (*AllocationPolicy) GetPlacement func (*AllocationPolicy) GetServiceAccount func (*AllocationPolicy) GetTags func (*AllocationPolicy) ProtoMessage func (*AllocationPolicy) ProtoReflect func (*AllocationPolicy) Reset func (*AllocationPolicy) String AllocationPolicy_Acceleratortype AllocationPolicy_Accelerator struct {
// The accelerator type. For example, "nvidia-tesla-t4".
// See `gcloud compute accelerator-types list`.
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// The number of accelerators of this type.
Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// Deprecated: please use instances[0].install_gpu_drivers instead.
//
// Deprecated: Marked as deprecated in google/cloud/batch/v1/job.proto.
InstallGpuDrivers bool `protobuf:"varint,3,opt,name=install_gpu_drivers,json=installGpuDrivers,proto3" json:"install_gpu_drivers,omitempty"`
// Optional. The NVIDIA GPU driver version that should be installed for this
// type.
//
// You can define the specific driver version such as "470.103.01",
// following the driver version requirements in
// https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver.
// Batch will install the specific accelerator driver if qualified.
DriverVersion string `protobuf:"bytes,4,opt,name=driver_version,json=driverVersion,proto3" json:"driver_version,omitempty"`
// contains filtered or unexported fields
}
Accelerator describes Compute Engine accelerators to be attached to the VM.
func (*AllocationPolicy_Accelerator) DescriptorDeprecated: Use AllocationPolicy_Accelerator.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_Accelerator) GetCount func (*AllocationPolicy_Accelerator) GetDriverVersion func (*AllocationPolicy_Accelerator) GetInstallGpuDriversDeprecated: Marked as deprecated in google/cloud/batch/v1/job.proto.
func (*AllocationPolicy_Accelerator) GetType func (*AllocationPolicy_Accelerator) ProtoMessage func (*AllocationPolicy_Accelerator) ProtoReflect func (*AllocationPolicy_Accelerator) Reset func (*AllocationPolicy_Accelerator) String AllocationPolicy_AttachedDisktype AllocationPolicy_AttachedDisk struct {
// Types that are assignable to Attached:
//
// *AllocationPolicy_AttachedDisk_NewDisk
// *AllocationPolicy_AttachedDisk_ExistingDisk
Attached isAllocationPolicy_AttachedDisk_Attached `protobuf_oneof:"attached"`
// Device name that the guest operating system will see.
// It is used by Runnable.volumes field to mount disks. So please specify
// the device_name if you want Batch to help mount the disk, and it should
// match the device_name field in volumes.
DeviceName string `protobuf:"bytes,3,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
// contains filtered or unexported fields
}
A new or an existing persistent disk (PD) or a local ssd attached to a VM instance.
func (*AllocationPolicy_AttachedDisk) DescriptorDeprecated: Use AllocationPolicy_AttachedDisk.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_AttachedDisk) GetAttached func (*AllocationPolicy_AttachedDisk) GetDeviceName func (*AllocationPolicy_AttachedDisk) GetExistingDisk func (*AllocationPolicy_AttachedDisk) GetNewDisk func (*AllocationPolicy_AttachedDisk) ProtoMessage func (*AllocationPolicy_AttachedDisk) ProtoReflect func (*AllocationPolicy_AttachedDisk) Reset func (*AllocationPolicy_AttachedDisk) String AllocationPolicy_AttachedDisk_ExistingDisktype AllocationPolicy_AttachedDisk_ExistingDisk struct {
// Name of an existing PD.
ExistingDisk string `protobuf:"bytes,2,opt,name=existing_disk,json=existingDisk,proto3,oneof"`
}
AllocationPolicy_AttachedDisk_NewDisk
type AllocationPolicy_AttachedDisk_NewDisk struct {
NewDisk *AllocationPolicy_Disk `protobuf:"bytes,1,opt,name=new_disk,json=newDisk,proto3,oneof"`
}
AllocationPolicy_Disk
type AllocationPolicy_Disk struct {
// A data source from which a PD will be created.
//
// Types that are assignable to DataSource:
//
// *AllocationPolicy_Disk_Image
// *AllocationPolicy_Disk_Snapshot
DataSource isAllocationPolicy_Disk_DataSource `protobuf_oneof:"data_source"`
// Disk type as shown in `gcloud compute disk-types list`.
// For example, local SSD uses type "local-ssd".
// Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd"
// or "pd-standard". If not specified, "pd-standard" will be used as the
// default type for non-boot disks, "pd-balanced" will be used as the
// default type for boot disks.
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Disk size in GB.
//
// **Non-Boot Disk**:
// If the `type` specifies a persistent disk, this field
// is ignored if `data_source` is set as `image` or `snapshot`.
// If the `type` specifies a local SSD, this field should be a multiple of
// 375 GB, otherwise, the final size will be the next greater multiple of
// 375 GB.
//
// **Boot Disk**:
// Batch will calculate the boot disk size based on source
// image and task requirements if you do not speicify the size.
// If both this field and the `boot_disk_mib` field in task spec's
// `compute_resource` are defined, Batch will only honor this field.
// Also, this field should be no smaller than the source disk's
// size when the `data_source` is set as `snapshot` or `image`.
// For example, if you set an image as the `data_source` field and the
// image's default disk size 30 GB, you can only use this field to make the
// disk larger or equal to 30 GB.
SizeGb int64 `protobuf:"varint,2,opt,name=size_gb,json=sizeGb,proto3" json:"size_gb,omitempty"`
// Local SSDs are available through both "SCSI" and "NVMe" interfaces.
// If not indicated, "NVMe" will be the default one for local ssds.
// This field is ignored for persistent disks as the interface is chosen
// automatically. See
// https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface.
DiskInterface string `protobuf:"bytes,6,opt,name=disk_interface,json=diskInterface,proto3" json:"disk_interface,omitempty"`
// contains filtered or unexported fields
}
A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. See https://cloud.google.com/compute/docs/disks#pdspecs and https://cloud.google.com/compute/docs/disks#localssds.
func (*AllocationPolicy_Disk) DescriptorDeprecated: Use AllocationPolicy_Disk.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_Disk) GetDataSource func (*AllocationPolicy_Disk) GetDiskInterface func (*AllocationPolicy_Disk) GetImage func (*AllocationPolicy_Disk) GetSizeGb func (*AllocationPolicy_Disk) GetSnapshot func (*AllocationPolicy_Disk) GetType func (*AllocationPolicy_Disk) ProtoMessage func (*AllocationPolicy_Disk) ProtoReflect func (*AllocationPolicy_Disk) Reset func (*AllocationPolicy_Disk) String AllocationPolicy_Disk_Imagetype AllocationPolicy_Disk_Image struct {
// URL for a VM image to use as the data source for this disk.
// For example, the following are all valid URLs:
//
// * Specify the image by its family name:
// projects/{project}/global/images/family/{image_family}
// * Specify the image version:
// projects/{project}/global/images/{image_version}
//
// You can also use Batch customized image in short names.
// The following image values are supported for a boot disk:
//
// * `batch-debian`: use Batch Debian images.
// * `batch-cos`: use Batch Container-Optimized images.
// * `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
Image string `protobuf:"bytes,4,opt,name=image,proto3,oneof"`
}
AllocationPolicy_Disk_Snapshot
type AllocationPolicy_Disk_Snapshot struct {
// Name of a snapshot used as the data source.
// Snapshot is not supported as boot disk now.
Snapshot string `protobuf:"bytes,5,opt,name=snapshot,proto3,oneof"`
}
AllocationPolicy_InstancePolicy
type AllocationPolicy_InstancePolicy struct {
// The Compute Engine machine type.
MachineType string `protobuf:"bytes,2,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"`
// The minimum CPU platform.
// See
// https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
MinCpuPlatform string `protobuf:"bytes,3,opt,name=min_cpu_platform,json=minCpuPlatform,proto3" json:"min_cpu_platform,omitempty"`
// The provisioning model.
ProvisioningModel AllocationPolicy_ProvisioningModel `protobuf:"varint,4,opt,name=provisioning_model,json=provisioningModel,proto3,enum=google.cloud.batch.v1.AllocationPolicy_ProvisioningModel" json:"provisioning_model,omitempty"`
// The accelerators attached to each VM instance.
Accelerators []*AllocationPolicy_Accelerator `protobuf:"bytes,5,rep,name=accelerators,proto3" json:"accelerators,omitempty"`
// Boot disk to be created and attached to each VM by this InstancePolicy.
// Boot disk will be deleted when the VM is deleted.
// Batch API now only supports booting from image.
BootDisk *AllocationPolicy_Disk `protobuf:"bytes,8,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"`
// Non-boot disks to be attached for each VM created by this InstancePolicy.
// New disks will be deleted when the VM is deleted.
// A non-boot disk is a disk that can be of a device with a
// file system or a raw storage drive that is not ready for data
// storage and accessing.
Disks []*AllocationPolicy_AttachedDisk `protobuf:"bytes,6,rep,name=disks,proto3" json:"disks,omitempty"`
// Optional. If not specified (default), VMs will consume any applicable
// reservation. If "NO_RESERVATION" is specified, VMs will not consume any
// reservation. Otherwise, if specified, VMs will consume only the specified
// reservation.
Reservation string `protobuf:"bytes,7,opt,name=reservation,proto3" json:"reservation,omitempty"`
// contains filtered or unexported fields
}
InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.
func (*AllocationPolicy_InstancePolicy) DescriptorDeprecated: Use AllocationPolicy_InstancePolicy.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_InstancePolicy) GetAccelerators func (*AllocationPolicy_InstancePolicy) GetBootDisk func (*AllocationPolicy_InstancePolicy) GetDisks func (*AllocationPolicy_InstancePolicy) GetMachineType func (*AllocationPolicy_InstancePolicy) GetMinCpuPlatform func (*AllocationPolicy_InstancePolicy) GetProvisioningModel func (*AllocationPolicy_InstancePolicy) GetReservation func (*AllocationPolicy_InstancePolicy) ProtoMessage func (*AllocationPolicy_InstancePolicy) ProtoReflect func (*AllocationPolicy_InstancePolicy) Reset func (*AllocationPolicy_InstancePolicy) String AllocationPolicy_InstancePolicyOrTemplatetype AllocationPolicy_InstancePolicyOrTemplate struct {
// Types that are assignable to PolicyTemplate:
//
// *AllocationPolicy_InstancePolicyOrTemplate_Policy
// *AllocationPolicy_InstancePolicyOrTemplate_InstanceTemplate
PolicyTemplate isAllocationPolicy_InstancePolicyOrTemplate_PolicyTemplate `protobuf_oneof:"policy_template"`
// Set this field true if you want Batch to help fetch drivers from a third
// party location and install them for GPUs specified in
// `policy.accelerators` or `instance_template` on your behalf. Default is
// false.
//
// For Container-Optimized Image cases, Batch will install the
// accelerator driver following milestones of
// https://cloud.google.com/container-optimized-os/docs/release-notes. For
// non Container-Optimized Image cases, following
// https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py.
InstallGpuDrivers bool `protobuf:"varint,3,opt,name=install_gpu_drivers,json=installGpuDrivers,proto3" json:"install_gpu_drivers,omitempty"`
// Optional. Set this field true if you want Batch to install Ops Agent on
// your behalf. Default is false.
InstallOpsAgent bool `protobuf:"varint,4,opt,name=install_ops_agent,json=installOpsAgent,proto3" json:"install_ops_agent,omitempty"`
// Optional. Set this field to `true` if you want Batch to block
// project-level SSH keys from accessing this job's VMs. Alternatively, you
// can configure the job to specify a VM instance template that blocks
// project-level SSH keys. In either case, Batch blocks project-level SSH
// keys while creating the VMs for this job.
//
// Batch allows project-level SSH keys for a job's VMs only if all
// the following are true:
//
// - This field is undefined or set to `false`.
// - The job's VM instance template (if any) doesn't block project-level
// SSH keys.
//
// Notably, you can override this behavior by manually updating a VM to
// block or allow project-level SSH keys. For more information about
// blocking project-level SSH keys, see the Compute Engine documentation:
// https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys
BlockProjectSshKeys bool `protobuf:"varint,5,opt,name=block_project_ssh_keys,json=blockProjectSshKeys,proto3" json:"block_project_ssh_keys,omitempty"`
// contains filtered or unexported fields
}
InstancePolicyOrTemplate lets you define the type of resources to use for this job either with an InstancePolicy or an instance template. If undefined, Batch picks the type of VM to use and doesn't include optional VM resources such as GPUs and extra disks.
func (*AllocationPolicy_InstancePolicyOrTemplate) DescriptorDeprecated: Use AllocationPolicy_InstancePolicyOrTemplate.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_InstancePolicyOrTemplate) GetBlockProjectSshKeys func (*AllocationPolicy_InstancePolicyOrTemplate) GetInstallGpuDrivers func (*AllocationPolicy_InstancePolicyOrTemplate) GetInstallOpsAgent func (*AllocationPolicy_InstancePolicyOrTemplate) GetInstanceTemplate func (*AllocationPolicy_InstancePolicyOrTemplate) GetPolicy func (*AllocationPolicy_InstancePolicyOrTemplate) GetPolicyTemplate func (*AllocationPolicy_InstancePolicyOrTemplate) ProtoMessage func (*AllocationPolicy_InstancePolicyOrTemplate) ProtoReflect func (*AllocationPolicy_InstancePolicyOrTemplate) Reset func (*AllocationPolicy_InstancePolicyOrTemplate) String AllocationPolicy_InstancePolicyOrTemplate_InstanceTemplatetype AllocationPolicy_InstancePolicyOrTemplate_InstanceTemplate struct {
// Name of an instance template used to create VMs.
// Named the field as 'instance_template' instead of 'template' to avoid
// C++ keyword conflict.
//
// Batch only supports global instance templates from the same project as
// the job.
// You can specify the global instance template as a full or partial URL.
InstanceTemplate string `protobuf:"bytes,2,opt,name=instance_template,json=instanceTemplate,proto3,oneof"`
}
AllocationPolicy_InstancePolicyOrTemplate_Policy
type AllocationPolicy_InstancePolicyOrTemplate_Policy struct {
// InstancePolicy.
Policy *AllocationPolicy_InstancePolicy `protobuf:"bytes,1,opt,name=policy,proto3,oneof"`
}
AllocationPolicy_LocationPolicy
type AllocationPolicy_LocationPolicy struct {
// A list of allowed location names represented by internal URLs.
//
// Each location can be a region or a zone.
// Only one region or multiple zones in one region is supported now.
// For example,
// ["regions/us-central1"] allow VMs in any zones in region us-central1.
// ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
// in zones us-central1-a and us-central1-c.
//
// Mixing locations from different regions would cause errors.
// For example,
// ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
// "zones/us-west1-a"] contains locations from two distinct regions:
// us-central1 and us-west1. This combination will trigger an error.
AllowedLocations []string `protobuf:"bytes,1,rep,name=allowed_locations,json=allowedLocations,proto3" json:"allowed_locations,omitempty"`
// contains filtered or unexported fields
}
func (*AllocationPolicy_LocationPolicy) Descriptor
Deprecated: Use AllocationPolicy_LocationPolicy.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_LocationPolicy) GetAllowedLocations func (*AllocationPolicy_LocationPolicy) ProtoMessage func (*AllocationPolicy_LocationPolicy) ProtoReflect func (*AllocationPolicy_LocationPolicy) Reset func (*AllocationPolicy_LocationPolicy) String AllocationPolicy_NetworkInterfacetype AllocationPolicy_NetworkInterface struct {
// The URL of an existing network resource.
// You can specify the network as a full or partial URL.
//
// For example, the following are all valid URLs:
//
// * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
// * projects/{project}/global/networks/{network}
// * global/networks/{network}
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
// The URL of an existing subnetwork resource in the network.
// You can specify the subnetwork as a full or partial URL.
//
// For example, the following are all valid URLs:
//
// * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}
// * projects/{project}/regions/{region}/subnetworks/{subnetwork}
// * regions/{region}/subnetworks/{subnetwork}
Subnetwork string `protobuf:"bytes,2,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"`
// Default is false (with an external IP address). Required if
// no external public IP address is attached to the VM. If no external
// public IP address, additional configuration is required to allow the VM
// to access Google Services. See
// https://cloud.google.com/vpc/docs/configure-private-google-access and
// https://cloud.google.com/nat/docs/gce-example#create-nat for more
// information.
NoExternalIpAddress bool `protobuf:"varint,3,opt,name=no_external_ip_address,json=noExternalIpAddress,proto3" json:"no_external_ip_address,omitempty"`
// contains filtered or unexported fields
}
A network interface.
func (*AllocationPolicy_NetworkInterface) DescriptorDeprecated: Use AllocationPolicy_NetworkInterface.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_NetworkInterface) GetNetwork func (*AllocationPolicy_NetworkInterface) GetNoExternalIpAddress func (*AllocationPolicy_NetworkInterface) GetSubnetwork func (*AllocationPolicy_NetworkInterface) ProtoMessage func (*AllocationPolicy_NetworkInterface) ProtoReflect func (*AllocationPolicy_NetworkInterface) Reset func (*AllocationPolicy_NetworkInterface) String AllocationPolicy_NetworkPolicytype AllocationPolicy_NetworkPolicy struct {
// Network configurations.
NetworkInterfaces []*AllocationPolicy_NetworkInterface `protobuf:"bytes,1,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"`
// contains filtered or unexported fields
}
NetworkPolicy describes VM instance network configurations.
func (*AllocationPolicy_NetworkPolicy) DescriptorDeprecated: Use AllocationPolicy_NetworkPolicy.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_NetworkPolicy) GetNetworkInterfaces func (*AllocationPolicy_NetworkPolicy) ProtoMessage func (*AllocationPolicy_NetworkPolicy) ProtoReflect func (*AllocationPolicy_NetworkPolicy) Reset func (*AllocationPolicy_NetworkPolicy) String AllocationPolicy_PlacementPolicytype AllocationPolicy_PlacementPolicy struct {
// UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
// want VMs to be located close to each other for low network latency
// between the VMs. No placement policy will be generated when collocation
// is UNSPECIFIED.
Collocation string `protobuf:"bytes,1,opt,name=collocation,proto3" json:"collocation,omitempty"`
// When specified, causes the job to fail if more than max_distance logical
// switches are required between VMs. Batch uses the most compact possible
// placement of VMs even when max_distance is not specified. An explicit
// max_distance makes that level of compactness a strict requirement.
// Not yet implemented
MaxDistance int64 `protobuf:"varint,2,opt,name=max_distance,json=maxDistance,proto3" json:"max_distance,omitempty"`
// contains filtered or unexported fields
}
PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy.
func (*AllocationPolicy_PlacementPolicy) DescriptorDeprecated: Use AllocationPolicy_PlacementPolicy.ProtoReflect.Descriptor instead.
func (*AllocationPolicy_PlacementPolicy) GetCollocation func (*AllocationPolicy_PlacementPolicy) GetMaxDistance func (*AllocationPolicy_PlacementPolicy) ProtoMessage func (*AllocationPolicy_PlacementPolicy) ProtoReflect func (*AllocationPolicy_PlacementPolicy) Reset func (*AllocationPolicy_PlacementPolicy) String AllocationPolicy_ProvisioningModeltype AllocationPolicy_ProvisioningModel int32
Compute Engine VM instance provisioning model.
AllocationPolicy_PROVISIONING_MODEL_UNSPECIFIED, AllocationPolicy_STANDARD, AllocationPolicy_SPOT, AllocationPolicy_PREEMPTIBLE func (AllocationPolicy_ProvisioningModel) Descriptor func (AllocationPolicy_ProvisioningModel) Enum func (AllocationPolicy_ProvisioningModel) EnumDescriptorDeprecated: Use AllocationPolicy_ProvisioningModel.Descriptor instead.
func (AllocationPolicy_ProvisioningModel) Number func (AllocationPolicy_ProvisioningModel) String func (AllocationPolicy_ProvisioningModel) Type BatchServiceClienttype BatchServiceClient interface {
// Create a Job.
CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error)
// Get a Job specified by its resource name.
GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error)
// Delete a Job.
DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Cancel a Job.
CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// List all Jobs for a project within a region.
ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error)
// Return a single Task.
GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error)
// List Tasks associated with a job.
ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error)
}
func NewBatchServiceClient BatchServiceServer
type BatchServiceServer interface {
// Create a Job.
CreateJob(context.Context, *CreateJobRequest) (*Job, error)
// Get a Job specified by its resource name.
GetJob(context.Context, *GetJobRequest) (*Job, error)
// Delete a Job.
DeleteJob(context.Context, *DeleteJobRequest) (*longrunningpb.Operation, error)
// Cancel a Job.
CancelJob(context.Context, *CancelJobRequest) (*longrunningpb.Operation, error)
// List all Jobs for a project within a region.
ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error)
// Return a single Task.
GetTask(context.Context, *GetTaskRequest) (*Task, error)
// List Tasks associated with a job.
ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error)
}
BatchServiceServer is the server API for BatchService service.
CancelJobRequesttype CancelJobRequest struct {
// Required. Job name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. An optional request ID to identify requests. Specify a unique
// request ID so that if you must retry your request, the server will know to
// ignore the request if it has already been completed. The server will
// guarantee that for at least 60 minutes after the first request.
//
// For example, consider a situation where you make an initial request and
// the request times out. If you make the request again with the same request
// ID, the server can check if original operation with the same request ID
// was received, and if so, will ignore the second request. This prevents
// clients from accidentally creating duplicate commitments.
//
// The request ID must be a valid UUID with the exception that zero UUID is
// not supported (00000000-0000-0000-0000-000000000000).
RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// contains filtered or unexported fields
}
CancelJob Request.
func (*CancelJobRequest) DescriptorDeprecated: Use CancelJobRequest.ProtoReflect.Descriptor instead.
func (*CancelJobRequest) GetName func (*CancelJobRequest) GetRequestId func (*CancelJobRequest) ProtoMessage func (*CancelJobRequest) ProtoReflect func (*CancelJobRequest) Reset func (*CancelJobRequest) String CancelJobResponsetype CancelJobResponse struct {
// contains filtered or unexported fields
}
Response to the CancelJob request.
func (*CancelJobResponse) DescriptorDeprecated: Use CancelJobResponse.ProtoReflect.Descriptor instead.
func (*CancelJobResponse) ProtoMessage func (*CancelJobResponse) ProtoReflect func (*CancelJobResponse) Reset func (*CancelJobResponse) String ComputeResourcetype ComputeResource struct {
// The milliCPU count.
//
// `cpuMilli` defines the amount of CPU resources per task in milliCPU units.
// For example, `1000` corresponds to 1 vCPU per task. If undefined, the
// default value is `2000`.
//
// If you also define the VM's machine type using the `machineType` in
// [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy)
// field or inside the `instanceTemplate` in the
// [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate)
// field, make sure the CPU resources for both fields are compatible with each
// other and with how many tasks you want to allow to run on the same VM at
// the same time.
//
// For example, if you specify the `n2-standard-2` machine type, which has 2
// vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or
// you are recommended to run two tasks on the same VM if you set `cpuMilli`
// to `1000` or less.
CpuMilli int64 `protobuf:"varint,1,opt,name=cpu_milli,json=cpuMilli,proto3" json:"cpu_milli,omitempty"`
// Memory in MiB.
//
// `memoryMib` defines the amount of memory per task in MiB units.
// If undefined, the default value is `2000`.
// If you also define the VM's machine type using the `machineType` in
// [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicy)
// field or inside the `instanceTemplate` in the
// [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate)
// field, make sure the memory resources for both fields are compatible with
// each other and with how many tasks you want to allow to run on the same VM
// at the same time.
//
// For example, if you specify the `n2-standard-2` machine type, which has 8
// GiB each, you are recommended to set `memoryMib` to no more than `8192`,
// or you are recommended to run two tasks on the same VM if you set
// `memoryMib` to `4096` or less.
MemoryMib int64 `protobuf:"varint,2,opt,name=memory_mib,json=memoryMib,proto3" json:"memory_mib,omitempty"`
// Extra boot disk size in MiB for each task.
BootDiskMib int64 `protobuf:"varint,4,opt,name=boot_disk_mib,json=bootDiskMib,proto3" json:"boot_disk_mib,omitempty"`
// contains filtered or unexported fields
}
Compute resource requirements.
ComputeResource defines the amount of resources required for each task. Make sure your tasks have enough resources to successfully run. If you also define the types of resources for a job to use with the InstancePolicyOrTemplate field, make sure both fields are compatible with each other.
func (*ComputeResource) DescriptorDeprecated: Use ComputeResource.ProtoReflect.Descriptor instead.
func (*ComputeResource) GetBootDiskMib func (*ComputeResource) GetCpuMilli func (*ComputeResource) GetMemoryMib func (*ComputeResource) ProtoMessage func (*ComputeResource) ProtoReflect func (*ComputeResource) Reset func (*ComputeResource) String CreateJobRequesttype CreateJobRequest struct {
// Required. The parent resource name where the Job will be created.
// Pattern: "projects/{project}/locations/{location}"
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// ID used to uniquely identify the Job within its parent scope.
// This field should contain at most 63 characters and must start with
// lowercase characters.
// Only lowercase characters, numbers and '-' are accepted.
// The '-' character cannot be the first or the last one.
// A system generated ID will be used if the field is not set.
//
// The job.name field in the request will be ignored and the created resource
// name of the Job will be "{parent}/jobs/{job_id}".
JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
// Required. The Job to create.
Job *Job `protobuf:"bytes,3,opt,name=job,proto3" json:"job,omitempty"`
// Optional. An optional request ID to identify requests. Specify a unique
// request ID so that if you must retry your request, the server will know to
// ignore the request if it has already been completed. The server will
// guarantee that for at least 60 minutes since the first request.
//
// For example, consider a situation where you make an initial request and
// the request times out. If you make the request again with the same request
// ID, the server can check if original operation with the same request ID
// was received, and if so, will ignore the second request. This prevents
// clients from accidentally creating duplicate commitments.
//
// The request ID must be a valid UUID with the exception that zero UUID is
// not supported (00000000-0000-0000-0000-000000000000).
RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// contains filtered or unexported fields
}
CreateJob Request.
func (*CreateJobRequest) DescriptorDeprecated: Use CreateJobRequest.ProtoReflect.Descriptor instead.
func (*CreateJobRequest) GetJob func (*CreateJobRequest) GetJobId func (*CreateJobRequest) GetParent func (*CreateJobRequest) GetRequestId func (*CreateJobRequest) ProtoMessage func (*CreateJobRequest) ProtoReflect func (*CreateJobRequest) Reset func (*CreateJobRequest) String DeleteJobRequesttype DeleteJobRequest struct {
// Job name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. Reason for this deletion.
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
// Optional. An optional request ID to identify requests. Specify a unique
// request ID so that if you must retry your request, the server will know to
// ignore the request if it has already been completed. The server will
// guarantee that for at least 60 minutes after the first request.
//
// For example, consider a situation where you make an initial request and
// the request times out. If you make the request again with the same request
// ID, the server can check if original operation with the same request ID
// was received, and if so, will ignore the second request. This prevents
// clients from accidentally creating duplicate commitments.
//
// The request ID must be a valid UUID with the exception that zero UUID is
// not supported (00000000-0000-0000-0000-000000000000).
RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// contains filtered or unexported fields
}
DeleteJob Request.
func (*DeleteJobRequest) DescriptorDeprecated: Use DeleteJobRequest.ProtoReflect.Descriptor instead.
func (*DeleteJobRequest) GetName func (*DeleteJobRequest) GetReason func (*DeleteJobRequest) GetRequestId func (*DeleteJobRequest) ProtoMessage func (*DeleteJobRequest) ProtoReflect func (*DeleteJobRequest) Reset func (*DeleteJobRequest) String Environmenttype Environment struct {
// A map of environment variable names to values.
Variables map[string]string `protobuf:"bytes,1,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// A map of environment variable names to Secret Manager secret names.
// The VM will access the named secrets to set the value of each environment
// variable.
SecretVariables map[string]string `protobuf:"bytes,2,rep,name=secret_variables,json=secretVariables,proto3" json:"secret_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// An encrypted JSON dictionary where the key/value pairs correspond to
// environment variable names and their values.
EncryptedVariables *Environment_KMSEnvMap `protobuf:"bytes,3,opt,name=encrypted_variables,json=encryptedVariables,proto3" json:"encrypted_variables,omitempty"`
// contains filtered or unexported fields
}
An Environment describes a collection of environment variables to set when executing Tasks.
func (*Environment) DescriptorDeprecated: Use Environment.ProtoReflect.Descriptor instead.
func (*Environment) GetEncryptedVariables func (*Environment) GetSecretVariables func (*Environment) GetVariables func (*Environment) ProtoMessage func (*Environment) ProtoReflect func (*Environment) Reset func (*Environment) String Environment_KMSEnvMaptype Environment_KMSEnvMap struct {
// The name of the KMS key that will be used to decrypt the cipher text.
KeyName string `protobuf:"bytes,1,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"`
// The value of the cipherText response from the `encrypt` method.
CipherText string `protobuf:"bytes,2,opt,name=cipher_text,json=cipherText,proto3" json:"cipher_text,omitempty"`
// contains filtered or unexported fields
}
func (*Environment_KMSEnvMap) Descriptor
Deprecated: Use Environment_KMSEnvMap.ProtoReflect.Descriptor instead.
func (*Environment_KMSEnvMap) GetCipherText func (*Environment_KMSEnvMap) GetKeyName func (*Environment_KMSEnvMap) ProtoMessage func (*Environment_KMSEnvMap) ProtoReflect func (*Environment_KMSEnvMap) Reset func (*Environment_KMSEnvMap) String GCStype GCS struct {
// Remote path, either a bucket name or a subdirectory of a bucket, e.g.:
// bucket_name, bucket_name/subdirectory/
RemotePath string `protobuf:"bytes,1,opt,name=remote_path,json=remotePath,proto3" json:"remote_path,omitempty"`
// contains filtered or unexported fields
}
Represents a Google Cloud Storage volume.
func (*GCS) DescriptorDeprecated: Use GCS.ProtoReflect.Descriptor instead.
func (*GCS) GetRemotePath func (*GCS) ProtoMessagefunc (*GCS) ProtoMessage()
func (*GCS) ProtoReflect func (*GCS) Reset func (*GCS) String GetJobRequest
type GetJobRequest struct {
// Required. Job name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
GetJob Request.
func (*GetJobRequest) DescriptorDeprecated: Use GetJobRequest.ProtoReflect.Descriptor instead.
func (*GetJobRequest) GetName func (*GetJobRequest) ProtoMessage func (*GetJobRequest) ProtoReflect func (*GetJobRequest) Reset func (*GetJobRequest) String GetTaskRequesttype GetTaskRequest struct {
// Required. Task name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
Request for a single Task by name.
func (*GetTaskRequest) DescriptorDeprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead.
func (*GetTaskRequest) GetName func (*GetTaskRequest) ProtoMessage func (*GetTaskRequest) ProtoReflect func (*GetTaskRequest) Reset func (*GetTaskRequest) String Jobtype Job struct {
// Output only. Job name.
// For example: "projects/123456/locations/us-central1/jobs/job01".
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. A system generated unique ID for the Job.
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// Priority of the Job.
// The valid value range is [0, 100). Default value is 0.
// Higher value indicates higher priority.
// A job with higher priority value is more likely to run earlier if all other
// requirements are satisfied.
Priority int64 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"`
// Required. TaskGroups in the Job. Only one TaskGroup is supported now.
TaskGroups []*TaskGroup `protobuf:"bytes,4,rep,name=task_groups,json=taskGroups,proto3" json:"task_groups,omitempty"`
// Compute resource allocation for all TaskGroups in the Job.
AllocationPolicy *AllocationPolicy `protobuf:"bytes,7,opt,name=allocation_policy,json=allocationPolicy,proto3" json:"allocation_policy,omitempty"`
// Custom labels to apply to the job and any Cloud Logging
// [LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)
// that it generates.
//
// Use labels to group and describe the resources they are applied to. Batch
// automatically applies predefined labels and supports multiple `labels`
// fields for each job, which each let you apply custom labels to various
// resources. Label names that start with "goog-" or "google-" are
// reserved for predefined labels. For more information about labels with
// Batch, see
// [Organize resources using
// labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
Labels map[string]string `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Output only. Job status. It is read only for users.
Status *JobStatus `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
// Output only. When the Job was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The last time the Job was updated.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Log preservation policy for the Job.
LogsPolicy *LogsPolicy `protobuf:"bytes,13,opt,name=logs_policy,json=logsPolicy,proto3" json:"logs_policy,omitempty"`
// Notification configurations.
Notifications []*JobNotification `protobuf:"bytes,14,rep,name=notifications,proto3" json:"notifications,omitempty"`
// contains filtered or unexported fields
}
The Cloud Batch Job description.
func (*Job) DescriptorDeprecated: Use Job.ProtoReflect.Descriptor instead.
func (*Job) GetAllocationPolicy func (*Job) GetCreateTime func (*Job) GetLabels func (*Job) GetLogsPolicy func (*Job) GetName func (*Job) GetNotifications func (*Job) GetPriority func (*Job) GetStatus func (*Job) GetTaskGroups func (*Job) GetUid func (*Job) GetUpdateTime func (*Job) ProtoMessagefunc (*Job) ProtoMessage()
func (*Job) ProtoReflect func (*Job) Reset func (*Job) String JobNotification
type JobNotification struct {
// The Pub/Sub topic where notifications for the job, like state
// changes, will be published. If undefined, no Pub/Sub notifications
// are sent for this job.
//
// Specify the topic using the following format:
// `projects/{project}/topics/{topic}`.
// Notably, if you want to specify a Pub/Sub topic that is in a
// different project than the job, your administrator must grant your
// project's Batch service agent permission to publish to that topic.
//
// For more information about configuring Pub/Sub notifications for
// a job, see
// https://cloud.google.com/batch/docs/enable-notifications.
PubsubTopic string `protobuf:"bytes,1,opt,name=pubsub_topic,json=pubsubTopic,proto3" json:"pubsub_topic,omitempty"`
// The attribute requirements of messages to be sent to this Pub/Sub topic.
// Without this field, no message will be sent.
Message *JobNotification_Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Notification configurations.
func (*JobNotification) DescriptorDeprecated: Use JobNotification.ProtoReflect.Descriptor instead.
func (*JobNotification) GetMessage func (*JobNotification) GetPubsubTopic func (*JobNotification) ProtoMessage func (*JobNotification) ProtoReflect func (*JobNotification) Reset func (*JobNotification) String JobNotification_Messagetype JobNotification_Message struct {
// The message type.
Type JobNotification_Type `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.batch.v1.JobNotification_Type" json:"type,omitempty"`
// The new job state.
NewJobState JobStatus_State `protobuf:"varint,2,opt,name=new_job_state,json=newJobState,proto3,enum=google.cloud.batch.v1.JobStatus_State" json:"new_job_state,omitempty"`
// The new task state.
NewTaskState TaskStatus_State `protobuf:"varint,3,opt,name=new_task_state,json=newTaskState,proto3,enum=google.cloud.batch.v1.TaskStatus_State" json:"new_task_state,omitempty"`
// contains filtered or unexported fields
}
Message details. Describe the conditions under which messages will be sent. If no attribute is defined, no message will be sent by default. One message should specify either the job or the task level attributes, but not both. For example, job level: JOB_STATE_CHANGED and/or a specified new_job_state; task level: TASK_STATE_CHANGED and/or a specified new_task_state.
func (*JobNotification_Message) DescriptorDeprecated: Use JobNotification_Message.ProtoReflect.Descriptor instead.
func (*JobNotification_Message) GetNewJobState func (*JobNotification_Message) GetNewTaskState func (*JobNotification_Message) GetType func (*JobNotification_Message) ProtoMessage func (*JobNotification_Message) ProtoReflect func (*JobNotification_Message) Reset func (*JobNotification_Message) String JobNotification_Typetype JobNotification_Type int32
The message type.
JobNotification_TYPE_UNSPECIFIED, JobNotification_JOB_STATE_CHANGED, JobNotification_TASK_STATE_CHANGED func (JobNotification_Type) Descriptor func (JobNotification_Type) Enum func (JobNotification_Type) EnumDescriptorDeprecated: Use JobNotification_Type.Descriptor instead.
func (JobNotification_Type) Number func (JobNotification_Type) String func (JobNotification_Type) Type JobStatustype JobStatus struct {
// Job state
State JobStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.batch.v1.JobStatus_State" json:"state,omitempty"`
// Job status events
StatusEvents []*StatusEvent `protobuf:"bytes,2,rep,name=status_events,json=statusEvents,proto3" json:"status_events,omitempty"`
// Aggregated task status for each TaskGroup in the Job.
// The map key is TaskGroup ID.
TaskGroups map[string]*JobStatus_TaskGroupStatus `protobuf:"bytes,4,rep,name=task_groups,json=taskGroups,proto3" json:"task_groups,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The duration of time that the Job spent in status RUNNING.
RunDuration *durationpb.Duration `protobuf:"bytes,5,opt,name=run_duration,json=runDuration,proto3" json:"run_duration,omitempty"`
// contains filtered or unexported fields
}
Job status.
func (*JobStatus) DescriptorDeprecated: Use JobStatus.ProtoReflect.Descriptor instead.
func (*JobStatus) GetRunDuration func (*JobStatus) GetState func (*JobStatus) GetStatusEvents func (*JobStatus) GetTaskGroups func (*JobStatus) ProtoMessage func (*JobStatus) ProtoReflect func (*JobStatus) Reset func (*JobStatus) String JobStatus_InstanceStatustype JobStatus_InstanceStatus struct {
// The Compute Engine machine type.
MachineType string `protobuf:"bytes,1,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"`
// The VM instance provisioning model.
ProvisioningModel AllocationPolicy_ProvisioningModel `protobuf:"varint,2,opt,name=provisioning_model,json=provisioningModel,proto3,enum=google.cloud.batch.v1.AllocationPolicy_ProvisioningModel" json:"provisioning_model,omitempty"`
// The max number of tasks can be assigned to this instance type.
TaskPack int64 `protobuf:"varint,3,opt,name=task_pack,json=taskPack,proto3" json:"task_pack,omitempty"`
// The VM boot disk.
BootDisk *AllocationPolicy_Disk `protobuf:"bytes,4,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"`
// contains filtered or unexported fields
}
VM instance status.
func (*JobStatus_InstanceStatus) DescriptorDeprecated: Use JobStatus_InstanceStatus.ProtoReflect.Descriptor instead.
func (*JobStatus_InstanceStatus) GetBootDisk func (*JobStatus_InstanceStatus) GetMachineType func (*JobStatus_InstanceStatus) GetProvisioningModel func (*JobStatus_InstanceStatus) GetTaskPack func (*JobStatus_InstanceStatus) ProtoMessage func (*JobStatus_InstanceStatus) ProtoReflect func (*JobStatus_InstanceStatus) Reset func (*JobStatus_InstanceStatus) String JobStatus_Statetype JobStatus_State int32
Valid Job states.
JobStatus_STATE_UNSPECIFIED, JobStatus_QUEUED, JobStatus_SCHEDULED, JobStatus_RUNNING, JobStatus_SUCCEEDED, JobStatus_FAILED, JobStatus_DELETION_IN_PROGRESS, JobStatus_CANCELLATION_IN_PROGRESS, JobStatus_CANCELLEDconst (
// Job state unspecified.
JobStatus_STATE_UNSPECIFIED JobStatus_State = 0
// Job is admitted (validated and persisted) and waiting for resources.
JobStatus_QUEUED JobStatus_State = 1
// Job is scheduled to run as soon as resource allocation is ready.
// The resource allocation may happen at a later time but with a high
// chance to succeed.
JobStatus_SCHEDULED JobStatus_State = 2
// Resource allocation has been successful. At least one Task in the Job is
// RUNNING.
JobStatus_RUNNING JobStatus_State = 3
// All Tasks in the Job have finished successfully.
JobStatus_SUCCEEDED JobStatus_State = 4
// At least one Task in the Job has failed.
JobStatus_FAILED JobStatus_State = 5
// The Job will be deleted, but has not been deleted yet. Typically this is
// because resources used by the Job are still being cleaned up.
JobStatus_DELETION_IN_PROGRESS JobStatus_State = 6
// The Job cancellation is in progress, this is because the resources used
// by the Job are still being cleaned up.
JobStatus_CANCELLATION_IN_PROGRESS JobStatus_State = 7
// The Job has been cancelled, the task executions were stopped and the
// resources were cleaned up.
JobStatus_CANCELLED JobStatus_State = 8
)
func (JobStatus_State) Descriptor func (JobStatus_State) Enum func (JobStatus_State) EnumDescriptor
Deprecated: Use JobStatus_State.Descriptor instead.
func (JobStatus_State) Number func (JobStatus_State) String func (JobStatus_State) Type JobStatus_TaskGroupStatustype JobStatus_TaskGroupStatus struct {
// Count of task in each state in the TaskGroup.
// The map key is task state name.
Counts map[string]int64 `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// Status of instances allocated for the TaskGroup.
Instances []*JobStatus_InstanceStatus `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`
// contains filtered or unexported fields
}
Aggregated task status for a TaskGroup.
func (*JobStatus_TaskGroupStatus) DescriptorDeprecated: Use JobStatus_TaskGroupStatus.ProtoReflect.Descriptor instead.
func (*JobStatus_TaskGroupStatus) GetCounts func (*JobStatus_TaskGroupStatus) GetInstances func (*JobStatus_TaskGroupStatus) ProtoMessage func (*JobStatus_TaskGroupStatus) ProtoReflect func (*JobStatus_TaskGroupStatus) Reset func (*JobStatus_TaskGroupStatus) String LifecyclePolicytype LifecyclePolicy struct {
// Action to execute when ActionCondition is true.
// When RETRY_TASK is specified, we will retry failed tasks
// if we notice any exit code match and fail tasks if no match is found.
// Likewise, when FAIL_TASK is specified, we will fail tasks
// if we notice any exit code match and retry tasks if no match is found.
Action LifecyclePolicy_Action `protobuf:"varint,1,opt,name=action,proto3,enum=google.cloud.batch.v1.LifecyclePolicy_Action" json:"action,omitempty"`
// Conditions that decide why a task failure is dealt with a specific action.
ActionCondition *LifecyclePolicy_ActionCondition `protobuf:"bytes,2,opt,name=action_condition,json=actionCondition,proto3" json:"action_condition,omitempty"`
// contains filtered or unexported fields
}
LifecyclePolicy describes how to deal with task failures based on different conditions.
func (*LifecyclePolicy) DescriptorDeprecated: Use LifecyclePolicy.ProtoReflect.Descriptor instead.
func (*LifecyclePolicy) GetAction func (*LifecyclePolicy) GetActionCondition func (*LifecyclePolicy) ProtoMessage func (*LifecyclePolicy) ProtoReflect func (*LifecyclePolicy) Reset func (*LifecyclePolicy) String LifecyclePolicy_Actiontype LifecyclePolicy_Action int32
Action on task failures based on different conditions.
LifecyclePolicy_ACTION_UNSPECIFIED, LifecyclePolicy_RETRY_TASK, LifecyclePolicy_FAIL_TASKconst (
// Action unspecified.
LifecyclePolicy_ACTION_UNSPECIFIED LifecyclePolicy_Action = 0
// Action that tasks in the group will be scheduled to re-execute.
LifecyclePolicy_RETRY_TASK LifecyclePolicy_Action = 1
// Action that tasks in the group will be stopped immediately.
LifecyclePolicy_FAIL_TASK LifecyclePolicy_Action = 2
)
func (LifecyclePolicy_Action) Descriptor func (LifecyclePolicy_Action) Enum func (LifecyclePolicy_Action) EnumDescriptor
Deprecated: Use LifecyclePolicy_Action.Descriptor instead.
func (LifecyclePolicy_Action) Number func (LifecyclePolicy_Action) String func (LifecyclePolicy_Action) Type LifecyclePolicy_ActionConditiontype LifecyclePolicy_ActionCondition struct {
// Exit codes of a task execution.
// If there are more than 1 exit codes,
// when task executes with any of the exit code in the list,
// the condition is met and the action will be executed.
ExitCodes []int32 `protobuf:"varint,1,rep,packed,name=exit_codes,json=exitCodes,proto3" json:"exit_codes,omitempty"`
// contains filtered or unexported fields
}
Conditions for actions to deal with task failures.
func (*LifecyclePolicy_ActionCondition) DescriptorDeprecated: Use LifecyclePolicy_ActionCondition.ProtoReflect.Descriptor instead.
func (*LifecyclePolicy_ActionCondition) GetExitCodes func (*LifecyclePolicy_ActionCondition) ProtoMessage func (*LifecyclePolicy_ActionCondition) ProtoReflect func (*LifecyclePolicy_ActionCondition) Reset func (*LifecyclePolicy_ActionCondition) String ListJobsRequesttype ListJobsRequest struct {
// Parent path.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// List filter.
Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
// Optional. Sort results. Supported are "name", "name desc", "create_time",
// and "create_time desc".
OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
// Page size.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Page token.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// contains filtered or unexported fields
}
ListJob Request.
func (*ListJobsRequest) DescriptorDeprecated: Use ListJobsRequest.ProtoReflect.Descriptor instead.
func (*ListJobsRequest) GetFilter func (*ListJobsRequest) GetOrderBy func (*ListJobsRequest) GetPageSize func (*ListJobsRequest) GetPageToken func (*ListJobsRequest) GetParent func (*ListJobsRequest) ProtoMessage func (*ListJobsRequest) ProtoReflect func (*ListJobsRequest) Reset func (*ListJobsRequest) String ListJobsResponsetype ListJobsResponse struct {
// Jobs.
Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"`
// Next page token.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// Locations that could not be reached.
Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"`
// contains filtered or unexported fields
}
ListJob Response.
func (*ListJobsResponse) DescriptorDeprecated: Use ListJobsResponse.ProtoReflect.Descriptor instead.
func (*ListJobsResponse) GetJobs func (*ListJobsResponse) GetNextPageToken func (*ListJobsResponse) GetUnreachable func (*ListJobsResponse) ProtoMessage func (*ListJobsResponse) ProtoReflect func (*ListJobsResponse) Reset func (*ListJobsResponse) String ListTasksRequesttype ListTasksRequest struct {
// Required. Name of a TaskGroup from which Tasks are being requested.
// Pattern:
// "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Task filter, null filter matches all Tasks.
// Filter string should be of the format State=TaskStatus.State e.g.
// State=RUNNING
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// Page size.
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Page token.
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// contains filtered or unexported fields
}
ListTasks Request.
func (*ListTasksRequest) DescriptorDeprecated: Use ListTasksRequest.ProtoReflect.Descriptor instead.
func (*ListTasksRequest) GetFilter func (*ListTasksRequest) GetPageSize func (*ListTasksRequest) GetPageToken func (*ListTasksRequest) GetParent func (*ListTasksRequest) ProtoMessage func (*ListTasksRequest) ProtoReflect func (*ListTasksRequest) Reset func (*ListTasksRequest) String ListTasksResponsetype ListTasksResponse struct {
// Tasks.
Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"`
// Next page token.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// Locations that could not be reached.
Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"`
// contains filtered or unexported fields
}
ListTasks Response.
func (*ListTasksResponse) DescriptorDeprecated: Use ListTasksResponse.ProtoReflect.Descriptor instead.
func (*ListTasksResponse) GetNextPageToken func (*ListTasksResponse) GetTasks func (*ListTasksResponse) GetUnreachable func (*ListTasksResponse) ProtoMessage func (*ListTasksResponse) ProtoReflect func (*ListTasksResponse) Reset func (*ListTasksResponse) String LogsPolicytype LogsPolicy struct {
// If and where logs should be saved.
Destination LogsPolicy_Destination `protobuf:"varint,1,opt,name=destination,proto3,enum=google.cloud.batch.v1.LogsPolicy_Destination" json:"destination,omitempty"`
// When `destination` is set to `PATH`, you must set this field to the path
// where you want logs to be saved. This path can point to a local directory
// on the VM or (if congifured) a directory under the mount path of any
// Cloud Storage bucket, network file system (NFS), or writable persistent
// disk that is mounted to the job. For example, if the job has a bucket with
// `mountPath` set to `/mnt/disks/my-bucket`, you can write logs to the
// root directory of the `remotePath` of that bucket by setting this field to
// `/mnt/disks/my-bucket/`.
LogsPath string `protobuf:"bytes,2,opt,name=logs_path,json=logsPath,proto3" json:"logs_path,omitempty"`
// Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally
// set this field to configure additional settings for Cloud Logging.
CloudLoggingOption *LogsPolicy_CloudLoggingOption `protobuf:"bytes,3,opt,name=cloud_logging_option,json=cloudLoggingOption,proto3" json:"cloud_logging_option,omitempty"`
// contains filtered or unexported fields
}
LogsPolicy describes if and how a job's logs are preserved. Logs include information that is automatically written by the Batch service agent and any information that you configured the job's runnables to write to the stdout
or stderr
streams.
Deprecated: Use LogsPolicy.ProtoReflect.Descriptor instead.
func (*LogsPolicy) GetCloudLoggingOption func (*LogsPolicy) GetDestination func (*LogsPolicy) GetLogsPath func (*LogsPolicy) ProtoMessage func (*LogsPolicy) ProtoReflect func (*LogsPolicy) Reset func (*LogsPolicy) String LogsPolicy_CloudLoggingOptiontype LogsPolicy_CloudLoggingOption struct {
// Optional. Set this field to `true` to change the [monitored resource
// type](https://cloud.google.com/monitoring/api/resources) for
// Cloud Logging logs generated by this Batch job from
// the
// [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job)
// type to the formerly used
// [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task)
// type.
UseGenericTaskMonitoredResource bool `protobuf:"varint,1,opt,name=use_generic_task_monitored_resource,json=useGenericTaskMonitoredResource,proto3" json:"use_generic_task_monitored_resource,omitempty"`
// contains filtered or unexported fields
}
CloudLoggingOption
contains additional settings for Cloud Logging logs generated by Batch job.
Deprecated: Use LogsPolicy_CloudLoggingOption.ProtoReflect.Descriptor instead.
func (*LogsPolicy_CloudLoggingOption) GetUseGenericTaskMonitoredResource func (*LogsPolicy_CloudLoggingOption) ProtoMessage func (*LogsPolicy_CloudLoggingOption) ProtoReflect func (*LogsPolicy_CloudLoggingOption) Reset func (*LogsPolicy_CloudLoggingOption) String LogsPolicy_Destinationtype LogsPolicy_Destination int32
The destination (if any) for logs.
LogsPolicy_DESTINATION_UNSPECIFIED, LogsPolicy_CLOUD_LOGGING, LogsPolicy_PATHconst (
// (Default) Logs are not preserved.
LogsPolicy_DESTINATION_UNSPECIFIED LogsPolicy_Destination = 0
// Logs are streamed to Cloud Logging. Optionally, you can configure
// additional settings in the `cloudLoggingOption` field.
LogsPolicy_CLOUD_LOGGING LogsPolicy_Destination = 1
// Logs are saved to the file path specified in the `logsPath` field.
LogsPolicy_PATH LogsPolicy_Destination = 2
)
func (LogsPolicy_Destination) Descriptor func (LogsPolicy_Destination) Enum func (LogsPolicy_Destination) EnumDescriptor
Deprecated: Use LogsPolicy_Destination.Descriptor instead.
func (LogsPolicy_Destination) Number func (LogsPolicy_Destination) String func (LogsPolicy_Destination) Type NFStype NFS struct {
// The IP address of the NFS.
Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
// Remote source path exported from the NFS, e.g., "/share".
RemotePath string `protobuf:"bytes,2,opt,name=remote_path,json=remotePath,proto3" json:"remote_path,omitempty"`
// contains filtered or unexported fields
}
Represents an NFS volume.
func (*NFS) DescriptorDeprecated: Use NFS.ProtoReflect.Descriptor instead.
func (*NFS) GetRemotePath func (*NFS) GetServer func (*NFS) ProtoMessagefunc (*NFS) ProtoMessage()
func (*NFS) ProtoReflect func (*NFS) Reset func (*NFS) String
type OperationMetadata struct {
// Output only. The time the operation was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The time the operation finished running.
EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
// Output only. Server-defined resource path for the target of the operation.
Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
// Output only. Name of the verb executed by the operation.
Verb string `protobuf:"bytes,4,opt,name=verb,proto3" json:"verb,omitempty"`
// Output only. Human-readable status of the operation, if any.
StatusMessage string `protobuf:"bytes,5,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
// Output only. Identifies whether the user has requested cancellation
// of the operation. Operations that have successfully been cancelled
// have
// [google.longrunning.Operation.error][google.longrunning.Operation.error]
// value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`.
RequestedCancellation bool `protobuf:"varint,6,opt,name=requested_cancellation,json=requestedCancellation,proto3" json:"requested_cancellation,omitempty"`
// Output only. API version used to start the operation.
ApiVersion string `protobuf:"bytes,7,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`
// contains filtered or unexported fields
}
Represents the metadata of the long-running operation.
func (*OperationMetadata) DescriptorDeprecated: Use OperationMetadata.ProtoReflect.Descriptor instead.
func (*OperationMetadata) GetApiVersion func (*OperationMetadata) GetCreateTime func (*OperationMetadata) GetEndTime func (*OperationMetadata) GetRequestedCancellation func (*OperationMetadata) GetStatusMessage func (*OperationMetadata) GetTarget func (*OperationMetadata) GetVerb func (*OperationMetadata) ProtoMessage func (*OperationMetadata) ProtoReflect func (*OperationMetadata) Reset func (*OperationMetadata) String Runnabletype Runnable struct {
// Required. The script, container, or barrier for this runnable to execute.
//
// Types that are assignable to Executable:
//
// *Runnable_Container_
// *Runnable_Script_
// *Runnable_Barrier_
Executable isRunnable_Executable `protobuf_oneof:"executable"`
// Optional. DisplayName is an optional field that can be provided by the
// caller. If provided, it will be used in logs and other outputs to identify
// the script, making it easier for users to understand the logs. If not
// provided the index of the runnable will be used for outputs.
DisplayName string `protobuf:"bytes,10,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Normally, a runnable that returns a non-zero exit status fails and causes
// the task to fail. However, you can set this field to `true` to allow the
// task to continue executing its other runnables even if this runnable
// fails.
IgnoreExitStatus bool `protobuf:"varint,3,opt,name=ignore_exit_status,json=ignoreExitStatus,proto3" json:"ignore_exit_status,omitempty"`
// Normally, a runnable that doesn't exit causes its task to fail. However,
// you can set this field to `true` to configure a background runnable.
// Background runnables are allowed continue running in the background while
// the task executes subsequent runnables. For example, background runnables
// are useful for providing services to other runnables or providing
// debugging-support tools like SSH servers.
//
// Specifically, background runnables are killed automatically (if they have
// not already exited) a short time after all foreground runnables have
// completed. Even though this is likely to result in a non-zero exit status
// for the background runnable, these automatic kills are not treated as task
// failures.
Background bool `protobuf:"varint,4,opt,name=background,proto3" json:"background,omitempty"`
// By default, after a Runnable fails, no further Runnable are executed. This
// flag indicates that this Runnable must be run even if the Task has already
// failed. This is useful for Runnables that copy output files off of the VM
// or for debugging.
//
// The always_run flag does not override the Task's overall max_run_duration.
// If the max_run_duration has expired then no further Runnables will execute,
// not even always_run Runnables.
AlwaysRun bool `protobuf:"varint,5,opt,name=always_run,json=alwaysRun,proto3" json:"always_run,omitempty"`
// Environment variables for this Runnable (overrides variables set for the
// whole Task or TaskGroup).
Environment *Environment `protobuf:"bytes,7,opt,name=environment,proto3" json:"environment,omitempty"`
// Timeout for this Runnable.
Timeout *durationpb.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"`
// Labels for this Runnable.
Labels map[string]string `protobuf:"bytes,9,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}
Runnable describes instructions for executing a specific script or container as part of a Task.
func (*Runnable) DescriptorDeprecated: Use Runnable.ProtoReflect.Descriptor instead.
func (*Runnable) GetAlwaysRun func (*Runnable) GetBackground func (*Runnable) GetBarrier func (*Runnable) GetContainer func (*Runnable) GetDisplayName func (*Runnable) GetEnvironment func (*Runnable) GetExecutablefunc (m *Runnable) GetExecutable() isRunnable_Executable
func (*Runnable) GetIgnoreExitStatus func (*Runnable) GetLabels func (*Runnable) GetScript func (*Runnable) GetTimeout func (*Runnable) ProtoMessage func (*Runnable) ProtoReflect func (*Runnable) Reset func (*Runnable) String Runnable_Barrier
type Runnable_Barrier struct {
// Barriers are identified by their index in runnable list.
// Names are not required, but if present should be an identifier.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
A barrier runnable automatically blocks the execution of subsequent runnables until all the tasks in the task group reach the barrier.
func (*Runnable_Barrier) DescriptorDeprecated: Use Runnable_Barrier.ProtoReflect.Descriptor instead.
func (*Runnable_Barrier) GetName func (*Runnable_Barrier) ProtoMessage func (*Runnable_Barrier) ProtoReflect func (*Runnable_Barrier) Reset func (*Runnable_Barrier) String Runnable_Barrier_type Runnable_Barrier_ struct {
// Barrier runnable.
Barrier *Runnable_Barrier `protobuf:"bytes,6,opt,name=barrier,proto3,oneof"`
}
Runnable_Container
type Runnable_Container struct {
// Required. The URI to pull the container image from.
ImageUri string `protobuf:"bytes,1,opt,name=image_uri,json=imageUri,proto3" json:"image_uri,omitempty"`
// Required for some container images. Overrides the `CMD` specified in the
// container. If there is an `ENTRYPOINT` (either in the container image or
// with the `entrypoint` field below) then these commands are appended as
// arguments to the `ENTRYPOINT`.
Commands []string `protobuf:"bytes,2,rep,name=commands,proto3" json:"commands,omitempty"`
// Required for some container images. Overrides the `ENTRYPOINT` specified
// in the container.
Entrypoint string `protobuf:"bytes,3,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"`
// Volumes to mount (bind mount) from the host machine files or directories
// into the container, formatted to match `--volume` option for the
// `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`.
//
// If the `TaskSpec.Volumes` field is specified but this field is not, Batch
// will mount each volume from the host machine to the container with the
// same mount path by default. In this case, the default mount option for
// containers will be read-only (`ro`) for existing persistent disks and
// read-write (`rw`) for other volume types, regardless of the original
// mount options specified in `TaskSpec.Volumes`. If you need different
// mount settings, you can explicitly configure them in this field.
Volumes []string `protobuf:"bytes,7,rep,name=volumes,proto3" json:"volumes,omitempty"`
// Required for some container images. Arbitrary additional options to
// include in the `docker run` command when running this container—for
// example, `--network host`. For the `--volume` option, use the `volumes`
// field for the container.
Options string `protobuf:"bytes,8,opt,name=options,proto3" json:"options,omitempty"`
// If set to true, external network access to and from container will be
// blocked, containers that are with block_external_network as true can
// still communicate with each other, network cannot be specified in the
// `container.options` field.
BlockExternalNetwork bool `protobuf:"varint,9,opt,name=block_external_network,json=blockExternalNetwork,proto3" json:"block_external_network,omitempty"`
// Required if the container image is from a private Docker registry. The
// username to login to the Docker registry that contains the image.
//
// You can either specify the username directly by using plain text or
// specify an encrypted username by using a Secret Manager secret:
// `projects/*/secrets/*/versions/*`. However, using a secret is
// recommended for enhanced security.
//
// Caution: If you specify the username using plain text, you risk the
// username being exposed to any users who can view the job or its logs.
// To avoid this risk, specify a secret that contains the username instead.
//
// Learn more about [Secret
// Manager](https://cloud.google.com/secret-manager/docs/) and [using
// Secret Manager with
// Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
Username string `protobuf:"bytes,10,opt,name=username,proto3" json:"username,omitempty"`
// Required if the container image is from a private Docker registry. The
// password to login to the Docker registry that contains the image.
//
// For security, it is strongly recommended to specify an
// encrypted password by using a Secret Manager secret:
// `projects/*/secrets/*/versions/*`.
//
// Warning: If you specify the password using plain text, you risk the
// password being exposed to any users who can view the job or its logs.
// To avoid this risk, specify a secret that contains the password instead.
//
// Learn more about [Secret
// Manager](https://cloud.google.com/secret-manager/docs/) and [using
// Secret Manager with
// Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
Password string `protobuf:"bytes,11,opt,name=password,proto3" json:"password,omitempty"`
// Optional. If set to true, this container runnable uses Image streaming.
//
// Use Image streaming to allow the runnable to initialize without
// waiting for the entire container image to download, which can
// significantly reduce startup time for large container images.
//
// When `enableImageStreaming` is set to true, the container
// runtime is [containerd](https://containerd.io/) instead of Docker.
// Additionally, this container runnable only supports the following
// `container` subfields: `imageUri`,
// `commands[]`, `entrypoint`, and
// `volumes[]`; any other `container` subfields are ignored.
//
// For more information about the requirements and limitations for using
// Image streaming with Batch, see the [`image-streaming`
// sample on
// GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
EnableImageStreaming bool `protobuf:"varint,12,opt,name=enable_image_streaming,json=enableImageStreaming,proto3" json:"enable_image_streaming,omitempty"`
// contains filtered or unexported fields
}
Container runnable.
func (*Runnable_Container) DescriptorDeprecated: Use Runnable_Container.ProtoReflect.Descriptor instead.
func (*Runnable_Container) GetBlockExternalNetwork func (*Runnable_Container) GetCommands func (*Runnable_Container) GetEnableImageStreaming func (*Runnable_Container) GetEntrypoint func (*Runnable_Container) GetImageUri func (*Runnable_Container) GetOptions func (*Runnable_Container) GetPassword func (*Runnable_Container) GetUsername func (*Runnable_Container) GetVolumes func (*Runnable_Container) ProtoMessage func (*Runnable_Container) ProtoReflect func (*Runnable_Container) Reset func (*Runnable_Container) String Runnable_Container_type Runnable_Container_ struct {
// Container runnable.
Container *Runnable_Container `protobuf:"bytes,1,opt,name=container,proto3,oneof"`
}
Runnable_Script
type Runnable_Script struct {
// Required. The source code for this script runnable.
//
// Types that are assignable to Command:
//
// *Runnable_Script_Path
// *Runnable_Script_Text
Command isRunnable_Script_Command `protobuf_oneof:"command"`
// contains filtered or unexported fields
}
Script runnable.
func (*Runnable_Script) DescriptorDeprecated: Use Runnable_Script.ProtoReflect.Descriptor instead.
func (*Runnable_Script) GetCommand func (*Runnable_Script) GetPath func (*Runnable_Script) GetText func (*Runnable_Script) ProtoMessage func (*Runnable_Script) ProtoReflect func (*Runnable_Script) Reset func (*Runnable_Script) String Runnable_Script_type Runnable_Script_ struct {
// Script runnable.
Script *Runnable_Script `protobuf:"bytes,2,opt,name=script,proto3,oneof"`
}
Runnable_Script_Path
type Runnable_Script_Path struct {
// The path to a script file that is accessible from the host VM(s).
//
// Unless the script file supports the default `#!/bin/sh` shell
// interpreter, you must specify an interpreter by including a
// [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the
// first line of the file. For example, to execute the script using bash,
// include `#!/bin/bash` as the first line of the file. Alternatively,
// to execute the script using Python3, include `#!/usr/bin/env python3`
// as the first line of the file.
Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"`
}
Runnable_Script_Text
type Runnable_Script_Text struct {
// The text for a script.
//
// Unless the script text supports the default `#!/bin/sh` shell
// interpreter, you must specify an interpreter by including a
// [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the
// beginning of the text. For example, to execute the script using bash,
// include `#!/bin/bash\n` at the beginning of the text. Alternatively,
// to execute the script using Python3, include `#!/usr/bin/env python3\n`
// at the beginning of the text.
Text string `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}
ServiceAccount
type ServiceAccount struct {
// Email address of the service account.
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// List of scopes to be enabled for this service account.
Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"`
// contains filtered or unexported fields
}
Carries information about a Google Cloud service account.
func (*ServiceAccount) DescriptorDeprecated: Use ServiceAccount.ProtoReflect.Descriptor instead.
func (*ServiceAccount) GetEmail func (*ServiceAccount) GetScopes func (*ServiceAccount) ProtoMessage func (*ServiceAccount) ProtoReflect func (*ServiceAccount) Reset func (*ServiceAccount) String StatusEventtype StatusEvent struct {
// Type of the event.
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
// Description of the event.
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
// The time this event occurred.
EventTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"`
// Task Execution.
// This field is only defined for task-level status events where the task
// fails.
TaskExecution *TaskExecution `protobuf:"bytes,4,opt,name=task_execution,json=taskExecution,proto3" json:"task_execution,omitempty"`
// Task State.
// This field is only defined for task-level status events.
TaskState TaskStatus_State `protobuf:"varint,5,opt,name=task_state,json=taskState,proto3,enum=google.cloud.batch.v1.TaskStatus_State" json:"task_state,omitempty"`
// contains filtered or unexported fields
}
Status event.
func (*StatusEvent) DescriptorDeprecated: Use StatusEvent.ProtoReflect.Descriptor instead.
func (*StatusEvent) GetDescription func (*StatusEvent) GetEventTime func (*StatusEvent) GetTaskExecution func (*StatusEvent) GetTaskState func (*StatusEvent) GetType func (*StatusEvent) ProtoMessage func (*StatusEvent) ProtoReflect func (*StatusEvent) Reset func (*StatusEvent) String Tasktype Task struct {
// Task name.
// The name is generated from the parent TaskGroup name and 'id' field.
// For example:
// "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01".
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Task Status.
Status *TaskStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
// contains filtered or unexported fields
}
A Cloud Batch task.
func (*Task) DescriptorDeprecated: Use Task.ProtoReflect.Descriptor instead.
func (*Task) GetName func (*Task) GetStatus func (*Task) ProtoMessagefunc (*Task) ProtoMessage()
func (*Task) ProtoReflect func (*Task) Reset func (*Task) String TaskExecution
type TaskExecution struct {
// The exit code of a finished task.
//
// If the task succeeded, the exit code will be 0. If the task failed but not
// due to the following reasons, the exit code will be 50000.
//
// Otherwise, it can be from different sources:
// * Batch known failures:
// https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
// * Batch runnable execution failures; you can rely on Batch logs to further
// diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
// there are multiple runnables failures, Batch only exposes the first error.
ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
// contains filtered or unexported fields
}
This Task Execution field includes detail information for task execution procedures, based on StatusEvent types.
func (*TaskExecution) DescriptorDeprecated: Use TaskExecution.ProtoReflect.Descriptor instead.
func (*TaskExecution) GetExitCode func (*TaskExecution) ProtoMessage func (*TaskExecution) ProtoReflect func (*TaskExecution) Reset func (*TaskExecution) String TaskGrouptype TaskGroup struct {
// Output only. TaskGroup name.
// The system generates this field based on parent Job name.
// For example:
// "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. Tasks in the group share the same task spec.
TaskSpec *TaskSpec `protobuf:"bytes,3,opt,name=task_spec,json=taskSpec,proto3" json:"task_spec,omitempty"`
// Number of Tasks in the TaskGroup.
// Default is 1.
TaskCount int64 `protobuf:"varint,4,opt,name=task_count,json=taskCount,proto3" json:"task_count,omitempty"`
// Max number of tasks that can run in parallel.
// Default to min(task_count, parallel tasks per job limit).
// See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits).
// Field parallelism must be 1 if the scheduling_policy is IN_ORDER.
Parallelism int64 `protobuf:"varint,5,opt,name=parallelism,proto3" json:"parallelism,omitempty"`
// Scheduling policy for Tasks in the TaskGroup.
// The default value is AS_SOON_AS_POSSIBLE.
SchedulingPolicy TaskGroup_SchedulingPolicy `protobuf:"varint,6,opt,name=scheduling_policy,json=schedulingPolicy,proto3,enum=google.cloud.batch.v1.TaskGroup_SchedulingPolicy" json:"scheduling_policy,omitempty"`
// An array of environment variable mappings, which are passed to Tasks with
// matching indices. If task_environments is used then task_count should
// not be specified in the request (and will be ignored). Task count will be
// the length of task_environments.
//
// Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in
// addition to any environment variables set in task_environments, specifying
// the number of Tasks in the Task's parent TaskGroup, and the specific Task's
// index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).
TaskEnvironments []*Environment `protobuf:"bytes,9,rep,name=task_environments,json=taskEnvironments,proto3" json:"task_environments,omitempty"`
// Max number of tasks that can be run on a VM at the same time.
// If not specified, the system will decide a value based on available
// compute resources on a VM and task requirements.
TaskCountPerNode int64 `protobuf:"varint,10,opt,name=task_count_per_node,json=taskCountPerNode,proto3" json:"task_count_per_node,omitempty"`
// When true, Batch will populate a file with a list of all VMs assigned to
// the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path
// of that file. Defaults to false. The host file supports up to 1000 VMs.
RequireHostsFile bool `protobuf:"varint,11,opt,name=require_hosts_file,json=requireHostsFile,proto3" json:"require_hosts_file,omitempty"`
// When true, Batch will configure SSH to allow passwordless login between
// VMs running the Batch tasks in the same TaskGroup.
PermissiveSsh bool `protobuf:"varint,12,opt,name=permissive_ssh,json=permissiveSsh,proto3" json:"permissive_ssh,omitempty"`
// Optional. If not set or set to false, Batch uses the root user to execute
// runnables. If set to true, Batch runs the runnables using a non-root user.
// Currently, the non-root user Batch used is generated by OS Login. For more
// information, see [About OS
// Login](https://cloud.google.com/compute/docs/oslogin).
RunAsNonRoot bool `protobuf:"varint,14,opt,name=run_as_non_root,json=runAsNonRoot,proto3" json:"run_as_non_root,omitempty"`
// contains filtered or unexported fields
}
A TaskGroup defines one or more Tasks that all share the same TaskSpec.
func (*TaskGroup) DescriptorDeprecated: Use TaskGroup.ProtoReflect.Descriptor instead.
func (*TaskGroup) GetName func (*TaskGroup) GetParallelism func (*TaskGroup) GetPermissiveSsh func (*TaskGroup) GetRequireHostsFile func (*TaskGroup) GetRunAsNonRoot func (*TaskGroup) GetSchedulingPolicy func (*TaskGroup) GetTaskCount func (*TaskGroup) GetTaskCountPerNode func (*TaskGroup) GetTaskEnvironments func (*TaskGroup) GetTaskSpec func (*TaskGroup) ProtoMessage func (*TaskGroup) ProtoReflect func (*TaskGroup) Reset func (*TaskGroup) String TaskGroup_SchedulingPolicytype TaskGroup_SchedulingPolicy int32
How Tasks in the TaskGroup should be scheduled relative to each other.
TaskGroup_SCHEDULING_POLICY_UNSPECIFIED, TaskGroup_AS_SOON_AS_POSSIBLE, TaskGroup_IN_ORDERconst (
// Unspecified.
TaskGroup_SCHEDULING_POLICY_UNSPECIFIED TaskGroup_SchedulingPolicy = 0
// Run Tasks as soon as resources are available.
//
// Tasks might be executed in parallel depending on parallelism and
// task_count values.
TaskGroup_AS_SOON_AS_POSSIBLE TaskGroup_SchedulingPolicy = 1
// Run Tasks sequentially with increased task index.
TaskGroup_IN_ORDER TaskGroup_SchedulingPolicy = 2
)
func (TaskGroup_SchedulingPolicy) Descriptor func (TaskGroup_SchedulingPolicy) Enum func (TaskGroup_SchedulingPolicy) EnumDescriptor
Deprecated: Use TaskGroup_SchedulingPolicy.Descriptor instead.
func (TaskGroup_SchedulingPolicy) Number func (TaskGroup_SchedulingPolicy) String func (TaskGroup_SchedulingPolicy) Type TaskSpectype TaskSpec struct {
// Required. The sequence of one or more runnables (executable scripts,
// executable containers, and/or barriers) for each task in this task group to
// run. Each task runs this list of runnables in order. For a task to succeed,
// all of its script and container runnables each must meet at least one of
// the following conditions:
//
// - The runnable exited with a zero status.
// - The runnable didn't finish, but you enabled its `background` subfield.
// - The runnable exited with a non-zero status, but you enabled its
// `ignore_exit_status` subfield.
Runnables []*Runnable `protobuf:"bytes,8,rep,name=runnables,proto3" json:"runnables,omitempty"`
// ComputeResource requirements.
ComputeResource *ComputeResource `protobuf:"bytes,3,opt,name=compute_resource,json=computeResource,proto3" json:"compute_resource,omitempty"`
// Maximum duration the task should run before being automatically retried
// (if enabled) or automatically failed. Format the value of this field
// as a time limit in seconds followed by `s`—for example, `3600s`
// for 1 hour. The field accepts any value between 0 and the maximum listed
// for the `Duration` field type at
// https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
// the actual maximum run time for a job will be limited to the maximum run
// time for a job listed at
// https://cloud.google.com/batch/quotas#max-job-duration.
MaxRunDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=max_run_duration,json=maxRunDuration,proto3" json:"max_run_duration,omitempty"`
// Maximum number of retries on failures.
// The default, 0, which means never retry.
// The valid value range is [0, 10].
MaxRetryCount int32 `protobuf:"varint,5,opt,name=max_retry_count,json=maxRetryCount,proto3" json:"max_retry_count,omitempty"`
// Lifecycle management schema when any task in a task group is failed.
// Currently we only support one lifecycle policy.
// When the lifecycle policy condition is met,
// the action in the policy will execute.
// If task execution result does not meet with the defined lifecycle
// policy, we consider it as the default policy.
// Default policy means if the exit code is 0, exit task.
// If task ends with non-zero exit code, retry the task with max_retry_count.
LifecyclePolicies []*LifecyclePolicy `protobuf:"bytes,9,rep,name=lifecycle_policies,json=lifecyclePolicies,proto3" json:"lifecycle_policies,omitempty"`
// Deprecated: please use environment(non-plural) instead.
//
// Deprecated: Marked as deprecated in google/cloud/batch/v1/task.proto.
Environments map[string]string `protobuf:"bytes,6,rep,name=environments,proto3" json:"environments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Volumes to mount before running Tasks using this TaskSpec.
Volumes []*Volume `protobuf:"bytes,7,rep,name=volumes,proto3" json:"volumes,omitempty"`
// Environment variables to set before running the Task.
Environment *Environment `protobuf:"bytes,10,opt,name=environment,proto3" json:"environment,omitempty"`
// contains filtered or unexported fields
}
Spec of a task
func (*TaskSpec) DescriptorDeprecated: Use TaskSpec.ProtoReflect.Descriptor instead.
func (*TaskSpec) GetComputeResource func (*TaskSpec) GetEnvironment func (*TaskSpec) GetEnvironmentsDeprecated: Marked as deprecated in google/cloud/batch/v1/task.proto.
func (*TaskSpec) GetLifecyclePolicies func (*TaskSpec) GetMaxRetryCount func (*TaskSpec) GetMaxRunDuration func (*TaskSpec) GetRunnables func (*TaskSpec) GetVolumes func (*TaskSpec) ProtoMessage func (*TaskSpec) ProtoReflect func (*TaskSpec) Reset func (*TaskSpec) String TaskStatustype TaskStatus struct {
// Task state.
State TaskStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.batch.v1.TaskStatus_State" json:"state,omitempty"`
// Detailed info about why the state is reached.
StatusEvents []*StatusEvent `protobuf:"bytes,2,rep,name=status_events,json=statusEvents,proto3" json:"status_events,omitempty"`
// contains filtered or unexported fields
}
Status of a task.
func (*TaskStatus) DescriptorDeprecated: Use TaskStatus.ProtoReflect.Descriptor instead.
func (*TaskStatus) GetState func (*TaskStatus) GetStatusEvents func (*TaskStatus) ProtoMessage func (*TaskStatus) ProtoReflect func (*TaskStatus) Reset func (*TaskStatus) String TaskStatus_Statetype TaskStatus_State int32
Task states.
TaskStatus_STATE_UNSPECIFIED, TaskStatus_PENDING, TaskStatus_ASSIGNED, TaskStatus_RUNNING, TaskStatus_FAILED, TaskStatus_SUCCEEDED, TaskStatus_UNEXECUTED func (TaskStatus_State) Descriptor func (TaskStatus_State) Enum func (TaskStatus_State) EnumDescriptorDeprecated: Use TaskStatus_State.Descriptor instead.
func (TaskStatus_State) Number func (TaskStatus_State) String func (TaskStatus_State) Type UnimplementedBatchServiceServertype UnimplementedBatchServiceServer struct {
}
UnimplementedBatchServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedBatchServiceServer) CancelJob func (*UnimplementedBatchServiceServer) CreateJob func (*UnimplementedBatchServiceServer) DeleteJob func (*UnimplementedBatchServiceServer) GetJob func (*UnimplementedBatchServiceServer) GetTask func (*UnimplementedBatchServiceServer) ListJobs func (*UnimplementedBatchServiceServer) ListTasks Volumetype Volume struct {
// The source for the volume.
//
// Types that are assignable to Source:
//
// *Volume_Nfs
// *Volume_Gcs
// *Volume_DeviceName
Source isVolume_Source `protobuf_oneof:"source"`
// The mount path for the volume, e.g. /mnt/disks/share.
MountPath string `protobuf:"bytes,4,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
// Mount options vary based on the type of storage volume:
//
// * For a Cloud Storage bucket, all the mount options provided
// by
//
// the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
// are supported.
// - For an existing persistent disk, all mount options provided by the
// [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html)
// except writing are supported. This is due to restrictions of
// [multi-writer
// mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms).
// - For any other disk or a Network File System (NFS), all the
// mount options provided by the `mount` command are supported.
MountOptions []string `protobuf:"bytes,5,rep,name=mount_options,json=mountOptions,proto3" json:"mount_options,omitempty"`
// contains filtered or unexported fields
}
Volume describes a volume and parameters for it to be mounted to a VM.
func (*Volume) DescriptorDeprecated: Use Volume.ProtoReflect.Descriptor instead.
func (*Volume) GetDeviceName func (*Volume) GetGcs func (*Volume) GetMountOptions func (*Volume) GetMountPath func (*Volume) GetNfs func (*Volume) GetSourcefunc (m *Volume) GetSource() isVolume_Source
func (*Volume) ProtoMessage func (*Volume) ProtoReflect func (*Volume) Reset func (*Volume) String Volume_DeviceName
type Volume_DeviceName struct {
// Device name of an attached disk volume, which should align with a
// device_name specified by
// job.allocation_policy.instances[0].policy.disks[i].device_name or
// defined by the given instance template in
// job.allocation_policy.instances[0].instance_template.
DeviceName string `protobuf:"bytes,6,opt,name=device_name,json=deviceName,proto3,oneof"`
}
Volume_Gcs
type Volume_Gcs struct {
// A Google Cloud Storage (GCS) volume.
Gcs *GCS `protobuf:"bytes,3,opt,name=gcs,proto3,oneof"`
}
Volume_Nfs
type Volume_Nfs struct {
// A Network File System (NFS) volume. For example, a
// Filestore file share.
Nfs *NFS `protobuf:"bytes,1,opt,name=nfs,proto3,oneof"`
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["The latest version available for the Google Cloud Batch API is 1.12.1, with several previous versions also accessible, ranging down to version 0.1.0."],["This API defines several core functionalities, including job management (creation, retrieval, deletion, cancellation, listing), and task management (retrieval and listing)."],["The API utilizes enum types to represent different states and policies, such as `LogsPolicy_Destination`, `JobStatus_State`, `JobNotification_Type`, `AllocationPolicy_ProvisioningModel`, `TaskGroup_SchedulingPolicy`, `TaskStatus_State`, and `LifecyclePolicy_Action`."],["Key components in the API include `Job`, `TaskGroup`, `Task`, `AllocationPolicy`, and `Runnable`, allowing for the configuration of resource allocation, task execution, and job management."],["A variety of data structures are provided to control and manage different aspects of the jobs, such as `ComputeResource` for setting resource requirements, `Environment` for managing environment variables, and `LogsPolicy` for configuring how logs are stored."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4