1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/rds/RDS_EXPORTS.h> 8 #include <aws/rds/RDSRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace RDS 15 { 16 namespace Model 17 { 18 19 /** 20 * <p/><p><h3>See Also:</h3> <a 21 * href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplicaMessage">AWS 22 * API Reference</a></p> 23 */ 24 class AWS_RDS_API PromoteReadReplicaRequest : public RDSRequest 25 { 26 public: 27 PromoteReadReplicaRequest(); 28 29 // Service request name is the Operation name which will send this request out, 30 // each operation should has unique request name, so that we can get operation's name from this request. 31 // Note: this is not true for response, multiple operations may have the same response name, 32 // so we can not get operation's name from response. GetServiceRequestName()33 inline virtual const char* GetServiceRequestName() const override { return "PromoteReadReplica"; } 34 35 Aws::String SerializePayload() const override; 36 37 protected: 38 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 39 40 public: 41 42 /** 43 * <p>The DB instance identifier. This value is stored as a lowercase string.</p> 44 * <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing read 45 * replica DB instance.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p> 46 */ GetDBInstanceIdentifier()47 inline const Aws::String& GetDBInstanceIdentifier() const{ return m_dBInstanceIdentifier; } 48 49 /** 50 * <p>The DB instance identifier. This value is stored as a lowercase string.</p> 51 * <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing read 52 * replica DB instance.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p> 53 */ DBInstanceIdentifierHasBeenSet()54 inline bool DBInstanceIdentifierHasBeenSet() const { return m_dBInstanceIdentifierHasBeenSet; } 55 56 /** 57 * <p>The DB instance identifier. This value is stored as a lowercase string.</p> 58 * <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing read 59 * replica DB instance.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p> 60 */ SetDBInstanceIdentifier(const Aws::String & value)61 inline void SetDBInstanceIdentifier(const Aws::String& value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier = value; } 62 63 /** 64 * <p>The DB instance identifier. This value is stored as a lowercase string.</p> 65 * <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing read 66 * replica DB instance.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p> 67 */ SetDBInstanceIdentifier(Aws::String && value)68 inline void SetDBInstanceIdentifier(Aws::String&& value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier = std::move(value); } 69 70 /** 71 * <p>The DB instance identifier. This value is stored as a lowercase string.</p> 72 * <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing read 73 * replica DB instance.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p> 74 */ SetDBInstanceIdentifier(const char * value)75 inline void SetDBInstanceIdentifier(const char* value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier.assign(value); } 76 77 /** 78 * <p>The DB instance identifier. This value is stored as a lowercase string.</p> 79 * <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing read 80 * replica DB instance.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p> 81 */ WithDBInstanceIdentifier(const Aws::String & value)82 inline PromoteReadReplicaRequest& WithDBInstanceIdentifier(const Aws::String& value) { SetDBInstanceIdentifier(value); return *this;} 83 84 /** 85 * <p>The DB instance identifier. This value is stored as a lowercase string.</p> 86 * <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing read 87 * replica DB instance.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p> 88 */ WithDBInstanceIdentifier(Aws::String && value)89 inline PromoteReadReplicaRequest& WithDBInstanceIdentifier(Aws::String&& value) { SetDBInstanceIdentifier(std::move(value)); return *this;} 90 91 /** 92 * <p>The DB instance identifier. This value is stored as a lowercase string.</p> 93 * <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing read 94 * replica DB instance.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p> 95 */ WithDBInstanceIdentifier(const char * value)96 inline PromoteReadReplicaRequest& WithDBInstanceIdentifier(const char* value) { SetDBInstanceIdentifier(value); return *this;} 97 98 99 /** 100 * <p>The number of days for which automated backups are retained. Setting this 101 * parameter to a positive number enables backups. Setting this parameter to 0 102 * disables automated backups.</p> <p>Default: 1</p> <p>Constraints:</p> <ul> <li> 103 * <p>Must be a value from 0 to 35.</p> </li> <li> <p>Can't be set to 0 if the DB 104 * instance is a source to read replicas.</p> </li> </ul> 105 */ GetBackupRetentionPeriod()106 inline int GetBackupRetentionPeriod() const{ return m_backupRetentionPeriod; } 107 108 /** 109 * <p>The number of days for which automated backups are retained. Setting this 110 * parameter to a positive number enables backups. Setting this parameter to 0 111 * disables automated backups.</p> <p>Default: 1</p> <p>Constraints:</p> <ul> <li> 112 * <p>Must be a value from 0 to 35.</p> </li> <li> <p>Can't be set to 0 if the DB 113 * instance is a source to read replicas.</p> </li> </ul> 114 */ BackupRetentionPeriodHasBeenSet()115 inline bool BackupRetentionPeriodHasBeenSet() const { return m_backupRetentionPeriodHasBeenSet; } 116 117 /** 118 * <p>The number of days for which automated backups are retained. Setting this 119 * parameter to a positive number enables backups. Setting this parameter to 0 120 * disables automated backups.</p> <p>Default: 1</p> <p>Constraints:</p> <ul> <li> 121 * <p>Must be a value from 0 to 35.</p> </li> <li> <p>Can't be set to 0 if the DB 122 * instance is a source to read replicas.</p> </li> </ul> 123 */ SetBackupRetentionPeriod(int value)124 inline void SetBackupRetentionPeriod(int value) { m_backupRetentionPeriodHasBeenSet = true; m_backupRetentionPeriod = value; } 125 126 /** 127 * <p>The number of days for which automated backups are retained. Setting this 128 * parameter to a positive number enables backups. Setting this parameter to 0 129 * disables automated backups.</p> <p>Default: 1</p> <p>Constraints:</p> <ul> <li> 130 * <p>Must be a value from 0 to 35.</p> </li> <li> <p>Can't be set to 0 if the DB 131 * instance is a source to read replicas.</p> </li> </ul> 132 */ WithBackupRetentionPeriod(int value)133 inline PromoteReadReplicaRequest& WithBackupRetentionPeriod(int value) { SetBackupRetentionPeriod(value); return *this;} 134 135 136 /** 137 * <p> The daily time range during which automated backups are created if automated 138 * backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. 139 * </p> <p> The default is a 30-minute window selected at random from an 8-hour 140 * block of time for each Amazon Web Services Region. To see the time blocks 141 * available, see <a 142 * href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html"> 143 * Adjusting the Preferred Maintenance Window</a> in the <i>Amazon RDS User 144 * Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format 145 * <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated 146 * Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance 147 * window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul> 148 */ GetPreferredBackupWindow()149 inline const Aws::String& GetPreferredBackupWindow() const{ return m_preferredBackupWindow; } 150 151 /** 152 * <p> The daily time range during which automated backups are created if automated 153 * backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. 154 * </p> <p> The default is a 30-minute window selected at random from an 8-hour 155 * block of time for each Amazon Web Services Region. To see the time blocks 156 * available, see <a 157 * href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html"> 158 * Adjusting the Preferred Maintenance Window</a> in the <i>Amazon RDS User 159 * Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format 160 * <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated 161 * Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance 162 * window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul> 163 */ PreferredBackupWindowHasBeenSet()164 inline bool PreferredBackupWindowHasBeenSet() const { return m_preferredBackupWindowHasBeenSet; } 165 166 /** 167 * <p> The daily time range during which automated backups are created if automated 168 * backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. 169 * </p> <p> The default is a 30-minute window selected at random from an 8-hour 170 * block of time for each Amazon Web Services Region. To see the time blocks 171 * available, see <a 172 * href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html"> 173 * Adjusting the Preferred Maintenance Window</a> in the <i>Amazon RDS User 174 * Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format 175 * <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated 176 * Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance 177 * window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul> 178 */ SetPreferredBackupWindow(const Aws::String & value)179 inline void SetPreferredBackupWindow(const Aws::String& value) { m_preferredBackupWindowHasBeenSet = true; m_preferredBackupWindow = value; } 180 181 /** 182 * <p> The daily time range during which automated backups are created if automated 183 * backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. 184 * </p> <p> The default is a 30-minute window selected at random from an 8-hour 185 * block of time for each Amazon Web Services Region. To see the time blocks 186 * available, see <a 187 * href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html"> 188 * Adjusting the Preferred Maintenance Window</a> in the <i>Amazon RDS User 189 * Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format 190 * <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated 191 * Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance 192 * window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul> 193 */ SetPreferredBackupWindow(Aws::String && value)194 inline void SetPreferredBackupWindow(Aws::String&& value) { m_preferredBackupWindowHasBeenSet = true; m_preferredBackupWindow = std::move(value); } 195 196 /** 197 * <p> The daily time range during which automated backups are created if automated 198 * backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. 199 * </p> <p> The default is a 30-minute window selected at random from an 8-hour 200 * block of time for each Amazon Web Services Region. To see the time blocks 201 * available, see <a 202 * href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html"> 203 * Adjusting the Preferred Maintenance Window</a> in the <i>Amazon RDS User 204 * Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format 205 * <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated 206 * Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance 207 * window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul> 208 */ SetPreferredBackupWindow(const char * value)209 inline void SetPreferredBackupWindow(const char* value) { m_preferredBackupWindowHasBeenSet = true; m_preferredBackupWindow.assign(value); } 210 211 /** 212 * <p> The daily time range during which automated backups are created if automated 213 * backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. 214 * </p> <p> The default is a 30-minute window selected at random from an 8-hour 215 * block of time for each Amazon Web Services Region. To see the time blocks 216 * available, see <a 217 * href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html"> 218 * Adjusting the Preferred Maintenance Window</a> in the <i>Amazon RDS User 219 * Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format 220 * <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated 221 * Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance 222 * window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul> 223 */ WithPreferredBackupWindow(const Aws::String & value)224 inline PromoteReadReplicaRequest& WithPreferredBackupWindow(const Aws::String& value) { SetPreferredBackupWindow(value); return *this;} 225 226 /** 227 * <p> The daily time range during which automated backups are created if automated 228 * backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. 229 * </p> <p> The default is a 30-minute window selected at random from an 8-hour 230 * block of time for each Amazon Web Services Region. To see the time blocks 231 * available, see <a 232 * href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html"> 233 * Adjusting the Preferred Maintenance Window</a> in the <i>Amazon RDS User 234 * Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format 235 * <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated 236 * Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance 237 * window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul> 238 */ WithPreferredBackupWindow(Aws::String && value)239 inline PromoteReadReplicaRequest& WithPreferredBackupWindow(Aws::String&& value) { SetPreferredBackupWindow(std::move(value)); return *this;} 240 241 /** 242 * <p> The daily time range during which automated backups are created if automated 243 * backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. 244 * </p> <p> The default is a 30-minute window selected at random from an 8-hour 245 * block of time for each Amazon Web Services Region. To see the time blocks 246 * available, see <a 247 * href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AdjustingTheMaintenanceWindow.html"> 248 * Adjusting the Preferred Maintenance Window</a> in the <i>Amazon RDS User 249 * Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format 250 * <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated 251 * Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance 252 * window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul> 253 */ WithPreferredBackupWindow(const char * value)254 inline PromoteReadReplicaRequest& WithPreferredBackupWindow(const char* value) { SetPreferredBackupWindow(value); return *this;} 255 256 private: 257 258 Aws::String m_dBInstanceIdentifier; 259 bool m_dBInstanceIdentifierHasBeenSet; 260 261 int m_backupRetentionPeriod; 262 bool m_backupRetentionPeriodHasBeenSet; 263 264 Aws::String m_preferredBackupWindow; 265 bool m_preferredBackupWindowHasBeenSet; 266 }; 267 268 } // namespace Model 269 } // namespace RDS 270 } // namespace Aws 271