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

export interface PrincipalAssociationArgs extends core.ResourceArgs {
  /**
   * (Required) The principal to associate with the resource share. Possible values are an AWS account ID
   * , an AWS Organizations Organization ARN, or an AWS Organizations Organization Unit ARN.
   */
  principal: string | core.StringOut;

  /**
   * (Required) The Amazon Resource Name (ARN) of the resource share.
   */
  resourceShareArn: string | core.StringOut;
}

export class PrincipalAssociation extends core.Resource<PrincipalAssociationArgs> {
  /**
   * The Amazon Resource Name (ARN) of the Resource Share and the principal, separated by a comma.
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Required) The principal to associate with the resource share. Possible values are an AWS account ID
   * , an AWS Organizations Organization ARN, or an AWS Organizations Organization Unit ARN.
   */
  @core.attr(String)
  public principal!: string | core.StringOut;

  /**
   * (Required) The Amazon Resource Name (ARN) of the resource share.
   */
  @core.attr(String)
  public resourceShareArn!: string | core.StringOut;

  constructor(name: string, args?: PrincipalAssociationArgs) {
    super(name, "aws_ram_principal_association", args);
  }

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