/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Backup { namespace Model { /** *

Specifies a scheduled task used to back up a selection of * resources.

See Also:

AWS * API Reference

*/ class AWS_BACKUP_API BackupRuleInput { public: BackupRuleInput(); BackupRuleInput(Aws::Utils::Json::JsonView jsonValue); BackupRuleInput& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

An optional display name for a backup rule.

*/ inline const Aws::String& GetRuleName() const{ return m_ruleName; } /** *

An optional display name for a backup rule.

*/ inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; } /** *

An optional display name for a backup rule.

*/ inline void SetRuleName(const Aws::String& value) { m_ruleNameHasBeenSet = true; m_ruleName = value; } /** *

An optional display name for a backup rule.

*/ inline void SetRuleName(Aws::String&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::move(value); } /** *

An optional display name for a backup rule.

*/ inline void SetRuleName(const char* value) { m_ruleNameHasBeenSet = true; m_ruleName.assign(value); } /** *

An optional display name for a backup rule.

*/ inline BackupRuleInput& WithRuleName(const Aws::String& value) { SetRuleName(value); return *this;} /** *

An optional display name for a backup rule.

*/ inline BackupRuleInput& WithRuleName(Aws::String&& value) { SetRuleName(std::move(value)); return *this;} /** *

An optional display name for a backup rule.

*/ inline BackupRuleInput& WithRuleName(const char* value) { SetRuleName(value); return *this;} /** *

The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.

*/ inline const Aws::String& GetTargetBackupVaultName() const{ return m_targetBackupVaultName; } /** *

The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.

*/ inline bool TargetBackupVaultNameHasBeenSet() const { return m_targetBackupVaultNameHasBeenSet; } /** *

The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.

*/ inline void SetTargetBackupVaultName(const Aws::String& value) { m_targetBackupVaultNameHasBeenSet = true; m_targetBackupVaultName = value; } /** *

The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.

*/ inline void SetTargetBackupVaultName(Aws::String&& value) { m_targetBackupVaultNameHasBeenSet = true; m_targetBackupVaultName = std::move(value); } /** *

The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.

*/ inline void SetTargetBackupVaultName(const char* value) { m_targetBackupVaultNameHasBeenSet = true; m_targetBackupVaultName.assign(value); } /** *

The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.

*/ inline BackupRuleInput& WithTargetBackupVaultName(const Aws::String& value) { SetTargetBackupVaultName(value); return *this;} /** *

The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.

*/ inline BackupRuleInput& WithTargetBackupVaultName(Aws::String&& value) { SetTargetBackupVaultName(std::move(value)); return *this;} /** *

The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.

*/ inline BackupRuleInput& WithTargetBackupVaultName(const char* value) { SetTargetBackupVaultName(value); return *this;} /** *

A CRON expression specifying when AWS Backup initiates a backup job.

*/ inline const Aws::String& GetScheduleExpression() const{ return m_scheduleExpression; } /** *

A CRON expression specifying when AWS Backup initiates a backup job.

*/ inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; } /** *

A CRON expression specifying when AWS Backup initiates a backup job.

*/ inline void SetScheduleExpression(const Aws::String& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = value; } /** *

A CRON expression specifying when AWS Backup initiates a backup job.

*/ inline void SetScheduleExpression(Aws::String&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = std::move(value); } /** *

A CRON expression specifying when AWS Backup initiates a backup job.

*/ inline void SetScheduleExpression(const char* value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression.assign(value); } /** *

A CRON expression specifying when AWS Backup initiates a backup job.

*/ inline BackupRuleInput& WithScheduleExpression(const Aws::String& value) { SetScheduleExpression(value); return *this;} /** *

A CRON expression specifying when AWS Backup initiates a backup job.

*/ inline BackupRuleInput& WithScheduleExpression(Aws::String&& value) { SetScheduleExpression(std::move(value)); return *this;} /** *

A CRON expression specifying when AWS Backup initiates a backup job.

*/ inline BackupRuleInput& WithScheduleExpression(const char* value) { SetScheduleExpression(value); return *this;} /** *

A value in minutes after a backup is scheduled before a job will be canceled * if it doesn't start successfully. This value is optional.

*/ inline long long GetStartWindowMinutes() const{ return m_startWindowMinutes; } /** *

A value in minutes after a backup is scheduled before a job will be canceled * if it doesn't start successfully. This value is optional.

*/ inline bool StartWindowMinutesHasBeenSet() const { return m_startWindowMinutesHasBeenSet; } /** *

A value in minutes after a backup is scheduled before a job will be canceled * if it doesn't start successfully. This value is optional.

*/ inline void SetStartWindowMinutes(long long value) { m_startWindowMinutesHasBeenSet = true; m_startWindowMinutes = value; } /** *

A value in minutes after a backup is scheduled before a job will be canceled * if it doesn't start successfully. This value is optional.

*/ inline BackupRuleInput& WithStartWindowMinutes(long long value) { SetStartWindowMinutes(value); return *this;} /** *

A value in minutes after a backup job is successfully started before it must * be completed or it will be canceled by AWS Backup. This value is optional.

*/ inline long long GetCompletionWindowMinutes() const{ return m_completionWindowMinutes; } /** *

A value in minutes after a backup job is successfully started before it must * be completed or it will be canceled by AWS Backup. This value is optional.

*/ inline bool CompletionWindowMinutesHasBeenSet() const { return m_completionWindowMinutesHasBeenSet; } /** *

A value in minutes after a backup job is successfully started before it must * be completed or it will be canceled by AWS Backup. This value is optional.

*/ inline void SetCompletionWindowMinutes(long long value) { m_completionWindowMinutesHasBeenSet = true; m_completionWindowMinutes = value; } /** *

A value in minutes after a backup job is successfully started before it must * be completed or it will be canceled by AWS Backup. This value is optional.

*/ inline BackupRuleInput& WithCompletionWindowMinutes(long long value) { SetCompletionWindowMinutes(value); return *this;} /** *

The lifecycle defines when a protected resource is transitioned to cold * storage and when it expires. AWS Backup will transition and expire backups * automatically according to the lifecycle that you define.

Backups * transitioned to cold storage must be stored in cold storage for a minimum of 90 * days. Therefore, the “expire after days” setting must be 90 days greater than * the “transition to cold after days” setting. The “transition to cold after days” * setting cannot be changed after a backup has been transitioned to cold.

*/ inline const Lifecycle& GetLifecycle() const{ return m_lifecycle; } /** *

The lifecycle defines when a protected resource is transitioned to cold * storage and when it expires. AWS Backup will transition and expire backups * automatically according to the lifecycle that you define.

Backups * transitioned to cold storage must be stored in cold storage for a minimum of 90 * days. Therefore, the “expire after days” setting must be 90 days greater than * the “transition to cold after days” setting. The “transition to cold after days” * setting cannot be changed after a backup has been transitioned to cold.

*/ inline bool LifecycleHasBeenSet() const { return m_lifecycleHasBeenSet; } /** *

The lifecycle defines when a protected resource is transitioned to cold * storage and when it expires. AWS Backup will transition and expire backups * automatically according to the lifecycle that you define.

Backups * transitioned to cold storage must be stored in cold storage for a minimum of 90 * days. Therefore, the “expire after days” setting must be 90 days greater than * the “transition to cold after days” setting. The “transition to cold after days” * setting cannot be changed after a backup has been transitioned to cold.

*/ inline void SetLifecycle(const Lifecycle& value) { m_lifecycleHasBeenSet = true; m_lifecycle = value; } /** *

The lifecycle defines when a protected resource is transitioned to cold * storage and when it expires. AWS Backup will transition and expire backups * automatically according to the lifecycle that you define.

Backups * transitioned to cold storage must be stored in cold storage for a minimum of 90 * days. Therefore, the “expire after days” setting must be 90 days greater than * the “transition to cold after days” setting. The “transition to cold after days” * setting cannot be changed after a backup has been transitioned to cold.

*/ inline void SetLifecycle(Lifecycle&& value) { m_lifecycleHasBeenSet = true; m_lifecycle = std::move(value); } /** *

The lifecycle defines when a protected resource is transitioned to cold * storage and when it expires. AWS Backup will transition and expire backups * automatically according to the lifecycle that you define.

Backups * transitioned to cold storage must be stored in cold storage for a minimum of 90 * days. Therefore, the “expire after days” setting must be 90 days greater than * the “transition to cold after days” setting. The “transition to cold after days” * setting cannot be changed after a backup has been transitioned to cold.

*/ inline BackupRuleInput& WithLifecycle(const Lifecycle& value) { SetLifecycle(value); return *this;} /** *

The lifecycle defines when a protected resource is transitioned to cold * storage and when it expires. AWS Backup will transition and expire backups * automatically according to the lifecycle that you define.

Backups * transitioned to cold storage must be stored in cold storage for a minimum of 90 * days. Therefore, the “expire after days” setting must be 90 days greater than * the “transition to cold after days” setting. The “transition to cold after days” * setting cannot be changed after a backup has been transitioned to cold.

*/ inline BackupRuleInput& WithLifecycle(Lifecycle&& value) { SetLifecycle(std::move(value)); return *this;} /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline const Aws::Map& GetRecoveryPointTags() const{ return m_recoveryPointTags; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline bool RecoveryPointTagsHasBeenSet() const { return m_recoveryPointTagsHasBeenSet; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline void SetRecoveryPointTags(const Aws::Map& value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags = value; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline void SetRecoveryPointTags(Aws::Map&& value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags = std::move(value); } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& WithRecoveryPointTags(const Aws::Map& value) { SetRecoveryPointTags(value); return *this;} /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& WithRecoveryPointTags(Aws::Map&& value) { SetRecoveryPointTags(std::move(value)); return *this;} /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& AddRecoveryPointTags(const Aws::String& key, const Aws::String& value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags.emplace(key, value); return *this; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& AddRecoveryPointTags(Aws::String&& key, const Aws::String& value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags.emplace(std::move(key), value); return *this; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& AddRecoveryPointTags(const Aws::String& key, Aws::String&& value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags.emplace(key, std::move(value)); return *this; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& AddRecoveryPointTags(Aws::String&& key, Aws::String&& value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags.emplace(std::move(key), std::move(value)); return *this; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& AddRecoveryPointTags(const char* key, Aws::String&& value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags.emplace(key, std::move(value)); return *this; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& AddRecoveryPointTags(Aws::String&& key, const char* value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags.emplace(std::move(key), value); return *this; } /** *

To help organize your resources, you can assign your own metadata to the * resources that you create. Each tag is a key-value pair.

*/ inline BackupRuleInput& AddRecoveryPointTags(const char* key, const char* value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags.emplace(key, value); return *this; } /** *

An array of CopyAction objects, which contains the details of * the copy operation.

*/ inline const Aws::Vector& GetCopyActions() const{ return m_copyActions; } /** *

An array of CopyAction objects, which contains the details of * the copy operation.

*/ inline bool CopyActionsHasBeenSet() const { return m_copyActionsHasBeenSet; } /** *

An array of CopyAction objects, which contains the details of * the copy operation.

*/ inline void SetCopyActions(const Aws::Vector& value) { m_copyActionsHasBeenSet = true; m_copyActions = value; } /** *

An array of CopyAction objects, which contains the details of * the copy operation.

*/ inline void SetCopyActions(Aws::Vector&& value) { m_copyActionsHasBeenSet = true; m_copyActions = std::move(value); } /** *

An array of CopyAction objects, which contains the details of * the copy operation.

*/ inline BackupRuleInput& WithCopyActions(const Aws::Vector& value) { SetCopyActions(value); return *this;} /** *

An array of CopyAction objects, which contains the details of * the copy operation.

*/ inline BackupRuleInput& WithCopyActions(Aws::Vector&& value) { SetCopyActions(std::move(value)); return *this;} /** *

An array of CopyAction objects, which contains the details of * the copy operation.

*/ inline BackupRuleInput& AddCopyActions(const CopyAction& value) { m_copyActionsHasBeenSet = true; m_copyActions.push_back(value); return *this; } /** *

An array of CopyAction objects, which contains the details of * the copy operation.

*/ inline BackupRuleInput& AddCopyActions(CopyAction&& value) { m_copyActionsHasBeenSet = true; m_copyActions.push_back(std::move(value)); return *this; } private: Aws::String m_ruleName; bool m_ruleNameHasBeenSet; Aws::String m_targetBackupVaultName; bool m_targetBackupVaultNameHasBeenSet; Aws::String m_scheduleExpression; bool m_scheduleExpressionHasBeenSet; long long m_startWindowMinutes; bool m_startWindowMinutesHasBeenSet; long long m_completionWindowMinutes; bool m_completionWindowMinutesHasBeenSet; Lifecycle m_lifecycle; bool m_lifecycleHasBeenSet; Aws::Map m_recoveryPointTags; bool m_recoveryPointTagsHasBeenSet; Aws::Vector m_copyActions; bool m_copyActionsHasBeenSet; }; } // namespace Model } // namespace Backup } // namespace Aws