- Resource: Task
- TriggerSpec
- Type
- ExecutionStatus
- SparkTaskConfig
- InfrastructureSpec
- BatchComputeResources
- ContainerImageRuntime
- VpcNetwork
- NotebookTaskConfig
- Methods
Resource: Task
A task represents a user-visible job.
JSON representation |
---|
{ "name": string, "uid": string, "createTime": string, "updateTime": string, "description": string, "displayName": string, "state": enum ( |
Fields | |
---|---|
name |
Output only. The relative resource name of the task, of the form: projects/{project_number}/locations/{locationId}/lakes/{lakeId}/ tasks/{taskId}. |
uid |
Output only. System generated globally unique ID for the task. This ID will be different if the task is deleted and re-created with the same name. |
createTime |
Output only. The time when the task was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The time when the task was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
description |
Optional. Description of the task. |
displayName |
Optional. User friendly display name. |
state |
Output only. Current state of the task. |
labels |
Optional. User-defined labels for the task. An object containing a list of |
triggerSpec |
Required. Spec related to how often and when a task should be triggered. |
executionSpec |
Required. Spec related to how a task is executed. |
executionStatus |
Output only. Status of the latest task executions. |
Union field config . Task template specific user-specified config. config can be only one of the following: |
|
spark |
Config related to running custom Spark tasks. |
notebook |
Config related to running scheduled Notebooks. |
TriggerSpec
Task scheduling and trigger settings.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
Required. Immutable. Trigger type of the user-specified Task. |
startTime |
Optional. The first run of the task will be after this time. If not specified, the task will run shortly after being submitted if ON_DEMAND and based on the schedule if RECURRING. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
disabled |
Optional. Prevent the task from executing. This does not cancel already running tasks. It is intended to temporarily disable RECURRING tasks. |
maxRetries |
Optional. Number of retry attempts before aborting. Set to zero to never attempt to retry a failed task. |
Union field trigger . Trigger only applies for RECURRING tasks. trigger can be only one of the following: |
|
schedule |
Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running tasks periodically. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, |
Type
Determines how often and when the job will run.
Enums | |
---|---|
TYPE_UNSPECIFIED |
Unspecified trigger type. |
ON_DEMAND |
The task runs one-time shortly after Task Creation. |
RECURRING |
The task is scheduled to run periodically. |
ExecutionStatus
Status of the task execution (e.g. Jobs).
JSON representation |
---|
{
"updateTime": string,
"latestJob": {
object ( |
Fields | |
---|---|
updateTime |
Output only. Last update time of the status. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
latestJob |
Output only. latest job execution |
SparkTaskConfig
User-specified config for running a Spark task.
JSON representation |
---|
{ "fileUris": [ string ], "archiveUris": [ string ], "infrastructureSpec": { object ( |
Fields | |
---|---|
fileUris[] |
Optional. Cloud Storage URIs of files to be placed in the working directory of each executor. |
archiveUris[] |
Optional. Cloud Storage URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. |
infrastructureSpec |
Optional. Infrastructure specification for the execution. |
Union field driver . Required. The specification of the main method to call to drive the job. Specify either the jar file that contains the main class or the main class name. driver can be only one of the following: |
|
mainJarFileUri |
The Cloud Storage URI of the jar file that contains the main class. The execution args are passed in as a sequence of named process arguments ( |
mainClass |
The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in |
pythonScriptFile |
The Gcloud Storage URI of the main Python file to use as the driver. Must be a .py file. The execution args are passed in as a sequence of named process arguments ( |
sqlScriptFile |
A reference to a query file. This should be the Cloud Storage URI of the query file. The execution args are used to declare a set of script variables ( |
sqlScript |
The query text. The execution args are used to declare a set of script variables ( |
InfrastructureSpec
Configuration for the underlying infrastructure used to run workloads.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field resources . Hardware config. resources can be only one of the following: |
|
batch |
Compute resources needed for a Task when using Dataproc Serverless. |
Union field runtime . Software config. runtime can be only one of the following: |
|
containerImage |
Container Image Runtime Configuration. |
Union field network . Networking config. network can be only one of the following: |
|
vpcNetwork |
Vpc network. |
BatchComputeResources
Batch compute resources associated with the task.
JSON representation |
---|
{ "executorsCount": integer, "maxExecutorsCount": integer } |
Fields | |
---|---|
executorsCount |
Optional. Total number of job executors. Executor Count should be between 2 and 100. [Default=2] |
maxExecutorsCount |
Optional. Max configurable executors. If maxExecutorsCount > executorsCount, then auto-scaling is enabled. Max Executor Count should be between 2 and 1000. [Default=1000] |
ContainerImageRuntime
Container Image Runtime Configuration used with Batch execution.
JSON representation |
---|
{ "image": string, "javaJars": [ string ], "pythonPackages": [ string ], "properties": { string: string, ... } } |
Fields | |
---|---|
image |
Optional. Container image to use. |
javaJars[] |
Optional. A list of Java JARS to add to the classpath. Valid input includes Cloud Storage URIs to Jar binaries. For example, gs://bucket-name/my/path/to/file.jar |
pythonPackages[] |
Optional. A list of python packages to be installed. Valid formats include Cloud Storage URI to a PIP installable library. For example, gs://bucket-name/my/path/to/lib.tar.gz |
properties |
Optional. Override to common configuration of open source components installed on the Dataproc cluster. The properties to set on daemon config files. Property keys are specified in An object containing a list of |
VpcNetwork
Cloud VPC Network used to run the infrastructure.
JSON representation |
---|
{ "networkTags": [ string ], // Union field |
Fields | |
---|---|
networkTags[] |
Optional. List of network tags to apply to the job. |
Union field network_name . The Cloud VPC network identifier. network_name can be only one of the following: |
|
network |
Optional. The Cloud VPC network in which the job is run. By default, the Cloud VPC network named Default within the project is used. |
subNetwork |
Optional. The Cloud VPC sub-network in which the job is run. |
NotebookTaskConfig
Config for running scheduled notebooks.
JSON representation |
---|
{
"notebook": string,
"infrastructureSpec": {
object ( |
Fields | |
---|---|
notebook |
Required. Path to input notebook. This can be the Cloud Storage URI of the notebook file or the path to a Notebook Content. The execution args are accessible as environment variables ( |
infrastructureSpec |
Optional. Infrastructure specification for the execution. |
fileUris[] |
Optional. Cloud Storage URIs of files to be placed in the working directory of each executor. |
archiveUris[] |
Optional. Cloud Storage URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip. |
Methods |
|
---|---|
|
Creates a task resource within a lake. |
|
Delete the task resource. |
|
Get task resource. |
|
Gets the access control policy for a resource. |
|
Lists tasks under the given lake. |
|
Update the task resource. |
|
Run an on demand execution of a Task. |
|
Sets the access control policy on the specified resource. |
|
Returns permissions that a caller has on the specified resource. |