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

export interface PermissionArgs extends core.ResourceArgs {
  actions: core.Array<string> | core.ArrayOut<core.StringOut>;

  certificateAuthorityArn: string | core.StringOut;

  principal: string | core.StringOut;

  sourceAccount?: string | core.StringOut;
}

export class Permission extends core.Resource<PermissionArgs> {
  @core.attr(String, { kind: "array" })
  public actions!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

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

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

  constructor(name: string, args?: PermissionArgs) {
    super(name, "aws_acmpca_permission", args);
  }

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