/*
* 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 lightsail-2016-11-28.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.Lightsail.Model
{
///
/// Container for the parameters to the CreateRelationalDatabaseFromSnapshot operation.
/// Creates a new database from an existing database snapshot in Amazon Lightsail.
///
///
///
/// You can create a new database from a snapshot in if something goes wrong with your
/// original database, or to change it to a different plan, such as a high availability
/// or standard plan.
///
///
///
/// The create relational database from snapshot
operation supports tag-based
/// access control via request tags and resource tags applied to the resource identified
/// by relationalDatabaseSnapshotName. For more information, see the Amazon
/// Lightsail Developer Guide.
///
///
public partial class CreateRelationalDatabaseFromSnapshotRequest : AmazonLightsailRequest
{
private string _availabilityZone;
private bool? _publiclyAccessible;
private string _relationalDatabaseBundleId;
private string _relationalDatabaseName;
private string _relationalDatabaseSnapshotName;
private DateTime? _restoreTime;
private string _sourceRelationalDatabaseName;
private List _tags = new List();
private bool? _useLatestRestorableTime;
///
/// Gets and sets the property AvailabilityZone.
///
/// The Availability Zone in which to create your new database. Use the us-east-2a
/// case-sensitive format.
///
///
///
/// You can get a list of Availability Zones by using the get regions
operation.
/// Be sure to add the include relational database Availability Zones
parameter
/// to your request.
///
///
public string AvailabilityZone
{
get { return this._availabilityZone; }
set { this._availabilityZone = value; }
}
// Check to see if AvailabilityZone property is set
internal bool IsSetAvailabilityZone()
{
return this._availabilityZone != null;
}
///
/// Gets and sets the property PubliclyAccessible.
///
/// Specifies the accessibility options for your new database. A value of true
/// specifies a database that is available to resources outside of your Lightsail account.
/// A value of false
specifies a database that is available only to your
/// Lightsail resources in the same region as your database.
///
///
public bool PubliclyAccessible
{
get { return this._publiclyAccessible.GetValueOrDefault(); }
set { this._publiclyAccessible = value; }
}
// Check to see if PubliclyAccessible property is set
internal bool IsSetPubliclyAccessible()
{
return this._publiclyAccessible.HasValue;
}
///
/// Gets and sets the property RelationalDatabaseBundleId.
///
/// The bundle ID for your new database. A bundle describes the performance specifications
/// for your database.
///
///
///
/// You can get a list of database bundle IDs by using the get relational database
/// bundles
operation.
///
///
///
/// When creating a new database from a snapshot, you cannot choose a bundle that is smaller
/// than the bundle of the source database.
///
///
public string RelationalDatabaseBundleId
{
get { return this._relationalDatabaseBundleId; }
set { this._relationalDatabaseBundleId = value; }
}
// Check to see if RelationalDatabaseBundleId property is set
internal bool IsSetRelationalDatabaseBundleId()
{
return this._relationalDatabaseBundleId != null;
}
///
/// Gets and sets the property RelationalDatabaseName.
///
/// The name to use for your new Lightsail database resource.
///
///
///
/// Constraints:
///
/// -
///
/// Must contain from 2 to 255 alphanumeric characters, or hyphens.
///
///
-
///
/// The first and last character must be a letter or number.
///
///
///
[AWSProperty(Required=true)]
public string RelationalDatabaseName
{
get { return this._relationalDatabaseName; }
set { this._relationalDatabaseName = value; }
}
// Check to see if RelationalDatabaseName property is set
internal bool IsSetRelationalDatabaseName()
{
return this._relationalDatabaseName != null;
}
///
/// Gets and sets the property RelationalDatabaseSnapshotName.
///
/// The name of the database snapshot from which to create your new database.
///
///
public string RelationalDatabaseSnapshotName
{
get { return this._relationalDatabaseSnapshotName; }
set { this._relationalDatabaseSnapshotName = value; }
}
// Check to see if RelationalDatabaseSnapshotName property is set
internal bool IsSetRelationalDatabaseSnapshotName()
{
return this._relationalDatabaseSnapshotName != null;
}
///
/// Gets and sets the property RestoreTime.
///
/// The date and time to restore your database from.
///
///
///
/// Constraints:
///
/// -
///
/// Must be before the latest restorable time for the database.
///
///
-
///
/// Cannot be specified if the
use latest restorable time
parameter is true
.
///
/// -
///
/// Specified in Coordinated Universal Time (UTC).
///
///
-
///
/// Specified in the Unix time format.
///
///
///
/// For example, if you wish to use a restore time of October 1, 2018, at 8 PM UTC, then
/// you input
1538424000
as the restore time.
///
///
///
public DateTime RestoreTime
{
get { return this._restoreTime.GetValueOrDefault(); }
set { this._restoreTime = value; }
}
// Check to see if RestoreTime property is set
internal bool IsSetRestoreTime()
{
return this._restoreTime.HasValue;
}
///
/// Gets and sets the property SourceRelationalDatabaseName.
///
/// The name of the source database.
///
///
public string SourceRelationalDatabaseName
{
get { return this._sourceRelationalDatabaseName; }
set { this._sourceRelationalDatabaseName = value; }
}
// Check to see if SourceRelationalDatabaseName property is set
internal bool IsSetSourceRelationalDatabaseName()
{
return this._sourceRelationalDatabaseName != null;
}
///
/// Gets and sets the property Tags.
///
/// The tag keys and optional values to add to the resource during create.
///
///
///
/// Use the TagResource
action to tag a resource after it's created.
///
///
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.
///
/// Specifies whether your database is restored from the latest backup time. A value of
/// true
restores from the latest backup time.
///
///
///
/// Default: false
///
///
///
/// Constraints: Cannot be specified if the restore time
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;
}
}
}