// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Organizations */ export interface OrganizationsPolicyAttachmentConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/organizations_policy_attachment.html#policy_id OrganizationsPolicyAttachment#policy_id} */ readonly policyId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/organizations_policy_attachment.html#target_id OrganizationsPolicyAttachment#target_id} */ readonly targetId: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/organizations_policy_attachment.html aws_organizations_policy_attachment} */ export class OrganizationsPolicyAttachment extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_organizations_policy_attachment"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/organizations_policy_attachment.html aws_organizations_policy_attachment} 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 OrganizationsPolicyAttachmentConfig */ public constructor(scope: Construct, id: string, config: OrganizationsPolicyAttachmentConfig) { super(scope, id, { terraformResourceType: 'aws_organizations_policy_attachment', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._policyId = config.policyId; this._targetId = config.targetId; } // ========== // ATTRIBUTES // ========== // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // policy_id - computed: false, optional: false, required: true private _policyId?: string; public get policyId() { return this.getStringAttribute('policy_id'); } public set policyId(value: string) { this._policyId = value; } // Temporarily expose input value. Use with caution. public get policyIdInput() { return this._policyId; } // target_id - computed: false, optional: false, required: true private _targetId?: string; public get targetId() { return this.getStringAttribute('target_id'); } public set targetId(value: string) { this._targetId = value; } // Temporarily expose input value. Use with caution. public get targetIdInput() { return this._targetId; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { policy_id: cdktf.stringToTerraform(this._policyId), target_id: cdktf.stringToTerraform(this._targetId), }; } }