AWS SDK for .NET Documentation
RunInstancesRequest Class
AmazonAmazon.EC2.ModelRunInstancesRequest Did this page help you?   Yes   No    Tell us about it...
Container for the parameters to the RunInstances operation.

Launches the specified number of instances using an AMI for which you have permissions.

When you launch an instance, it enters the pending state. After the instance is ready for you, it enters the running state. To check the state of your instance, call DescribeInstances.

If you don't specify a security group when launching an instance, Amazon EC2 uses the default security group. For more information, see Security Groups in the Amazon Elastic Compute Cloud User Guide .

Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .

You can provide optional user data when launching an instance. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide .

If any of the AMIs have a product code attached for which the user has not subscribed, RunInstances fails.

For more information about troubleshooting, see What To Do If An Instance Immediately Terminates , and Troubleshooting Connecting to Your Instance in the Amazon Elastic Compute Cloud User Guide .

Declaration Syntax
C#
public class RunInstancesRequest : EC2Request
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
RunInstancesRequest()()()()
Initializes a new instance of the RunInstancesRequest class

BlockDeviceMapping
Block device mapping.

ClientToken
Unique, case-sensitive identifier you provide to ensure idempotency of the request.

DisableApiTermination
Whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.

EbsOptimized
Whether to use the EBS IOPS optimized option.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
ImageId
Unique ID of a machine image.

InstanceInitiatedShutdownBehavior
Whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.

InstanceProfile
An Identity and Access Management Instance Profile to associate with the instance.

InstanceType
The instance type. Valid Values: m1.small | m1.medium | m1.large | m1.xlarge | c1.medium | c1.xlarge | m2.2xlarge | m2.4xlarge Default: m1.small

IsSetBlockDeviceMapping()()()()
Checks if BlockDeviceMapping property is set

IsSetClientToken()()()()
Checks if ClientToken property is set

IsSetDisableApiTermination()()()()
Checks if DisableApiTermination property is set

IsSetEbsOptimized()()()()
Checks if EbsOptimized property is set

IsSetImageId()()()()
Checks if ImageId property is set

IsSetInstanceInitiatedShutdownBehavior()()()()
Checks if InstanceInitiatedShutdownBehavior property is set

IsSetInstanceProfile()()()()
Checks if the InstanceProfile property is set

IsSetInstanceType()()()()
Checks if InstanceType property is set

IsSetKernelId()()()()
Checks if KernelId property is set

IsSetKeyName()()()()
Checks if KeyName property is set

IsSetLicense()()()()
Checks if License property is set

IsSetMaxCount()()()()
Checks if MaxCount property is set

IsSetMinCount()()()()
Checks if MinCount property is set

IsSetMonitoring()()()()
Checks if Monitoring property is set

IsSetNetworkInterfaceSet()()()()
Checks if the NetworkInterfaceSet property is set

IsSetPlacement()()()()
Checks if Placement property is set

IsSetPrivateIpAddress()()()()
Checks if PrivateIpAddress property is set

IsSetRamdiskId()()()()
Checks if RamdiskId property is set

IsSetSecurityGroup()()()()
Checks if SecurityGroup property is set

IsSetSecurityGroupId()()()()
Checks if SecurityGroupId property is set

IsSetSubnetId()()()()
Checks if SubnetId property is set

IsSetUserData()()()()
Checks if UserData property is set

KernelId
The ID of the kernel with which to launch the instance.

KeyName
The name of the key pair to use.

License
Active licenses in use and attached to an Amazon EC2 instance.

MaxCount
Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead. Constraints: Between 1 and the maximum number allowed for your account (default: 20).

MinCount
Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all. Constraints: Between 1 and the maximum number allowed for your account (default: 20).

Monitoring
Monitoring for the instance.

NetworkInterfaceSet
A set of one or more existing network interfaces to attach to the instance.

Placement
The placement constraints.

PrivateIpAddress
Private IP address for this instance.
Remarks
If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.

RamdiskId
The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.

SecurityGroup
Names of the security groups.

SecurityGroupId
IDs of the security groups.

SubnetId
The subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.

ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
UserData
MIME, Base64-encoded user data.

WithBlockDeviceMapping(array<BlockDeviceMapping>[]()[][]) Obsolete.
Sets the block device mapping.

WithClientToken(String) Obsolete.
Sets the unique, case-sensitive identifier to ensure idempotency of the request.

WithDisableApiTermination(Boolean) Obsolete.
Sets whether the instance can be terminated using the APIs.

WithEbsOptimized(Boolean) Obsolete.
Sets whether to use the EBS IOPS optimized option.

WithImageId(String) Obsolete.
Sets the unique ID of a machine image.

WithInstanceInitiatedShutdownBehavior(String) Obsolete.
Sets whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.

WithInstanceProfile(IAMInstanceProfile) Obsolete.
Sets an Identity and Access Management Instance Profile to associate with the instance.

WithInstanceType(String) Obsolete.
Sets the instance type.

WithKernelId(String) Obsolete.
Sets the ID of the kernel with which to launch the instance.

WithKeyName(String) Obsolete.
Sets the name of the key pair to use.

WithLicense(InstanceLicenseSpecification) Obsolete.
Sets the active licenses in use and attached to an Amazon EC2 instance.

WithMaxCount(Decimal) Obsolete.
Sets the maximum number of instances to launch.

WithMinCount(Decimal) Obsolete.
Sets the minimum number of instances to launch.

WithMonitoring(MonitoringSpecification) Obsolete.
Sets the monitoring for the instance.

WithNetworkInterfaceSet(array<InstanceNetworkInterfaceSpecification>[]()[][]) Obsolete.
Sets one or more existing network interfaces to attach to the instance.

WithPlacement(Placement) Obsolete.
Sets the placement constraints.

WithPrivateIpAddress(String) Obsolete.
Sets the private IP address for this instance.

WithRamdiskId(String) Obsolete.
Sets the ID of the RAM disk with which to launch the instance.

WithSecurityGroup(array<String>[]()[][]) Obsolete.
Sets the names of the security groups.

WithSecurityGroupId(array<String>[]()[][]) Obsolete.
Sets the IDs of the security groups.

WithSubnetId(String) Obsolete.
Sets the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.

WithUserData(String) Obsolete.
Sets the MIME, Base64-encoded user data.

Inheritance Hierarchy
Object
EC2Request
 RunInstancesRequest

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)