2015/10/22 - Auto Scaling - 2 updated api methods
{'BlockDeviceMappings': {'Ebs': {'Encrypted': 'boolean'}}}
Creates a launch configuration.
If you exceed your maximum limit of launch configurations, which by default is 100 per region, the call fails. For information about viewing and updating this limit, see DescribeAccountLimits.
For more information, see Launch Configurations in the Auto Scaling Developer Guide.
Request Syntax
client.create_launch_configuration( LaunchConfigurationName='string', ImageId='string', KeyName='string', SecurityGroups=[ 'string', ], ClassicLinkVPCId='string', ClassicLinkVPCSecurityGroups=[ 'string', ], UserData='string', InstanceId='string', InstanceType='string', KernelId='string', RamdiskId='string', BlockDeviceMappings=[ { 'VirtualName': 'string', 'DeviceName': 'string', 'Ebs': { 'SnapshotId': 'string', 'VolumeSize': 123, 'VolumeType': 'string', 'DeleteOnTermination': True|False, 'Iops': 123, 'Encrypted': True|False }, 'NoDevice': True|False }, ], InstanceMonitoring={ 'Enabled': True|False }, SpotPrice='string', IamInstanceProfile='string', EbsOptimized=True|False, AssociatePublicIpAddress=True|False, PlacementTenancy='string' )
string
[REQUIRED]
The name of the launch configuration. This name must be unique within the scope of your AWS account.
string
The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances. For more information, see Finding an AMI in the Amazon Elastic Compute Cloud User Guide.
string
The name of the key pair. For more information, see Amazon EC2 Key Pairs in the Amazon Elastic Compute Cloud User Guide.
list
One or more security groups with which to associate the instances.
If your instances are launched in EC2-Classic, you can either specify security group names or the security group IDs. For more information about security groups for EC2-Classic, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide.
If your instances are launched into a VPC, specify security group IDs. For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.
(string) --
string
The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter is supported only if you are launching EC2-Classic instances. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
list
The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId. This parameter is required if ClassicLinkVPCId is specified, and is not supported otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
(string) --
string
The user data to make available to the launched EC2 instances. For more information, see Instance Metadata and User Data in the Amazon Elastic Compute Cloud User Guide.
At this time, launch configurations don't support compressed (zipped) user data files.
string
The ID of the EC2 instance to use to create the launch configuration.
The new launch configuration derives attributes from the instance, with the exception of 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 Create a Launch Configuration Using an EC2 Instance in the Auto Scaling Developer Guide.
string
The instance type of the EC2 instance. For information about available instance types, see Available Instance Types in the Amazon Elastic Compute Cloud User Guide.
string
The ID of the kernel associated with the AMI.
string
The ID of the RAM disk associated with the AMI.
list
One or more mappings that specify how block devices are exposed to the instance. For more information, see Block Device Mapping in the Amazon Elastic Compute Cloud User Guide.
(dict) --
Describes a block device mapping.
VirtualName (string) --
The name of the virtual device (for example, ephemeral0).
DeviceName (string) -- [REQUIRED]
The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
Ebs (dict) --
The information about the Amazon EBS volume.
SnapshotId (string) --
The ID of the snapshot.
VolumeSize (integer) --
The volume size, in gigabytes.
Valid values: If the volume type is io1, the minimum size of the volume is 10 GiB. If you specify SnapshotId and VolumeSize, VolumeSize must be equal to or larger than the size of the snapshot.
Default: If you create a volume from a snapshot and you don't specify a volume size, the default is the size of the snapshot.
Required: Required when the volume type is io1.
VolumeType (string) --
The volume type.
Valid values: standard | io1 | gp2
Default: standard
DeleteOnTermination (boolean) --
Indicates whether to delete the volume on instance termination.
Default: true
Iops (integer) --
For Provisioned IOPS (SSD) volumes only. The number of I/O operations per second (IOPS) to provision for the volume.
Default: None
Encrypted (boolean) --
Indicates whether the volume should be encrypted. Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or an unencrypted volume from an encrypted snapshot. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
NoDevice (boolean) --
Suppresses a device mapping.
If this parameter is true for the root device, the instance might fail the EC2 health check. Auto Scaling launches a replacement instance if the instance fails the health check.
dict
Enables detailed monitoring if it is disabled. Detailed monitoring is enabled by default.
When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, by specifying False, CloudWatch generates metrics every 5 minutes. For more information, see Monitor Your Auto Scaling Instances in the Auto Scaling Developer Guide.
Enabled (boolean) --
If True, instance monitoring is enabled.
string
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 market price. For more information, see Launch Spot Instances in Your Auto Scaling Group in the Auto Scaling Developer Guide.
string
The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
EC2 instances launched with an IAM role will automatically have AWS security credentials available. You can use IAM roles with Auto Scaling to automatically enable applications running on your EC2 instances to securely access other AWS resources. For more information, see Launch Auto Scaling Instances with an IAM Role in the Auto Scaling Developer Guide.
boolean
Indicates whether the instance is optimized for Amazon EBS I/O. By default, the instance is not optimized for EBS I/O. 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 usage charges apply. For more information, see Amazon EBS-Optimized Instances in the Amazon Elastic Compute Cloud User Guide.
boolean
Used for groups that launch instances into a virtual private cloud (VPC). Specifies whether to assign a public IP address to each instance. For more information, see Auto Scaling and Amazon Virtual Private Cloud in the Auto Scaling Developer Guide.
If you specify a value for this parameter, be sure to specify at least one subnet using the VPCZoneIdentifier parameter when you create your group.
Default: If the instance is launched into a default subnet, the default is true. If the instance is launched into a nondefault subnet, the default is false. For more information, see Supported Platforms in the Amazon Elastic Compute Cloud User Guide.
string
The tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware and can only be launched into a VPC.
You must set the value of this parameter to dedicated if want to launch Dedicated Instances into a shared tenancy VPC (VPC with instance placement tenancy attribute set to default).
If you specify a value for this parameter, be sure to specify at least one subnet using the VPCZoneIdentifier parameter when you create your group.
For more information, see Auto Scaling and Amazon Virtual Private Cloud in the Auto Scaling Developer Guide.
Valid values: default | dedicated
None
{'LaunchConfigurations': {'BlockDeviceMappings': {'Ebs': {'Encrypted': 'boolean'}}}}
Describes one or more launch configurations. If you omit the list of names, then the call describes all launch configurations.
Request Syntax
client.describe_launch_configurations( LaunchConfigurationNames=[ 'string', ], NextToken='string', MaxRecords=123 )
list
The launch configuration names.
(string) --
string
The token for the next set of items to return. (You received this token from a previous call.)
integer
The maximum number of items to return with this call. The default is 100.
dict
Response Syntax
{ 'LaunchConfigurations': [ { 'LaunchConfigurationName': 'string', 'LaunchConfigurationARN': 'string', 'ImageId': 'string', 'KeyName': 'string', 'SecurityGroups': [ 'string', ], 'ClassicLinkVPCId': 'string', 'ClassicLinkVPCSecurityGroups': [ 'string', ], 'UserData': 'string', 'InstanceType': 'string', 'KernelId': 'string', 'RamdiskId': 'string', 'BlockDeviceMappings': [ { 'VirtualName': 'string', 'DeviceName': 'string', 'Ebs': { 'SnapshotId': 'string', 'VolumeSize': 123, 'VolumeType': 'string', 'DeleteOnTermination': True|False, 'Iops': 123, 'Encrypted': True|False }, 'NoDevice': True|False }, ], 'InstanceMonitoring': { 'Enabled': True|False }, 'SpotPrice': 'string', 'IamInstanceProfile': 'string', 'CreatedTime': datetime(2015, 1, 1), 'EbsOptimized': True|False, 'AssociatePublicIpAddress': True|False, 'PlacementTenancy': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
LaunchConfigurations (list) --
The launch configurations.
(dict) --
Describes a launch configuration.
LaunchConfigurationName (string) --
The name of the launch configuration.
LaunchConfigurationARN (string) --
The Amazon Resource Name (ARN) of the launch configuration.
ImageId (string) --
The ID of the Amazon Machine Image (AMI).
KeyName (string) --
The name of the key pair.
SecurityGroups (list) --
The security groups to associate with the instances.
(string) --
ClassicLinkVPCId (string) --
The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter can only be used if you are launching EC2-Classic instances. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
ClassicLinkVPCSecurityGroups (list) --
The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId. This parameter is required if ClassicLinkVPCId is specified, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
(string) --
UserData (string) --
The user data available to the instances.
InstanceType (string) --
The instance type for the instances.
KernelId (string) --
The ID of the kernel associated with the AMI.
RamdiskId (string) --
The ID of the RAM disk associated with the AMI.
BlockDeviceMappings (list) --
A block device mapping, which specifies the block devices for the instance.
(dict) --
Describes a block device mapping.
VirtualName (string) --
The name of the virtual device (for example, ephemeral0).
DeviceName (string) --
The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
Ebs (dict) --
The information about the Amazon EBS volume.
SnapshotId (string) --
The ID of the snapshot.
VolumeSize (integer) --
The volume size, in gigabytes.
Valid values: If the volume type is io1, the minimum size of the volume is 10 GiB. If you specify SnapshotId and VolumeSize, VolumeSize must be equal to or larger than the size of the snapshot.
Default: If you create a volume from a snapshot and you don't specify a volume size, the default is the size of the snapshot.
Required: Required when the volume type is io1.
VolumeType (string) --
The volume type.
Valid values: standard | io1 | gp2
Default: standard
DeleteOnTermination (boolean) --
Indicates whether to delete the volume on instance termination.
Default: true
Iops (integer) --
For Provisioned IOPS (SSD) volumes only. The number of I/O operations per second (IOPS) to provision for the volume.
Default: None
Encrypted (boolean) --
Indicates whether the volume should be encrypted. Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or an unencrypted volume from an encrypted snapshot. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
NoDevice (boolean) --
Suppresses a device mapping.
If this parameter is true for the root device, the instance might fail the EC2 health check. Auto Scaling launches a replacement instance if the instance fails the health check.
InstanceMonitoring (dict) --
Controls whether instances in this group are launched with detailed monitoring.
Enabled (boolean) --
If True, instance monitoring is enabled.
SpotPrice (string) --
The price to bid when launching Spot Instances.
IamInstanceProfile (string) --
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
CreatedTime (datetime) --
The creation date and time for the launch configuration.
EbsOptimized (boolean) --
Controls whether the instance is optimized for EBS I/O ( true) or not ( false).
AssociatePublicIpAddress (boolean) --
[EC2-VPC] Indicates whether to assign a public IP address to each instance.
PlacementTenancy (string) --
The tenancy of the instance, either default or dedicated. An instance with dedicated tenancy runs in an isolated, single-tenant hardware and can only be launched into a VPC.
NextToken (string) --
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.