openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 75.2 kB
JSON
{"openapi":"3.0.0","servers":[{"url":"https://batch.googleapis.com/"}],"info":{"contact":{"name":"Google","url":"https://google.com","x-twitter":"youtube"},"description":"An API to manage the running of batch resources on Google Cloud Platform.","license":{"name":"Creative Commons Attribution 3.0","url":"http://creativecommons.org/licenses/by/3.0/"},"termsOfService":"https://developers.google.com/terms/","title":"Batch API","version":"v1","x-apisguru-categories":["analytics","media"],"x-logo":{"url":"https://upload.wikimedia.org/wikipedia/commons/e/e1/YouTube_play_buttom_icon_%282013-2017%29.svg"},"x-origin":[{"format":"google","url":"https://batch.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-providerName":"googleapis.com","x-serviceName":"batch"},"externalDocs":{"url":"https://cloud.google.com/batch/"},"tags":[{"name":"projects"}],"paths":{"/v1/{name}":{"delete":{"description":"Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.","operationId":"batch.projects.locations.operations.delete","parameters":[{"description":"The name of the operation resource to be deleted.","in":"path","name":"name","required":true,"schema":{"type":"string"}},{"description":"Optional. Reason for this deletion.","in":"query","name":"reason","schema":{"type":"string"}},{"description":"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).","in":"query","name":"requestId","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]},"get":{"description":"Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.","operationId":"batch.projects.locations.operations.get","parameters":[{"description":"The name of the operation resource.","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/{name}/locations":{"get":{"description":"Lists information about the supported locations for this service.","operationId":"batch.projects.locations.list","parameters":[{"description":"The resource that owns the locations collection, if applicable.","in":"path","name":"name","required":true,"schema":{"type":"string"}},{"description":"A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).","in":"query","name":"filter","schema":{"type":"string"}},{"description":"The maximum number of results to return. If not set, the service selects a default.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLocationsResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/{name}/operations":{"get":{"description":"Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.","operationId":"batch.projects.locations.operations.list","parameters":[{"description":"The name of the operation's parent resource.","in":"path","name":"name","required":true,"schema":{"type":"string"}},{"description":"The standard list filter.","in":"query","name":"filter","schema":{"type":"string"}},{"description":"The standard list page size.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"The standard list page token.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOperationsResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/{name}:cancel":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.","operationId":"batch.projects.locations.operations.cancel","parameters":[{"description":"The name of the operation resource to be cancelled.","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOperationRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]}},"/v1/{parent}/jobs":{"get":{"description":"List all Jobs for a project within a region.","operationId":"batch.projects.locations.jobs.list","parameters":[{"description":"Parent path.","in":"path","name":"parent","required":true,"schema":{"type":"string"}},{"description":"List filter.","in":"query","name":"filter","schema":{"type":"string"}},{"description":"Optional. Sort results. Supported are \"name\", \"name desc\", \"create_time\", and \"create_time desc\".","in":"query","name":"orderBy","schema":{"type":"string"}},{"description":"Page size.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Page token.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListJobsResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Create a Job.","operationId":"batch.projects.locations.jobs.create","parameters":[{"description":"Required. The parent resource name where the Job will be created. Pattern: \"projects/{project}/locations/{location}\"","in":"path","name":"parent","required":true,"schema":{"type":"string"}},{"description":"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}\".","in":"query","name":"jobId","schema":{"type":"string"}},{"description":"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).","in":"query","name":"requestId","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]}},"/v1/{parent}/state:report":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Report agent's state, e.g. agent status and tasks information","operationId":"batch.projects.locations.state.report","parameters":[{"description":"Required. Format: projects/{project}/locations/{location} {project} should be a project number.","in":"path","name":"parent","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportAgentStateRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportAgentStateResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]}},"/v1/{parent}/tasks":{"get":{"description":"List Tasks associated with a job.","operationId":"batch.projects.locations.jobs.taskGroups.tasks.list","parameters":[{"description":"Required. Name of a TaskGroup from which Tasks are being requested. Pattern: \"projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"","in":"path","name":"parent","required":true,"schema":{"type":"string"}},{"description":"Task filter, null filter matches all Tasks. Filter string should be of the format State=TaskStatus.State e.g. State=RUNNING","in":"query","name":"filter","schema":{"type":"string"}},{"description":"Page size.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Page token.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTasksResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]}},"components":{"parameters":{"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"enum":["1","2"],"type":"string"}},"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"enum":["json","media","proto"],"type":"string"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean"}},"quotaUser":{"description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}}},"schemas":{"Accelerator":{"description":"Accelerator describes Compute Engine accelerators to be attached to the VM.","properties":{"count":{"description":"The number of accelerators of this type.","format":"int64","type":"string"},"driverVersion":{"description":"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.","type":"string"},"installGpuDrivers":{"deprecated":true,"description":"Deprecated: please use instances[0].install_gpu_drivers instead.","type":"boolean"},"type":{"description":"The accelerator type. For example, \"nvidia-tesla-t4\". See `gcloud compute accelerator-types list`.","type":"string"}},"type":"object"},"ActionCondition":{"description":"Conditions for actions to deal with task failures.","properties":{"exitCodes":{"description":"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.","items":{"format":"int32","type":"integer"},"type":"array"}},"type":"object"},"AgentContainer":{"description":"Container runnable representation on the agent side.","properties":{"commands":{"description":"Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT.","items":{"type":"string"},"type":"array"},"entrypoint":{"description":"Overrides the `ENTRYPOINT` specified in the container.","type":"string"},"imageUri":{"description":"The URI to pull the container image from.","type":"string"},"options":{"description":"Arbitrary additional options to include in the \"docker run\" command when running this container, e.g. \"--network host\".","type":"string"},"volumes":{"description":"Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro","items":{"type":"string"},"type":"array"}},"type":"object"},"AgentEnvironment":{"description":"AgentEnvironment is the Environment representation between Agent and CLH communication. The environment is used in both task level and agent level.","properties":{"encryptedVariables":{"$ref":"#/components/schemas/AgentKMSEnvMap","description":"An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values."},"secretVariables":{"additionalProperties":{"type":"string"},"description":"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.","type":"object"},"variables":{"additionalProperties":{"type":"string"},"description":"A map of environment variable names to values.","type":"object"}},"type":"object"},"AgentInfo":{"description":"VM Agent Info.","properties":{"jobId":{"description":"Optional. The assigned Job ID","type":"string"},"reportTime":{"description":"When the AgentInfo is generated.","format":"google-datetime","type":"string"},"state":{"description":"Agent state.","enum":["AGENT_STATE_UNSPECIFIED","AGENT_STARTING","AGENT_RUNNING","AGENT_STOPPED"],"type":"string"},"taskGroupId":{"description":"The assigned task group ID.","type":"string"},"tasks":{"description":"Task Info.","items":{"$ref":"#/components/schemas/AgentTaskInfo"},"type":"array"}},"type":"object"},"AgentKMSEnvMap":{"description":"AgentKMSEnvMap contains the encrypted key/value pair to be used in the environment on the Agent side.","properties":{"cipherText":{"description":"The value of the cipherText response from the `encrypt` method.","type":"string"},"keyName":{"description":"The name of the KMS key that will be used to decrypt the cipher text.","type":"string"}},"type":"object"},"AgentMetadata":{"description":"VM Agent Metadata.","properties":{"creationTime":{"deprecated":true,"description":"When the VM agent started. Use agent_startup_time instead.","format":"google-datetime","type":"string"},"creator":{"description":"Full name of the entity that created this vm. For MIG, this path is: projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The value is retrieved from the vm metadata key of \"created-by\".","type":"string"},"imageVersion":{"description":"image version for the VM that this agent is installed on.","type":"string"},"instance":{"description":"GCP instance name (go/instance-name).","type":"string"},"instanceId":{"description":"GCP instance ID (go/instance-id).","format":"uint64","type":"string"},"instancePreemptionNoticeReceived":{"description":"If the GCP instance has received preemption notice.","type":"boolean"},"osRelease":{"additionalProperties":{"type":"string"},"description":"parsed contents of /etc/os-release","type":"object"},"version":{"description":"agent binary version running on VM","type":"string"},"zone":{"description":"Agent zone.","type":"string"}},"type":"object"},"AgentScript":{"description":"Script runnable representation on the agent side.","properties":{"path":{"description":"Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the first line of the file.) Otherwise, the file will by default be executed by `/bin/sh`.","type":"string"},"text":{"description":"Shell script text. To specify an interpreter, please add a `#!\\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\\n` should be added. To execute the script using`Python3`, `#!/usr/bin/env python3\\n` should be added.) Otherwise, the script will by default be executed by `/bin/sh`.","type":"string"}},"type":"object"},"AgentTask":{"description":"TODO(b/182501497) The message needs to be redefined when the Agent API server updates data in storage per the backend design.","properties":{"agentTaskSpec":{"$ref":"#/components/schemas/AgentTaskSpec","description":"AgentTaskSpec is the taskSpec representation between Agent and CLH communication. This field will replace the TaskSpec field above in future to have a better separation between user-facaing API and internal API."},"intendedState":{"description":"The intended state of the task.","enum":["INTENDED_STATE_UNSPECIFIED","ASSIGNED","CANCELLED","DELETED"],"type":"string"},"reachedBarrier":{"description":"The highest barrier reached by all tasks in the task's TaskGroup.","format":"int64","type":"string"},"spec":{"$ref":"#/components/schemas/TaskSpec","description":"Task Spec. This field will be replaced by agent_task_spec below in future."},"status":{"$ref":"#/components/schemas/TaskStatus","description":"Task status."},"task":{"description":"Task name.","type":"string"},"taskSource":{"description":"TaskSource represents the source of the task.","enum":["TASK_SOURCE_UNSPECIFIED","BATCH_INTERNAL","USER"],"type":"string"}},"type":"object"},"AgentTaskInfo":{"description":"Task Info","properties":{"runnable":{"description":"The highest index of a runnable started by the agent for this task. The runnables are indexed from 1. Value 0 is undefined.","format":"int64","type":"string"},"taskId":{"description":"ID of the Task","type":"string"},"taskStatus":{"$ref":"#/components/schemas/TaskStatus","description":"The status of the Task. If we need agent specific fields we should fork the public TaskStatus into an agent specific one. Or add them below."}},"type":"object"},"AgentTaskRunnable":{"description":"AgentTaskRunnable is the Runnable representation between Agent and CLH communication.","properties":{"alwaysRun":{"description":"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.","type":"boolean"},"background":{"description":"This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).","type":"boolean"},"container":{"$ref":"#/components/schemas/AgentContainer","description":"Container runnable."},"environment":{"$ref":"#/components/schemas/AgentEnvironment","description":"Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup)."},"ignoreExitStatus":{"description":"Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.","type":"boolean"},"script":{"$ref":"#/components/schemas/AgentScript","description":"Script runnable."},"timeout":{"description":"Timeout for this Runnable.","format":"google-duration","type":"string"}},"type":"object"},"AgentTaskSpec":{"description":"AgentTaskSpec is the user's TaskSpec representation between Agent and CLH communication.","properties":{"environment":{"$ref":"#/components/schemas/AgentEnvironment","description":"Environment variables to set before running the Task."},"maxRunDuration":{"description":"Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.","format":"google-duration","type":"string"},"runnables":{"description":"AgentTaskRunnable is runanbles that will be executed on the agent.","items":{"$ref":"#/components/schemas/AgentTaskRunnable"},"type":"array"},"userAccount":{"$ref":"#/components/schemas/AgentTaskUserAccount","description":"User account on the VM to run the runnables in the agentTaskSpec. If not set, the runnable will be run under root user."}},"type":"object"},"AgentTaskUserAccount":{"description":"AgentTaskUserAccount contains the information of a POSIX account on the guest os which is used to execute the runnables.","properties":{"gid":{"description":"gid id an unique identifier of the POSIX account group corresponding to the user account.","format":"int64","type":"string"},"uid":{"description":"uid is an unique identifier of the POSIX account corresponding to the user account.","format":"int64","type":"string"}},"type":"object"},"AgentTimingInfo":{"description":"VM timing information","properties":{"agentStartupTime":{"description":"Agent startup time","format":"google-datetime","type":"string"},"bootTime":{"description":"Boot timestamp of the VM OS","format":"google-datetime","type":"string"},"scriptStartupTime":{"description":"Startup time of the Batch VM script.","format":"google-datetime","type":"string"}},"type":"object"},"AllocationPolicy":{"description":"A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.","properties":{"instances":{"description":"Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.","items":{"$ref":"#/components/schemas/InstancePolicyOrTemplate"},"type":"array"},"labels":{"additionalProperties":{"type":"string"},"description":"Labels applied to all VM instances and other resources created by AllocationPolicy. Labels could be user provided or system generated. You can assign up to 64 labels. [Google Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with \"goog-\" or \"google-\" are reserved.","type":"object"},"location":{"$ref":"#/components/schemas/LocationPolicy","description":"Location where compute resources should be allocated for the Job."},"network":{"$ref":"#/components/schemas/NetworkPolicy","description":"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."},"placement":{"$ref":"#/components/schemas/PlacementPolicy","description":"The placement policy."},"serviceAccount":{"$ref":"#/components/schemas/ServiceAccount","description":"Service account that VMs will run as."},"tags":{"description":"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).","items":{"type":"string"},"type":"array"}},"type":"object"},"AttachedDisk":{"description":"A new or an existing persistent disk (PD) or a local ssd attached to a VM instance.","properties":{"deviceName":{"description":"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.","type":"string"},"existingDisk":{"description":"Name of an existing PD.","type":"string"},"newDisk":{"$ref":"#/components/schemas/Disk"}},"type":"object"},"Barrier":{"description":"Barrier runnable blocks until all tasks in a taskgroup reach it.","properties":{"name":{"description":"Barriers are identified by their index in runnable list. Names are not required, but if present should be an identifier.","type":"string"}},"type":"object"},"CancelOperationRequest":{"description":"The request message for Operations.CancelOperation.","properties":{},"type":"object"},"CloudLoggingOption":{"description":"`CloudLoggingOption` contains additional settings for Cloud Logging logs generated by Batch job.","properties":{"useGenericTaskMonitoredResource":{"description":"Optional. Set this flag 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.","type":"boolean"}},"type":"object"},"ComputeResource":{"description":"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](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate) field, make sure both fields are compatible with each other.","properties":{"bootDiskMib":{"description":"Extra boot disk size in MiB for each task.","format":"int64","type":"string"},"cpuMilli":{"description":"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.","format":"int64","type":"string"},"memoryMib":{"description":"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.","format":"int64","type":"string"}},"type":"object"},"Container":{"description":"Container runnable.","properties":{"blockExternalNetwork":{"description":"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.","type":"boolean"},"commands":{"description":"Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT.","items":{"type":"string"},"type":"array"},"enableImageStreaming":{"description":"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).","type":"boolean"},"entrypoint":{"description":"Overrides the `ENTRYPOINT` specified in the container.","type":"string"},"imageUri":{"description":"The URI to pull the container image from.","type":"string"},"options":{"description":"Arbitrary additional options to include in the \"docker run\" command when running this container, e.g. \"--network host\".","type":"string"},"password":{"description":"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).","type":"string"},"username":{"description":"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).","type":"string"},"volumes":{"description":"Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /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.","items":{"type":"string"},"type":"array"}},"type":"object"},"Disk":{"description":"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.","properties":{"diskInterface":{"description":"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.","type":"string"},"image":{"description":"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-centos`: use Batch CentOS images. * `batch-cos`: use Batch Container-Optimized images. * `batch-hpc-centos`: use Batch HPC CentOS images. * `batch-hpc-rocky`: use Batch HPC Rocky Linux images.","type":"string"},"sizeGb":{"description":"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.","format":"int64","type":"string"},"snapshot":{"description":"Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.","type":"string"},"type":{"description":"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\".","type":"string"}},"type":"object"},"Empty":{"description":"A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }","properties":{},"type":"object"},"Environment":{"description":"An Environment describes a collection of environment variables to set when executing Tasks.","properties":{"encryptedVariables":{"$ref":"#/components/schemas/KMSEnvMap","description":"An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values."},"secretVariables":{"additionalProperties":{"type":"string"},"description":"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.","type":"object"},"variables":{"additionalProperties":{"type":"string"},"description":"A map of environment variable names to values.","type":"object"}},"type":"object"},"GCS":{"description":"Represents a Google Cloud Storage volume.","properties":{"remotePath":{"description":"Remote path, either a bucket name or a subdirectory of a bucket, e.g.: bucket_name, bucket_name/subdirectory/","type":"string"}},"type":"object"},"InstancePolicy":{"description":"InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.","properties":{"accelerators":{"description":"The accelerators attached to each VM instance.","items":{"$ref":"#/components/schemas/Accelerator"},"type":"array"},"bootDisk":{"$ref":"#/components/schemas/Disk","description":"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."},"disks":{"description":"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.","items":{"$ref":"#/components/schemas/AttachedDisk"},"type":"array"},"machineType":{"description":"The Compute Engine machine type.","type":"string"},"minCpuPlatform":{"description":"The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.","type":"string"},"provisioningModel":{"description":"The provisioning model.","enum":["PROVISIONING_MODEL_UNSPECIFIED","STANDARD","SPOT","PREEMPTIBLE"],"type":"string"},"reservation":{"description":"Optional. If specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation.","type":"string"}},"type":"object"},"InstancePolicyOrTemplate":{"description":"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.","properties":{"installGpuDrivers":{"description":"Set this field true if users want Batch to help fetch drivers from a third party location and install them for GPUs specified in policy.accelerators or instance_template on their 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.","type":"boolean"},"instanceTemplate":{"description":"Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid c++ keyword conflict.","type":"string"},"policy":{"$ref":"#/components/schemas/InstancePolicy","description":"InstancePolicy."}},"type":"object"},"InstanceStatus":{"description":"VM instance status.","properties":{"bootDisk":{"$ref":"#/components/schemas/Disk","description":"The VM boot disk."},"machineType":{"description":"The Compute Engine machine type.","type":"string"},"provisioningModel":{"description":"The VM instance provisioning model.","enum":["PROVISIONING_MODEL_UNSPECIFIED","STANDARD","SPOT","PREEMPTIBLE"],"type":"string"},"taskPack":{"description":"The max number of tasks can be assigned to this instance type.","format":"int64","type":"string"}},"type":"object"},"Job":{"description":"The Cloud Batch Job description.","properties":{"allocationPolicy":{"$ref":"#/components/schemas/AllocationPolicy","description":"Compute resource allocation for all TaskGroups in the Job."},"createTime":{"description":"Output only. When the Job was created.","format":"google-datetime","readOnly":true,"type":"string"},"labels":{"additionalProperties":{"type":"string"},"description":"Labels for the Job. Labels could be user provided or system generated. For example, \"labels\": { \"department\": \"finance\", \"environment\": \"test\" } You can assign up to 64 labels. [Google Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with \"goog-\" or \"google-\" are reserved.","type":"object"},"logsPolicy":{"$ref":"#/components/schemas/LogsPolicy","description":"Log preservation policy for the Job."},"name":{"description":"Output only. Job name. For example: \"projects/123456/locations/us-central1/jobs/job01\".","readOnly":true,"type":"string"},"notifications":{"description":"Notification configurations.","items":{"$ref":"#/components/schemas/JobNotification"},"type":"array"},"priority":{"description":"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.","format":"int64","type":"string"},"status":{"$ref":"#/components/schemas/JobStatus","description":"Output only. Job status. It is read only for users.","readOnly":true},"taskGroups":{"description":"Required. TaskGroups in the Job. Only one TaskGroup is supported now.","items":{"$ref":"#/components/schemas/TaskGroup"},"type":"array"},"uid":{"description":"Output only. A system generated unique ID for the Job.","readOnly":true,"type":"string"},"updateTime":{"description":"Output only. The last time the Job was updated.","format":"google-datetime","readOnly":true,"type":"string"}},"type":"object"},"JobNotification":{"description":"Notification configurations.","properties":{"message":{"$ref":"#/components/schemas/Message","description":"The attribute requirements of messages to be sent to this Pub/Sub topic. Without this field, no message will be sent."},"pubsubTopic":{"description":"The Pub/Sub topic where notifications like the job state changes will be published. The topic must exist in the same project as the job and billings will be charged to this project. If not specified, no Pub/Sub messages will be sent. Topic format: `projects/{project}/topics/{topic}`.","type":"string"}},"type":"object"},"JobStatus":{"description":"Job status.","properties":{"runDuration":{"description":"The duration of time that the Job spent in status RUNNING.","format":"google-duration","type":"string"},"state":{"description":"Job state","enum":["STATE_UNSPECIFIED","QUEUED","SCHEDULED","RUNNING","SUCCEEDED","FAILED","DELETION_IN_PROGRESS"],"type":"string"},"statusEvents":{"description":"Job status events","items":{"$ref":"#/components/schemas/StatusEvent"},"type":"array"},"taskGroups":{"additionalProperties":{"$ref":"#/components/schemas/TaskGroupStatus"},"description":"Aggregated task status for each TaskGroup in the Job. The map key is TaskGroup ID.","type":"object"}},"type":"object"},"KMSEnvMap":{"properties":{"cipherText":{"description":"The value of the cipherText response from the `encrypt` method.","type":"string"},"keyName":{"description":"The name of the KMS key that will be used to decrypt the cipher text.","type":"string"}},"type":"object"},"LifecyclePolicy":{"description":"LifecyclePolicy describes how to deal with task failures based on different conditions.","properties":{"action":{"description":"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.","enum":["ACTION_UNSPECIFIED","RETRY_TASK","FAIL_TASK"],"type":"string"},"actionCondition":{"$ref":"#/components/schemas/ActionCondition","description":"Conditions that decide why a task failure is dealt with a specific action."}},"type":"object"},"ListJobsResponse":{"description":"ListJob Response.","properties":{"jobs":{"description":"Jobs.","items":{"$ref":"#/components/schemas/Job"},"type":"array"},"nextPageToken":{"description":"Next page token.","type":"string"},"unreachable":{"description":"Locations that could not be reached.","items":{"type":