import * as core from "@terrascript/core";

export interface TopicPolicyArgs extends core.ResourceArgs {
  arn: string | core.StringOut;

  policy: string | core.StringOut;
}

export class TopicPolicy extends core.Resource<TopicPolicyArgs> {
  @core.attr(String)
  public arn!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public owner!: string | core.StringOut;

  @core.attr(String)
  public policy!: string | core.StringOut;

  constructor(name: string, args?: TopicPolicyArgs) {
    super(name, "aws_sns_topic_policy", args);
  }

  public override getNamespace(): string {
    return "aws_sns";
  }
}
