import * as core from "@terrascript/core"; export interface CloudwatchEventRuleArgs extends core.ResourceArgs { /** * (Optional) The description of the rule. */ description?: string | core.StringOut; /** * (Optional) The event bus to associate with this rule. If you omit this, the `default` event bus is u * sed. */ eventBusName?: string | core.StringOut; /** * (Optional) The event pattern described a JSON object. At least one of `schedule_expression` or `even * t_pattern` is required. See full documentation of [Events and Event Patterns in EventBridge](https:/ * /docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) for details. */ eventPattern?: string | core.StringOut; /** * (Optional) Whether the rule should be enabled (defaults to `true`). */ isEnabled?: boolean | core.BooleanOut; /** * (Optional) The name of the rule. If omitted, Terraform will assign a random, unique name. Conflicts * with `name_prefix`. */ name?: string | core.StringOut; /** * (Optional) Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ namePrefix?: string | core.StringOut; /** * (Optional) The Amazon Resource Name (ARN) associated with the role that is used for target invocatio * n. */ roleArn?: string | core.StringOut; /** * (Optional) The scheduling expression. For example, `cron(0 20 * * ? *)` or `rate(5 minutes)`. At lea * st one of `schedule_expression` or `event_pattern` is required. Can only be used on the default even * t bus. For more information, refer to the AWS documentation [Schedule Expressions for Rules](https:/ * /docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html). */ scheduleExpression?: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; } export class CloudwatchEventRule extends core.Resource { /** * The Amazon Resource Name (ARN) of the rule. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) The description of the rule. */ @core.attr(String) public description?: string | core.StringOut; /** * (Optional) The event bus to associate with this rule. If you omit this, the `default` event bus is u * sed. */ @core.attr(String) public eventBusName?: string | core.StringOut; /** * (Optional) The event pattern described a JSON object. At least one of `schedule_expression` or `even * t_pattern` is required. See full documentation of [Events and Event Patterns in EventBridge](https:/ * /docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) for details. */ @core.attr(String) public eventPattern?: string | core.StringOut; /** * The name of the rule. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Whether the rule should be enabled (defaults to `true`). */ @core.attr(Boolean) public isEnabled?: boolean | core.BooleanOut; /** * (Optional) The name of the rule. If omitted, Terraform will assign a random, unique name. Conflicts * with `name_prefix`. */ @core.attr(String, { computed: true }) public name?: string | core.StringOut; /** * (Optional) Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ @core.attr(String, { computed: true }) public namePrefix?: string | core.StringOut; /** * (Optional) The Amazon Resource Name (ARN) associated with the role that is used for target invocatio * n. */ @core.attr(String) public roleArn?: string | core.StringOut; /** * (Optional) The scheduling expression. For example, `cron(0 20 * * ? *)` or `rate(5 minutes)`. At lea * st one of `schedule_expression` or `event_pattern` is required. Can only be used on the default even * t bus. For more information, refer to the AWS documentation [Schedule Expressions for Rules](https:/ * /docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html). */ @core.attr(String) public scheduleExpression?: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; constructor(name: string, args?: CloudwatchEventRuleArgs) { super(name, "aws_cloudwatch_event_rule", args); } public override getNamespace(): string { return "aws_eventbridge"; } }