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 <https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate>__
field, make sure both fields are compatible with each other.
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.
Runnable describes instructions for executing a specific
script or container as part of a Task.
This message has oneof_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
Volume describes a volume and parameters for it to be mounted
to a VM.
This message has oneof_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
[[["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-28 UTC."],[],[],null,["# Package types (0.17.36)\n\nVersion latestkeyboard_arrow_down\n\n- [0.17.36 (latest)](/python/docs/reference/batch/latest/google.cloud.batch_v1.types)\n- [0.17.35](/python/docs/reference/batch/0.17.35/google.cloud.batch_v1.types)\n- [0.16.0](/python/docs/reference/batch/0.16.0/google.cloud.batch_v1.types)\n- [0.15.0](/python/docs/reference/batch/0.15.0/google.cloud.batch_v1.types)\n- [0.14.0](/python/docs/reference/batch/0.14.0/google.cloud.batch_v1.types)\n- [0.13.0](/python/docs/reference/batch/0.13.0/google.cloud.batch_v1.types)\n- [0.12.0](/python/docs/reference/batch/0.12.0/google.cloud.batch_v1.types)\n- [0.11.0](/python/docs/reference/batch/0.11.0/google.cloud.batch_v1.types)\n- [0.10.0](/python/docs/reference/batch/0.10.0/google.cloud.batch_v1.types)\n- [0.9.0](/python/docs/reference/batch/0.9.0/google.cloud.batch_v1.types)\n- [0.8.1](/python/docs/reference/batch/0.8.1/google.cloud.batch_v1.types)\n- [0.7.0](/python/docs/reference/batch/0.7.0/google.cloud.batch_v1.types)\n- [0.6.0](/python/docs/reference/batch/0.6.0/google.cloud.batch_v1.types)\n- [0.5.0](/python/docs/reference/batch/0.5.0/google.cloud.batch_v1.types)\n- [0.4.1](/python/docs/reference/batch/0.4.1/google.cloud.batch_v1.types)\n- [0.3.2](/python/docs/reference/batch/0.3.2/google.cloud.batch_v1.types)\n- [0.2.0](/python/docs/reference/batch/0.2.0/google.cloud.batch_v1.types)\n- [0.1.2](/python/docs/reference/batch/0.1.2/google.cloud.batch_v1.types) \nAPI documentation for `batch_v1.types` package. \n\nClasses\n-------\n\n### [AllocationPolicy](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.AllocationPolicy)\n\nA Job's resource allocation policy describes when, where, and\nhow compute resources should be allocated for the Job.\n\n### [CancelJobRequest](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.CancelJobRequest)\n\nCancelJob Request.\n\n### [CancelJobResponse](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.CancelJobResponse)\n\nResponse to the CancelJob request.\n\n### [ComputeResource](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.ComputeResource)\n\nCompute resource requirements.\n\nComputeResource defines the amount of resources required for each\ntask. Make sure your tasks have enough resources to successfully\nrun. If you also define the types of resources for a job to use with\nthe\n`InstancePolicyOrTemplate \u003chttps://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate\u003e`__\nfield, make sure both fields are compatible with each other.\n\n### [CreateJobRequest](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.CreateJobRequest)\n\nCreateJob Request.\n\n### [DeleteJobRequest](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.DeleteJobRequest)\n\nDeleteJob Request.\n\n### [Environment](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Environment)\n\nAn Environment describes a collection of environment\nvariables to set when executing Tasks.\n\n### [GCS](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.GCS)\n\nRepresents a Google Cloud Storage volume.\n\n### [GetJobRequest](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.GetJobRequest)\n\nGetJob Request.\n\n### [GetTaskRequest](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.GetTaskRequest)\n\nRequest for a single Task by name.\n\n### [Job](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Job)\n\nThe Cloud Batch Job description.\n\n### [JobNotification](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.JobNotification)\n\nNotification configurations.\n\n### [JobStatus](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.JobStatus)\n\nJob status.\n\n### [LifecyclePolicy](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.LifecyclePolicy)\n\nLifecyclePolicy describes how to deal with task failures\nbased on different conditions.\n\n### [ListJobsRequest](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.ListJobsRequest)\n\nListJob Request.\n\n### [ListJobsResponse](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.ListJobsResponse)\n\nListJob Response.\n\n### [ListTasksRequest](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.ListTasksRequest)\n\nListTasks Request.\n\n### [ListTasksResponse](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.ListTasksResponse)\n\nListTasks Response.\n\n### [LogsPolicy](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.LogsPolicy)\n\nLogsPolicy describes if and how a job's logs are preserved. Logs\ninclude information that is automatically written by the Batch\nservice agent and any information that you configured the job's\nrunnables to write to the `stdout` or `stderr` streams.\n\n### [NFS](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.NFS)\n\nRepresents an NFS volume.\n\n### [OperationMetadata](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.OperationMetadata)\n\nRepresents the metadata of the long-running operation.\n\n### [Runnable](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Runnable)\n\nRunnable describes instructions for executing a specific\nscript or container as part of a Task.\n\nThis message has `oneof`_ fields (mutually exclusive fields).\nFor each oneof, at most one member field can be set at the same time.\nSetting any member of the oneof automatically clears all other\nmembers.\n\n.. _oneof: \u003chttps://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields\u003e\n\n### [ServiceAccount](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.ServiceAccount)\n\nCarries information about a Google Cloud service account.\n\n### [StatusEvent](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.StatusEvent)\n\nStatus event.\n\n### [Task](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Task)\n\nA Cloud Batch task.\n\n### [TaskExecution](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.TaskExecution)\n\nThis Task Execution field includes detail information for\ntask execution procedures, based on StatusEvent types.\n\n### [TaskGroup](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.TaskGroup)\n\nA TaskGroup defines one or more Tasks that all share the same\nTaskSpec.\n\n### [TaskSpec](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.TaskSpec)\n\nSpec of a task\n\n### [TaskStatus](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.TaskStatus)\n\nStatus of a task.\n\n### [Volume](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Volume)\n\nVolume describes a volume and parameters for it to be mounted\nto a VM.\n\nThis message has `oneof`_ fields (mutually exclusive fields).\nFor each oneof, at most one member field can be set at the same time.\nSetting any member of the oneof automatically clears all other\nmembers.\n\n.. _oneof: \u003chttps://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields\u003e"]]