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

export interface DbProxyTargetArgs extends core.ResourceArgs {
  dbClusterIdentifier?: string | core.StringOut;

  dbInstanceIdentifier?: string | core.StringOut;

  dbProxyName: string | core.StringOut;

  targetGroupName: string | core.StringOut;
}

export class DbProxyTarget extends core.Resource<DbProxyTargetArgs> {
  @core.attr(String)
  public dbClusterIdentifier?: string | core.StringOut;

  @core.attr(String)
  public dbInstanceIdentifier?: string | core.StringOut;

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

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

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

  @core.attr(Number, { computed: true })
  public port!: number | core.NumberOut;

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

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

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

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

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

  constructor(name: string, args?: DbProxyTargetArgs) {
    super(name, "aws_db_proxy_target", args);
  }

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