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/backup/Backup_EXPORTS.h> 8 #include <aws/backup/BackupRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Backup 15 { 16 namespace Model 17 { 18 19 /** 20 */ 21 class AWS_BACKUP_API PutBackupVaultLockConfigurationRequest : public BackupRequest 22 { 23 public: 24 PutBackupVaultLockConfigurationRequest(); 25 26 // Service request name is the Operation name which will send this request out, 27 // each operation should has unique request name, so that we can get operation's name from this request. 28 // Note: this is not true for response, multiple operations may have the same response name, 29 // so we can not get operation's name from response. GetServiceRequestName()30 inline virtual const char* GetServiceRequestName() const override { return "PutBackupVaultLockConfiguration"; } 31 32 Aws::String SerializePayload() const override; 33 34 35 /** 36 * <p>The Backup Vault Lock configuration that specifies the name of the backup 37 * vault it protects.</p> 38 */ GetBackupVaultName()39 inline const Aws::String& GetBackupVaultName() const{ return m_backupVaultName; } 40 41 /** 42 * <p>The Backup Vault Lock configuration that specifies the name of the backup 43 * vault it protects.</p> 44 */ BackupVaultNameHasBeenSet()45 inline bool BackupVaultNameHasBeenSet() const { return m_backupVaultNameHasBeenSet; } 46 47 /** 48 * <p>The Backup Vault Lock configuration that specifies the name of the backup 49 * vault it protects.</p> 50 */ SetBackupVaultName(const Aws::String & value)51 inline void SetBackupVaultName(const Aws::String& value) { m_backupVaultNameHasBeenSet = true; m_backupVaultName = value; } 52 53 /** 54 * <p>The Backup Vault Lock configuration that specifies the name of the backup 55 * vault it protects.</p> 56 */ SetBackupVaultName(Aws::String && value)57 inline void SetBackupVaultName(Aws::String&& value) { m_backupVaultNameHasBeenSet = true; m_backupVaultName = std::move(value); } 58 59 /** 60 * <p>The Backup Vault Lock configuration that specifies the name of the backup 61 * vault it protects.</p> 62 */ SetBackupVaultName(const char * value)63 inline void SetBackupVaultName(const char* value) { m_backupVaultNameHasBeenSet = true; m_backupVaultName.assign(value); } 64 65 /** 66 * <p>The Backup Vault Lock configuration that specifies the name of the backup 67 * vault it protects.</p> 68 */ WithBackupVaultName(const Aws::String & value)69 inline PutBackupVaultLockConfigurationRequest& WithBackupVaultName(const Aws::String& value) { SetBackupVaultName(value); return *this;} 70 71 /** 72 * <p>The Backup Vault Lock configuration that specifies the name of the backup 73 * vault it protects.</p> 74 */ WithBackupVaultName(Aws::String && value)75 inline PutBackupVaultLockConfigurationRequest& WithBackupVaultName(Aws::String&& value) { SetBackupVaultName(std::move(value)); return *this;} 76 77 /** 78 * <p>The Backup Vault Lock configuration that specifies the name of the backup 79 * vault it protects.</p> 80 */ WithBackupVaultName(const char * value)81 inline PutBackupVaultLockConfigurationRequest& WithBackupVaultName(const char* value) { SetBackupVaultName(value); return *this;} 82 83 84 /** 85 * <p>The Backup Vault Lock configuration that specifies the minimum retention 86 * period that the vault retains its recovery points. This setting can be useful 87 * if, for example, your organization's policies require you to retain certain data 88 * for at least seven years (2555 days).</p> <p>If this parameter is not specified, 89 * Vault Lock will not enforce a minimum retention period.</p> <p>If this parameter 90 * is specified, any backup or copy job to the vault must have a lifecycle policy 91 * with a retention period equal to or longer than the minimum retention period. If 92 * the job's retention period is shorter than that minimum retention period, then 93 * the vault fails that backup or copy job, and you should either modify your 94 * lifecycle settings or use a different vault. Recovery points already saved in 95 * the vault prior to Vault Lock are not affected.</p> 96 */ GetMinRetentionDays()97 inline long long GetMinRetentionDays() const{ return m_minRetentionDays; } 98 99 /** 100 * <p>The Backup Vault Lock configuration that specifies the minimum retention 101 * period that the vault retains its recovery points. This setting can be useful 102 * if, for example, your organization's policies require you to retain certain data 103 * for at least seven years (2555 days).</p> <p>If this parameter is not specified, 104 * Vault Lock will not enforce a minimum retention period.</p> <p>If this parameter 105 * is specified, any backup or copy job to the vault must have a lifecycle policy 106 * with a retention period equal to or longer than the minimum retention period. If 107 * the job's retention period is shorter than that minimum retention period, then 108 * the vault fails that backup or copy job, and you should either modify your 109 * lifecycle settings or use a different vault. Recovery points already saved in 110 * the vault prior to Vault Lock are not affected.</p> 111 */ MinRetentionDaysHasBeenSet()112 inline bool MinRetentionDaysHasBeenSet() const { return m_minRetentionDaysHasBeenSet; } 113 114 /** 115 * <p>The Backup Vault Lock configuration that specifies the minimum retention 116 * period that the vault retains its recovery points. This setting can be useful 117 * if, for example, your organization's policies require you to retain certain data 118 * for at least seven years (2555 days).</p> <p>If this parameter is not specified, 119 * Vault Lock will not enforce a minimum retention period.</p> <p>If this parameter 120 * is specified, any backup or copy job to the vault must have a lifecycle policy 121 * with a retention period equal to or longer than the minimum retention period. If 122 * the job's retention period is shorter than that minimum retention period, then 123 * the vault fails that backup or copy job, and you should either modify your 124 * lifecycle settings or use a different vault. Recovery points already saved in 125 * the vault prior to Vault Lock are not affected.</p> 126 */ SetMinRetentionDays(long long value)127 inline void SetMinRetentionDays(long long value) { m_minRetentionDaysHasBeenSet = true; m_minRetentionDays = value; } 128 129 /** 130 * <p>The Backup Vault Lock configuration that specifies the minimum retention 131 * period that the vault retains its recovery points. This setting can be useful 132 * if, for example, your organization's policies require you to retain certain data 133 * for at least seven years (2555 days).</p> <p>If this parameter is not specified, 134 * Vault Lock will not enforce a minimum retention period.</p> <p>If this parameter 135 * is specified, any backup or copy job to the vault must have a lifecycle policy 136 * with a retention period equal to or longer than the minimum retention period. If 137 * the job's retention period is shorter than that minimum retention period, then 138 * the vault fails that backup or copy job, and you should either modify your 139 * lifecycle settings or use a different vault. Recovery points already saved in 140 * the vault prior to Vault Lock are not affected.</p> 141 */ WithMinRetentionDays(long long value)142 inline PutBackupVaultLockConfigurationRequest& WithMinRetentionDays(long long value) { SetMinRetentionDays(value); return *this;} 143 144 145 /** 146 * <p>The Backup Vault Lock configuration that specifies the maximum retention 147 * period that the vault retains its recovery points. This setting can be useful 148 * if, for example, your organization's policies require you to destroy certain 149 * data after retaining it for four years (1460 days).</p> <p>If this parameter is 150 * not included, Vault Lock does not enforce a maximum retention period on the 151 * recovery points in the vault. If this parameter is included without a value, 152 * Vault Lock will not enforce a maximum retention period.</p> <p>If this parameter 153 * is specified, any backup or copy job to the vault must have a lifecycle policy 154 * with a retention period equal to or shorter than the maximum retention period. 155 * If the job's retention period is longer than that maximum retention period, then 156 * the vault fails the backup or copy job, and you should either modify your 157 * lifecycle settings or use a different vault. Recovery points already saved in 158 * the vault prior to Vault Lock are not affected.</p> 159 */ GetMaxRetentionDays()160 inline long long GetMaxRetentionDays() const{ return m_maxRetentionDays; } 161 162 /** 163 * <p>The Backup Vault Lock configuration that specifies the maximum retention 164 * period that the vault retains its recovery points. This setting can be useful 165 * if, for example, your organization's policies require you to destroy certain 166 * data after retaining it for four years (1460 days).</p> <p>If this parameter is 167 * not included, Vault Lock does not enforce a maximum retention period on the 168 * recovery points in the vault. If this parameter is included without a value, 169 * Vault Lock will not enforce a maximum retention period.</p> <p>If this parameter 170 * is specified, any backup or copy job to the vault must have a lifecycle policy 171 * with a retention period equal to or shorter than the maximum retention period. 172 * If the job's retention period is longer than that maximum retention period, then 173 * the vault fails the backup or copy job, and you should either modify your 174 * lifecycle settings or use a different vault. Recovery points already saved in 175 * the vault prior to Vault Lock are not affected.</p> 176 */ MaxRetentionDaysHasBeenSet()177 inline bool MaxRetentionDaysHasBeenSet() const { return m_maxRetentionDaysHasBeenSet; } 178 179 /** 180 * <p>The Backup Vault Lock configuration that specifies the maximum retention 181 * period that the vault retains its recovery points. This setting can be useful 182 * if, for example, your organization's policies require you to destroy certain 183 * data after retaining it for four years (1460 days).</p> <p>If this parameter is 184 * not included, Vault Lock does not enforce a maximum retention period on the 185 * recovery points in the vault. If this parameter is included without a value, 186 * Vault Lock will not enforce a maximum retention period.</p> <p>If this parameter 187 * is specified, any backup or copy job to the vault must have a lifecycle policy 188 * with a retention period equal to or shorter than the maximum retention period. 189 * If the job's retention period is longer than that maximum retention period, then 190 * the vault fails the backup or copy job, and you should either modify your 191 * lifecycle settings or use a different vault. Recovery points already saved in 192 * the vault prior to Vault Lock are not affected.</p> 193 */ SetMaxRetentionDays(long long value)194 inline void SetMaxRetentionDays(long long value) { m_maxRetentionDaysHasBeenSet = true; m_maxRetentionDays = value; } 195 196 /** 197 * <p>The Backup Vault Lock configuration that specifies the maximum retention 198 * period that the vault retains its recovery points. This setting can be useful 199 * if, for example, your organization's policies require you to destroy certain 200 * data after retaining it for four years (1460 days).</p> <p>If this parameter is 201 * not included, Vault Lock does not enforce a maximum retention period on the 202 * recovery points in the vault. If this parameter is included without a value, 203 * Vault Lock will not enforce a maximum retention period.</p> <p>If this parameter 204 * is specified, any backup or copy job to the vault must have a lifecycle policy 205 * with a retention period equal to or shorter than the maximum retention period. 206 * If the job's retention period is longer than that maximum retention period, then 207 * the vault fails the backup or copy job, and you should either modify your 208 * lifecycle settings or use a different vault. Recovery points already saved in 209 * the vault prior to Vault Lock are not affected.</p> 210 */ WithMaxRetentionDays(long long value)211 inline PutBackupVaultLockConfigurationRequest& WithMaxRetentionDays(long long value) { SetMaxRetentionDays(value); return *this;} 212 213 214 /** 215 * <p>The Backup Vault Lock configuration that specifies the number of days before 216 * the lock date. For example, setting <code>ChangeableForDays</code> to 30 on Jan. 217 * 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm UTC.</p> 218 * <p>Backup enforces a 72-hour cooling-off period before Vault Lock takes effect 219 * and becomes immutable. Therefore, you must set <code>ChangeableForDays</code> to 220 * 3 or greater.</p> <p>Before the lock date, you can delete Vault Lock from the 221 * vault using <code>DeleteBackupVaultLockConfiguration</code> or change the Vault 222 * Lock configuration using <code>PutBackupVaultLockConfiguration</code>. On and 223 * after the lock date, the Vault Lock becomes immutable and cannot be changed or 224 * deleted.</p> <p>If this parameter is not specified, you can delete Vault Lock 225 * from the vault using <code>DeleteBackupVaultLockConfiguration</code> or change 226 * the Vault Lock configuration using <code>PutBackupVaultLockConfiguration</code> 227 * at any time.</p> 228 */ GetChangeableForDays()229 inline long long GetChangeableForDays() const{ return m_changeableForDays; } 230 231 /** 232 * <p>The Backup Vault Lock configuration that specifies the number of days before 233 * the lock date. For example, setting <code>ChangeableForDays</code> to 30 on Jan. 234 * 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm UTC.</p> 235 * <p>Backup enforces a 72-hour cooling-off period before Vault Lock takes effect 236 * and becomes immutable. Therefore, you must set <code>ChangeableForDays</code> to 237 * 3 or greater.</p> <p>Before the lock date, you can delete Vault Lock from the 238 * vault using <code>DeleteBackupVaultLockConfiguration</code> or change the Vault 239 * Lock configuration using <code>PutBackupVaultLockConfiguration</code>. On and 240 * after the lock date, the Vault Lock becomes immutable and cannot be changed or 241 * deleted.</p> <p>If this parameter is not specified, you can delete Vault Lock 242 * from the vault using <code>DeleteBackupVaultLockConfiguration</code> or change 243 * the Vault Lock configuration using <code>PutBackupVaultLockConfiguration</code> 244 * at any time.</p> 245 */ ChangeableForDaysHasBeenSet()246 inline bool ChangeableForDaysHasBeenSet() const { return m_changeableForDaysHasBeenSet; } 247 248 /** 249 * <p>The Backup Vault Lock configuration that specifies the number of days before 250 * the lock date. For example, setting <code>ChangeableForDays</code> to 30 on Jan. 251 * 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm UTC.</p> 252 * <p>Backup enforces a 72-hour cooling-off period before Vault Lock takes effect 253 * and becomes immutable. Therefore, you must set <code>ChangeableForDays</code> to 254 * 3 or greater.</p> <p>Before the lock date, you can delete Vault Lock from the 255 * vault using <code>DeleteBackupVaultLockConfiguration</code> or change the Vault 256 * Lock configuration using <code>PutBackupVaultLockConfiguration</code>. On and 257 * after the lock date, the Vault Lock becomes immutable and cannot be changed or 258 * deleted.</p> <p>If this parameter is not specified, you can delete Vault Lock 259 * from the vault using <code>DeleteBackupVaultLockConfiguration</code> or change 260 * the Vault Lock configuration using <code>PutBackupVaultLockConfiguration</code> 261 * at any time.</p> 262 */ SetChangeableForDays(long long value)263 inline void SetChangeableForDays(long long value) { m_changeableForDaysHasBeenSet = true; m_changeableForDays = value; } 264 265 /** 266 * <p>The Backup Vault Lock configuration that specifies the number of days before 267 * the lock date. For example, setting <code>ChangeableForDays</code> to 30 on Jan. 268 * 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm UTC.</p> 269 * <p>Backup enforces a 72-hour cooling-off period before Vault Lock takes effect 270 * and becomes immutable. Therefore, you must set <code>ChangeableForDays</code> to 271 * 3 or greater.</p> <p>Before the lock date, you can delete Vault Lock from the 272 * vault using <code>DeleteBackupVaultLockConfiguration</code> or change the Vault 273 * Lock configuration using <code>PutBackupVaultLockConfiguration</code>. On and 274 * after the lock date, the Vault Lock becomes immutable and cannot be changed or 275 * deleted.</p> <p>If this parameter is not specified, you can delete Vault Lock 276 * from the vault using <code>DeleteBackupVaultLockConfiguration</code> or change 277 * the Vault Lock configuration using <code>PutBackupVaultLockConfiguration</code> 278 * at any time.</p> 279 */ WithChangeableForDays(long long value)280 inline PutBackupVaultLockConfigurationRequest& WithChangeableForDays(long long value) { SetChangeableForDays(value); return *this;} 281 282 private: 283 284 Aws::String m_backupVaultName; 285 bool m_backupVaultNameHasBeenSet; 286 287 long long m_minRetentionDays; 288 bool m_minRetentionDaysHasBeenSet; 289 290 long long m_maxRetentionDays; 291 bool m_maxRetentionDaysHasBeenSet; 292 293 long long m_changeableForDays; 294 bool m_changeableForDaysHasBeenSet; 295 }; 296 297 } // namespace Model 298 } // namespace Backup 299 } // namespace Aws 300