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