// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Identity and Access Management */ export interface DataAwsIamPolicyConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/iam_policy.html#name DataAwsIamPolicy#name} */ readonly name?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/iam_policy.html#path_prefix DataAwsIamPolicy#path_prefix} */ readonly pathPrefix?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/iam_policy.html#tags DataAwsIamPolicy#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/d/iam_policy.html aws_iam_policy} */ export class DataAwsIamPolicy extends cdktf.TerraformDataSource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_iam_policy"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/d/iam_policy.html aws_iam_policy} 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 DataAwsIamPolicyConfig = {} */ public constructor(scope: Construct, id: string, config: DataAwsIamPolicyConfig = {}) { super(scope, id, { terraformResourceType: 'aws_iam_policy', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._name = config.name; this._pathPrefix = config.pathPrefix; this._tags = config.tags; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: true, required: false public get arn() { return this.getStringAttribute('arn'); } // 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'); } // name - computed: true, optional: true, required: false private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } public resetName() { this._name = undefined; } // 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'); } // path_prefix - computed: false, optional: true, required: false private _pathPrefix?: string; public get pathPrefix() { return this.getStringAttribute('path_prefix'); } public set pathPrefix(value: string) { this._pathPrefix = value; } public resetPathPrefix() { this._pathPrefix = undefined; } // Temporarily expose input value. Use with caution. public get pathPrefixInput() { return this._pathPrefix; } // policy - computed: true, optional: false, required: false public get policy() { return this.getStringAttribute('policy'); } // policy_id - computed: true, optional: false, required: false public get policyId() { return this.getStringAttribute('policy_id'); } // 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; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { name: cdktf.stringToTerraform(this._name), path_prefix: cdktf.stringToTerraform(this._pathPrefix), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), }; } }