// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS CloudWatch Event Bridge */ export interface CloudwatchEventArchiveConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_archive.html#description CloudwatchEventArchive#description} */ readonly description?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_archive.html#event_pattern CloudwatchEventArchive#event_pattern} */ readonly eventPattern?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_archive.html#event_source_arn CloudwatchEventArchive#event_source_arn} */ readonly eventSourceArn: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_archive.html#name CloudwatchEventArchive#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_archive.html#retention_days CloudwatchEventArchive#retention_days} */ readonly retentionDays?: number; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_archive.html aws_cloudwatch_event_archive} */ export class CloudwatchEventArchive extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_cloudwatch_event_archive"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_archive.html aws_cloudwatch_event_archive} 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 CloudwatchEventArchiveConfig */ public constructor(scope: Construct, id: string, config: CloudwatchEventArchiveConfig) { super(scope, id, { terraformResourceType: 'aws_cloudwatch_event_archive', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._description = config.description; this._eventPattern = config.eventPattern; this._eventSourceArn = config.eventSourceArn; this._name = config.name; this._retentionDays = config.retentionDays; } // ========== // 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_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; } // event_source_arn - computed: false, optional: false, required: true private _eventSourceArn?: string; public get eventSourceArn() { return this.getStringAttribute('event_source_arn'); } public set eventSourceArn(value: string) { this._eventSourceArn = value; } // Temporarily expose input value. Use with caution. public get eventSourceArnInput() { return this._eventSourceArn; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // name - computed: false, optional: false, required: true private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // retention_days - computed: false, optional: true, required: false private _retentionDays?: number; public get retentionDays() { return this.getNumberAttribute('retention_days'); } public set retentionDays(value: number) { this._retentionDays = value; } public resetRetentionDays() { this._retentionDays = undefined; } // Temporarily expose input value. Use with caution. public get retentionDaysInput() { return this._retentionDays; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { description: cdktf.stringToTerraform(this._description), event_pattern: cdktf.stringToTerraform(this._eventPattern), event_source_arn: cdktf.stringToTerraform(this._eventSourceArn), name: cdktf.stringToTerraform(this._name), retention_days: cdktf.numberToTerraform(this._retentionDays), }; } }