/*
* 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 ec2-2016-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.EC2.Model
{
///
/// Container for the parameters to the CreateImage operation.
/// Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either
/// running or stopped.
///
///
///
/// If you customized your instance with instance store volumes or Amazon EBS volumes
/// in addition to the root device volume, the new AMI contains block device mapping information
/// for those volumes. When you launch an instance from this new AMI, the instance automatically
/// launches with those additional volumes.
///
///
///
/// For more information, see Create
/// an Amazon EBS-backed Linux AMI in the Amazon Elastic Compute Cloud User Guide.
///
///
public partial class CreateImageRequest : AmazonEC2Request
{
private List _blockDeviceMappings = new List();
private string _description;
private string _instanceId;
private string _name;
private bool? _noReboot;
private List _tagSpecifications = new List();
///
/// Empty constructor used to set properties independently even when a simple constructor is available
///
public CreateImageRequest() { }
///
/// Instantiates CreateImageRequest with the parameterized properties
///
/// The ID of the instance.
/// A name for the new image. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public CreateImageRequest(string instanceId, string name)
{
_instanceId = instanceId;
_name = name;
}
///
/// Gets and sets the property BlockDeviceMappings.
///
/// The block device mappings. This parameter cannot be used to modify the encryption
/// status of existing volumes or snapshots. To create an AMI with encrypted snapshots,
/// use the CopyImage action.
///
///
public List BlockDeviceMappings
{
get { return this._blockDeviceMappings; }
set { this._blockDeviceMappings = value; }
}
// Check to see if BlockDeviceMappings property is set
internal bool IsSetBlockDeviceMappings()
{
return this._blockDeviceMappings != null && this._blockDeviceMappings.Count > 0;
}
///
/// Gets and sets the property Description.
///
/// A description for the new image.
///
///
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 InstanceId.
///
/// The ID of the instance.
///
///
[AWSProperty(Required=true)]
public string InstanceId
{
get { return this._instanceId; }
set { this._instanceId = value; }
}
// Check to see if InstanceId property is set
internal bool IsSetInstanceId()
{
return this._instanceId != null;
}
///
/// Gets and sets the property Name.
///
/// A name for the new image.
///
///
///
/// Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]),
/// spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@),
/// or underscores(_)
///
///
[AWSProperty(Required=true)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property NoReboot.
///
/// Indicates whether or not the instance should be automatically rebooted before creating
/// the image. Specify one of the following values:
///
/// -
///
///
true
- The instance is not rebooted before creating the image. This
/// creates crash-consistent snapshots that include only the data that has been written
/// to the volumes at the time the snapshots are created. Buffered data and data in memory
/// that has not yet been written to the volumes is not included in the snapshots.
///
/// -
///
///
false
- The instance is rebooted before creating the image. This ensures
/// that all buffered data and data in memory is written to the volumes before the snapshots
/// are created.
///
///
///
/// Default: false
///
///
public bool NoReboot
{
get { return this._noReboot.GetValueOrDefault(); }
set { this._noReboot = value; }
}
// Check to see if NoReboot property is set
internal bool IsSetNoReboot()
{
return this._noReboot.HasValue;
}
///
/// Gets and sets the property TagSpecifications.
///
/// The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots,
/// or both.
///
/// -
///
/// To tag the AMI, the value for
ResourceType
must be image
.
///
/// -
///
/// To tag the snapshots that are created of the root volume and of other Amazon EBS volumes
/// that are attached to the instance, the value for
ResourceType
must be
/// snapshot
. The same tag is applied to all of the snapshots that are created.
///
///
///
/// If you specify other values for ResourceType
, the request fails.
///
///
///
/// To tag an AMI or snapshot after it has been created, see CreateTags.
///
///
///
public List TagSpecifications
{
get { return this._tagSpecifications; }
set { this._tagSpecifications = value; }
}
// Check to see if TagSpecifications property is set
internal bool IsSetTagSpecifications()
{
return this._tagSpecifications != null && this._tagSpecifications.Count > 0;
}
}
}