/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the backup-2018-11-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.Backup.Model { /// /// Specifies a scheduled task used to back up a selection of resources. /// public partial class BackupRule { private long? _completionWindowMinutes; private List _copyActions = new List(); private bool? _enableContinuousBackup; private Lifecycle _lifecycle; private Dictionary _recoveryPointTags = new Dictionary(); private string _ruleId; private string _ruleName; private string _scheduleExpression; private long? _startWindowMinutes; private string _targetBackupVaultName; /// /// Gets and sets the property CompletionWindowMinutes. /// /// A value in minutes after a backup job is successfully started before it must be completed /// or it will be canceled by Backup. This value is optional. /// /// public long CompletionWindowMinutes { get { return this._completionWindowMinutes.GetValueOrDefault(); } set { this._completionWindowMinutes = value; } } // Check to see if CompletionWindowMinutes property is set internal bool IsSetCompletionWindowMinutes() { return this._completionWindowMinutes.HasValue; } /// /// Gets and sets the property CopyActions. /// /// An array of CopyAction objects, which contains the details of the copy /// operation. /// /// public List CopyActions { get { return this._copyActions; } set { this._copyActions = value; } } // Check to see if CopyActions property is set internal bool IsSetCopyActions() { return this._copyActions != null && this._copyActions.Count > 0; } /// /// Gets and sets the property EnableContinuousBackup. /// /// Specifies whether Backup creates continuous backups. True causes Backup to create /// continuous backups capable of point-in-time restore (PITR). False (or not specified) /// causes Backup to create snapshot backups. /// /// public bool EnableContinuousBackup { get { return this._enableContinuousBackup.GetValueOrDefault(); } set { this._enableContinuousBackup = value; } } // Check to see if EnableContinuousBackup property is set internal bool IsSetEnableContinuousBackup() { return this._enableContinuousBackup.HasValue; } /// /// Gets and sets the property Lifecycle. /// /// The lifecycle defines when a protected resource is transitioned to cold storage and /// when it expires. Backup transitions and expires 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 “retention” 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. /// /// /// /// Resource types that are able to be transitioned to cold storage are listed in the /// "Lifecycle to cold storage" section of the /// Feature availability by resource table. Backup ignores this expression for other /// resource types. /// /// public Lifecycle Lifecycle { get { return this._lifecycle; } set { this._lifecycle = value; } } // Check to see if Lifecycle property is set internal bool IsSetLifecycle() { return this._lifecycle != null; } /// /// Gets and sets the property RecoveryPointTags. /// /// An array of key-value pair strings that are assigned to resources that are associated /// with this rule when restored from backup. /// /// [AWSProperty(Sensitive=true)] public Dictionary RecoveryPointTags { get { return this._recoveryPointTags; } set { this._recoveryPointTags = value; } } // Check to see if RecoveryPointTags property is set internal bool IsSetRecoveryPointTags() { return this._recoveryPointTags != null && this._recoveryPointTags.Count > 0; } /// /// Gets and sets the property RuleId. /// /// Uniquely identifies a rule that is used to schedule the backup of a selection of resources. /// /// public string RuleId { get { return this._ruleId; } set { this._ruleId = value; } } // Check to see if RuleId property is set internal bool IsSetRuleId() { return this._ruleId != null; } /// /// Gets and sets the property RuleName. /// /// A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' characters. /// /// [AWSProperty(Required=true)] public string RuleName { get { return this._ruleName; } set { this._ruleName = value; } } // Check to see if RuleName property is set internal bool IsSetRuleName() { return this._ruleName != null; } /// /// Gets and sets the property ScheduleExpression. /// /// A cron expression in UTC specifying when Backup initiates a backup job. For more information /// about Amazon Web Services cron expressions, see Schedule /// Expressions for Rules in the Amazon CloudWatch Events User Guide.. Two /// examples of Amazon Web Services cron expressions are 15 * ? * * * (take /// a backup every hour at 15 minutes past the hour) and 0 12 * * ? * (take /// a backup every day at 12 noon UTC). For a table of examples, click the preceding link /// and scroll down the page. /// /// public string ScheduleExpression { get { return this._scheduleExpression; } set { this._scheduleExpression = value; } } // Check to see if ScheduleExpression property is set internal bool IsSetScheduleExpression() { return this._scheduleExpression != null; } /// /// Gets and sets the property 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. If this value is included, it /// must be at least 60 minutes to avoid errors. /// /// /// /// During the start window, the backup job status remains in CREATED status /// until it has successfully begun or until the start window time has run out. If within /// the start window time Backup receives an error that allows the job to be retried, /// Backup will automatically retry to begin the job at least every 10 minutes until the /// backup successfully begins (the job status changes to RUNNING) or until /// the job status changes to EXPIRED (which is expected to occur when the /// start window time is over). /// /// public long StartWindowMinutes { get { return this._startWindowMinutes.GetValueOrDefault(); } set { this._startWindowMinutes = value; } } // Check to see if StartWindowMinutes property is set internal bool IsSetStartWindowMinutes() { return this._startWindowMinutes.HasValue; } /// /// Gets and sets the property 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 Amazon Web Services /// Region where they are created. They consist of lowercase letters, numbers, and hyphens. /// /// [AWSProperty(Required=true)] public string TargetBackupVaultName { get { return this._targetBackupVaultName; } set { this._targetBackupVaultName = value; } } // Check to see if TargetBackupVaultName property is set internal bool IsSetTargetBackupVaultName() { return this._targetBackupVaultName != null; } } }