// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS CloudWatch Event Bridge */ export interface CloudwatchEventRuleConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#description CloudwatchEventRule#description} */ readonly description?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#event_bus_name CloudwatchEventRule#event_bus_name} */ readonly eventBusName?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#event_pattern CloudwatchEventRule#event_pattern} */ readonly eventPattern?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#is_enabled CloudwatchEventRule#is_enabled} */ readonly isEnabled?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#name CloudwatchEventRule#name} */ readonly name?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#name_prefix CloudwatchEventRule#name_prefix} */ readonly namePrefix?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#role_arn CloudwatchEventRule#role_arn} */ readonly roleArn?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#schedule_expression CloudwatchEventRule#schedule_expression} */ readonly scheduleExpression?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#tags CloudwatchEventRule#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html#tags_all CloudwatchEventRule#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html aws_cloudwatch_event_rule} */ export class CloudwatchEventRule extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_cloudwatch_event_rule"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html aws_cloudwatch_event_rule} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options CloudwatchEventRuleConfig = {} */ public constructor(scope: Construct, id: string, config: CloudwatchEventRuleConfig = {}) { super(scope, id, { terraformResourceType: 'aws_cloudwatch_event_rule', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._description = config.description; this._eventBusName = config.eventBusName; this._eventPattern = config.eventPattern; this._isEnabled = config.isEnabled; this._name = config.name; this._namePrefix = config.namePrefix; this._roleArn = config.roleArn; this._scheduleExpression = config.scheduleExpression; this._tags = config.tags; this._tagsAll = config.tagsAll; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // description - computed: false, optional: true, required: false private _description?: string; public get description() { return this.getStringAttribute('description'); } public set description(value: string) { this._description = value; } public resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. public get descriptionInput() { return this._description; } // event_bus_name - computed: false, optional: true, required: false private _eventBusName?: string; public get eventBusName() { return this.getStringAttribute('event_bus_name'); } public set eventBusName(value: string) { this._eventBusName = value; } public resetEventBusName() { this._eventBusName = undefined; } // Temporarily expose input value. Use with caution. public get eventBusNameInput() { return this._eventBusName; } // event_pattern - computed: false, optional: true, required: false private _eventPattern?: string; public get eventPattern() { return this.getStringAttribute('event_pattern'); } public set eventPattern(value: string) { this._eventPattern = value; } public resetEventPattern() { this._eventPattern = undefined; } // Temporarily expose input value. Use with caution. public get eventPatternInput() { return this._eventPattern; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // is_enabled - computed: false, optional: true, required: false private _isEnabled?: boolean | cdktf.IResolvable; public get isEnabled() { return this.getBooleanAttribute('is_enabled') as any; } public set isEnabled(value: boolean | cdktf.IResolvable) { this._isEnabled = value; } public resetIsEnabled() { this._isEnabled = undefined; } // Temporarily expose input value. Use with caution. public get isEnabledInput() { return this._isEnabled; } // name - computed: true, optional: true, required: false private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } public resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // name_prefix - computed: true, optional: true, required: false private _namePrefix?: string; public get namePrefix() { return this.getStringAttribute('name_prefix'); } public set namePrefix(value: string) { this._namePrefix = value; } public resetNamePrefix() { this._namePrefix = undefined; } // Temporarily expose input value. Use with caution. public get namePrefixInput() { return this._namePrefix; } // role_arn - computed: false, optional: true, required: false private _roleArn?: string; public get roleArn() { return this.getStringAttribute('role_arn'); } public set roleArn(value: string) { this._roleArn = value; } public resetRoleArn() { this._roleArn = undefined; } // Temporarily expose input value. Use with caution. public get roleArnInput() { return this._roleArn; } // schedule_expression - computed: false, optional: true, required: false private _scheduleExpression?: string; public get scheduleExpression() { return this.getStringAttribute('schedule_expression'); } public set scheduleExpression(value: string) { this._scheduleExpression = value; } public resetScheduleExpression() { this._scheduleExpression = undefined; } // Temporarily expose input value. Use with caution. public get scheduleExpressionInput() { return this._scheduleExpression; } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { description: cdktf.stringToTerraform(this._description), event_bus_name: cdktf.stringToTerraform(this._eventBusName), event_pattern: cdktf.stringToTerraform(this._eventPattern), is_enabled: cdktf.booleanToTerraform(this._isEnabled), name: cdktf.stringToTerraform(this._name), name_prefix: cdktf.stringToTerraform(this._namePrefix), role_arn: cdktf.stringToTerraform(this._roleArn), schedule_expression: cdktf.stringToTerraform(this._scheduleExpression), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), }; } }