// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Identity and Access Management */ export interface DataAwsIamRoleConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/iam_role.html#name DataAwsIamRole#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/iam_role.html#tags DataAwsIamRole#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/d/iam_role.html aws_iam_role} */ export class DataAwsIamRole extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_iam_role"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/iam_role.html aws_iam_role} Data Source * * @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 DataAwsIamRoleConfig */ public constructor(scope: Construct, id: string, config: DataAwsIamRoleConfig) { super(scope, id, { terraformResourceType: 'aws_iam_role', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._name = config.name; this._tags = config.tags; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // assume_role_policy - computed: true, optional: false, required: false public get assumeRolePolicy() { return this.getStringAttribute('assume_role_policy'); } // create_date - computed: true, optional: false, required: false public get createDate() { return this.getStringAttribute('create_date'); } // description - computed: true, optional: false, required: false public get description() { return this.getStringAttribute('description'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // max_session_duration - computed: true, optional: false, required: false public get maxSessionDuration() { return this.getNumberAttribute('max_session_duration'); } // 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; } // path - computed: true, optional: false, required: false public get path() { return this.getStringAttribute('path'); } // permissions_boundary - computed: true, optional: false, required: false public get permissionsBoundary() { return this.getStringAttribute('permissions_boundary'); } // tags - computed: true, 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; } // unique_id - computed: true, optional: false, required: false public get uniqueId() { return this.getStringAttribute('unique_id'); } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { name: cdktf.stringToTerraform(this._name), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), }; } }