import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../../types/input"; import * as outputs from "../../types/output"; import * as enums from "../../types/enums"; /** * Creates a Cloud Dataflow job. To create a job, we recommend using `projects.locations.jobs.create` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.create` is not recommended, as your job will always start in `us-central1`. Do not enter confidential information when you supply string values using the API. * Note - this resource's API doesn't support deletion. When deleted, the resource will persist * on Google Cloud even though it will be deleted from Pulumi state. */ export declare class Job extends pulumi.CustomResource { /** * Get an existing Job resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Job; /** * Returns true if the given object is an instance of Job. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Job; /** * The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it. */ readonly clientRequestId: pulumi.Output; /** * The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service. */ readonly createTime: pulumi.Output; /** * If this is specified, the job's initial state is populated from the given snapshot. */ readonly createdFromSnapshotId: pulumi.Output; /** * The current state of the job. Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise specified. A job in the `JOB_STATE_RUNNING` state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. */ readonly currentState: pulumi.Output; /** * The timestamp associated with the current state. */ readonly currentStateTime: pulumi.Output; /** * The environment for the job. */ readonly environment: pulumi.Output; /** * Deprecated. * * @deprecated Deprecated. */ readonly executionInfo: pulumi.Output; /** * This field is populated by the Dataflow service to support filtering jobs by the metadata values provided here. Populated for ListJobs and all GetJob views SUMMARY and higher. */ readonly jobMetadata: pulumi.Output; /** * User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; readonly location: pulumi.Output; /** * The user-specified Cloud Dataflow job name. Only one Job with a given name can exist in a project within one region at any given time. Jobs in different regions can have the same name. If a caller attempts to create a Job with the same name as an already-existing Job, the attempt returns the existing Job. The name must match the regular expression `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?` */ readonly name: pulumi.Output; /** * Preliminary field: The format of this data may change at any time. A description of the user pipeline and stages through which it is executed. Created by Cloud Dataflow service. Only retrieved with JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. */ readonly pipelineDescription: pulumi.Output; readonly project: pulumi.Output; /** * Deprecated. This field is now in the Job message. */ readonly replaceJobId: pulumi.Output; /** * If another job is an update of this job (and thus, this job is in `JOB_STATE_UPDATED`), this field contains the ID of that job. */ readonly replacedByJobId: pulumi.Output; /** * The job's requested state. Applies to `UpdateJob` requests. Set `requested_state` with `UpdateJob` requests to switch between the states `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use `UpdateJob` requests to change a job's state from `JOB_STATE_RUNNING` to `JOB_STATE_CANCELLED`, `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These states irrevocably terminate the job if it hasn't already reached a terminal state. This field has no effect on `CreateJob` requests. */ readonly requestedState: pulumi.Output; /** * This field may ONLY be modified at runtime using the projects.jobs.update method to adjust job behavior. This field has no effect when specified at job creation. */ readonly runtimeUpdatableParams: pulumi.Output; /** * Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. */ readonly satisfiesPzi: pulumi.Output; /** * Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. */ readonly satisfiesPzs: pulumi.Output; /** * This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. */ readonly stageStates: pulumi.Output; /** * The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service. */ readonly startTime: pulumi.Output; /** * Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. */ readonly steps: pulumi.Output; /** * The Cloud Storage location where the steps are stored. */ readonly stepsLocation: pulumi.Output; /** * A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} */ readonly tempFiles: pulumi.Output; /** * The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. */ readonly transformNameMapping: pulumi.Output<{ [key: string]: string; }>; /** * The type of Cloud Dataflow job. */ readonly type: pulumi.Output; /** * The level of information requested in response. */ readonly view: pulumi.Output; /** * Create a Job resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: JobArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a Job resource. */ export interface JobArgs { /** * The client's unique identifier of the job, re-used across retried attempts. If this field is set, the service will ensure its uniqueness. The request to create a job will fail if the service has knowledge of a previously submitted job with the same client's ID and job name. The caller may use this field to ensure idempotence of job creation across retried attempts to create a job. By default, the field is empty and, in that case, the service ignores it. */ clientRequestId?: pulumi.Input; /** * The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service. */ createTime?: pulumi.Input; /** * If this is specified, the job's initial state is populated from the given snapshot. */ createdFromSnapshotId?: pulumi.Input; /** * The current state of the job. Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise specified. A job in the `JOB_STATE_RUNNING` state may asynchronously enter a terminal state. After a job has reached a terminal state, no further state updates may be made. This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. */ currentState?: pulumi.Input; /** * The timestamp associated with the current state. */ currentStateTime?: pulumi.Input; /** * The environment for the job. */ environment?: pulumi.Input; /** * Deprecated. * * @deprecated Deprecated. */ executionInfo?: pulumi.Input; /** * The unique ID of this job. This field is set by the Cloud Dataflow service when the Job is created, and is immutable for the life of the job. */ id?: pulumi.Input; /** * This field is populated by the Dataflow service to support filtering jobs by the metadata values provided here. Populated for ListJobs and all GetJob views SUMMARY and higher. */ jobMetadata?: pulumi.Input; /** * User-defined labels for this job. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job. */ location?: pulumi.Input; /** * The user-specified Cloud Dataflow job name. Only one Job with a given name can exist in a project within one region at any given time. Jobs in different regions can have the same name. If a caller attempts to create a Job with the same name as an already-existing Job, the attempt returns the existing Job. The name must match the regular expression `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?` */ name?: pulumi.Input; /** * Preliminary field: The format of this data may change at any time. A description of the user pipeline and stages through which it is executed. Created by Cloud Dataflow service. Only retrieved with JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. */ pipelineDescription?: pulumi.Input; /** * The ID of the Cloud Platform project that the job belongs to. */ project?: pulumi.Input; /** * If this job is an update of an existing job, this field is the job ID of the job it replaced. When sending a `CreateJobRequest`, you can update a job by specifying it here. The job named here is stopped, and its intermediate state is transferred to this job. */ replaceJobId?: pulumi.Input; /** * If another job is an update of this job (and thus, this job is in `JOB_STATE_UPDATED`), this field contains the ID of that job. */ replacedByJobId?: pulumi.Input; /** * The job's requested state. Applies to `UpdateJob` requests. Set `requested_state` with `UpdateJob` requests to switch between the states `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use `UpdateJob` requests to change a job's state from `JOB_STATE_RUNNING` to `JOB_STATE_CANCELLED`, `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These states irrevocably terminate the job if it hasn't already reached a terminal state. This field has no effect on `CreateJob` requests. */ requestedState?: pulumi.Input; /** * This field may ONLY be modified at runtime using the projects.jobs.update method to adjust job behavior. This field has no effect when specified at job creation. */ runtimeUpdatableParams?: pulumi.Input; /** * Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests. */ satisfiesPzs?: pulumi.Input; /** * This field may be mutated by the Cloud Dataflow service; callers cannot mutate it. */ stageStates?: pulumi.Input[]>; /** * The timestamp when the job was started (transitioned to JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some delay after job creation, so start_time is unset before start and is updated when the job is started by the Cloud Dataflow service. For other jobs, start_time always equals to create_time and is immutable and set by the Cloud Dataflow service. */ startTime?: pulumi.Input; /** * Exactly one of step or steps_location should be specified. The top-level steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. */ steps?: pulumi.Input[]>; /** * The Cloud Storage location where the steps are stored. */ stepsLocation?: pulumi.Input; /** * A set of files the system should be aware of that are used for temporary storage. These temporary files will be removed on job completion. No duplicates are allowed. No file patterns are supported. The supported files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} bucket.storage.googleapis.com/{object} */ tempFiles?: pulumi.Input[]>; /** * The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. */ transformNameMapping?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The type of Cloud Dataflow job. */ type?: pulumi.Input; /** * The level of information requested in response. */ view?: pulumi.Input; }