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

export interface DbInstanceAutomatedBackupsReplicationArgs
  extends core.ResourceArgs {
  /**
   * (Optional, Forces new resource) The AWS KMS key identifier for encryption of the replicated automate
   * d backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destin
   * ation AWS Region, for example, `arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE`.
   */
  kmsKeyId?: string | core.StringOut;

  /**
   * (Optional, Forces new resource) A URL that contains a [Signature Version 4](https://docs.aws.amazon.
   * com/general/latest/gr/signature-version-4.html) signed request for the [`StartDBInstanceAutomatedBac
   * kupsReplication`](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StartDBInstanceAutom
   * atedBackupsReplication.html) action to be called in the AWS Region of the source DB instance.
   */
  preSignedUrl?: string | core.StringOut;

  /**
   * (Optional, Forces new resource) The retention period for the replicated automated backups, defaults
   * to `7`.
   */
  retentionPeriod?: number | core.NumberOut;

  /**
   * (Required, Forces new resource) The Amazon Resource Name (ARN) of the source DB instance for the rep
   * licated automated backups, for example, `arn:aws:rds:us-west-2:123456789012:db:mydatabase`.
   */
  sourceDbInstanceArn: string | core.StringOut;
}

export class DbInstanceAutomatedBackupsReplication extends core.Resource<DbInstanceAutomatedBackupsReplicationArgs> {
  /**
   * The Amazon Resource Name (ARN) of the replicated automated backups.
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Optional, Forces new resource) The AWS KMS key identifier for encryption of the replicated automate
   * d backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destin
   * ation AWS Region, for example, `arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE`.
   */
  @core.attr(String, { computed: true })
  public kmsKeyId?: string | core.StringOut;

  /**
   * (Optional, Forces new resource) A URL that contains a [Signature Version 4](https://docs.aws.amazon.
   * com/general/latest/gr/signature-version-4.html) signed request for the [`StartDBInstanceAutomatedBac
   * kupsReplication`](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StartDBInstanceAutom
   * atedBackupsReplication.html) action to be called in the AWS Region of the source DB instance.
   */
  @core.attr(String)
  public preSignedUrl?: string | core.StringOut;

  /**
   * (Optional, Forces new resource) The retention period for the replicated automated backups, defaults
   * to `7`.
   */
  @core.attr(Number)
  public retentionPeriod?: number | core.NumberOut;

  /**
   * (Required, Forces new resource) The Amazon Resource Name (ARN) of the source DB instance for the rep
   * licated automated backups, for example, `arn:aws:rds:us-west-2:123456789012:db:mydatabase`.
   */
  @core.attr(String)
  public sourceDbInstanceArn!: string | core.StringOut;

  constructor(name: string, args?: DbInstanceAutomatedBackupsReplicationArgs) {
    super(name, "aws_db_instance_automated_backups_replication", args);
  }

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