AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the CreateLaunchConfiguration operation. 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 User Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.AutoScaling.AmazonAutoScalingRequest
      Amazon.AutoScaling.Model.CreateLaunchConfigurationRequest

Namespace: Amazon.AutoScaling.Model
Assembly: AWSSDK.AutoScaling.dll
Version: 3.x.y.z

Syntax

C#
public class CreateLaunchConfigurationRequest : AmazonAutoScalingRequest
         IAmazonWebServiceRequest

The CreateLaunchConfigurationRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property AssociatePublicIpAddress System.Boolean

Gets and sets the property AssociatePublicIpAddress.

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 Launching Auto Scaling Instances in a VPC in the Auto Scaling User Guide.

If you specify this parameter, be sure to specify at least one subnet 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.

Public Property BlockDeviceMappings System.Collections.Generic.List<Amazon.AutoScaling.Model.BlockDeviceMapping>

Gets and sets the property BlockDeviceMappings.

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.

Public Property ClassicLinkVPCId System.String

Gets and sets the property ClassicLinkVPCId.

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.

Public Property ClassicLinkVPCSecurityGroups System.Collections.Generic.List<System.String>

Gets and sets the property ClassicLinkVPCSecurityGroups.

The IDs of one or more security groups for the specified ClassicLink-enabled VPC. This parameter is required if you specify a ClassicLink-enabled VPC, and is not supported otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

Public Property EbsOptimized System.Boolean

Gets and sets the property EbsOptimized.

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.

Public Property IamInstanceProfile System.String

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.

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 User Guide.

Public Property ImageId System.String

Gets and sets the property ImageId.

The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.

If you do not specify InstanceId, you must specify ImageId.

For more information, see Finding an AMI in the Amazon Elastic Compute Cloud User Guide.

Public Property InstanceId System.String

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, with the exception of the block device mapping.

If you do not specify InstanceId, you must specify both ImageId and InstanceType.

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 User Guide.

Public Property InstanceMonitoring Amazon.AutoScaling.Model.InstanceMonitoring

Gets and sets the property InstanceMonitoring.

Enables detailed monitoring (true) or basic monitoring (false) for the Auto Scaling instances. The default is true.

Public Property InstanceType System.String

Gets and sets the property InstanceType.

The instance type of the EC2 instance.

If you do not specify InstanceId, you must specify InstanceType.

For information about available instance types, see Available Instance Types in the Amazon Elastic Compute Cloud User Guide.

Public Property KernelId System.String

Gets and sets the property KernelId.

The ID of the kernel associated with the AMI.

Public Property KeyName System.String

Gets and sets the property KeyName.

The name of the key pair. For more information, see Amazon EC2 Key Pairs in the Amazon Elastic Compute Cloud User Guide.

Public Property LaunchConfigurationName System.String

Gets and sets the property LaunchConfigurationName.

The name of the launch configuration. This name must be unique within the scope of your AWS account.

Public Property PlacementTenancy System.String

Gets and sets the property PlacementTenancy.

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 this parameter, be sure to specify at least one subnet when you create your group.

For more information, see Launching Auto Scaling Instances in a VPC in the Auto Scaling User Guide.

Valid values: default | dedicated

Public Property RamdiskId System.String

Gets and sets the property RamdiskId.

The ID of the RAM disk associated with the AMI.

Public Property SecurityGroups System.Collections.Generic.List<System.String>

Gets and sets the property SecurityGroups.

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.

Public Property SpotPrice System.String

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 market price. For more information, see Launching Spot Instances in Your Auto Scaling Group in the Auto Scaling User Guide.

Public Property UserData System.String

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 in the Amazon Elastic Compute Cloud User Guide.

Examples

This example creates a launch configuration.

To create a launch configuration


var response = client.CreateLaunchConfiguration(new CreateLaunchConfigurationRequest 
{
    IamInstanceProfile = "my-iam-role",
    ImageId = "ami-12345678",
    InstanceType = "m3.medium",
    LaunchConfigurationName = "my-launch-config",
    SecurityGroups = new List {
        "sg-eb2af88e"
    }
});


            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms