// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS IoT */ export interface IotThingConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/iot_thing.html#attributes IotThing#attributes} */ readonly attributes?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/iot_thing.html#name IotThing#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/iot_thing.html#thing_type_name IotThing#thing_type_name} */ readonly thingTypeName?: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/iot_thing.html aws_iot_thing} */ export class IotThing extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_iot_thing"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/iot_thing.html aws_iot_thing} 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 IotThingConfig */ public constructor(scope: Construct, id: string, config: IotThingConfig) { super(scope, id, { terraformResourceType: 'aws_iot_thing', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._attributes = config.attributes; this._name = config.name; this._thingTypeName = config.thingTypeName; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // attributes - computed: false, optional: true, required: false private _attributes?: { [key: string]: string } | cdktf.IResolvable; public get attributes() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('attributes') as any; } public set attributes(value: { [key: string]: string } | cdktf.IResolvable) { this._attributes = value; } public resetAttributes() { this._attributes = undefined; } // Temporarily expose input value. Use with caution. public get attributesInput() { return this._attributes; } // default_client_id - computed: true, optional: false, required: false public get defaultClientId() { return this.getStringAttribute('default_client_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; } // thing_type_name - computed: false, optional: true, required: false private _thingTypeName?: string; public get thingTypeName() { return this.getStringAttribute('thing_type_name'); } public set thingTypeName(value: string) { this._thingTypeName = value; } public resetThingTypeName() { this._thingTypeName = undefined; } // Temporarily expose input value. Use with caution. public get thingTypeNameInput() { return this._thingTypeName; } // version - computed: true, optional: false, required: false public get version() { return this.getNumberAttribute('version'); } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { attributes: cdktf.hashMapper(cdktf.anyToTerraform)(this._attributes), name: cdktf.stringToTerraform(this._name), thing_type_name: cdktf.stringToTerraform(this._thingTypeName), }; } }