// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Backup */ export interface DataAwsBackupPlanConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/backup_plan.html#plan_id DataAwsBackupPlan#plan_id} */ readonly planId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/backup_plan.html#tags DataAwsBackupPlan#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/d/backup_plan.html aws_backup_plan} */ export class DataAwsBackupPlan extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_backup_plan"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/backup_plan.html aws_backup_plan} Data Source * * @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 DataAwsBackupPlanConfig */ public constructor(scope: Construct, id: string, config: DataAwsBackupPlanConfig) { super(scope, id, { terraformResourceType: 'aws_backup_plan', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._planId = config.planId; this._tags = config.tags; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // name - computed: true, optional: false, required: false public get name() { return this.getStringAttribute('name'); } // plan_id - computed: false, optional: false, required: true private _planId?: string; public get planId() { return this.getStringAttribute('plan_id'); } public set planId(value: string) { this._planId = value; } // Temporarily expose input value. Use with caution. public get planIdInput() { return this._planId; } // tags - computed: true, 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; } // version - computed: true, optional: false, required: false public get version() { return this.getStringAttribute('version'); } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { plan_id: cdktf.stringToTerraform(this._planId), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), }; } }