Creates a task resource within a lake.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: dataplex1 --scope <scope> projects locations-lakes-tasks-create ...

Required Scalar Argument

  • <parent> (string)
    • Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

GoogleCloudDataplexV1Task:
  create-time: string
  description: string
  display-name: string
  execution-spec:
    args: { string: string }
    kms-key: string
    max-job-execution-lifetime: string
    project: string
    service-account: string
  execution-status:
    latest-job:
      end-time: string
      execution-spec:
        args: { string: string }
        kms-key: string
        max-job-execution-lifetime: string
        project: string
        service-account: string
      labels: { string: string }
      message: string
      name: string
      retry-count: integer
      service: string
      service-job: string
      start-time: string
      state: string
      trigger: string
      uid: string
    update-time: string
  labels: { string: string }
  name: string
  notebook:
    archive-uris: [string]
    file-uris: [string]
    infrastructure-spec:
      batch:
        executors-count: integer
        max-executors-count: integer
      container-image:
        image: string
        java-jars: [string]
        properties: { string: string }
        python-packages: [string]
      vpc-network:
        network: string
        network-tags: [string]
        sub-network: string
    notebook: string
  spark:
    archive-uris: [string]
    file-uris: [string]
    infrastructure-spec:
      batch:
        executors-count: integer
        max-executors-count: integer
      container-image:
        image: string
        java-jars: [string]
        properties: { string: string }
        python-packages: [string]
      vpc-network:
        network: string
        network-tags: [string]
        sub-network: string
    main-class: string
    main-jar-file-uri: string
    python-script-file: string
    sql-script: string
    sql-script-file: string
  state: string
  trigger-spec:
    disabled: boolean
    max-retries: integer
    schedule: string
    start-time: string
    type: string
  uid: string
  update-time: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . create-time=invidunt
    • Output only. The time when the task was created.
  • description=nonumy
    • Optional. Description of the task.
  • display-name=erat
    • Optional. User friendly display name.
  • execution-spec args=key=erat
    • Optional. The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${task_id} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.
    • the value will be associated with the given key
  • kms-key=dolores
    • Optional. The Cloud KMS key to use for encryption, of the form: projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}.
  • max-job-execution-lifetime=ipsum
    • Optional. The maximum duration after which the job execution is expired.
  • project=voluptua.
    • Optional. The project in which jobs are run. By default, the project containing the Lake is used. If a project is provided, the ExecutionSpec.service_account must belong to this project.
  • service-account=eos

    • Required. Service account to use to execute a task. If not provided, the default Compute service account for the project is used.
  • ..execution-status.latest-job end-time=duo

    • Output only. The time when the job ended.
  • execution-spec args=key=elitr
    • Optional. The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${task_id} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.
    • the value will be associated with the given key
  • kms-key=consetetur
    • Optional. The Cloud KMS key to use for encryption, of the form: projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}.
  • max-job-execution-lifetime=et
    • Optional. The maximum duration after which the job execution is expired.
  • project=clita
    • Optional. The project in which jobs are run. By default, the project containing the Lake is used. If a project is provided, the ExecutionSpec.service_account must belong to this project.
  • service-account=sit

    • Required. Service account to use to execute a task. If not provided, the default Compute service account for the project is used.
  • .. labels=key=takimata

    • Output only. User-defined labels for the task.
    • the value will be associated with the given key
  • message=erat
    • Output only. Additional information about the current state.
  • name=diam
    • Output only. The relative resource name of the job, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}.
  • retry-count=60
    • Output only. The number of times the job has been retried (excluding the initial attempt).
  • service=lorem
    • Output only. The underlying service running a job.
  • service-job=at
    • Output only. The full resource name for the job run under a particular service.
  • start-time=diam
    • Output only. The time when the job was started.
  • state=diam
    • Output only. Execution state for the job.
  • trigger=sed
    • Output only. Job execution trigger.
  • uid=et

    • Output only. System generated globally unique ID for the job.
  • .. update-time=ea

    • Output only. Last update time of the status.
  • .. labels=key=dolore

    • Optional. User-defined labels for the task.
    • the value will be associated with the given key
  • name=ipsum
    • Output only. The relative resource name of the task, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}.
  • notebook archive-uris=ea
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • file-uris=at
    • Optional. Cloud Storage URIs of files to be placed in the working directory of each executor.
    • Each invocation of this argument appends the given value to the array.
  • infrastructure-spec.batch executors-count=48
    • Optional. Total number of job executors. Executor Count should be between 2 and 100. Default=2
  • max-executors-count=3

    • Optional. Max configurable executors. If max_executors_count > executors_count, then auto-scaling is enabled. Max Executor Count should be between 2 and 1000. Default=1000
  • ..container-image image=lorem

    • Optional. Container image to use.
  • java-jars=stet
    • 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
    • Each invocation of this argument appends the given value to the array.
  • properties=key=duo
    • 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 prefix:property format, for example core:hadoop.tmp.dir. For more information, see Cluster properties (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
    • the value will be associated with the given key
  • python-packages=elitr

    • 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
    • Each invocation of this argument appends the given value to the array.
  • ..vpc-network network=aliquyam

    • Optional. The Cloud VPC network in which the job is run. By default, the Cloud VPC network named Default within the project is used.
  • network-tags=erat
    • Optional. List of network tags to apply to the job.
    • Each invocation of this argument appends the given value to the array.
  • sub-network=ut

    • Optional. The Cloud VPC sub-network in which the job is run.
  • ... notebook=et

    • 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 (TASK_key=value).
  • ..spark archive-uris=lorem

    • 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.
    • Each invocation of this argument appends the given value to the array.
  • file-uris=rebum.
    • Optional. Cloud Storage URIs of files to be placed in the working directory of each executor.
    • Each invocation of this argument appends the given value to the array.
  • infrastructure-spec.batch executors-count=66
    • Optional. Total number of job executors. Executor Count should be between 2 and 100. Default=2
  • max-executors-count=71

    • Optional. Max configurable executors. If max_executors_count > executors_count, then auto-scaling is enabled. Max Executor Count should be between 2 and 1000. Default=1000
  • ..container-image image=stet

    • Optional. Container image to use.
  • java-jars=aliquyam
    • 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
    • Each invocation of this argument appends the given value to the array.
  • properties=key=kasd
    • 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 prefix:property format, for example core:hadoop.tmp.dir. For more information, see Cluster properties (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
    • the value will be associated with the given key
  • python-packages=lorem

    • 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
    • Each invocation of this argument appends the given value to the array.
  • ..vpc-network network=sit

    • Optional. The Cloud VPC network in which the job is run. By default, the Cloud VPC network named Default within the project is used.
  • network-tags=kasd
    • Optional. List of network tags to apply to the job.
    • Each invocation of this argument appends the given value to the array.
  • sub-network=tempor

    • Optional. The Cloud VPC sub-network in which the job is run.
  • ... main-class=dolor

    • The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris. The execution args are passed in as a sequence of named process arguments (--key=value).
  • main-jar-file-uri=amet
    • 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 (--key=value).
  • python-script-file=sit
    • 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 (--key=value).
  • sql-script=rebum.
    • The query text. The execution args are used to declare a set of script variables (set key="value";).
  • sql-script-file=sea

    • A reference to a query file. This can be the Cloud Storage URI of the query file or it can the path to a SqlScript Content. The execution args are used to declare a set of script variables (set key="value";).
  • .. state=ipsum

    • Output only. Current state of the task.
  • trigger-spec disabled=false
    • Optional. Prevent the task from executing. This does not cancel already running tasks. It is intended to temporarily disable RECURRING tasks.
  • max-retries=11
    • Optional. Number of retry attempts before aborting. Set to zero to never attempt to retry a failed task.
  • schedule=dolor
    • 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, CRON_TZ=America/New_York 1 * * , or TZ=America/New_York 1 * * . This field is required for RECURRING tasks.
  • start-time=sadipscing
    • 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.
  • type=dolor

    • Required. Immutable. Trigger type of the user-specified Task.
  • .. uid=dolor

    • 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.
  • update-time=consetetur
    • Output only. The time when the task was last updated.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p task-id=string

    • Required. Task identifier.
  • -p validate-only=boolean

    • Optional. Only validate the request, but do not perform mutations. The default is false.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • 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.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • 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.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").