/*
* 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 autoscaling-2011-01-01.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.AutoScaling.Model
{
///
/// Container for the parameters to the CreateLaunchConfiguration operation.
/// Creates a launch configuration.
///
///
///
/// If you exceed your maximum limit of launch configurations, the call fails. To query
/// this limit, call the DescribeAccountLimits API. For information about updating
/// this limit, see Quotas
/// for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
///
///
///
/// For more information, see Launch
/// configurations in the Amazon EC2 Auto Scaling User Guide.
///
///
///
/// Amazon EC2 Auto Scaling configures instances launched as part of an Auto Scaling group
/// using either a launch template or a launch configuration. We strongly recommend that
/// you do not use launch configurations. They do not provide full functionality for Amazon
/// EC2 Auto Scaling or Amazon EC2. For information about using launch templates, see
/// Launch
/// templates in the Amazon EC2 Auto Scaling User Guide.
///
///
///
public partial class CreateLaunchConfigurationRequest : AmazonAutoScalingRequest
{
private bool? _associatePublicIpAddress;
private List _blockDeviceMappings = new List();
private string _classicLinkVPCId;
private List _classicLinkVPCSecurityGroups = new List();
private bool? _ebsOptimized;
private string _iamInstanceProfile;
private string _imageId;
private string _instanceId;
private InstanceMonitoring _instanceMonitoring;
private string _instanceType;
private string _kernelId;
private string _keyName;
private string _launchConfigurationName;
private InstanceMetadataOptions _metadataOptions;
private string _placementTenancy;
private string _ramdiskId;
private List _securityGroups = new List();
private string _spotPrice;
private string _userData;
///
/// Gets and sets the property AssociatePublicIpAddress.
///
/// Specifies whether to assign a public IPv4 address to the group's instances. If the
/// instance is launched into a default subnet, the default is to assign a public IPv4
/// address, unless you disabled the option to assign a public IPv4 address on the subnet.
/// If the instance is launched into a nondefault subnet, the default is not to assign
/// a public IPv4 address, unless you enabled the option to assign a public IPv4 address
/// on the subnet.
///
///
///
/// If you specify true
, each instance in the Auto Scaling group receives
/// a unique public IPv4 address. For more information, see Launching
/// Auto Scaling instances in a VPC in the Amazon EC2 Auto Scaling User Guide.
///
///
///
/// If you specify this property, you must specify at least one subnet for VPCZoneIdentifier
/// when you create your group.
///
///
public bool AssociatePublicIpAddress
{
get { return this._associatePublicIpAddress.GetValueOrDefault(); }
set { this._associatePublicIpAddress = value; }
}
// Check to see if AssociatePublicIpAddress property is set
internal bool IsSetAssociatePublicIpAddress()
{
return this._associatePublicIpAddress.HasValue;
}
///
/// Gets and sets the property BlockDeviceMappings.
///
/// The block device mapping entries that define the block devices to attach to the instances
/// at launch. By default, the block devices specified in the block device mapping for
/// the AMI are used. For more information, see Block
/// device mappings in the Amazon EC2 User Guide for Linux Instances.
///
///
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 ClassicLinkVPCId.
///
/// Available for backward compatibility.
///
///
[AWSProperty(Min=1, Max=255)]
public string ClassicLinkVPCId
{
get { return this._classicLinkVPCId; }
set { this._classicLinkVPCId = value; }
}
// Check to see if ClassicLinkVPCId property is set
internal bool IsSetClassicLinkVPCId()
{
return this._classicLinkVPCId != null;
}
///
/// Gets and sets the property ClassicLinkVPCSecurityGroups.
///
/// Available for backward compatibility.
///
///
public List ClassicLinkVPCSecurityGroups
{
get { return this._classicLinkVPCSecurityGroups; }
set { this._classicLinkVPCSecurityGroups = value; }
}
// Check to see if ClassicLinkVPCSecurityGroups property is set
internal bool IsSetClassicLinkVPCSecurityGroups()
{
return this._classicLinkVPCSecurityGroups != null && this._classicLinkVPCSecurityGroups.Count > 0;
}
///
/// Gets and sets the property EbsOptimized.
///
/// Specifies whether the launch configuration is optimized for EBS I/O (true
)
/// or not (false
). The optimization provides dedicated throughput to Amazon
/// EBS and an optimized configuration stack to provide optimal I/O performance. This
/// optimization is not available with all instance types. Additional fees are incurred
/// when you enable EBS optimization for an instance type that is not EBS-optimized by
/// default. For more information, see Amazon
/// EBS-optimized instances in the Amazon EC2 User Guide for Linux Instances.
///
///
///
/// The default value is false
.
///
///
public bool EbsOptimized
{
get { return this._ebsOptimized.GetValueOrDefault(); }
set { this._ebsOptimized = value; }
}
// Check to see if EbsOptimized property is set
internal bool IsSetEbsOptimized()
{
return this._ebsOptimized.HasValue;
}
///
/// Gets and sets the property IamInstanceProfile.
///
/// The name or the Amazon Resource Name (ARN) of the instance profile associated with
/// the IAM role for the instance. The instance profile contains the IAM role. For more
/// information, see IAM
/// role for applications that run on Amazon EC2 instances in the Amazon EC2 Auto
/// Scaling User Guide.
///
///
[AWSProperty(Min=1, Max=1600)]
public string IamInstanceProfile
{
get { return this._iamInstanceProfile; }
set { this._iamInstanceProfile = value; }
}
// Check to see if IamInstanceProfile property is set
internal bool IsSetIamInstanceProfile()
{
return this._iamInstanceProfile != null;
}
///
/// Gets and sets the property ImageId.
///
/// The ID of the Amazon Machine Image (AMI) that was assigned during registration. For
/// more information, see Finding
/// a Linux AMI in the Amazon EC2 User Guide for Linux Instances.
///
///
///
/// If you specify InstanceId
, an ImageId
is not required.
///
///
[AWSProperty(Min=1, Max=255)]
public string ImageId
{
get { return this._imageId; }
set { this._imageId = value; }
}
// Check to see if ImageId property is set
internal bool IsSetImageId()
{
return this._imageId != null;
}
///
/// Gets and sets the property InstanceId.
///
/// The ID of the instance to use to create the launch configuration. The new launch configuration
/// derives attributes from the instance, except for the block device mapping.
///
///
///
/// To create a launch configuration with a block device mapping or override any other
/// instance attributes, specify them as part of the same request.
///
///
///
/// For more information, see Creating
/// a launch configuration using an EC2 instance in the Amazon EC2 Auto Scaling
/// User Guide.
///
///
[AWSProperty(Min=1, Max=19)]
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 InstanceMonitoring.
///
/// Controls whether instances in this group are launched with detailed (true
)
/// or basic (false
) monitoring.
///
///
///
/// The default value is true
(enabled).
///
///
///
/// When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute
/// and your account is charged a fee. When you disable detailed monitoring, CloudWatch
/// generates metrics every 5 minutes. For more information, see Configure
/// Monitoring for Auto Scaling Instances in the Amazon EC2 Auto Scaling User Guide.
///
///
///
public InstanceMonitoring InstanceMonitoring
{
get { return this._instanceMonitoring; }
set { this._instanceMonitoring = value; }
}
// Check to see if InstanceMonitoring property is set
internal bool IsSetInstanceMonitoring()
{
return this._instanceMonitoring != null;
}
///
/// Gets and sets the property InstanceType.
///
/// Specifies the instance type of the EC2 instance. For information about available instance
/// types, see Available
/// instance types in the Amazon EC2 User Guide for Linux Instances.
///
///
///
/// If you specify InstanceId
, an InstanceType
is not required.
///
///
[AWSProperty(Min=1, Max=255)]
public string InstanceType
{
get { return this._instanceType; }
set { this._instanceType = value; }
}
// Check to see if InstanceType property is set
internal bool IsSetInstanceType()
{
return this._instanceType != null;
}
///
/// Gets and sets the property KernelId.
///
/// The ID of the kernel associated with the AMI.
///
///
///
/// We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information,
/// see User
/// provided kernels in the Amazon EC2 User Guide for Linux Instances.
///
///
///
[AWSProperty(Min=1, Max=255)]
public string KernelId
{
get { return this._kernelId; }
set { this._kernelId = value; }
}
// Check to see if KernelId property is set
internal bool IsSetKernelId()
{
return this._kernelId != null;
}
///
/// Gets and sets the property KeyName.
///
/// The name of the key pair. For more information, see Amazon
/// EC2 key pairs and Linux instances in the Amazon EC2 User Guide for Linux Instances.
///
///
[AWSProperty(Min=1, Max=255)]
public string KeyName
{
get { return this._keyName; }
set { this._keyName = value; }
}
// Check to see if KeyName property is set
internal bool IsSetKeyName()
{
return this._keyName != null;
}
///
/// Gets and sets the property LaunchConfigurationName.
///
/// The name of the launch configuration. This name must be unique per Region per account.
///
///
[AWSProperty(Required=true, Min=1, Max=255)]
public string LaunchConfigurationName
{
get { return this._launchConfigurationName; }
set { this._launchConfigurationName = value; }
}
// Check to see if LaunchConfigurationName property is set
internal bool IsSetLaunchConfigurationName()
{
return this._launchConfigurationName != null;
}
///
/// Gets and sets the property MetadataOptions.
///
/// The metadata options for the instances. For more information, see Configuring
/// the Instance Metadata Options in the Amazon EC2 Auto Scaling User Guide.
///
///
public InstanceMetadataOptions MetadataOptions
{
get { return this._metadataOptions; }
set { this._metadataOptions = value; }
}
// Check to see if MetadataOptions property is set
internal bool IsSetMetadataOptions()
{
return this._metadataOptions != null;
}
///
/// Gets and sets the property PlacementTenancy.
///
/// The tenancy of the instance, either default
or dedicated
.
/// An instance with dedicated
tenancy runs on isolated, single-tenant hardware
/// and can only be launched into a VPC. To launch dedicated instances into a shared tenancy
/// VPC (a VPC with the instance placement tenancy attribute set to default
),
/// you must set the value of this property to dedicated
. For more information,
/// see Configuring
/// instance tenancy with Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling
/// User Guide.
///
///
///
/// If you specify PlacementTenancy
, you must specify at least one subnet
/// for VPCZoneIdentifier
when you create your group.
///
///
///
/// Valid values: default
| dedicated
///
///
[AWSProperty(Min=1, Max=64)]
public string PlacementTenancy
{
get { return this._placementTenancy; }
set { this._placementTenancy = value; }
}
// Check to see if PlacementTenancy property is set
internal bool IsSetPlacementTenancy()
{
return this._placementTenancy != null;
}
///
/// Gets and sets the property RamdiskId.
///
/// The ID of the RAM disk to select.
///
///
///
/// We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information,
/// see User
/// provided kernels in the Amazon EC2 User Guide for Linux Instances.
///
///
///
[AWSProperty(Min=1, Max=255)]
public string RamdiskId
{
get { return this._ramdiskId; }
set { this._ramdiskId = value; }
}
// Check to see if RamdiskId property is set
internal bool IsSetRamdiskId()
{
return this._ramdiskId != null;
}
///
/// Gets and sets the property SecurityGroups.
///
/// A list that contains the security group IDs to assign to the instances in the Auto
/// Scaling group. For more information, see Control
/// traffic to resources using security groups in the Amazon Virtual Private Cloud
/// User Guide.
///
///
public List SecurityGroups
{
get { return this._securityGroups; }
set { this._securityGroups = value; }
}
// Check to see if SecurityGroups property is set
internal bool IsSetSecurityGroups()
{
return this._securityGroups != null && this._securityGroups.Count > 0;
}
///
/// Gets and sets the property SpotPrice.
///
/// The maximum hourly price to be paid for any Spot Instance launched to fulfill the
/// request. Spot Instances are launched when the price you specify exceeds the current
/// Spot price. For more information, see Request
/// Spot Instances for fault-tolerant and flexible applications in the Amazon EC2
/// Auto Scaling User Guide.
///
///
///
/// Valid Range: Minimum value of 0.001
///
///
///
/// When you change your maximum price by creating a new launch configuration, running
/// instances will continue to run as long as the maximum price for those running instances
/// is higher than the current Spot price.
///
///
///
[AWSProperty(Min=1, Max=255)]
public string SpotPrice
{
get { return this._spotPrice; }
set { this._spotPrice = value; }
}
// Check to see if SpotPrice property is set
internal bool IsSetSpotPrice()
{
return this._spotPrice != null;
}
///
/// Gets and sets the property UserData.
///
/// The user data to make available to the launched EC2 instances. For more information,
/// see Instance
/// metadata and user data (Linux) and Instance
/// metadata and user data (Windows). If you are using a command line tool, base64-encoding
/// is performed for you, and you can load the text from a file. Otherwise, you must provide
/// base64-encoded text. User data is limited to 16 KB.
///
///
[AWSProperty(Max=21847)]
public string UserData
{
get { return this._userData; }
set { this._userData = value; }
}
// Check to see if UserData property is set
internal bool IsSetUserData()
{
return this._userData != null;
}
}
}