github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/glue/trigger.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package glue 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Manages a Glue Trigger resource. 16 // 17 // ## Example Usage 18 // 19 // ### Conditional Trigger 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{ 35 // Name: pulumi.String("example"), 36 // Type: pulumi.String("CONDITIONAL"), 37 // Actions: glue.TriggerActionArray{ 38 // &glue.TriggerActionArgs{ 39 // JobName: pulumi.Any(example1.Name), 40 // }, 41 // }, 42 // Predicate: &glue.TriggerPredicateArgs{ 43 // Conditions: glue.TriggerPredicateConditionArray{ 44 // &glue.TriggerPredicateConditionArgs{ 45 // JobName: pulumi.Any(example2.Name), 46 // State: pulumi.String("SUCCEEDED"), 47 // }, 48 // }, 49 // }, 50 // }) 51 // if err != nil { 52 // return err 53 // } 54 // return nil 55 // }) 56 // } 57 // 58 // ``` 59 // <!--End PulumiCodeChooser --> 60 // 61 // ### On-Demand Trigger 62 // 63 // <!--Start PulumiCodeChooser --> 64 // ```go 65 // package main 66 // 67 // import ( 68 // 69 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue" 70 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 71 // 72 // ) 73 // 74 // func main() { 75 // pulumi.Run(func(ctx *pulumi.Context) error { 76 // _, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{ 77 // Name: pulumi.String("example"), 78 // Type: pulumi.String("ON_DEMAND"), 79 // Actions: glue.TriggerActionArray{ 80 // &glue.TriggerActionArgs{ 81 // JobName: pulumi.Any(exampleAwsGlueJob.Name), 82 // }, 83 // }, 84 // }) 85 // if err != nil { 86 // return err 87 // } 88 // return nil 89 // }) 90 // } 91 // 92 // ``` 93 // <!--End PulumiCodeChooser --> 94 // 95 // ### Scheduled Trigger 96 // 97 // <!--Start PulumiCodeChooser --> 98 // ```go 99 // package main 100 // 101 // import ( 102 // 103 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue" 104 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 105 // 106 // ) 107 // 108 // func main() { 109 // pulumi.Run(func(ctx *pulumi.Context) error { 110 // _, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{ 111 // Name: pulumi.String("example"), 112 // Schedule: pulumi.String("cron(15 12 * * ? *)"), 113 // Type: pulumi.String("SCHEDULED"), 114 // Actions: glue.TriggerActionArray{ 115 // &glue.TriggerActionArgs{ 116 // JobName: pulumi.Any(exampleAwsGlueJob.Name), 117 // }, 118 // }, 119 // }) 120 // if err != nil { 121 // return err 122 // } 123 // return nil 124 // }) 125 // } 126 // 127 // ``` 128 // <!--End PulumiCodeChooser --> 129 // 130 // ### Conditional Trigger with Crawler Action 131 // 132 // **Note:** Triggers can have both a crawler action and a crawler condition, just no example provided. 133 // 134 // <!--Start PulumiCodeChooser --> 135 // ```go 136 // package main 137 // 138 // import ( 139 // 140 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue" 141 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 142 // 143 // ) 144 // 145 // func main() { 146 // pulumi.Run(func(ctx *pulumi.Context) error { 147 // _, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{ 148 // Name: pulumi.String("example"), 149 // Type: pulumi.String("CONDITIONAL"), 150 // Actions: glue.TriggerActionArray{ 151 // &glue.TriggerActionArgs{ 152 // CrawlerName: pulumi.Any(example1.Name), 153 // }, 154 // }, 155 // Predicate: &glue.TriggerPredicateArgs{ 156 // Conditions: glue.TriggerPredicateConditionArray{ 157 // &glue.TriggerPredicateConditionArgs{ 158 // JobName: pulumi.Any(example2.Name), 159 // State: pulumi.String("SUCCEEDED"), 160 // }, 161 // }, 162 // }, 163 // }) 164 // if err != nil { 165 // return err 166 // } 167 // return nil 168 // }) 169 // } 170 // 171 // ``` 172 // <!--End PulumiCodeChooser --> 173 // 174 // ### Conditional Trigger with Crawler Condition 175 // 176 // **Note:** Triggers can have both a crawler action and a crawler condition, just no example provided. 177 // 178 // <!--Start PulumiCodeChooser --> 179 // ```go 180 // package main 181 // 182 // import ( 183 // 184 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue" 185 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 186 // 187 // ) 188 // 189 // func main() { 190 // pulumi.Run(func(ctx *pulumi.Context) error { 191 // _, err := glue.NewTrigger(ctx, "example", &glue.TriggerArgs{ 192 // Name: pulumi.String("example"), 193 // Type: pulumi.String("CONDITIONAL"), 194 // Actions: glue.TriggerActionArray{ 195 // &glue.TriggerActionArgs{ 196 // JobName: pulumi.Any(example1.Name), 197 // }, 198 // }, 199 // Predicate: &glue.TriggerPredicateArgs{ 200 // Conditions: glue.TriggerPredicateConditionArray{ 201 // &glue.TriggerPredicateConditionArgs{ 202 // CrawlerName: pulumi.Any(example2.Name), 203 // CrawlState: pulumi.String("SUCCEEDED"), 204 // }, 205 // }, 206 // }, 207 // }) 208 // if err != nil { 209 // return err 210 // } 211 // return nil 212 // }) 213 // } 214 // 215 // ``` 216 // <!--End PulumiCodeChooser --> 217 // 218 // ## Import 219 // 220 // Using `pulumi import`, import Glue Triggers using `name`. For example: 221 // 222 // ```sh 223 // $ pulumi import aws:glue/trigger:Trigger MyTrigger MyTrigger 224 // ``` 225 type Trigger struct { 226 pulumi.CustomResourceState 227 228 // List of actions initiated by this trigger when it fires. See Actions Below. 229 Actions TriggerActionArrayOutput `pulumi:"actions"` 230 // Amazon Resource Name (ARN) of Glue Trigger 231 Arn pulumi.StringOutput `pulumi:"arn"` 232 // A description of the new trigger. 233 Description pulumi.StringPtrOutput `pulumi:"description"` 234 // Start the trigger. Defaults to `true`. 235 Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` 236 // Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires. See Event Batching Condition. 237 EventBatchingConditions TriggerEventBatchingConditionArrayOutput `pulumi:"eventBatchingConditions"` 238 // The name of the trigger. 239 Name pulumi.StringOutput `pulumi:"name"` 240 // A predicate to specify when the new trigger should fire. Required when trigger type is `CONDITIONAL`. See Predicate Below. 241 Predicate TriggerPredicatePtrOutput `pulumi:"predicate"` 242 // A cron expression used to specify the schedule. [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html) 243 Schedule pulumi.StringPtrOutput `pulumi:"schedule"` 244 // Set to true to start `SCHEDULED` and `CONDITIONAL` triggers when created. True is not supported for `ON_DEMAND` triggers. 245 StartOnCreation pulumi.BoolPtrOutput `pulumi:"startOnCreation"` 246 // The condition job state. Currently, the values supported are `SUCCEEDED`, `STOPPED`, `TIMEOUT` and `FAILED`. If this is specified, `jobName` must also be specified. Conflicts with `crawlerState`. 247 State pulumi.StringOutput `pulumi:"state"` 248 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 249 Tags pulumi.StringMapOutput `pulumi:"tags"` 250 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 251 // 252 // Deprecated: Please use `tags` instead. 253 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 254 // The type of trigger. Valid values are `CONDITIONAL`, `EVENT`, `ON_DEMAND`, and `SCHEDULED`. 255 Type pulumi.StringOutput `pulumi:"type"` 256 // A workflow to which the trigger should be associated to. Every workflow graph (DAG) needs a starting trigger (`ON_DEMAND` or `SCHEDULED` type) and can contain multiple additional `CONDITIONAL` triggers. 257 WorkflowName pulumi.StringPtrOutput `pulumi:"workflowName"` 258 } 259 260 // NewTrigger registers a new resource with the given unique name, arguments, and options. 261 func NewTrigger(ctx *pulumi.Context, 262 name string, args *TriggerArgs, opts ...pulumi.ResourceOption) (*Trigger, error) { 263 if args == nil { 264 return nil, errors.New("missing one or more required arguments") 265 } 266 267 if args.Actions == nil { 268 return nil, errors.New("invalid value for required argument 'Actions'") 269 } 270 if args.Type == nil { 271 return nil, errors.New("invalid value for required argument 'Type'") 272 } 273 opts = internal.PkgResourceDefaultOpts(opts) 274 var resource Trigger 275 err := ctx.RegisterResource("aws:glue/trigger:Trigger", name, args, &resource, opts...) 276 if err != nil { 277 return nil, err 278 } 279 return &resource, nil 280 } 281 282 // GetTrigger gets an existing Trigger resource's state with the given name, ID, and optional 283 // state properties that are used to uniquely qualify the lookup (nil if not required). 284 func GetTrigger(ctx *pulumi.Context, 285 name string, id pulumi.IDInput, state *TriggerState, opts ...pulumi.ResourceOption) (*Trigger, error) { 286 var resource Trigger 287 err := ctx.ReadResource("aws:glue/trigger:Trigger", name, id, state, &resource, opts...) 288 if err != nil { 289 return nil, err 290 } 291 return &resource, nil 292 } 293 294 // Input properties used for looking up and filtering Trigger resources. 295 type triggerState struct { 296 // List of actions initiated by this trigger when it fires. See Actions Below. 297 Actions []TriggerAction `pulumi:"actions"` 298 // Amazon Resource Name (ARN) of Glue Trigger 299 Arn *string `pulumi:"arn"` 300 // A description of the new trigger. 301 Description *string `pulumi:"description"` 302 // Start the trigger. Defaults to `true`. 303 Enabled *bool `pulumi:"enabled"` 304 // Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires. See Event Batching Condition. 305 EventBatchingConditions []TriggerEventBatchingCondition `pulumi:"eventBatchingConditions"` 306 // The name of the trigger. 307 Name *string `pulumi:"name"` 308 // A predicate to specify when the new trigger should fire. Required when trigger type is `CONDITIONAL`. See Predicate Below. 309 Predicate *TriggerPredicate `pulumi:"predicate"` 310 // A cron expression used to specify the schedule. [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html) 311 Schedule *string `pulumi:"schedule"` 312 // Set to true to start `SCHEDULED` and `CONDITIONAL` triggers when created. True is not supported for `ON_DEMAND` triggers. 313 StartOnCreation *bool `pulumi:"startOnCreation"` 314 // The condition job state. Currently, the values supported are `SUCCEEDED`, `STOPPED`, `TIMEOUT` and `FAILED`. If this is specified, `jobName` must also be specified. Conflicts with `crawlerState`. 315 State *string `pulumi:"state"` 316 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 317 Tags map[string]string `pulumi:"tags"` 318 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 319 // 320 // Deprecated: Please use `tags` instead. 321 TagsAll map[string]string `pulumi:"tagsAll"` 322 // The type of trigger. Valid values are `CONDITIONAL`, `EVENT`, `ON_DEMAND`, and `SCHEDULED`. 323 Type *string `pulumi:"type"` 324 // A workflow to which the trigger should be associated to. Every workflow graph (DAG) needs a starting trigger (`ON_DEMAND` or `SCHEDULED` type) and can contain multiple additional `CONDITIONAL` triggers. 325 WorkflowName *string `pulumi:"workflowName"` 326 } 327 328 type TriggerState struct { 329 // List of actions initiated by this trigger when it fires. See Actions Below. 330 Actions TriggerActionArrayInput 331 // Amazon Resource Name (ARN) of Glue Trigger 332 Arn pulumi.StringPtrInput 333 // A description of the new trigger. 334 Description pulumi.StringPtrInput 335 // Start the trigger. Defaults to `true`. 336 Enabled pulumi.BoolPtrInput 337 // Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires. See Event Batching Condition. 338 EventBatchingConditions TriggerEventBatchingConditionArrayInput 339 // The name of the trigger. 340 Name pulumi.StringPtrInput 341 // A predicate to specify when the new trigger should fire. Required when trigger type is `CONDITIONAL`. See Predicate Below. 342 Predicate TriggerPredicatePtrInput 343 // A cron expression used to specify the schedule. [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html) 344 Schedule pulumi.StringPtrInput 345 // Set to true to start `SCHEDULED` and `CONDITIONAL` triggers when created. True is not supported for `ON_DEMAND` triggers. 346 StartOnCreation pulumi.BoolPtrInput 347 // The condition job state. Currently, the values supported are `SUCCEEDED`, `STOPPED`, `TIMEOUT` and `FAILED`. If this is specified, `jobName` must also be specified. Conflicts with `crawlerState`. 348 State pulumi.StringPtrInput 349 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 350 Tags pulumi.StringMapInput 351 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 352 // 353 // Deprecated: Please use `tags` instead. 354 TagsAll pulumi.StringMapInput 355 // The type of trigger. Valid values are `CONDITIONAL`, `EVENT`, `ON_DEMAND`, and `SCHEDULED`. 356 Type pulumi.StringPtrInput 357 // A workflow to which the trigger should be associated to. Every workflow graph (DAG) needs a starting trigger (`ON_DEMAND` or `SCHEDULED` type) and can contain multiple additional `CONDITIONAL` triggers. 358 WorkflowName pulumi.StringPtrInput 359 } 360 361 func (TriggerState) ElementType() reflect.Type { 362 return reflect.TypeOf((*triggerState)(nil)).Elem() 363 } 364 365 type triggerArgs struct { 366 // List of actions initiated by this trigger when it fires. See Actions Below. 367 Actions []TriggerAction `pulumi:"actions"` 368 // A description of the new trigger. 369 Description *string `pulumi:"description"` 370 // Start the trigger. Defaults to `true`. 371 Enabled *bool `pulumi:"enabled"` 372 // Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires. See Event Batching Condition. 373 EventBatchingConditions []TriggerEventBatchingCondition `pulumi:"eventBatchingConditions"` 374 // The name of the trigger. 375 Name *string `pulumi:"name"` 376 // A predicate to specify when the new trigger should fire. Required when trigger type is `CONDITIONAL`. See Predicate Below. 377 Predicate *TriggerPredicate `pulumi:"predicate"` 378 // A cron expression used to specify the schedule. [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html) 379 Schedule *string `pulumi:"schedule"` 380 // Set to true to start `SCHEDULED` and `CONDITIONAL` triggers when created. True is not supported for `ON_DEMAND` triggers. 381 StartOnCreation *bool `pulumi:"startOnCreation"` 382 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 383 Tags map[string]string `pulumi:"tags"` 384 // The type of trigger. Valid values are `CONDITIONAL`, `EVENT`, `ON_DEMAND`, and `SCHEDULED`. 385 Type string `pulumi:"type"` 386 // A workflow to which the trigger should be associated to. Every workflow graph (DAG) needs a starting trigger (`ON_DEMAND` or `SCHEDULED` type) and can contain multiple additional `CONDITIONAL` triggers. 387 WorkflowName *string `pulumi:"workflowName"` 388 } 389 390 // The set of arguments for constructing a Trigger resource. 391 type TriggerArgs struct { 392 // List of actions initiated by this trigger when it fires. See Actions Below. 393 Actions TriggerActionArrayInput 394 // A description of the new trigger. 395 Description pulumi.StringPtrInput 396 // Start the trigger. Defaults to `true`. 397 Enabled pulumi.BoolPtrInput 398 // Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires. See Event Batching Condition. 399 EventBatchingConditions TriggerEventBatchingConditionArrayInput 400 // The name of the trigger. 401 Name pulumi.StringPtrInput 402 // A predicate to specify when the new trigger should fire. Required when trigger type is `CONDITIONAL`. See Predicate Below. 403 Predicate TriggerPredicatePtrInput 404 // A cron expression used to specify the schedule. [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html) 405 Schedule pulumi.StringPtrInput 406 // Set to true to start `SCHEDULED` and `CONDITIONAL` triggers when created. True is not supported for `ON_DEMAND` triggers. 407 StartOnCreation pulumi.BoolPtrInput 408 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 409 Tags pulumi.StringMapInput 410 // The type of trigger. Valid values are `CONDITIONAL`, `EVENT`, `ON_DEMAND`, and `SCHEDULED`. 411 Type pulumi.StringInput 412 // A workflow to which the trigger should be associated to. Every workflow graph (DAG) needs a starting trigger (`ON_DEMAND` or `SCHEDULED` type) and can contain multiple additional `CONDITIONAL` triggers. 413 WorkflowName pulumi.StringPtrInput 414 } 415 416 func (TriggerArgs) ElementType() reflect.Type { 417 return reflect.TypeOf((*triggerArgs)(nil)).Elem() 418 } 419 420 type TriggerInput interface { 421 pulumi.Input 422 423 ToTriggerOutput() TriggerOutput 424 ToTriggerOutputWithContext(ctx context.Context) TriggerOutput 425 } 426 427 func (*Trigger) ElementType() reflect.Type { 428 return reflect.TypeOf((**Trigger)(nil)).Elem() 429 } 430 431 func (i *Trigger) ToTriggerOutput() TriggerOutput { 432 return i.ToTriggerOutputWithContext(context.Background()) 433 } 434 435 func (i *Trigger) ToTriggerOutputWithContext(ctx context.Context) TriggerOutput { 436 return pulumi.ToOutputWithContext(ctx, i).(TriggerOutput) 437 } 438 439 // TriggerArrayInput is an input type that accepts TriggerArray and TriggerArrayOutput values. 440 // You can construct a concrete instance of `TriggerArrayInput` via: 441 // 442 // TriggerArray{ TriggerArgs{...} } 443 type TriggerArrayInput interface { 444 pulumi.Input 445 446 ToTriggerArrayOutput() TriggerArrayOutput 447 ToTriggerArrayOutputWithContext(context.Context) TriggerArrayOutput 448 } 449 450 type TriggerArray []TriggerInput 451 452 func (TriggerArray) ElementType() reflect.Type { 453 return reflect.TypeOf((*[]*Trigger)(nil)).Elem() 454 } 455 456 func (i TriggerArray) ToTriggerArrayOutput() TriggerArrayOutput { 457 return i.ToTriggerArrayOutputWithContext(context.Background()) 458 } 459 460 func (i TriggerArray) ToTriggerArrayOutputWithContext(ctx context.Context) TriggerArrayOutput { 461 return pulumi.ToOutputWithContext(ctx, i).(TriggerArrayOutput) 462 } 463 464 // TriggerMapInput is an input type that accepts TriggerMap and TriggerMapOutput values. 465 // You can construct a concrete instance of `TriggerMapInput` via: 466 // 467 // TriggerMap{ "key": TriggerArgs{...} } 468 type TriggerMapInput interface { 469 pulumi.Input 470 471 ToTriggerMapOutput() TriggerMapOutput 472 ToTriggerMapOutputWithContext(context.Context) TriggerMapOutput 473 } 474 475 type TriggerMap map[string]TriggerInput 476 477 func (TriggerMap) ElementType() reflect.Type { 478 return reflect.TypeOf((*map[string]*Trigger)(nil)).Elem() 479 } 480 481 func (i TriggerMap) ToTriggerMapOutput() TriggerMapOutput { 482 return i.ToTriggerMapOutputWithContext(context.Background()) 483 } 484 485 func (i TriggerMap) ToTriggerMapOutputWithContext(ctx context.Context) TriggerMapOutput { 486 return pulumi.ToOutputWithContext(ctx, i).(TriggerMapOutput) 487 } 488 489 type TriggerOutput struct{ *pulumi.OutputState } 490 491 func (TriggerOutput) ElementType() reflect.Type { 492 return reflect.TypeOf((**Trigger)(nil)).Elem() 493 } 494 495 func (o TriggerOutput) ToTriggerOutput() TriggerOutput { 496 return o 497 } 498 499 func (o TriggerOutput) ToTriggerOutputWithContext(ctx context.Context) TriggerOutput { 500 return o 501 } 502 503 // List of actions initiated by this trigger when it fires. See Actions Below. 504 func (o TriggerOutput) Actions() TriggerActionArrayOutput { 505 return o.ApplyT(func(v *Trigger) TriggerActionArrayOutput { return v.Actions }).(TriggerActionArrayOutput) 506 } 507 508 // Amazon Resource Name (ARN) of Glue Trigger 509 func (o TriggerOutput) Arn() pulumi.StringOutput { 510 return o.ApplyT(func(v *Trigger) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 511 } 512 513 // A description of the new trigger. 514 func (o TriggerOutput) Description() pulumi.StringPtrOutput { 515 return o.ApplyT(func(v *Trigger) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 516 } 517 518 // Start the trigger. Defaults to `true`. 519 func (o TriggerOutput) Enabled() pulumi.BoolPtrOutput { 520 return o.ApplyT(func(v *Trigger) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) 521 } 522 523 // Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires. See Event Batching Condition. 524 func (o TriggerOutput) EventBatchingConditions() TriggerEventBatchingConditionArrayOutput { 525 return o.ApplyT(func(v *Trigger) TriggerEventBatchingConditionArrayOutput { return v.EventBatchingConditions }).(TriggerEventBatchingConditionArrayOutput) 526 } 527 528 // The name of the trigger. 529 func (o TriggerOutput) Name() pulumi.StringOutput { 530 return o.ApplyT(func(v *Trigger) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 531 } 532 533 // A predicate to specify when the new trigger should fire. Required when trigger type is `CONDITIONAL`. See Predicate Below. 534 func (o TriggerOutput) Predicate() TriggerPredicatePtrOutput { 535 return o.ApplyT(func(v *Trigger) TriggerPredicatePtrOutput { return v.Predicate }).(TriggerPredicatePtrOutput) 536 } 537 538 // A cron expression used to specify the schedule. [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html) 539 func (o TriggerOutput) Schedule() pulumi.StringPtrOutput { 540 return o.ApplyT(func(v *Trigger) pulumi.StringPtrOutput { return v.Schedule }).(pulumi.StringPtrOutput) 541 } 542 543 // Set to true to start `SCHEDULED` and `CONDITIONAL` triggers when created. True is not supported for `ON_DEMAND` triggers. 544 func (o TriggerOutput) StartOnCreation() pulumi.BoolPtrOutput { 545 return o.ApplyT(func(v *Trigger) pulumi.BoolPtrOutput { return v.StartOnCreation }).(pulumi.BoolPtrOutput) 546 } 547 548 // The condition job state. Currently, the values supported are `SUCCEEDED`, `STOPPED`, `TIMEOUT` and `FAILED`. If this is specified, `jobName` must also be specified. Conflicts with `crawlerState`. 549 func (o TriggerOutput) State() pulumi.StringOutput { 550 return o.ApplyT(func(v *Trigger) pulumi.StringOutput { return v.State }).(pulumi.StringOutput) 551 } 552 553 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 554 func (o TriggerOutput) Tags() pulumi.StringMapOutput { 555 return o.ApplyT(func(v *Trigger) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 556 } 557 558 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 559 // 560 // Deprecated: Please use `tags` instead. 561 func (o TriggerOutput) TagsAll() pulumi.StringMapOutput { 562 return o.ApplyT(func(v *Trigger) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 563 } 564 565 // The type of trigger. Valid values are `CONDITIONAL`, `EVENT`, `ON_DEMAND`, and `SCHEDULED`. 566 func (o TriggerOutput) Type() pulumi.StringOutput { 567 return o.ApplyT(func(v *Trigger) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) 568 } 569 570 // A workflow to which the trigger should be associated to. Every workflow graph (DAG) needs a starting trigger (`ON_DEMAND` or `SCHEDULED` type) and can contain multiple additional `CONDITIONAL` triggers. 571 func (o TriggerOutput) WorkflowName() pulumi.StringPtrOutput { 572 return o.ApplyT(func(v *Trigger) pulumi.StringPtrOutput { return v.WorkflowName }).(pulumi.StringPtrOutput) 573 } 574 575 type TriggerArrayOutput struct{ *pulumi.OutputState } 576 577 func (TriggerArrayOutput) ElementType() reflect.Type { 578 return reflect.TypeOf((*[]*Trigger)(nil)).Elem() 579 } 580 581 func (o TriggerArrayOutput) ToTriggerArrayOutput() TriggerArrayOutput { 582 return o 583 } 584 585 func (o TriggerArrayOutput) ToTriggerArrayOutputWithContext(ctx context.Context) TriggerArrayOutput { 586 return o 587 } 588 589 func (o TriggerArrayOutput) Index(i pulumi.IntInput) TriggerOutput { 590 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Trigger { 591 return vs[0].([]*Trigger)[vs[1].(int)] 592 }).(TriggerOutput) 593 } 594 595 type TriggerMapOutput struct{ *pulumi.OutputState } 596 597 func (TriggerMapOutput) ElementType() reflect.Type { 598 return reflect.TypeOf((*map[string]*Trigger)(nil)).Elem() 599 } 600 601 func (o TriggerMapOutput) ToTriggerMapOutput() TriggerMapOutput { 602 return o 603 } 604 605 func (o TriggerMapOutput) ToTriggerMapOutputWithContext(ctx context.Context) TriggerMapOutput { 606 return o 607 } 608 609 func (o TriggerMapOutput) MapIndex(k pulumi.StringInput) TriggerOutput { 610 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Trigger { 611 return vs[0].(map[string]*Trigger)[vs[1].(string)] 612 }).(TriggerOutput) 613 } 614 615 func init() { 616 pulumi.RegisterInputType(reflect.TypeOf((*TriggerInput)(nil)).Elem(), &Trigger{}) 617 pulumi.RegisterInputType(reflect.TypeOf((*TriggerArrayInput)(nil)).Elem(), TriggerArray{}) 618 pulumi.RegisterInputType(reflect.TypeOf((*TriggerMapInput)(nil)).Elem(), TriggerMap{}) 619 pulumi.RegisterOutputType(TriggerOutput{}) 620 pulumi.RegisterOutputType(TriggerArrayOutput{}) 621 pulumi.RegisterOutputType(TriggerMapOutput{}) 622 }