// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS CloudFront */ export interface CloudfrontKeyGroupConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_key_group.html#comment CloudfrontKeyGroup#comment} */ readonly comment?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_key_group.html#items CloudfrontKeyGroup#items} */ readonly items: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_key_group.html#name CloudfrontKeyGroup#name} */ readonly name: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_key_group.html aws_cloudfront_key_group} */ export class CloudfrontKeyGroup extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_cloudfront_key_group"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_key_group.html aws_cloudfront_key_group} 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 CloudfrontKeyGroupConfig */ public constructor(scope: Construct, id: string, config: CloudfrontKeyGroupConfig) { super(scope, id, { terraformResourceType: 'aws_cloudfront_key_group', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._comment = config.comment; this._items = config.items; this._name = config.name; } // ========== // ATTRIBUTES // ========== // comment - computed: false, optional: true, required: false private _comment?: string; public get comment() { return this.getStringAttribute('comment'); } public set comment(value: string) { this._comment = value; } public resetComment() { this._comment = undefined; } // Temporarily expose input value. Use with caution. public get commentInput() { return this._comment; } // etag - computed: true, optional: false, required: false public get etag() { return this.getStringAttribute('etag'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // items - computed: false, optional: false, required: true private _items?: string[]; public get items() { return this.getListAttribute('items'); } public set items(value: string[]) { this._items = value; } // Temporarily expose input value. Use with caution. public get itemsInput() { return this._items; } // 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; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { comment: cdktf.stringToTerraform(this._comment), items: cdktf.listMapper(cdktf.stringToTerraform)(this._items), name: cdktf.stringToTerraform(this._name), }; } }