/*
* 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 rbin-2021-06-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.RecycleBin.Model
{
///
/// Container for the parameters to the UpdateRule operation.
/// Updates an existing Recycle Bin retention rule. You can update a retention rule's
/// description, resource tags, and retention period at any time after creation. You can't
/// update a retention rule's resource type after creation. For more information, see
///
/// Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User
/// Guide.
///
public partial class UpdateRuleRequest : AmazonRecycleBinRequest
{
private string _description;
private string _identifier;
private List _resourceTags = new List();
private ResourceType _resourceType;
private RetentionPeriod _retentionPeriod;
///
/// Gets and sets the property Description.
///
/// The retention rule description.
///
///
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property Identifier.
///
/// The unique ID of the retention rule.
///
///
[AWSProperty(Required=true)]
public string Identifier
{
get { return this._identifier; }
set { this._identifier = value; }
}
// Check to see if Identifier property is set
internal bool IsSetIdentifier()
{
return this._identifier != null;
}
///
/// Gets and sets the property ResourceTags.
///
/// Specifies the resource tags to use to identify resources that are to be retained by
/// a tag-level retention rule. For tag-level retention rules, only deleted resources,
/// of the specified resource type, that have one or more of the specified tag key and
/// value pairs are retained. If a resource is deleted, but it does not have any of the
/// specified tag key and value pairs, it is immediately deleted without being retained
/// by the retention rule.
///
///
///
/// You can add the same tag key and value pair to a maximum or five retention rules.
///
///
///
/// To create a Region-level retention rule, omit this parameter. A Region-level retention
/// rule does not have any resource tags specified. It retains all deleted resources of
/// the specified resource type in the Region in which the rule is created, even if the
/// resources are not tagged.
///
///
[AWSProperty(Min=0, Max=50)]
public List ResourceTags
{
get { return this._resourceTags; }
set { this._resourceTags = value; }
}
// Check to see if ResourceTags property is set
internal bool IsSetResourceTags()
{
return this._resourceTags != null && this._resourceTags.Count > 0;
}
///
/// Gets and sets the property ResourceType.
///
/// This parameter is currently not supported. You can't update a retention rule's resource
/// type after creation.
///
///
///
public ResourceType ResourceType
{
get { return this._resourceType; }
set { this._resourceType = value; }
}
// Check to see if ResourceType property is set
internal bool IsSetResourceType()
{
return this._resourceType != null;
}
///
/// Gets and sets the property RetentionPeriod.
///
/// Information about the retention period for which the retention rule is to retain resources.
///
///
public RetentionPeriod RetentionPeriod
{
get { return this._retentionPeriod; }
set { this._retentionPeriod = value; }
}
// Check to see if RetentionPeriod property is set
internal bool IsSetRetentionPeriod()
{
return this._retentionPeriod != null;
}
}
}