// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Organizations */ export interface OrganizationsOrganizationalUnitConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/organizations_organizational_unit.html#name OrganizationsOrganizationalUnit#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/organizations_organizational_unit.html#parent_id OrganizationsOrganizationalUnit#parent_id} */ readonly parentId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/organizations_organizational_unit.html#tags OrganizationsOrganizationalUnit#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/organizations_organizational_unit.html#tags_all OrganizationsOrganizationalUnit#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; } export class OrganizationsOrganizationalUnitAccounts extends cdktf.ComplexComputedList { // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // email - computed: true, optional: false, required: false public get email() { return this.getStringAttribute('email'); } // id - computed: true, optional: false, required: false public get id() { return this.getStringAttribute('id'); } // name - computed: true, optional: false, required: false public get name() { return this.getStringAttribute('name'); } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/organizations_organizational_unit.html aws_organizations_organizational_unit} */ export class OrganizationsOrganizationalUnit extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_organizations_organizational_unit"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/organizations_organizational_unit.html aws_organizations_organizational_unit} 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 OrganizationsOrganizationalUnitConfig */ public constructor(scope: Construct, id: string, config: OrganizationsOrganizationalUnitConfig) { super(scope, id, { terraformResourceType: 'aws_organizations_organizational_unit', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._name = config.name; this._parentId = config.parentId; this._tags = config.tags; this._tagsAll = config.tagsAll; } // ========== // ATTRIBUTES // ========== // accounts - computed: true, optional: false, required: false public accounts(index: string) { return new OrganizationsOrganizationalUnitAccounts(this, 'accounts', index); } // 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: 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; } // parent_id - computed: false, optional: false, required: true private _parentId?: string; public get parentId() { return this.getStringAttribute('parent_id'); } public set parentId(value: string) { this._parentId = value; } // Temporarily expose input value. Use with caution. public get parentIdInput() { return this._parentId; } // 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; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { name: cdktf.stringToTerraform(this._name), parent_id: cdktf.stringToTerraform(this._parentId), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), }; } }