/* * 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 dlm-2018-01-12.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.DLM.Model { /// /// [All policy types] Specifies the configuration of a lifecycle policy. /// public partial class PolicyDetails { private List _actions = new List(); private EventSource _eventSource; private Parameters _parameters; private PolicyTypeValues _policyType; private List _resourceLocations = new List(); private List _resourceTypes = new List(); private List _schedules = new List(); private List _targetTags = new List(); /// /// Gets and sets the property Actions. /// /// [Event-based policies only] The actions to be performed when the event-based /// policy is activated. You can specify only one action per policy. /// /// [AWSProperty(Min=1, Max=1)] public List Actions { get { return this._actions; } set { this._actions = value; } } // Check to see if Actions property is set internal bool IsSetActions() { return this._actions != null && this._actions.Count > 0; } /// /// Gets and sets the property EventSource. /// /// [Event-based policies only] The event that activates the event-based policy. /// /// public EventSource EventSource { get { return this._eventSource; } set { this._eventSource = value; } } // Check to see if EventSource property is set internal bool IsSetEventSource() { return this._eventSource != null; } /// /// Gets and sets the property Parameters. /// /// [Snapshot and AMI policies only] A set of optional parameters for snapshot /// and AMI lifecycle policies. /// /// /// /// If you are modifying a policy that was created or previously modified using the Amazon /// Data Lifecycle Manager console, then you must include this parameter and specify either /// the default values or the new values that you require. You can't omit this parameter /// or set its values to null. /// /// /// public Parameters Parameters { get { return this._parameters; } set { this._parameters = value; } } // Check to see if Parameters property is set internal bool IsSetParameters() { return this._parameters != null; } /// /// Gets and sets the property PolicyType. /// /// [All policy types] The valid target resource types and actions a policy can /// manage. Specify EBS_SNAPSHOT_MANAGEMENT to create a lifecycle policy /// that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT /// to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify /// EVENT_BASED_POLICY to create an event-based policy that performs specific /// actions when a defined event occurs in your Amazon Web Services account. /// /// /// /// The default is EBS_SNAPSHOT_MANAGEMENT. /// /// public PolicyTypeValues PolicyType { get { return this._policyType; } set { this._policyType = value; } } // Check to see if PolicyType property is set internal bool IsSetPolicyType() { return this._policyType != null; } /// /// Gets and sets the property ResourceLocations. /// /// [Snapshot and AMI policies only] The location of the resources to backup. /// If the source resources are located in an Amazon Web Services Region, specify CLOUD. /// If the source resources are located on an Outpost in your account, specify OUTPOST. /// /// /// /// If you specify OUTPOST, Amazon Data Lifecycle Manager backs up all resources /// of the specified type with matching target tags across all of the Outposts in your /// account. /// /// [AWSProperty(Min=1, Max=1)] public List ResourceLocations { get { return this._resourceLocations; } set { this._resourceLocations = value; } } // Check to see if ResourceLocations property is set internal bool IsSetResourceLocations() { return this._resourceLocations != null && this._resourceLocations.Count > 0; } /// /// Gets and sets the property ResourceTypes. /// /// [Snapshot policies only] The target resource type for snapshot and AMI lifecycle /// policies. Use VOLUME to create snapshots of individual volumes or use /// INSTANCE to create multi-volume snapshots from the volumes for an instance. /// /// [AWSProperty(Min=1, Max=1)] public List ResourceTypes { get { return this._resourceTypes; } set { this._resourceTypes = value; } } // Check to see if ResourceTypes property is set internal bool IsSetResourceTypes() { return this._resourceTypes != null && this._resourceTypes.Count > 0; } /// /// Gets and sets the property Schedules. /// /// [Snapshot and AMI policies only] The schedules of policy-defined actions for /// snapshot and AMI lifecycle policies. A policy can have up to four schedules—one mandatory /// schedule and up to three optional schedules. /// /// [AWSProperty(Min=1, Max=4)] public List Schedules { get { return this._schedules; } set { this._schedules = value; } } // Check to see if Schedules property is set internal bool IsSetSchedules() { return this._schedules != null && this._schedules.Count > 0; } /// /// Gets and sets the property TargetTags. /// /// [Snapshot and AMI policies only] The single tag that identifies targeted resources /// for this policy. /// /// [AWSProperty(Min=1, Max=50)] public List TargetTags { get { return this._targetTags; } set { this._targetTags = value; } } // Check to see if TargetTags property is set internal bool IsSetTargetTags() { return this._targetTags != null && this._targetTags.Count > 0; } } }