// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS CloudFront */ export interface CloudfrontFunctionConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_function.html#code CloudfrontFunction#code} */ readonly code: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_function.html#comment CloudfrontFunction#comment} */ readonly comment?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_function.html#name CloudfrontFunction#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_function.html#publish CloudfrontFunction#publish} */ readonly publish?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_function.html#runtime CloudfrontFunction#runtime} */ readonly runtime: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_function.html aws_cloudfront_function} */ export class CloudfrontFunction extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_cloudfront_function"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudfront_function.html aws_cloudfront_function} 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 CloudfrontFunctionConfig */ public constructor(scope: Construct, id: string, config: CloudfrontFunctionConfig) { super(scope, id, { terraformResourceType: 'aws_cloudfront_function', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._code = config.code; this._comment = config.comment; this._name = config.name; this._publish = config.publish; this._runtime = config.runtime; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // code - computed: false, optional: false, required: true private _code?: string; public get code() { return this.getStringAttribute('code'); } public set code(value: string) { this._code = value; } // Temporarily expose input value. Use with caution. public get codeInput() { return this._code; } // 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'); } // live_stage_etag - computed: true, optional: false, required: false public get liveStageEtag() { return this.getStringAttribute('live_stage_etag'); } // 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; } // publish - computed: false, optional: true, required: false private _publish?: boolean | cdktf.IResolvable; public get publish() { return this.getBooleanAttribute('publish') as any; } public set publish(value: boolean | cdktf.IResolvable) { this._publish = value; } public resetPublish() { this._publish = undefined; } // Temporarily expose input value. Use with caution. public get publishInput() { return this._publish; } // runtime - computed: false, optional: false, required: true private _runtime?: string; public get runtime() { return this.getStringAttribute('runtime'); } public set runtime(value: string) { this._runtime = value; } // Temporarily expose input value. Use with caution. public get runtimeInput() { return this._runtime; } // status - computed: true, optional: false, required: false public get status() { return this.getStringAttribute('status'); } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { code: cdktf.stringToTerraform(this._code), comment: cdktf.stringToTerraform(this._comment), name: cdktf.stringToTerraform(this._name), publish: cdktf.booleanToTerraform(this._publish), runtime: cdktf.stringToTerraform(this._runtime), }; } }