/
job.go
414 lines (363 loc) · 30.2 KB
/
job.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1b3
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// 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.
type Job struct {
pulumi.CustomResourceState
// 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.StringOutput `pulumi:"clientRequestId"`
// The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// If this is specified, the job's initial state is populated from the given snapshot.
CreatedFromSnapshotId pulumi.StringOutput `pulumi:"createdFromSnapshotId"`
// 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.StringOutput `pulumi:"currentState"`
// The timestamp associated with the current state.
CurrentStateTime pulumi.StringOutput `pulumi:"currentStateTime"`
// The environment for the job.
Environment EnvironmentResponseOutput `pulumi:"environment"`
// Deprecated.
//
// Deprecated: Deprecated.
ExecutionInfo JobExecutionInfoResponseOutput `pulumi:"executionInfo"`
// 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 JobMetadataResponseOutput `pulumi:"jobMetadata"`
// 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.StringMapOutput `pulumi:"labels"`
Location pulumi.StringOutput `pulumi:"location"`
// 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.StringOutput `pulumi:"name"`
// 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 PipelineDescriptionResponseOutput `pulumi:"pipelineDescription"`
Project pulumi.StringOutput `pulumi:"project"`
// Deprecated. This field is now in the Job message.
ReplaceJobId pulumi.StringOutput `pulumi:"replaceJobId"`
// 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.StringOutput `pulumi:"replacedByJobId"`
// 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.StringOutput `pulumi:"requestedState"`
// 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 RuntimeUpdatableParamsResponseOutput `pulumi:"runtimeUpdatableParams"`
// Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
SatisfiesPzi pulumi.BoolOutput `pulumi:"satisfiesPzi"`
// 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.BoolOutput `pulumi:"satisfiesPzs"`
// This field may be mutated by the Cloud Dataflow service; callers cannot mutate it.
StageStates ExecutionStageStateResponseArrayOutput `pulumi:"stageStates"`
// 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.StringOutput `pulumi:"startTime"`
// 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 StepResponseArrayOutput `pulumi:"steps"`
// The Cloud Storage location where the steps are stored.
StepsLocation pulumi.StringOutput `pulumi:"stepsLocation"`
// 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.StringArrayOutput `pulumi:"tempFiles"`
// The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job.
TransformNameMapping pulumi.StringMapOutput `pulumi:"transformNameMapping"`
// The type of Cloud Dataflow job.
Type pulumi.StringOutput `pulumi:"type"`
// The level of information requested in response.
View pulumi.StringPtrOutput `pulumi:"view"`
}
// NewJob registers a new resource with the given unique name, arguments, and options.
func NewJob(ctx *pulumi.Context,
name string, args *JobArgs, opts ...pulumi.ResourceOption) (*Job, error) {
if args == nil {
args = &JobArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"location",
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Job
err := ctx.RegisterResource("google-native:dataflow/v1b3:Job", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJob gets an existing Job resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetJob(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobState, opts ...pulumi.ResourceOption) (*Job, error) {
var resource Job
err := ctx.ReadResource("google-native:dataflow/v1b3:Job", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Job resources.
type jobState struct {
}
type JobState struct {
}
func (JobState) ElementType() reflect.Type {
return reflect.TypeOf((*jobState)(nil)).Elem()
}
type jobArgs struct {
// 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 *string `pulumi:"clientRequestId"`
// The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service.
CreateTime *string `pulumi:"createTime"`
// If this is specified, the job's initial state is populated from the given snapshot.
CreatedFromSnapshotId *string `pulumi:"createdFromSnapshotId"`
// 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 *JobCurrentState `pulumi:"currentState"`
// The timestamp associated with the current state.
CurrentStateTime *string `pulumi:"currentStateTime"`
// The environment for the job.
Environment *Environment `pulumi:"environment"`
// Deprecated.
//
// Deprecated: Deprecated.
ExecutionInfo *JobExecutionInfo `pulumi:"executionInfo"`
// 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 *string `pulumi:"id"`
// 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 *JobMetadata `pulumi:"jobMetadata"`
// 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 map[string]string `pulumi:"labels"`
// The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.
Location *string `pulumi:"location"`
// 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 *string `pulumi:"name"`
// 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 *PipelineDescription `pulumi:"pipelineDescription"`
// The ID of the Cloud Platform project that the job belongs to.
Project *string `pulumi:"project"`
// 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 *string `pulumi:"replaceJobId"`
// 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 *string `pulumi:"replacedByJobId"`
// 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 *JobRequestedState `pulumi:"requestedState"`
// 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 *RuntimeUpdatableParams `pulumi:"runtimeUpdatableParams"`
// 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 *bool `pulumi:"satisfiesPzs"`
// This field may be mutated by the Cloud Dataflow service; callers cannot mutate it.
StageStates []ExecutionStageState `pulumi:"stageStates"`
// 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 *string `pulumi:"startTime"`
// 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 []Step `pulumi:"steps"`
// The Cloud Storage location where the steps are stored.
StepsLocation *string `pulumi:"stepsLocation"`
// 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 []string `pulumi:"tempFiles"`
// The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job.
TransformNameMapping map[string]string `pulumi:"transformNameMapping"`
// The type of Cloud Dataflow job.
Type *JobType `pulumi:"type"`
// The level of information requested in response.
View *string `pulumi:"view"`
}
// The set of arguments for constructing a Job resource.
type JobArgs struct {
// 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.StringPtrInput
// The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service.
CreateTime pulumi.StringPtrInput
// If this is specified, the job's initial state is populated from the given snapshot.
CreatedFromSnapshotId pulumi.StringPtrInput
// 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 JobCurrentStatePtrInput
// The timestamp associated with the current state.
CurrentStateTime pulumi.StringPtrInput
// The environment for the job.
Environment EnvironmentPtrInput
// Deprecated.
//
// Deprecated: Deprecated.
ExecutionInfo JobExecutionInfoPtrInput
// 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.StringPtrInput
// 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 JobMetadataPtrInput
// 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.StringMapInput
// The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.
Location pulumi.StringPtrInput
// 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.StringPtrInput
// 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 PipelineDescriptionPtrInput
// The ID of the Cloud Platform project that the job belongs to.
Project pulumi.StringPtrInput
// 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.StringPtrInput
// 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.StringPtrInput
// 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 JobRequestedStatePtrInput
// 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 RuntimeUpdatableParamsPtrInput
// 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.BoolPtrInput
// This field may be mutated by the Cloud Dataflow service; callers cannot mutate it.
StageStates ExecutionStageStateArrayInput
// 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.StringPtrInput
// 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 StepArrayInput
// The Cloud Storage location where the steps are stored.
StepsLocation pulumi.StringPtrInput
// 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.StringArrayInput
// The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job.
TransformNameMapping pulumi.StringMapInput
// The type of Cloud Dataflow job.
Type JobTypePtrInput
// The level of information requested in response.
View pulumi.StringPtrInput
}
func (JobArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobArgs)(nil)).Elem()
}
type JobInput interface {
pulumi.Input
ToJobOutput() JobOutput
ToJobOutputWithContext(ctx context.Context) JobOutput
}
func (*Job) ElementType() reflect.Type {
return reflect.TypeOf((**Job)(nil)).Elem()
}
func (i *Job) ToJobOutput() JobOutput {
return i.ToJobOutputWithContext(context.Background())
}
func (i *Job) ToJobOutputWithContext(ctx context.Context) JobOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobOutput)
}
type JobOutput struct{ *pulumi.OutputState }
func (JobOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Job)(nil)).Elem()
}
func (o JobOutput) ToJobOutput() JobOutput {
return o
}
func (o JobOutput) ToJobOutputWithContext(ctx context.Context) JobOutput {
return o
}
// 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.
func (o JobOutput) ClientRequestId() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.ClientRequestId }).(pulumi.StringOutput)
}
// The timestamp when the job was initially created. Immutable and set by the Cloud Dataflow service.
func (o JobOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// If this is specified, the job's initial state is populated from the given snapshot.
func (o JobOutput) CreatedFromSnapshotId() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.CreatedFromSnapshotId }).(pulumi.StringOutput)
}
// 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.
func (o JobOutput) CurrentState() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.CurrentState }).(pulumi.StringOutput)
}
// The timestamp associated with the current state.
func (o JobOutput) CurrentStateTime() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.CurrentStateTime }).(pulumi.StringOutput)
}
// The environment for the job.
func (o JobOutput) Environment() EnvironmentResponseOutput {
return o.ApplyT(func(v *Job) EnvironmentResponseOutput { return v.Environment }).(EnvironmentResponseOutput)
}
// Deprecated.
//
// Deprecated: Deprecated.
func (o JobOutput) ExecutionInfo() JobExecutionInfoResponseOutput {
return o.ApplyT(func(v *Job) JobExecutionInfoResponseOutput { return v.ExecutionInfo }).(JobExecutionInfoResponseOutput)
}
// 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.
func (o JobOutput) JobMetadata() JobMetadataResponseOutput {
return o.ApplyT(func(v *Job) JobMetadataResponseOutput { return v.JobMetadata }).(JobMetadataResponseOutput)
}
// 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.
func (o JobOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v *Job) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput)
}
func (o JobOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// 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])?`
func (o JobOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// 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.
func (o JobOutput) PipelineDescription() PipelineDescriptionResponseOutput {
return o.ApplyT(func(v *Job) PipelineDescriptionResponseOutput { return v.PipelineDescription }).(PipelineDescriptionResponseOutput)
}
func (o JobOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// Deprecated. This field is now in the Job message.
func (o JobOutput) ReplaceJobId() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.ReplaceJobId }).(pulumi.StringOutput)
}
// 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.
func (o JobOutput) ReplacedByJobId() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.ReplacedByJobId }).(pulumi.StringOutput)
}
// 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.
func (o JobOutput) RequestedState() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.RequestedState }).(pulumi.StringOutput)
}
// 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.
func (o JobOutput) RuntimeUpdatableParams() RuntimeUpdatableParamsResponseOutput {
return o.ApplyT(func(v *Job) RuntimeUpdatableParamsResponseOutput { return v.RuntimeUpdatableParams }).(RuntimeUpdatableParamsResponseOutput)
}
// Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
func (o JobOutput) SatisfiesPzi() pulumi.BoolOutput {
return o.ApplyT(func(v *Job) pulumi.BoolOutput { return v.SatisfiesPzi }).(pulumi.BoolOutput)
}
// Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
func (o JobOutput) SatisfiesPzs() pulumi.BoolOutput {
return o.ApplyT(func(v *Job) pulumi.BoolOutput { return v.SatisfiesPzs }).(pulumi.BoolOutput)
}
// This field may be mutated by the Cloud Dataflow service; callers cannot mutate it.
func (o JobOutput) StageStates() ExecutionStageStateResponseArrayOutput {
return o.ApplyT(func(v *Job) ExecutionStageStateResponseArrayOutput { return v.StageStates }).(ExecutionStageStateResponseArrayOutput)
}
// 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.
func (o JobOutput) StartTime() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.StartTime }).(pulumi.StringOutput)
}
// 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.
func (o JobOutput) Steps() StepResponseArrayOutput {
return o.ApplyT(func(v *Job) StepResponseArrayOutput { return v.Steps }).(StepResponseArrayOutput)
}
// The Cloud Storage location where the steps are stored.
func (o JobOutput) StepsLocation() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.StepsLocation }).(pulumi.StringOutput)
}
// 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}
func (o JobOutput) TempFiles() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Job) pulumi.StringArrayOutput { return v.TempFiles }).(pulumi.StringArrayOutput)
}
// The map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job.
func (o JobOutput) TransformNameMapping() pulumi.StringMapOutput {
return o.ApplyT(func(v *Job) pulumi.StringMapOutput { return v.TransformNameMapping }).(pulumi.StringMapOutput)
}
// The type of Cloud Dataflow job.
func (o JobOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// The level of information requested in response.
func (o JobOutput) View() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.View }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobInput)(nil)).Elem(), &Job{})
pulumi.RegisterOutputType(JobOutput{})
}