/*
* 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 neptune-2014-10-31.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.Neptune.Model
{
///
/// Container for the parameters to the RestoreDBClusterToPointInTime operation.
/// Restores a DB cluster to an arbitrary point in time. Users can restore to any point
/// in time before LatestRestorableTime
for up to BackupRetentionPeriod
/// days. The target DB cluster is created from the source DB cluster with the same configuration
/// as the original DB cluster, except that the new DB cluster is created with the default
/// DB security group.
///
///
///
/// This action only restores the DB cluster, not the DB instances for that DB cluster.
/// You must invoke the CreateDBInstance action to create DB instances for the
/// restored DB cluster, specifying the identifier of the restored DB cluster in DBClusterIdentifier
.
/// You can create DB instances only after the RestoreDBClusterToPointInTime
/// action has completed and the DB cluster is available.
///
///
///
public partial class RestoreDBClusterToPointInTimeRequest : AmazonNeptuneRequest
{
private string _dbClusterIdentifier;
private string _dbClusterParameterGroupName;
private string _dbSubnetGroupName;
private bool? _deletionProtection;
private List _enableCloudwatchLogsExports = new List();
private bool? _enableIAMDatabaseAuthentication;
private string _kmsKeyId;
private string _optionGroupName;
private int? _port;
private DateTime? _restoreToTimeUtc;
private string _restoreType;
private ServerlessV2ScalingConfiguration _serverlessV2ScalingConfiguration;
private string _sourceDBClusterIdentifier;
private List _tags = new List();
private bool? _useLatestRestorableTime;
private List _vpcSecurityGroupIds = new List();
///
/// Gets and sets the property DBClusterIdentifier.
///
/// The name of the new DB cluster to be created.
///
///
///
/// Constraints:
///
/// -
///
/// Must contain from 1 to 63 letters, numbers, or hyphens
///
///
-
///
/// First character must be a letter
///
///
-
///
/// Cannot end with a hyphen or contain two consecutive hyphens
///
///
///
[AWSProperty(Required=true)]
public string DBClusterIdentifier
{
get { return this._dbClusterIdentifier; }
set { this._dbClusterIdentifier = value; }
}
// Check to see if DBClusterIdentifier property is set
internal bool IsSetDBClusterIdentifier()
{
return this._dbClusterIdentifier != null;
}
///
/// Gets and sets the property DBClusterParameterGroupName.
///
/// The name of the DB cluster parameter group to associate with the new DB cluster.
///
///
///
/// Constraints:
///
/// -
///
/// If supplied, must match the name of an existing DBClusterParameterGroup.
///
///
///
public string DBClusterParameterGroupName
{
get { return this._dbClusterParameterGroupName; }
set { this._dbClusterParameterGroupName = value; }
}
// Check to see if DBClusterParameterGroupName property is set
internal bool IsSetDBClusterParameterGroupName()
{
return this._dbClusterParameterGroupName != null;
}
///
/// Gets and sets the property DBSubnetGroupName.
///
/// The DB subnet group name to use for the new DB cluster.
///
///
///
/// Constraints: If supplied, must match the name of an existing DBSubnetGroup.
///
///
///
/// Example: mySubnetgroup
///
///
public string DBSubnetGroupName
{
get { return this._dbSubnetGroupName; }
set { this._dbSubnetGroupName = value; }
}
// Check to see if DBSubnetGroupName property is set
internal bool IsSetDBSubnetGroupName()
{
return this._dbSubnetGroupName != null;
}
///
/// Gets and sets the property DeletionProtection.
///
/// A value that indicates whether the DB cluster has deletion protection enabled. The
/// database can't be deleted when deletion protection is enabled. By default, deletion
/// protection is disabled.
///
///
public bool DeletionProtection
{
get { return this._deletionProtection.GetValueOrDefault(); }
set { this._deletionProtection = value; }
}
// Check to see if DeletionProtection property is set
internal bool IsSetDeletionProtection()
{
return this._deletionProtection.HasValue;
}
///
/// Gets and sets the property EnableCloudwatchLogsExports.
///
/// The list of logs that the restored DB cluster is to export to CloudWatch Logs.
///
///
public List EnableCloudwatchLogsExports
{
get { return this._enableCloudwatchLogsExports; }
set { this._enableCloudwatchLogsExports = value; }
}
// Check to see if EnableCloudwatchLogsExports property is set
internal bool IsSetEnableCloudwatchLogsExports()
{
return this._enableCloudwatchLogsExports != null && this._enableCloudwatchLogsExports.Count > 0;
}
///
/// Gets and sets the property EnableIAMDatabaseAuthentication.
///
/// True to enable mapping of Amazon Identity and Access Management (IAM) accounts to
/// database accounts, and otherwise false.
///
///
///
/// Default: false
///
///
public bool EnableIAMDatabaseAuthentication
{
get { return this._enableIAMDatabaseAuthentication.GetValueOrDefault(); }
set { this._enableIAMDatabaseAuthentication = value; }
}
// Check to see if EnableIAMDatabaseAuthentication property is set
internal bool IsSetEnableIAMDatabaseAuthentication()
{
return this._enableIAMDatabaseAuthentication.HasValue;
}
///
/// Gets and sets the property KmsKeyId.
///
/// The Amazon KMS key identifier to use when restoring an encrypted DB cluster from an
/// encrypted DB cluster.
///
///
///
/// The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key.
/// If you are restoring a DB cluster with the same Amazon account that owns the KMS encryption
/// key used to encrypt the new DB cluster, then you can use the KMS key alias instead
/// of the ARN for the KMS encryption key.
///
///
///
/// You can restore to a new DB cluster and encrypt the new DB cluster with a KMS key
/// that is different than the KMS key used to encrypt the source DB cluster. The new
/// DB cluster is encrypted with the KMS key identified by the KmsKeyId
parameter.
///
///
///
/// If you do not specify a value for the KmsKeyId
parameter, then the following
/// will occur:
///
/// -
///
/// If the DB cluster is encrypted, then the restored DB cluster is encrypted using the
/// KMS key that was used to encrypt the source DB cluster.
///
///
-
///
/// If the DB cluster is not encrypted, then the restored DB cluster is not encrypted.
///
///
///
/// If DBClusterIdentifier
refers to a DB cluster that is not encrypted,
/// then the restore request is rejected.
///
///
public string KmsKeyId
{
get { return this._kmsKeyId; }
set { this._kmsKeyId = value; }
}
// Check to see if KmsKeyId property is set
internal bool IsSetKmsKeyId()
{
return this._kmsKeyId != null;
}
///
/// Gets and sets the property OptionGroupName.
///
/// (Not supported by Neptune)
///
///
public string OptionGroupName
{
get { return this._optionGroupName; }
set { this._optionGroupName = value; }
}
// Check to see if OptionGroupName property is set
internal bool IsSetOptionGroupName()
{
return this._optionGroupName != null;
}
///
/// Gets and sets the property Port.
///
/// The port number on which the new DB cluster accepts connections.
///
///
///
/// Constraints: Value must be 1150-65535
///
///
///
/// Default: The same port as the original DB cluster.
///
///
public int Port
{
get { return this._port.GetValueOrDefault(); }
set { this._port = value; }
}
// Check to see if Port property is set
internal bool IsSetPort()
{
return this._port.HasValue;
}
///
/// Gets and sets the property RestoreToTimeUtc.
///
/// The date and time to restore the DB cluster to.
///
///
///
/// Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
///
///
///
/// Constraints:
///
/// -
///
/// Must be before the latest restorable time for the DB instance
///
///
-
///
/// Must be specified if
UseLatestRestorableTime
parameter is not provided
///
/// -
///
/// Cannot be specified if
UseLatestRestorableTime
parameter is true
///
/// -
///
/// Cannot be specified if
RestoreType
parameter is copy-on-write
///
///
///
///
/// Example: 2015-03-07T23:45:00Z
///
///
public DateTime RestoreToTimeUtc
{
get { return this._restoreToTimeUtc.GetValueOrDefault(); }
set { this._restoreToTime = this._restoreToTimeUtc = value; }
}
// Check to see if RestoreToTimeUtc property is set
internal bool IsSetRestoreToTimeUtc()
{
return this._restoreToTimeUtc.HasValue;
}
///
/// Gets and sets the property RestoreType.
///
/// The type of restore to be performed. You can specify one of the following values:
///
/// -
///
///
full-copy
- The new DB cluster is restored as a full copy of the source
/// DB cluster.
///
/// -
///
///
copy-on-write
- The new DB cluster is restored as a clone of the source
/// DB cluster.
///
///
///
/// If you don't specify a RestoreType
value, then the new DB cluster is
/// restored as a full copy of the source DB cluster.
///
///
public string RestoreType
{
get { return this._restoreType; }
set { this._restoreType = value; }
}
// Check to see if RestoreType property is set
internal bool IsSetRestoreType()
{
return this._restoreType != null;
}
///
/// Gets and sets the property ServerlessV2ScalingConfiguration.
///
public ServerlessV2ScalingConfiguration ServerlessV2ScalingConfiguration
{
get { return this._serverlessV2ScalingConfiguration; }
set { this._serverlessV2ScalingConfiguration = value; }
}
// Check to see if ServerlessV2ScalingConfiguration property is set
internal bool IsSetServerlessV2ScalingConfiguration()
{
return this._serverlessV2ScalingConfiguration != null;
}
///
/// Gets and sets the property SourceDBClusterIdentifier.
///
/// The identifier of the source DB cluster from which to restore.
///
///
///
/// Constraints:
///
/// -
///
/// Must match the identifier of an existing DBCluster.
///
///
///
[AWSProperty(Required=true)]
public string SourceDBClusterIdentifier
{
get { return this._sourceDBClusterIdentifier; }
set { this._sourceDBClusterIdentifier = value; }
}
// Check to see if SourceDBClusterIdentifier property is set
internal bool IsSetSourceDBClusterIdentifier()
{
return this._sourceDBClusterIdentifier != null;
}
///
/// Gets and sets the property Tags.
///
/// The tags to be applied to the restored DB cluster.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property UseLatestRestorableTime.
///
/// A value that is set to true
to restore the DB cluster to the latest restorable
/// backup time, and false
otherwise.
///
///
///
/// Default: false
///
///
///
/// Constraints: Cannot be specified if RestoreToTime
parameter is provided.
///
///
public bool UseLatestRestorableTime
{
get { return this._useLatestRestorableTime.GetValueOrDefault(); }
set { this._useLatestRestorableTime = value; }
}
// Check to see if UseLatestRestorableTime property is set
internal bool IsSetUseLatestRestorableTime()
{
return this._useLatestRestorableTime.HasValue;
}
///
/// Gets and sets the property VpcSecurityGroupIds.
///
/// A list of VPC security groups that the new DB cluster belongs to.
///
///
public List VpcSecurityGroupIds
{
get { return this._vpcSecurityGroupIds; }
set { this._vpcSecurityGroupIds = value; }
}
// Check to see if VpcSecurityGroupIds property is set
internal bool IsSetVpcSecurityGroupIds()
{
return this._vpcSecurityGroupIds != null && this._vpcSecurityGroupIds.Count > 0;
}
#region Backwards compatible properties
private DateTime? _restoreToTime;
///
/// Gets and sets the property RestoreToTimeUtc.
///
/// This property is deprecated. Setting this property results in non-UTC DateTimes not
/// being marshalled correctly. Use RestoreToTimeUtc instead. Setting either RestoreToTime
/// or RestoreToTimeUtc results in both RestoreToTime and RestoreToTimeUtc being assigned,
/// the latest assignment to either one of the two property is reflected in the value
/// of both. RestoreToTime is provided for backwards compatibility only and assigning
/// a non-Utc DateTime to it results in the wrong timestamp being passed to the service.
///
///
///
/// The date and time to restore the DB cluster to.
///
///
///
/// Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
///
///
///
/// Constraints:
///
/// -
///
/// Must be before the latest restorable time for the DB instance
///
///
-
///
/// Must be specified if
UseLatestRestorableTime
parameter is not provided
///
/// -
///
/// Cannot be specified if
UseLatestRestorableTime
parameter is true
///
/// -
///
/// Cannot be specified if
RestoreType
parameter is copy-on-write
///
///
///
///
/// Example: 2015-03-07T23:45:00Z
///
///
[Obsolete("Setting this property results in non-UTC DateTimes not being marshalled correctly. " +
"Use RestoreToTimeUtc instead. Setting either RestoreToTime or RestoreToTimeUtc results in both RestoreToTime and " +
"RestoreToTimeUtc being assigned, the latest assignment to either one of the two property is " +
"reflected in the value of both. RestoreToTime is provided for backwards compatibility only and " +
"assigning a non-Utc DateTime to it results in the wrong timestamp being passed to the service.", false)]
public DateTime RestoreToTime
{
get { return this._restoreToTime.GetValueOrDefault(); }
set
{
this._restoreToTime = value;
this._restoreToTimeUtc = new DateTime(value.Ticks, DateTimeKind.Utc);
}
}
#endregion
}
}