// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS EC2 Container Registry */ export interface EcrpublicRepositoryPolicyConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/ecrpublic_repository_policy.html#policy EcrpublicRepositoryPolicy#policy} */ readonly policy: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/ecrpublic_repository_policy.html#repository_name EcrpublicRepositoryPolicy#repository_name} */ readonly repositoryName: string; } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/ecrpublic_repository_policy.html aws_ecrpublic_repository_policy} */ export class EcrpublicRepositoryPolicy extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_ecrpublic_repository_policy"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ecrpublic_repository_policy.html aws_ecrpublic_repository_policy} 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 EcrpublicRepositoryPolicyConfig */ public constructor(scope: Construct, id: string, config: EcrpublicRepositoryPolicyConfig) { super(scope, id, { terraformResourceType: 'aws_ecrpublic_repository_policy', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._policy = config.policy; this._repositoryName = config.repositoryName; } // ========== // ATTRIBUTES // ========== // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // policy - computed: false, optional: false, required: true private _policy?: string; public get policy() { return this.getStringAttribute('policy'); } public set policy(value: string) { this._policy = value; } // Temporarily expose input value. Use with caution. public get policyInput() { return this._policy; } // registry_id - computed: true, optional: false, required: false public get registryId() { return this.getStringAttribute('registry_id'); } // repository_name - computed: false, optional: false, required: true private _repositoryName?: string; public get repositoryName() { return this.getStringAttribute('repository_name'); } public set repositoryName(value: string) { this._repositoryName = value; } // Temporarily expose input value. Use with caution. public get repositoryNameInput() { return this._repositoryName; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { policy: cdktf.stringToTerraform(this._policy), repository_name: cdktf.stringToTerraform(this._repositoryName), }; } }