-
Notifications
You must be signed in to change notification settings - Fork 151
/
maintenanceWindowTask.go
548 lines (487 loc) · 24.2 KB
/
maintenanceWindowTask.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
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ssm
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides an SSM Maintenance Window Task resource
//
// ## Example Usage
// ### Automation Tasks
//
// ```go
// package main
//
// import (
// "fmt"
//
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ssm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ssm.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
// MaxConcurrency: pulumi.String("2"),
// MaxErrors: pulumi.String("1"),
// Priority: pulumi.Int(1),
// TaskArn: pulumi.String("AWS-RestartEC2Instance"),
// TaskType: pulumi.String("AUTOMATION"),
// WindowId: pulumi.Any(aws_ssm_maintenance_window.Example.Id),
// Targets: ssm.MaintenanceWindowTaskTargetArray{
// &ssm.MaintenanceWindowTaskTargetArgs{
// Key: pulumi.String("InstanceIds"),
// Values: pulumi.StringArray{
// pulumi.Any(aws_instance.Example.Id),
// },
// },
// },
// TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
// AutomationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersArgs{
// DocumentVersion: pulumi.String(fmt.Sprintf("%v%v", "$", "LATEST")),
// Parameters: ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArray{
// &ssm.MaintenanceWindowTaskTaskInvocationParametersAutomationParametersParameterArgs{
// Name: pulumi.String("InstanceId"),
// Values: pulumi.StringArray{
// pulumi.Any(aws_instance.Example.Id),
// },
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Run Command Tasks
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ssm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ssm.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
// MaxConcurrency: pulumi.String("2"),
// MaxErrors: pulumi.String("1"),
// Priority: pulumi.Int(1),
// TaskArn: pulumi.String("AWS-RunShellScript"),
// TaskType: pulumi.String("RUN_COMMAND"),
// WindowId: pulumi.Any(aws_ssm_maintenance_window.Example.Id),
// Targets: ssm.MaintenanceWindowTaskTargetArray{
// &ssm.MaintenanceWindowTaskTargetArgs{
// Key: pulumi.String("InstanceIds"),
// Values: pulumi.StringArray{
// pulumi.Any(aws_instance.Example.Id),
// },
// },
// },
// TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
// RunCommandParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersArgs{
// OutputS3Bucket: pulumi.Any(aws_s3_bucket.Example.Bucket),
// OutputS3KeyPrefix: pulumi.String("output"),
// ServiceRoleArn: pulumi.Any(aws_iam_role.Example.Arn),
// TimeoutSeconds: pulumi.Int(600),
// NotificationConfig: &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersNotificationConfigArgs{
// NotificationArn: pulumi.Any(aws_sns_topic.Example.Arn),
// NotificationEvents: pulumi.StringArray{
// pulumi.String("All"),
// },
// NotificationType: pulumi.String("Command"),
// },
// Parameters: ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArray{
// &ssm.MaintenanceWindowTaskTaskInvocationParametersRunCommandParametersParameterArgs{
// Name: pulumi.String("commands"),
// Values: pulumi.StringArray{
// pulumi.String("date"),
// },
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Step Function Tasks
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ssm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ssm.NewMaintenanceWindowTask(ctx, "example", &ssm.MaintenanceWindowTaskArgs{
// MaxConcurrency: pulumi.String("2"),
// MaxErrors: pulumi.String("1"),
// Priority: pulumi.Int(1),
// TaskArn: pulumi.Any(aws_sfn_activity.Example.Id),
// TaskType: pulumi.String("STEP_FUNCTIONS"),
// WindowId: pulumi.Any(aws_ssm_maintenance_window.Example.Id),
// Targets: ssm.MaintenanceWindowTaskTargetArray{
// &ssm.MaintenanceWindowTaskTargetArgs{
// Key: pulumi.String("InstanceIds"),
// Values: pulumi.StringArray{
// pulumi.Any(aws_instance.Example.Id),
// },
// },
// },
// TaskInvocationParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersArgs{
// StepFunctionsParameters: &ssm.MaintenanceWindowTaskTaskInvocationParametersStepFunctionsParametersArgs{
// Input: pulumi.String("{\"key1\":\"value1\"}"),
// Name: pulumi.String("example"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// AWS Maintenance Window Task can be imported using the `window_id` and `window_task_id` separated by `/`.
//
// ```sh
// $ pulumi import aws:ssm/maintenanceWindowTask:MaintenanceWindowTask task <window_id>/<window_task_id>
// ```
type MaintenanceWindowTask struct {
pulumi.CustomResourceState
// The description of the maintenance window task.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The maximum number of targets this task can be run for in parallel.
MaxConcurrency pulumi.StringOutput `pulumi:"maxConcurrency"`
// The maximum number of errors allowed before this task stops being scheduled.
MaxErrors pulumi.StringOutput `pulumi:"maxErrors"`
// The name of the maintenance window task.
Name pulumi.StringOutput `pulumi:"name"`
// The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
Priority pulumi.IntPtrOutput `pulumi:"priority"`
// The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
ServiceRoleArn pulumi.StringOutput `pulumi:"serviceRoleArn"`
// The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.
Targets MaintenanceWindowTaskTargetArrayOutput `pulumi:"targets"`
// The ARN of the task to execute.
TaskArn pulumi.StringOutput `pulumi:"taskArn"`
// Configuration block with parameters for task execution.
TaskInvocationParameters MaintenanceWindowTaskTaskInvocationParametersPtrOutput `pulumi:"taskInvocationParameters"`
// The type of task being registered. Valid values: `AUTOMATION`, `LAMBDA`, `RUN_COMMAND` or `STEP_FUNCTIONS`.
TaskType pulumi.StringOutput `pulumi:"taskType"`
// The Id of the maintenance window to register the task with.
WindowId pulumi.StringOutput `pulumi:"windowId"`
}
// NewMaintenanceWindowTask registers a new resource with the given unique name, arguments, and options.
func NewMaintenanceWindowTask(ctx *pulumi.Context,
name string, args *MaintenanceWindowTaskArgs, opts ...pulumi.ResourceOption) (*MaintenanceWindowTask, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MaxConcurrency == nil {
return nil, errors.New("invalid value for required argument 'MaxConcurrency'")
}
if args.MaxErrors == nil {
return nil, errors.New("invalid value for required argument 'MaxErrors'")
}
if args.TaskArn == nil {
return nil, errors.New("invalid value for required argument 'TaskArn'")
}
if args.TaskType == nil {
return nil, errors.New("invalid value for required argument 'TaskType'")
}
if args.WindowId == nil {
return nil, errors.New("invalid value for required argument 'WindowId'")
}
var resource MaintenanceWindowTask
err := ctx.RegisterResource("aws:ssm/maintenanceWindowTask:MaintenanceWindowTask", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMaintenanceWindowTask gets an existing MaintenanceWindowTask 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 GetMaintenanceWindowTask(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MaintenanceWindowTaskState, opts ...pulumi.ResourceOption) (*MaintenanceWindowTask, error) {
var resource MaintenanceWindowTask
err := ctx.ReadResource("aws:ssm/maintenanceWindowTask:MaintenanceWindowTask", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MaintenanceWindowTask resources.
type maintenanceWindowTaskState struct {
// The description of the maintenance window task.
Description *string `pulumi:"description"`
// The maximum number of targets this task can be run for in parallel.
MaxConcurrency *string `pulumi:"maxConcurrency"`
// The maximum number of errors allowed before this task stops being scheduled.
MaxErrors *string `pulumi:"maxErrors"`
// The name of the maintenance window task.
Name *string `pulumi:"name"`
// The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
Priority *int `pulumi:"priority"`
// The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
ServiceRoleArn *string `pulumi:"serviceRoleArn"`
// The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.
Targets []MaintenanceWindowTaskTarget `pulumi:"targets"`
// The ARN of the task to execute.
TaskArn *string `pulumi:"taskArn"`
// Configuration block with parameters for task execution.
TaskInvocationParameters *MaintenanceWindowTaskTaskInvocationParameters `pulumi:"taskInvocationParameters"`
// The type of task being registered. Valid values: `AUTOMATION`, `LAMBDA`, `RUN_COMMAND` or `STEP_FUNCTIONS`.
TaskType *string `pulumi:"taskType"`
// The Id of the maintenance window to register the task with.
WindowId *string `pulumi:"windowId"`
}
type MaintenanceWindowTaskState struct {
// The description of the maintenance window task.
Description pulumi.StringPtrInput
// The maximum number of targets this task can be run for in parallel.
MaxConcurrency pulumi.StringPtrInput
// The maximum number of errors allowed before this task stops being scheduled.
MaxErrors pulumi.StringPtrInput
// The name of the maintenance window task.
Name pulumi.StringPtrInput
// The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
Priority pulumi.IntPtrInput
// The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
ServiceRoleArn pulumi.StringPtrInput
// The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.
Targets MaintenanceWindowTaskTargetArrayInput
// The ARN of the task to execute.
TaskArn pulumi.StringPtrInput
// Configuration block with parameters for task execution.
TaskInvocationParameters MaintenanceWindowTaskTaskInvocationParametersPtrInput
// The type of task being registered. Valid values: `AUTOMATION`, `LAMBDA`, `RUN_COMMAND` or `STEP_FUNCTIONS`.
TaskType pulumi.StringPtrInput
// The Id of the maintenance window to register the task with.
WindowId pulumi.StringPtrInput
}
func (MaintenanceWindowTaskState) ElementType() reflect.Type {
return reflect.TypeOf((*maintenanceWindowTaskState)(nil)).Elem()
}
type maintenanceWindowTaskArgs struct {
// The description of the maintenance window task.
Description *string `pulumi:"description"`
// The maximum number of targets this task can be run for in parallel.
MaxConcurrency string `pulumi:"maxConcurrency"`
// The maximum number of errors allowed before this task stops being scheduled.
MaxErrors string `pulumi:"maxErrors"`
// The name of the maintenance window task.
Name *string `pulumi:"name"`
// The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
Priority *int `pulumi:"priority"`
// The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
ServiceRoleArn *string `pulumi:"serviceRoleArn"`
// The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.
Targets []MaintenanceWindowTaskTarget `pulumi:"targets"`
// The ARN of the task to execute.
TaskArn string `pulumi:"taskArn"`
// Configuration block with parameters for task execution.
TaskInvocationParameters *MaintenanceWindowTaskTaskInvocationParameters `pulumi:"taskInvocationParameters"`
// The type of task being registered. Valid values: `AUTOMATION`, `LAMBDA`, `RUN_COMMAND` or `STEP_FUNCTIONS`.
TaskType string `pulumi:"taskType"`
// The Id of the maintenance window to register the task with.
WindowId string `pulumi:"windowId"`
}
// The set of arguments for constructing a MaintenanceWindowTask resource.
type MaintenanceWindowTaskArgs struct {
// The description of the maintenance window task.
Description pulumi.StringPtrInput
// The maximum number of targets this task can be run for in parallel.
MaxConcurrency pulumi.StringInput
// The maximum number of errors allowed before this task stops being scheduled.
MaxErrors pulumi.StringInput
// The name of the maintenance window task.
Name pulumi.StringPtrInput
// The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
Priority pulumi.IntPtrInput
// The role that should be assumed when executing the task. If a role is not provided, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created for you.
ServiceRoleArn pulumi.StringPtrInput
// The targets (either instances or window target ids). Instances are specified using Key=InstanceIds,Values=instanceid1,instanceid2. Window target ids are specified using Key=WindowTargetIds,Values=window target id1, window target id2.
Targets MaintenanceWindowTaskTargetArrayInput
// The ARN of the task to execute.
TaskArn pulumi.StringInput
// Configuration block with parameters for task execution.
TaskInvocationParameters MaintenanceWindowTaskTaskInvocationParametersPtrInput
// The type of task being registered. Valid values: `AUTOMATION`, `LAMBDA`, `RUN_COMMAND` or `STEP_FUNCTIONS`.
TaskType pulumi.StringInput
// The Id of the maintenance window to register the task with.
WindowId pulumi.StringInput
}
func (MaintenanceWindowTaskArgs) ElementType() reflect.Type {
return reflect.TypeOf((*maintenanceWindowTaskArgs)(nil)).Elem()
}
type MaintenanceWindowTaskInput interface {
pulumi.Input
ToMaintenanceWindowTaskOutput() MaintenanceWindowTaskOutput
ToMaintenanceWindowTaskOutputWithContext(ctx context.Context) MaintenanceWindowTaskOutput
}
func (*MaintenanceWindowTask) ElementType() reflect.Type {
return reflect.TypeOf((*MaintenanceWindowTask)(nil))
}
func (i *MaintenanceWindowTask) ToMaintenanceWindowTaskOutput() MaintenanceWindowTaskOutput {
return i.ToMaintenanceWindowTaskOutputWithContext(context.Background())
}
func (i *MaintenanceWindowTask) ToMaintenanceWindowTaskOutputWithContext(ctx context.Context) MaintenanceWindowTaskOutput {
return pulumi.ToOutputWithContext(ctx, i).(MaintenanceWindowTaskOutput)
}
func (i *MaintenanceWindowTask) ToMaintenanceWindowTaskPtrOutput() MaintenanceWindowTaskPtrOutput {
return i.ToMaintenanceWindowTaskPtrOutputWithContext(context.Background())
}
func (i *MaintenanceWindowTask) ToMaintenanceWindowTaskPtrOutputWithContext(ctx context.Context) MaintenanceWindowTaskPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MaintenanceWindowTaskPtrOutput)
}
type MaintenanceWindowTaskPtrInput interface {
pulumi.Input
ToMaintenanceWindowTaskPtrOutput() MaintenanceWindowTaskPtrOutput
ToMaintenanceWindowTaskPtrOutputWithContext(ctx context.Context) MaintenanceWindowTaskPtrOutput
}
type maintenanceWindowTaskPtrType MaintenanceWindowTaskArgs
func (*maintenanceWindowTaskPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**MaintenanceWindowTask)(nil))
}
func (i *maintenanceWindowTaskPtrType) ToMaintenanceWindowTaskPtrOutput() MaintenanceWindowTaskPtrOutput {
return i.ToMaintenanceWindowTaskPtrOutputWithContext(context.Background())
}
func (i *maintenanceWindowTaskPtrType) ToMaintenanceWindowTaskPtrOutputWithContext(ctx context.Context) MaintenanceWindowTaskPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MaintenanceWindowTaskPtrOutput)
}
// MaintenanceWindowTaskArrayInput is an input type that accepts MaintenanceWindowTaskArray and MaintenanceWindowTaskArrayOutput values.
// You can construct a concrete instance of `MaintenanceWindowTaskArrayInput` via:
//
// MaintenanceWindowTaskArray{ MaintenanceWindowTaskArgs{...} }
type MaintenanceWindowTaskArrayInput interface {
pulumi.Input
ToMaintenanceWindowTaskArrayOutput() MaintenanceWindowTaskArrayOutput
ToMaintenanceWindowTaskArrayOutputWithContext(context.Context) MaintenanceWindowTaskArrayOutput
}
type MaintenanceWindowTaskArray []MaintenanceWindowTaskInput
func (MaintenanceWindowTaskArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MaintenanceWindowTask)(nil)).Elem()
}
func (i MaintenanceWindowTaskArray) ToMaintenanceWindowTaskArrayOutput() MaintenanceWindowTaskArrayOutput {
return i.ToMaintenanceWindowTaskArrayOutputWithContext(context.Background())
}
func (i MaintenanceWindowTaskArray) ToMaintenanceWindowTaskArrayOutputWithContext(ctx context.Context) MaintenanceWindowTaskArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MaintenanceWindowTaskArrayOutput)
}
// MaintenanceWindowTaskMapInput is an input type that accepts MaintenanceWindowTaskMap and MaintenanceWindowTaskMapOutput values.
// You can construct a concrete instance of `MaintenanceWindowTaskMapInput` via:
//
// MaintenanceWindowTaskMap{ "key": MaintenanceWindowTaskArgs{...} }
type MaintenanceWindowTaskMapInput interface {
pulumi.Input
ToMaintenanceWindowTaskMapOutput() MaintenanceWindowTaskMapOutput
ToMaintenanceWindowTaskMapOutputWithContext(context.Context) MaintenanceWindowTaskMapOutput
}
type MaintenanceWindowTaskMap map[string]MaintenanceWindowTaskInput
func (MaintenanceWindowTaskMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MaintenanceWindowTask)(nil)).Elem()
}
func (i MaintenanceWindowTaskMap) ToMaintenanceWindowTaskMapOutput() MaintenanceWindowTaskMapOutput {
return i.ToMaintenanceWindowTaskMapOutputWithContext(context.Background())
}
func (i MaintenanceWindowTaskMap) ToMaintenanceWindowTaskMapOutputWithContext(ctx context.Context) MaintenanceWindowTaskMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MaintenanceWindowTaskMapOutput)
}
type MaintenanceWindowTaskOutput struct{ *pulumi.OutputState }
func (MaintenanceWindowTaskOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MaintenanceWindowTask)(nil))
}
func (o MaintenanceWindowTaskOutput) ToMaintenanceWindowTaskOutput() MaintenanceWindowTaskOutput {
return o
}
func (o MaintenanceWindowTaskOutput) ToMaintenanceWindowTaskOutputWithContext(ctx context.Context) MaintenanceWindowTaskOutput {
return o
}
func (o MaintenanceWindowTaskOutput) ToMaintenanceWindowTaskPtrOutput() MaintenanceWindowTaskPtrOutput {
return o.ToMaintenanceWindowTaskPtrOutputWithContext(context.Background())
}
func (o MaintenanceWindowTaskOutput) ToMaintenanceWindowTaskPtrOutputWithContext(ctx context.Context) MaintenanceWindowTaskPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v MaintenanceWindowTask) *MaintenanceWindowTask {
return &v
}).(MaintenanceWindowTaskPtrOutput)
}
type MaintenanceWindowTaskPtrOutput struct{ *pulumi.OutputState }
func (MaintenanceWindowTaskPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MaintenanceWindowTask)(nil))
}
func (o MaintenanceWindowTaskPtrOutput) ToMaintenanceWindowTaskPtrOutput() MaintenanceWindowTaskPtrOutput {
return o
}
func (o MaintenanceWindowTaskPtrOutput) ToMaintenanceWindowTaskPtrOutputWithContext(ctx context.Context) MaintenanceWindowTaskPtrOutput {
return o
}
func (o MaintenanceWindowTaskPtrOutput) Elem() MaintenanceWindowTaskOutput {
return o.ApplyT(func(v *MaintenanceWindowTask) MaintenanceWindowTask {
if v != nil {
return *v
}
var ret MaintenanceWindowTask
return ret
}).(MaintenanceWindowTaskOutput)
}
type MaintenanceWindowTaskArrayOutput struct{ *pulumi.OutputState }
func (MaintenanceWindowTaskArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]MaintenanceWindowTask)(nil))
}
func (o MaintenanceWindowTaskArrayOutput) ToMaintenanceWindowTaskArrayOutput() MaintenanceWindowTaskArrayOutput {
return o
}
func (o MaintenanceWindowTaskArrayOutput) ToMaintenanceWindowTaskArrayOutputWithContext(ctx context.Context) MaintenanceWindowTaskArrayOutput {
return o
}
func (o MaintenanceWindowTaskArrayOutput) Index(i pulumi.IntInput) MaintenanceWindowTaskOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) MaintenanceWindowTask {
return vs[0].([]MaintenanceWindowTask)[vs[1].(int)]
}).(MaintenanceWindowTaskOutput)
}
type MaintenanceWindowTaskMapOutput struct{ *pulumi.OutputState }
func (MaintenanceWindowTaskMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]MaintenanceWindowTask)(nil))
}
func (o MaintenanceWindowTaskMapOutput) ToMaintenanceWindowTaskMapOutput() MaintenanceWindowTaskMapOutput {
return o
}
func (o MaintenanceWindowTaskMapOutput) ToMaintenanceWindowTaskMapOutputWithContext(ctx context.Context) MaintenanceWindowTaskMapOutput {
return o
}
func (o MaintenanceWindowTaskMapOutput) MapIndex(k pulumi.StringInput) MaintenanceWindowTaskOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) MaintenanceWindowTask {
return vs[0].(map[string]MaintenanceWindowTask)[vs[1].(string)]
}).(MaintenanceWindowTaskOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MaintenanceWindowTaskInput)(nil)).Elem(), &MaintenanceWindowTask{})
pulumi.RegisterInputType(reflect.TypeOf((*MaintenanceWindowTaskPtrInput)(nil)).Elem(), &MaintenanceWindowTask{})
pulumi.RegisterInputType(reflect.TypeOf((*MaintenanceWindowTaskArrayInput)(nil)).Elem(), MaintenanceWindowTaskArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MaintenanceWindowTaskMapInput)(nil)).Elem(), MaintenanceWindowTaskMap{})
pulumi.RegisterOutputType(MaintenanceWindowTaskOutput{})
pulumi.RegisterOutputType(MaintenanceWindowTaskPtrOutput{})
pulumi.RegisterOutputType(MaintenanceWindowTaskArrayOutput{})
pulumi.RegisterOutputType(MaintenanceWindowTaskMapOutput{})
}