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

export interface DsSessionContextArgs {
  /**
   * (Required) ARN for an assumed role.
   */
  arn: string | core.StringOut;
}

export class DsSessionContext extends core.Data<DsSessionContextArgs> {
  /**
   * (Required) ARN for an assumed role.
   */
  @core.attr(String)
  public arn!: string | core.StringOut;

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

  /**
   * IAM source role ARN if `arn` corresponds to an STS assumed role. Otherwise, `issuer_arn` is equal to
   * arn`.
   */
  @core.attr(String, { computed: true })
  public issuerArn!: string | core.StringOut;

  /**
   * Unique identifier of the IAM role that issues the STS assumed role.
   */
  @core.attr(String, { computed: true })
  public issuerId!: string | core.StringOut;

  /**
   * Name of the source role. Only available if `arn` corresponds to an STS assumed role.
   */
  @core.attr(String, { computed: true })
  public issuerName!: string | core.StringOut;

  /**
   * Name of the STS session. Only available if `arn` corresponds to an STS assumed role.
   */
  @core.attr(String, { computed: true })
  public sessionName!: string | core.StringOut;

  constructor(name: string, args?: DsSessionContextArgs) {
    super(name, "aws_iam_session_context", args);
  }

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