// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AppConfig */ export interface AppconfigEnvironmentConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html#application_id AppconfigEnvironment#application_id} */ readonly applicationId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html#description AppconfigEnvironment#description} */ readonly description?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html#name AppconfigEnvironment#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html#tags AppconfigEnvironment#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html#tags_all AppconfigEnvironment#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * monitor block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html#monitor AppconfigEnvironment#monitor} */ readonly monitor?: AppconfigEnvironmentMonitor[]; } export interface AppconfigEnvironmentMonitor { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html#alarm_arn AppconfigEnvironment#alarm_arn} */ readonly alarmArn: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html#alarm_role_arn AppconfigEnvironment#alarm_role_arn} */ readonly alarmRoleArn?: string; } export function appconfigEnvironmentMonitorToTerraform(struct?: AppconfigEnvironmentMonitor): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { alarm_arn: cdktf.stringToTerraform(struct!.alarmArn), alarm_role_arn: cdktf.stringToTerraform(struct!.alarmRoleArn), } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html aws_appconfig_environment} */ export class AppconfigEnvironment extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_appconfig_environment"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/appconfig_environment.html aws_appconfig_environment} 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 AppconfigEnvironmentConfig */ public constructor(scope: Construct, id: string, config: AppconfigEnvironmentConfig) { super(scope, id, { terraformResourceType: 'aws_appconfig_environment', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._applicationId = config.applicationId; this._description = config.description; this._name = config.name; this._tags = config.tags; this._tagsAll = config.tagsAll; this._monitor = config.monitor; } // ========== // ATTRIBUTES // ========== // application_id - computed: false, optional: false, required: true private _applicationId?: string; public get applicationId() { return this.getStringAttribute('application_id'); } public set applicationId(value: string) { this._applicationId = value; } // Temporarily expose input value. Use with caution. public get applicationIdInput() { return this._applicationId; } // 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; } // environment_id - computed: true, optional: false, required: false public get environmentId() { return this.getStringAttribute('environment_id'); } // 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; } // state - computed: true, optional: false, required: false public get state() { return this.getStringAttribute('state'); } // 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; } // monitor - computed: false, optional: true, required: false private _monitor?: AppconfigEnvironmentMonitor[]; public get monitor() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('monitor') as any; } public set monitor(value: AppconfigEnvironmentMonitor[]) { this._monitor = value; } public resetMonitor() { this._monitor = undefined; } // Temporarily expose input value. Use with caution. public get monitorInput() { return this._monitor; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { application_id: cdktf.stringToTerraform(this._applicationId), description: cdktf.stringToTerraform(this._description), name: cdktf.stringToTerraform(this._name), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), monitor: cdktf.listMapper(appconfigEnvironmentMonitorToTerraform)(this._monitor), }; } }