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

export interface AliasArgs extends core.ResourceArgs {
  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  targetKeyId: string | core.StringOut;
}

export class Alias extends core.Resource<AliasArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

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

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

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

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

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

  constructor(name: string, args?: AliasArgs) {
    super(name, "aws_kms_alias", args);
  }

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