/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace RDS { namespace Model { /** *

See Also:

AWS * API Reference

*/ class AWS_RDS_API PromoteReadReplicaRequest : public RDSRequest { public: PromoteReadReplicaRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PromoteReadReplica"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The DB instance identifier. This value is stored as a lowercase string.

*

Constraints:

  • Must match the identifier of an existing read * replica DB instance.

Example: mydbinstance

*/ inline const Aws::String& GetDBInstanceIdentifier() const{ return m_dBInstanceIdentifier; } /** *

The DB instance identifier. This value is stored as a lowercase string.

*

Constraints:

  • Must match the identifier of an existing read * replica DB instance.

Example: mydbinstance

*/ inline bool DBInstanceIdentifierHasBeenSet() const { return m_dBInstanceIdentifierHasBeenSet; } /** *

The DB instance identifier. This value is stored as a lowercase string.

*

Constraints:

  • Must match the identifier of an existing read * replica DB instance.

Example: mydbinstance

*/ inline void SetDBInstanceIdentifier(const Aws::String& value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier = value; } /** *

The DB instance identifier. This value is stored as a lowercase string.

*

Constraints:

  • Must match the identifier of an existing read * replica DB instance.

Example: mydbinstance

*/ inline void SetDBInstanceIdentifier(Aws::String&& value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier = std::move(value); } /** *

The DB instance identifier. This value is stored as a lowercase string.

*

Constraints:

  • Must match the identifier of an existing read * replica DB instance.

Example: mydbinstance

*/ inline void SetDBInstanceIdentifier(const char* value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier.assign(value); } /** *

The DB instance identifier. This value is stored as a lowercase string.

*

Constraints:

  • Must match the identifier of an existing read * replica DB instance.

Example: mydbinstance

*/ inline PromoteReadReplicaRequest& WithDBInstanceIdentifier(const Aws::String& value) { SetDBInstanceIdentifier(value); return *this;} /** *

The DB instance identifier. This value is stored as a lowercase string.

*

Constraints:

  • Must match the identifier of an existing read * replica DB instance.

Example: mydbinstance

*/ inline PromoteReadReplicaRequest& WithDBInstanceIdentifier(Aws::String&& value) { SetDBInstanceIdentifier(std::move(value)); return *this;} /** *

The DB instance identifier. This value is stored as a lowercase string.

*

Constraints:

  • Must match the identifier of an existing read * replica DB instance.

Example: mydbinstance

*/ inline PromoteReadReplicaRequest& WithDBInstanceIdentifier(const char* value) { SetDBInstanceIdentifier(value); return *this;} /** *

The number of days for which automated backups are retained. Setting this * parameter to a positive number enables backups. Setting this parameter to 0 * disables automated backups.

Default: 1

Constraints:

  • *

    Must be a value from 0 to 35.

  • Can't be set to 0 if the DB * instance is a source to read replicas.

*/ inline int GetBackupRetentionPeriod() const{ return m_backupRetentionPeriod; } /** *

The number of days for which automated backups are retained. Setting this * parameter to a positive number enables backups. Setting this parameter to 0 * disables automated backups.

Default: 1

Constraints:

  • *

    Must be a value from 0 to 35.

  • Can't be set to 0 if the DB * instance is a source to read replicas.

*/ inline bool BackupRetentionPeriodHasBeenSet() const { return m_backupRetentionPeriodHasBeenSet; } /** *

The number of days for which automated backups are retained. Setting this * parameter to a positive number enables backups. Setting this parameter to 0 * disables automated backups.

Default: 1

Constraints:

  • *

    Must be a value from 0 to 35.

  • Can't be set to 0 if the DB * instance is a source to read replicas.

*/ inline void SetBackupRetentionPeriod(int value) { m_backupRetentionPeriodHasBeenSet = true; m_backupRetentionPeriod = value; } /** *

The number of days for which automated backups are retained. Setting this * parameter to a positive number enables backups. Setting this parameter to 0 * disables automated backups.

Default: 1

Constraints:

  • *

    Must be a value from 0 to 35.

  • Can't be set to 0 if the DB * instance is a source to read replicas.

*/ inline PromoteReadReplicaRequest& WithBackupRetentionPeriod(int value) { SetBackupRetentionPeriod(value); return *this;} /** *

The daily time range during which automated backups are created if automated * backups are enabled, using the BackupRetentionPeriod parameter. *

The default is a 30-minute window selected at random from an 8-hour * block of time for each Amazon Web Services Region. To see the time blocks * available, see * Adjusting the Preferred Maintenance Window in the Amazon RDS User * Guide.

Constraints:

  • Must be in the format * hh24:mi-hh24:mi.

  • Must be in Universal Coordinated * Time (UTC).

  • Must not conflict with the preferred maintenance * window.

  • Must be at least 30 minutes.

*/ inline const Aws::String& GetPreferredBackupWindow() const{ return m_preferredBackupWindow; } /** *

The daily time range during which automated backups are created if automated * backups are enabled, using the BackupRetentionPeriod parameter. *

The default is a 30-minute window selected at random from an 8-hour * block of time for each Amazon Web Services Region. To see the time blocks * available, see * Adjusting the Preferred Maintenance Window in the Amazon RDS User * Guide.

Constraints:

  • Must be in the format * hh24:mi-hh24:mi.

  • Must be in Universal Coordinated * Time (UTC).

  • Must not conflict with the preferred maintenance * window.

  • Must be at least 30 minutes.

*/ inline bool PreferredBackupWindowHasBeenSet() const { return m_preferredBackupWindowHasBeenSet; } /** *

The daily time range during which automated backups are created if automated * backups are enabled, using the BackupRetentionPeriod parameter. *

The default is a 30-minute window selected at random from an 8-hour * block of time for each Amazon Web Services Region. To see the time blocks * available, see * Adjusting the Preferred Maintenance Window in the Amazon RDS User * Guide.

Constraints:

  • Must be in the format * hh24:mi-hh24:mi.

  • Must be in Universal Coordinated * Time (UTC).

  • Must not conflict with the preferred maintenance * window.

  • Must be at least 30 minutes.

*/ inline void SetPreferredBackupWindow(const Aws::String& value) { m_preferredBackupWindowHasBeenSet = true; m_preferredBackupWindow = value; } /** *

The daily time range during which automated backups are created if automated * backups are enabled, using the BackupRetentionPeriod parameter. *

The default is a 30-minute window selected at random from an 8-hour * block of time for each Amazon Web Services Region. To see the time blocks * available, see * Adjusting the Preferred Maintenance Window in the Amazon RDS User * Guide.

Constraints:

  • Must be in the format * hh24:mi-hh24:mi.

  • Must be in Universal Coordinated * Time (UTC).

  • Must not conflict with the preferred maintenance * window.

  • Must be at least 30 minutes.

*/ inline void SetPreferredBackupWindow(Aws::String&& value) { m_preferredBackupWindowHasBeenSet = true; m_preferredBackupWindow = std::move(value); } /** *

The daily time range during which automated backups are created if automated * backups are enabled, using the BackupRetentionPeriod parameter. *

The default is a 30-minute window selected at random from an 8-hour * block of time for each Amazon Web Services Region. To see the time blocks * available, see * Adjusting the Preferred Maintenance Window in the Amazon RDS User * Guide.

Constraints:

  • Must be in the format * hh24:mi-hh24:mi.

  • Must be in Universal Coordinated * Time (UTC).

  • Must not conflict with the preferred maintenance * window.

  • Must be at least 30 minutes.

*/ inline void SetPreferredBackupWindow(const char* value) { m_preferredBackupWindowHasBeenSet = true; m_preferredBackupWindow.assign(value); } /** *

The daily time range during which automated backups are created if automated * backups are enabled, using the BackupRetentionPeriod parameter. *

The default is a 30-minute window selected at random from an 8-hour * block of time for each Amazon Web Services Region. To see the time blocks * available, see * Adjusting the Preferred Maintenance Window in the Amazon RDS User * Guide.

Constraints:

  • Must be in the format * hh24:mi-hh24:mi.

  • Must be in Universal Coordinated * Time (UTC).

  • Must not conflict with the preferred maintenance * window.

  • Must be at least 30 minutes.

*/ inline PromoteReadReplicaRequest& WithPreferredBackupWindow(const Aws::String& value) { SetPreferredBackupWindow(value); return *this;} /** *

The daily time range during which automated backups are created if automated * backups are enabled, using the BackupRetentionPeriod parameter. *

The default is a 30-minute window selected at random from an 8-hour * block of time for each Amazon Web Services Region. To see the time blocks * available, see * Adjusting the Preferred Maintenance Window in the Amazon RDS User * Guide.

Constraints:

  • Must be in the format * hh24:mi-hh24:mi.

  • Must be in Universal Coordinated * Time (UTC).

  • Must not conflict with the preferred maintenance * window.

  • Must be at least 30 minutes.

*/ inline PromoteReadReplicaRequest& WithPreferredBackupWindow(Aws::String&& value) { SetPreferredBackupWindow(std::move(value)); return *this;} /** *

The daily time range during which automated backups are created if automated * backups are enabled, using the BackupRetentionPeriod parameter. *

The default is a 30-minute window selected at random from an 8-hour * block of time for each Amazon Web Services Region. To see the time blocks * available, see * Adjusting the Preferred Maintenance Window in the Amazon RDS User * Guide.

Constraints:

  • Must be in the format * hh24:mi-hh24:mi.

  • Must be in Universal Coordinated * Time (UTC).

  • Must not conflict with the preferred maintenance * window.

  • Must be at least 30 minutes.

*/ inline PromoteReadReplicaRequest& WithPreferredBackupWindow(const char* value) { SetPreferredBackupWindow(value); return *this;} private: Aws::String m_dBInstanceIdentifier; bool m_dBInstanceIdentifierHasBeenSet; int m_backupRetentionPeriod; bool m_backupRetentionPeriodHasBeenSet; Aws::String m_preferredBackupWindow; bool m_preferredBackupWindowHasBeenSet; }; } // namespace Model } // namespace RDS } // namespace Aws