All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.RunInstancesRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

There is a newer version: 1.12.782
Show newest version
/*
 * Copyright 2011-2016 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.
 */
package com.amazonaws.services.ec2.model;

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.RunInstancesRequestMarshaller;

/**
 * 

* Contains the parameters for RunInstances. *

*/ public class RunInstancesRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest { /** *

* The ID of the AMI, which you can get by calling DescribeImages. *

*/ private String imageId; /** *

* The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can * launch in the target Availability Zone, Amazon EC2 launches no instances. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I run in * Amazon EC2 in the Amazon EC2 General FAQ. *

*/ private Integer minCount; /** *

* The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target * Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I run in * Amazon EC2 in the Amazon EC2 FAQ. *

*/ private Integer maxCount; /** *

* The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair. *

* *

* If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured * to allow users another way to log in. *

*
*/ private String keyName; /** *

* [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group * IDs instead. *

*

* Default: Amazon EC2 uses the default security group. *

*/ private com.amazonaws.internal.SdkInternalList securityGroups; /** *

* One or more security group IDs. You can create a security group using CreateSecurityGroup. *

*

* Default: Amazon EC2 uses the default security group. *

*/ private com.amazonaws.internal.SdkInternalList securityGroupIds; /** *

* The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance * at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or 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. *

*/ private String userData; /** *

* The instance type. For more information, see Instance Types in the Amazon * Elastic Compute Cloud User Guide. *

*

* Default: m1.small *

*/ private String instanceType; /** *

* The placement for the instance. *

*/ private Placement placement; /** *

* The ID of the kernel. *

* *

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon * Elastic Compute Cloud User Guide. *

*
*/ private String kernelId; /** *

* The ID of the RAM disk. *

* *

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon * Elastic Compute Cloud User Guide. *

*
*/ private String ramdiskId; /** *

* The block device mapping. *

* *

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. * This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a * snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed * using this action. *

*
*/ private com.amazonaws.internal.SdkInternalList blockDeviceMappings; /** *

* The monitoring for the instance. *

*/ private Boolean monitoring; /** *

* [EC2-VPC] The ID of the subnet to launch the instance into. *

*/ private String subnetId; /** *

* If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, * CLI, or API; otherwise, you can. If you set this parameter to true and then later want to be able to * terminate the instance, you must first change the value of the disableApiTermination attribute to * false using ModifyInstanceAttribute. Alternatively, if you set * InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by * running the shutdown command from the instance. *

*

* Default: false *

*/ private Boolean disableApiTermination; /** *

* Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *

*

* Default: stop *

*/ private String instanceInitiatedShutdownBehavior; /** *

* [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet. *

*

* Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if * PrivateIpAddresses.n.Primary is set to true and * PrivateIpAddresses.n.PrivateIpAddress is set to an IP address. *

*

* You cannot specify this option if you're launching more than one instance in the request. *

*

* Default: We select an IP address from the IP address range of the subnet. *

*/ private String privateIpAddress; /** *

* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see * Ensuring * Idempotency. *

*

* Constraints: Maximum 64 ASCII characters *

*/ private String clientToken; /** *

* Reserved. *

*/ private String additionalInfo; /** *

* One or more network interfaces. *

*/ private com.amazonaws.internal.SdkInternalList networkInterfaces; /** *

* The IAM instance profile. *

*/ private IamInstanceProfileSpecification iamInstanceProfile; /** *

* Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to * Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't * available with all instance types. Additional usage charges apply when using an EBS-optimized instance. *

*

* Default: false *

*/ private Boolean ebsOptimized; /** * Default constructor for RunInstancesRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize the object after creating it. */ public RunInstancesRequest() { } /** * Constructs a new RunInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param imageId * The ID of the AMI, which you can get by calling DescribeImages. * @param minCount * The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 * can launch in the target Availability Zone, Amazon EC2 launches no instances.

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I * run in Amazon EC2 in the Amazon EC2 General FAQ. * @param maxCount * The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the * target Availability Zone, Amazon EC2 launches the largest possible number of instances above * MinCount. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I * run in Amazon EC2 in the Amazon EC2 FAQ. */ public RunInstancesRequest(String imageId, Integer minCount, Integer maxCount) { setImageId(imageId); setMinCount(minCount); setMaxCount(maxCount); } /** *

* The ID of the AMI, which you can get by calling DescribeImages. *

* * @param imageId * The ID of the AMI, which you can get by calling DescribeImages. */ public void setImageId(String imageId) { this.imageId = imageId; } /** *

* The ID of the AMI, which you can get by calling DescribeImages. *

* * @return The ID of the AMI, which you can get by calling DescribeImages. */ public String getImageId() { return this.imageId; } /** *

* The ID of the AMI, which you can get by calling DescribeImages. *

* * @param imageId * The ID of the AMI, which you can get by calling DescribeImages. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withImageId(String imageId) { setImageId(imageId); return this; } /** *

* The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can * launch in the target Availability Zone, Amazon EC2 launches no instances. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I run in * Amazon EC2 in the Amazon EC2 General FAQ. *

* * @param minCount * The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 * can launch in the target Availability Zone, Amazon EC2 launches no instances.

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I * run in Amazon EC2 in the Amazon EC2 General FAQ. */ public void setMinCount(Integer minCount) { this.minCount = minCount; } /** *

* The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can * launch in the target Availability Zone, Amazon EC2 launches no instances. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I run in * Amazon EC2 in the Amazon EC2 General FAQ. *

* * @return The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon * EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can * I run in Amazon EC2 in the Amazon EC2 General FAQ. */ public Integer getMinCount() { return this.minCount; } /** *

* The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can * launch in the target Availability Zone, Amazon EC2 launches no instances. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I run in * Amazon EC2 in the Amazon EC2 General FAQ. *

* * @param minCount * The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 * can launch in the target Availability Zone, Amazon EC2 launches no instances.

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I * run in Amazon EC2 in the Amazon EC2 General FAQ. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withMinCount(Integer minCount) { setMinCount(minCount); return this; } /** *

* The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target * Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I run in * Amazon EC2 in the Amazon EC2 FAQ. *

* * @param maxCount * The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the * target Availability Zone, Amazon EC2 launches the largest possible number of instances above * MinCount.

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I * run in Amazon EC2 in the Amazon EC2 FAQ. */ public void setMaxCount(Integer maxCount) { this.maxCount = maxCount; } /** *

* The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target * Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I run in * Amazon EC2 in the Amazon EC2 FAQ. *

* * @return The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in * the target Availability Zone, Amazon EC2 launches the largest possible number of instances above * MinCount.

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can * I run in Amazon EC2 in the Amazon EC2 FAQ. */ public Integer getMaxCount() { return this.maxCount; } /** *

* The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target * Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount. *

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I run in * Amazon EC2 in the Amazon EC2 FAQ. *

* * @param maxCount * The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the * target Availability Zone, Amazon EC2 launches the largest possible number of instances above * MinCount.

*

* Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more * information about the default limits, and how to request an increase, see How many instances can I * run in Amazon EC2 in the Amazon EC2 FAQ. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withMaxCount(Integer maxCount) { setMaxCount(maxCount); return this; } /** *

* The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair. *

* *

* If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured * to allow users another way to log in. *

*
* * @param keyName * The name of the key pair. You can create a key pair using CreateKeyPair or * ImportKeyPair.

*

* If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is * configured to allow users another way to log in. *

*/ public void setKeyName(String keyName) { this.keyName = keyName; } /** *

* The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair. *

* *

* If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured * to allow users another way to log in. *

*
* * @return The name of the key pair. You can create a key pair using CreateKeyPair or * ImportKeyPair.

*

* If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is * configured to allow users another way to log in. *

*/ public String getKeyName() { return this.keyName; } /** *

* The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair. *

* *

* If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured * to allow users another way to log in. *

*
* * @param keyName * The name of the key pair. You can create a key pair using CreateKeyPair or * ImportKeyPair.

*

* If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is * configured to allow users another way to log in. *

* @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withKeyName(String keyName) { setKeyName(keyName); return this; } /** *

* [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group * IDs instead. *

*

* Default: Amazon EC2 uses the default security group. *

* * @return [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security * group IDs instead.

*

* Default: Amazon EC2 uses the default security group. */ public java.util.List getSecurityGroups() { if (securityGroups == null) { securityGroups = new com.amazonaws.internal.SdkInternalList(); } return securityGroups; } /** *

* [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group * IDs instead. *

*

* Default: Amazon EC2 uses the default security group. *

* * @param securityGroups * [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security * group IDs instead.

*

* Default: Amazon EC2 uses the default security group. */ public void setSecurityGroups(java.util.Collection securityGroups) { if (securityGroups == null) { this.securityGroups = null; return; } this.securityGroups = new com.amazonaws.internal.SdkInternalList(securityGroups); } /** *

* [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group * IDs instead. *

*

* Default: Amazon EC2 uses the default security group. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroups(java.util.Collection)} or {@link #withSecurityGroups(java.util.Collection)} if you want * to override the existing values. *

* * @param securityGroups * [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security * group IDs instead.

*

* Default: Amazon EC2 uses the default security group. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSecurityGroups(String... securityGroups) { if (this.securityGroups == null) { setSecurityGroups(new com.amazonaws.internal.SdkInternalList(securityGroups.length)); } for (String ele : securityGroups) { this.securityGroups.add(ele); } return this; } /** *

* [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group * IDs instead. *

*

* Default: Amazon EC2 uses the default security group. *

* * @param securityGroups * [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security * group IDs instead.

*

* Default: Amazon EC2 uses the default security group. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSecurityGroups(java.util.Collection securityGroups) { setSecurityGroups(securityGroups); return this; } /** *

* One or more security group IDs. You can create a security group using CreateSecurityGroup. *

*

* Default: Amazon EC2 uses the default security group. *

* * @return One or more security group IDs. You can create a security group using CreateSecurityGroup.

*

* Default: Amazon EC2 uses the default security group. */ public java.util.List getSecurityGroupIds() { if (securityGroupIds == null) { securityGroupIds = new com.amazonaws.internal.SdkInternalList(); } return securityGroupIds; } /** *

* One or more security group IDs. You can create a security group using CreateSecurityGroup. *

*

* Default: Amazon EC2 uses the default security group. *

* * @param securityGroupIds * One or more security group IDs. You can create a security group using CreateSecurityGroup.

*

* Default: Amazon EC2 uses the default security group. */ public void setSecurityGroupIds(java.util.Collection securityGroupIds) { if (securityGroupIds == null) { this.securityGroupIds = null; return; } this.securityGroupIds = new com.amazonaws.internal.SdkInternalList(securityGroupIds); } /** *

* One or more security group IDs. You can create a security group using CreateSecurityGroup. *

*

* Default: Amazon EC2 uses the default security group. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you * want to override the existing values. *

* * @param securityGroupIds * One or more security group IDs. You can create a security group using CreateSecurityGroup.

*

* Default: Amazon EC2 uses the default security group. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new com.amazonaws.internal.SdkInternalList(securityGroupIds.length)); } for (String ele : securityGroupIds) { this.securityGroupIds.add(ele); } return this; } /** *

* One or more security group IDs. You can create a security group using CreateSecurityGroup. *

*

* Default: Amazon EC2 uses the default security group. *

* * @param securityGroupIds * One or more security group IDs. You can create a security group using CreateSecurityGroup.

*

* Default: Amazon EC2 uses the default security group. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSecurityGroupIds(java.util.Collection securityGroupIds) { setSecurityGroupIds(securityGroupIds); return this; } /** *

* The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance * at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or 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. *

* * @param userData * The user data to make available to the instance. For more information, see Running Commands on Your Linux * Instance at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or 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. */ public void setUserData(String userData) { this.userData = userData; } /** *

* The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance * at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or 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. *

* * @return The user data to make available to the instance. For more information, see Running Commands on Your Linux * Instance at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or 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. */ public String getUserData() { return this.userData; } /** *

* The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance * at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or 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. *

* * @param userData * The user data to make available to the instance. For more information, see Running Commands on Your Linux * Instance at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or 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. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withUserData(String userData) { setUserData(userData); return this; } /** *

* The instance type. For more information, see Instance Types in the Amazon * Elastic Compute Cloud User Guide. *

*

* Default: m1.small *

* * @param instanceType * The instance type. For more information, see Instance Types in the * Amazon Elastic Compute Cloud User Guide.

*

* Default: m1.small * @see InstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The instance type. For more information, see Instance Types in the Amazon * Elastic Compute Cloud User Guide. *

*

* Default: m1.small *

* * @return The instance type. For more information, see Instance Types in the * Amazon Elastic Compute Cloud User Guide.

*

* Default: m1.small * @see InstanceType */ public String getInstanceType() { return this.instanceType; } /** *

* The instance type. For more information, see Instance Types in the Amazon * Elastic Compute Cloud User Guide. *

*

* Default: m1.small *

* * @param instanceType * The instance type. For more information, see Instance Types in the * Amazon Elastic Compute Cloud User Guide.

*

* Default: m1.small * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceType */ public RunInstancesRequest withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* The instance type. For more information, see Instance Types in the Amazon * Elastic Compute Cloud User Guide. *

*

* Default: m1.small *

* * @param instanceType * The instance type. For more information, see Instance Types in the * Amazon Elastic Compute Cloud User Guide.

*

* Default: m1.small * @see InstanceType */ public void setInstanceType(InstanceType instanceType) { this.instanceType = instanceType.toString(); } /** *

* The instance type. For more information, see Instance Types in the Amazon * Elastic Compute Cloud User Guide. *

*

* Default: m1.small *

* * @param instanceType * The instance type. For more information, see Instance Types in the * Amazon Elastic Compute Cloud User Guide.

*

* Default: m1.small * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceType */ public RunInstancesRequest withInstanceType(InstanceType instanceType) { setInstanceType(instanceType); return this; } /** *

* The placement for the instance. *

* * @param placement * The placement for the instance. */ public void setPlacement(Placement placement) { this.placement = placement; } /** *

* The placement for the instance. *

* * @return The placement for the instance. */ public Placement getPlacement() { return this.placement; } /** *

* The placement for the instance. *

* * @param placement * The placement for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withPlacement(Placement placement) { setPlacement(placement); return this; } /** *

* The ID of the kernel. *

* *

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon * Elastic Compute Cloud User Guide. *

*
* * @param kernelId * The ID of the kernel.

*

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the * Amazon Elastic Compute Cloud User Guide. *

*/ public void setKernelId(String kernelId) { this.kernelId = kernelId; } /** *

* The ID of the kernel. *

* *

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon * Elastic Compute Cloud User Guide. *

*
* * @return The ID of the kernel.

*

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the * Amazon Elastic Compute Cloud User Guide. *

*/ public String getKernelId() { return this.kernelId; } /** *

* The ID of the kernel. *

* *

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon * Elastic Compute Cloud User Guide. *

*
* * @param kernelId * The ID of the kernel.

*

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the * Amazon Elastic Compute Cloud User Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withKernelId(String kernelId) { setKernelId(kernelId); return this; } /** *

* The ID of the RAM disk. *

* *

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon * Elastic Compute Cloud User Guide. *

*
* * @param ramdiskId * The ID of the RAM disk.

*

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the * Amazon Elastic Compute Cloud User Guide. *

*/ public void setRamdiskId(String ramdiskId) { this.ramdiskId = ramdiskId; } /** *

* The ID of the RAM disk. *

* *

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon * Elastic Compute Cloud User Guide. *

*
* * @return The ID of the RAM disk.

*

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the * Amazon Elastic Compute Cloud User Guide. *

*/ public String getRamdiskId() { return this.ramdiskId; } /** *

* The ID of the RAM disk. *

* *

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon * Elastic Compute Cloud User Guide. *

*
* * @param ramdiskId * The ID of the RAM disk.

*

* We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the * Amazon Elastic Compute Cloud User Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withRamdiskId(String ramdiskId) { setRamdiskId(ramdiskId); return this; } /** *

* The block device mapping. *

* *

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. * This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a * snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed * using this action. *

*
* * @return The block device mapping.

*

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an * error. This is because only blank volumes can be encrypted on start, and these are not created from a * snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption * status cannot be changed using this action. *

*/ public java.util.List getBlockDeviceMappings() { if (blockDeviceMappings == null) { blockDeviceMappings = new com.amazonaws.internal.SdkInternalList(); } return blockDeviceMappings; } /** *

* The block device mapping. *

* *

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. * This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a * snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed * using this action. *

*
* * @param blockDeviceMappings * The block device mapping.

*

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an * error. This is because only blank volumes can be encrypted on start, and these are not created from a * snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption * status cannot be changed using this action. *

*/ public void setBlockDeviceMappings(java.util.Collection blockDeviceMappings) { if (blockDeviceMappings == null) { this.blockDeviceMappings = null; return; } this.blockDeviceMappings = new com.amazonaws.internal.SdkInternalList(blockDeviceMappings); } /** *

* The block device mapping. *

* *

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. * This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a * snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed * using this action. *

*
*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBlockDeviceMappings(java.util.Collection)} or {@link #withBlockDeviceMappings(java.util.Collection)} * if you want to override the existing values. *

* * @param blockDeviceMappings * The block device mapping.

*

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an * error. This is because only blank volumes can be encrypted on start, and these are not created from a * snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption * status cannot be changed using this action. *

* @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) { if (this.blockDeviceMappings == null) { setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList(blockDeviceMappings.length)); } for (BlockDeviceMapping ele : blockDeviceMappings) { this.blockDeviceMappings.add(ele); } return this; } /** *

* The block device mapping. *

* *

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. * This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a * snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed * using this action. *

*
* * @param blockDeviceMappings * The block device mapping.

*

* Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an * error. This is because only blank volumes can be encrypted on start, and these are not created from a * snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption * status cannot be changed using this action. *

* @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withBlockDeviceMappings(java.util.Collection blockDeviceMappings) { setBlockDeviceMappings(blockDeviceMappings); return this; } /** *

* The monitoring for the instance. *

* * @param monitoring * The monitoring for the instance. */ public void setMonitoring(Boolean monitoring) { this.monitoring = monitoring; } /** *

* The monitoring for the instance. *

* * @return The monitoring for the instance. */ public Boolean getMonitoring() { return this.monitoring; } /** *

* The monitoring for the instance. *

* * @param monitoring * The monitoring for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withMonitoring(Boolean monitoring) { setMonitoring(monitoring); return this; } /** *

* The monitoring for the instance. *

* * @return The monitoring for the instance. */ public Boolean isMonitoring() { return this.monitoring; } /** *

* [EC2-VPC] The ID of the subnet to launch the instance into. *

* * @param subnetId * [EC2-VPC] The ID of the subnet to launch the instance into. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** *

* [EC2-VPC] The ID of the subnet to launch the instance into. *

* * @return [EC2-VPC] The ID of the subnet to launch the instance into. */ public String getSubnetId() { return this.subnetId; } /** *

* [EC2-VPC] The ID of the subnet to launch the instance into. *

* * @param subnetId * [EC2-VPC] The ID of the subnet to launch the instance into. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** *

* If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, * CLI, or API; otherwise, you can. If you set this parameter to true and then later want to be able to * terminate the instance, you must first change the value of the disableApiTermination attribute to * false using ModifyInstanceAttribute. Alternatively, if you set * InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by * running the shutdown command from the instance. *

*

* Default: false *

* * @param disableApiTermination * If you set this parameter to true, you can't terminate the instance using the Amazon EC2 * console, CLI, or API; otherwise, you can. If you set this parameter to true and then later * want to be able to terminate the instance, you must first change the value of the * disableApiTermination attribute to false using ModifyInstanceAttribute. * Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you * can terminate the instance by running the shutdown command from the instance.

*

* Default: false */ public void setDisableApiTermination(Boolean disableApiTermination) { this.disableApiTermination = disableApiTermination; } /** *

* If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, * CLI, or API; otherwise, you can. If you set this parameter to true and then later want to be able to * terminate the instance, you must first change the value of the disableApiTermination attribute to * false using ModifyInstanceAttribute. Alternatively, if you set * InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by * running the shutdown command from the instance. *

*

* Default: false *

* * @return If you set this parameter to true, you can't terminate the instance using the Amazon EC2 * console, CLI, or API; otherwise, you can. If you set this parameter to true and then later * want to be able to terminate the instance, you must first change the value of the * disableApiTermination attribute to false using ModifyInstanceAttribute. * Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you * can terminate the instance by running the shutdown command from the instance.

*

* Default: false */ public Boolean getDisableApiTermination() { return this.disableApiTermination; } /** *

* If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, * CLI, or API; otherwise, you can. If you set this parameter to true and then later want to be able to * terminate the instance, you must first change the value of the disableApiTermination attribute to * false using ModifyInstanceAttribute. Alternatively, if you set * InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by * running the shutdown command from the instance. *

*

* Default: false *

* * @param disableApiTermination * If you set this parameter to true, you can't terminate the instance using the Amazon EC2 * console, CLI, or API; otherwise, you can. If you set this parameter to true and then later * want to be able to terminate the instance, you must first change the value of the * disableApiTermination attribute to false using ModifyInstanceAttribute. * Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you * can terminate the instance by running the shutdown command from the instance.

*

* Default: false * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withDisableApiTermination(Boolean disableApiTermination) { setDisableApiTermination(disableApiTermination); return this; } /** *

* If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, * CLI, or API; otherwise, you can. If you set this parameter to true and then later want to be able to * terminate the instance, you must first change the value of the disableApiTermination attribute to * false using ModifyInstanceAttribute. Alternatively, if you set * InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by * running the shutdown command from the instance. *

*

* Default: false *

* * @return If you set this parameter to true, you can't terminate the instance using the Amazon EC2 * console, CLI, or API; otherwise, you can. If you set this parameter to true and then later * want to be able to terminate the instance, you must first change the value of the * disableApiTermination attribute to false using ModifyInstanceAttribute. * Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you * can terminate the instance by running the shutdown command from the instance.

*

* Default: false */ public Boolean isDisableApiTermination() { return this.disableApiTermination; } /** *

* Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *

*

* Default: stop *

* * @param instanceInitiatedShutdownBehavior * Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown).

*

* Default: stop * @see ShutdownBehavior */ public void setInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior) { this.instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehavior; } /** *

* Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *

*

* Default: stop *

* * @return Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown).

*

* Default: stop * @see ShutdownBehavior */ public String getInstanceInitiatedShutdownBehavior() { return this.instanceInitiatedShutdownBehavior; } /** *

* Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *

*

* Default: stop *

* * @param instanceInitiatedShutdownBehavior * Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown).

*

* Default: stop * @return Returns a reference to this object so that method calls can be chained together. * @see ShutdownBehavior */ public RunInstancesRequest withInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior) { setInstanceInitiatedShutdownBehavior(instanceInitiatedShutdownBehavior); return this; } /** *

* Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *

*

* Default: stop *

* * @param instanceInitiatedShutdownBehavior * Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown).

*

* Default: stop * @see ShutdownBehavior */ public void setInstanceInitiatedShutdownBehavior(ShutdownBehavior instanceInitiatedShutdownBehavior) { this.instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehavior.toString(); } /** *

* Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown). *

*

* Default: stop *

* * @param instanceInitiatedShutdownBehavior * Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the * operating system command for system shutdown).

*

* Default: stop * @return Returns a reference to this object so that method calls can be chained together. * @see ShutdownBehavior */ public RunInstancesRequest withInstanceInitiatedShutdownBehavior(ShutdownBehavior instanceInitiatedShutdownBehavior) { setInstanceInitiatedShutdownBehavior(instanceInitiatedShutdownBehavior); return this; } /** *

* [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet. *

*

* Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if * PrivateIpAddresses.n.Primary is set to true and * PrivateIpAddresses.n.PrivateIpAddress is set to an IP address. *

*

* You cannot specify this option if you're launching more than one instance in the request. *

*

* Default: We select an IP address from the IP address range of the subnet. *

* * @param privateIpAddress * [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.

*

* Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if * PrivateIpAddresses.n.Primary is set to true and * PrivateIpAddresses.n.PrivateIpAddress is set to an IP address. *

*

* You cannot specify this option if you're launching more than one instance in the request. *

*

* Default: We select an IP address from the IP address range of the subnet. */ public void setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; } /** *

* [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet. *

*

* Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if * PrivateIpAddresses.n.Primary is set to true and * PrivateIpAddresses.n.PrivateIpAddress is set to an IP address. *

*

* You cannot specify this option if you're launching more than one instance in the request. *

*

* Default: We select an IP address from the IP address range of the subnet. *

* * @return [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.

*

* Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if * PrivateIpAddresses.n.Primary is set to true and * PrivateIpAddresses.n.PrivateIpAddress is set to an IP address. *

*

* You cannot specify this option if you're launching more than one instance in the request. *

*

* Default: We select an IP address from the IP address range of the subnet. */ public String getPrivateIpAddress() { return this.privateIpAddress; } /** *

* [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet. *

*

* Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if * PrivateIpAddresses.n.Primary is set to true and * PrivateIpAddresses.n.PrivateIpAddress is set to an IP address. *

*

* You cannot specify this option if you're launching more than one instance in the request. *

*

* Default: We select an IP address from the IP address range of the subnet. *

* * @param privateIpAddress * [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.

*

* Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if * PrivateIpAddresses.n.Primary is set to true and * PrivateIpAddresses.n.PrivateIpAddress is set to an IP address. *

*

* You cannot specify this option if you're launching more than one instance in the request. *

*

* Default: We select an IP address from the IP address range of the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withPrivateIpAddress(String privateIpAddress) { setPrivateIpAddress(privateIpAddress); return this; } /** *

* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see * Ensuring * Idempotency. *

*

* Constraints: Maximum 64 ASCII characters *

* * @param clientToken * Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency.

*

* Constraints: Maximum 64 ASCII characters */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see * Ensuring * Idempotency. *

*

* Constraints: Maximum 64 ASCII characters *

* * @return Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency.

*

* Constraints: Maximum 64 ASCII characters */ public String getClientToken() { return this.clientToken; } /** *

* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see * Ensuring * Idempotency. *

*

* Constraints: Maximum 64 ASCII characters *

* * @param clientToken * Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency.

*

* Constraints: Maximum 64 ASCII characters * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* Reserved. *

* * @param additionalInfo * Reserved. */ public void setAdditionalInfo(String additionalInfo) { this.additionalInfo = additionalInfo; } /** *

* Reserved. *

* * @return Reserved. */ public String getAdditionalInfo() { return this.additionalInfo; } /** *

* Reserved. *

* * @param additionalInfo * Reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withAdditionalInfo(String additionalInfo) { setAdditionalInfo(additionalInfo); return this; } /** *

* One or more network interfaces. *

* * @return One or more network interfaces. */ public java.util.List getNetworkInterfaces() { if (networkInterfaces == null) { networkInterfaces = new com.amazonaws.internal.SdkInternalList(); } return networkInterfaces; } /** *

* One or more network interfaces. *

* * @param networkInterfaces * One or more network interfaces. */ public void setNetworkInterfaces(java.util.Collection networkInterfaces) { if (networkInterfaces == null) { this.networkInterfaces = null; return; } this.networkInterfaces = new com.amazonaws.internal.SdkInternalList(networkInterfaces); } /** *

* One or more network interfaces. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setNetworkInterfaces(java.util.Collection)} or {@link #withNetworkInterfaces(java.util.Collection)} if * you want to override the existing values. *

* * @param networkInterfaces * One or more network interfaces. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces) { if (this.networkInterfaces == null) { setNetworkInterfaces(new com.amazonaws.internal.SdkInternalList(networkInterfaces.length)); } for (InstanceNetworkInterfaceSpecification ele : networkInterfaces) { this.networkInterfaces.add(ele); } return this; } /** *

* One or more network interfaces. *

* * @param networkInterfaces * One or more network interfaces. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withNetworkInterfaces(java.util.Collection networkInterfaces) { setNetworkInterfaces(networkInterfaces); return this; } /** *

* The IAM instance profile. *

* * @param iamInstanceProfile * The IAM instance profile. */ public void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile) { this.iamInstanceProfile = iamInstanceProfile; } /** *

* The IAM instance profile. *

* * @return The IAM instance profile. */ public IamInstanceProfileSpecification getIamInstanceProfile() { return this.iamInstanceProfile; } /** *

* The IAM instance profile. *

* * @param iamInstanceProfile * The IAM instance profile. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile) { setIamInstanceProfile(iamInstanceProfile); return this; } /** *

* Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to * Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't * available with all instance types. Additional usage charges apply when using an EBS-optimized instance. *

*

* Default: false *

* * @param ebsOptimized * Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput * to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an * EBS-optimized instance.

*

* Default: false */ public void setEbsOptimized(Boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; } /** *

* Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to * Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't * available with all instance types. Additional usage charges apply when using an EBS-optimized instance. *

*

* Default: false *

* * @return Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput * to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an * EBS-optimized instance.

*

* Default: false */ public Boolean getEbsOptimized() { return this.ebsOptimized; } /** *

* Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to * Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't * available with all instance types. Additional usage charges apply when using an EBS-optimized instance. *

*

* Default: false *

* * @param ebsOptimized * Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput * to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an * EBS-optimized instance.

*

* Default: false * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withEbsOptimized(Boolean ebsOptimized) { setEbsOptimized(ebsOptimized); return this; } /** *

* Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to * Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't * available with all instance types. Additional usage charges apply when using an EBS-optimized instance. *

*

* Default: false *

* * @return Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput * to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an * EBS-optimized instance.

*

* Default: false */ public Boolean isEbsOptimized() { return this.ebsOptimized; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request getDryRunRequest() { Request request = new RunInstancesRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getImageId() != null) sb.append("ImageId: " + getImageId() + ","); if (getMinCount() != null) sb.append("MinCount: " + getMinCount() + ","); if (getMaxCount() != null) sb.append("MaxCount: " + getMaxCount() + ","); if (getKeyName() != null) sb.append("KeyName: " + getKeyName() + ","); if (getSecurityGroups() != null) sb.append("SecurityGroups: " + getSecurityGroups() + ","); if (getSecurityGroupIds() != null) sb.append("SecurityGroupIds: " + getSecurityGroupIds() + ","); if (getUserData() != null) sb.append("UserData: " + getUserData() + ","); if (getInstanceType() != null) sb.append("InstanceType: " + getInstanceType() + ","); if (getPlacement() != null) sb.append("Placement: " + getPlacement() + ","); if (getKernelId() != null) sb.append("KernelId: " + getKernelId() + ","); if (getRamdiskId() != null) sb.append("RamdiskId: " + getRamdiskId() + ","); if (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ","); if (getMonitoring() != null) sb.append("Monitoring: " + getMonitoring() + ","); if (getSubnetId() != null) sb.append("SubnetId: " + getSubnetId() + ","); if (getDisableApiTermination() != null) sb.append("DisableApiTermination: " + getDisableApiTermination() + ","); if (getInstanceInitiatedShutdownBehavior() != null) sb.append("InstanceInitiatedShutdownBehavior: " + getInstanceInitiatedShutdownBehavior() + ","); if (getPrivateIpAddress() != null) sb.append("PrivateIpAddress: " + getPrivateIpAddress() + ","); if (getClientToken() != null) sb.append("ClientToken: " + getClientToken() + ","); if (getAdditionalInfo() != null) sb.append("AdditionalInfo: " + getAdditionalInfo() + ","); if (getNetworkInterfaces() != null) sb.append("NetworkInterfaces: " + getNetworkInterfaces() + ","); if (getIamInstanceProfile() != null) sb.append("IamInstanceProfile: " + getIamInstanceProfile() + ","); if (getEbsOptimized() != null) sb.append("EbsOptimized: " + getEbsOptimized()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RunInstancesRequest == false) return false; RunInstancesRequest other = (RunInstancesRequest) obj; if (other.getImageId() == null ^ this.getImageId() == null) return false; if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false) return false; if (other.getMinCount() == null ^ this.getMinCount() == null) return false; if (other.getMinCount() != null && other.getMinCount().equals(this.getMinCount()) == false) return false; if (other.getMaxCount() == null ^ this.getMaxCount() == null) return false; if (other.getMaxCount() != null && other.getMaxCount().equals(this.getMaxCount()) == false) return false; if (other.getKeyName() == null ^ this.getKeyName() == null) return false; if (other.getKeyName() != null && other.getKeyName().equals(this.getKeyName()) == false) return false; if (other.getSecurityGroups() == null ^ this.getSecurityGroups() == null) return false; if (other.getSecurityGroups() != null && other.getSecurityGroups().equals(this.getSecurityGroups()) == false) return false; if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == null) return false; if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals(this.getSecurityGroupIds()) == false) return false; if (other.getUserData() == null ^ this.getUserData() == null) return false; if (other.getUserData() != null && other.getUserData().equals(this.getUserData()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getPlacement() == null ^ this.getPlacement() == null) return false; if (other.getPlacement() != null && other.getPlacement().equals(this.getPlacement()) == false) return false; if (other.getKernelId() == null ^ this.getKernelId() == null) return false; if (other.getKernelId() != null && other.getKernelId().equals(this.getKernelId()) == false) return false; if (other.getRamdiskId() == null ^ this.getRamdiskId() == null) return false; if (other.getRamdiskId() != null && other.getRamdiskId().equals(this.getRamdiskId()) == false) return false; if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null) return false; if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == false) return false; if (other.getMonitoring() == null ^ this.getMonitoring() == null) return false; if (other.getMonitoring() != null && other.getMonitoring().equals(this.getMonitoring()) == false) return false; if (other.getSubnetId() == null ^ this.getSubnetId() == null) return false; if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == false) return false; if (other.getDisableApiTermination() == null ^ this.getDisableApiTermination() == null) return false; if (other.getDisableApiTermination() != null && other.getDisableApiTermination().equals(this.getDisableApiTermination()) == false) return false; if (other.getInstanceInitiatedShutdownBehavior() == null ^ this.getInstanceInitiatedShutdownBehavior() == null) return false; if (other.getInstanceInitiatedShutdownBehavior() != null && other.getInstanceInitiatedShutdownBehavior().equals(this.getInstanceInitiatedShutdownBehavior()) == false) return false; if (other.getPrivateIpAddress() == null ^ this.getPrivateIpAddress() == null) return false; if (other.getPrivateIpAddress() != null && other.getPrivateIpAddress().equals(this.getPrivateIpAddress()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getAdditionalInfo() == null ^ this.getAdditionalInfo() == null) return false; if (other.getAdditionalInfo() != null && other.getAdditionalInfo().equals(this.getAdditionalInfo()) == false) return false; if (other.getNetworkInterfaces() == null ^ this.getNetworkInterfaces() == null) return false; if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals(this.getNetworkInterfaces()) == false) return false; if (other.getIamInstanceProfile() == null ^ this.getIamInstanceProfile() == null) return false; if (other.getIamInstanceProfile() != null && other.getIamInstanceProfile().equals(this.getIamInstanceProfile()) == false) return false; if (other.getEbsOptimized() == null ^ this.getEbsOptimized() == null) return false; if (other.getEbsOptimized() != null && other.getEbsOptimized().equals(this.getEbsOptimized()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); hashCode = prime * hashCode + ((getMinCount() == null) ? 0 : getMinCount().hashCode()); hashCode = prime * hashCode + ((getMaxCount() == null) ? 0 : getMaxCount().hashCode()); hashCode = prime * hashCode + ((getKeyName() == null) ? 0 : getKeyName().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getUserData() == null) ? 0 : getUserData().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getPlacement() == null) ? 0 : getPlacement().hashCode()); hashCode = prime * hashCode + ((getKernelId() == null) ? 0 : getKernelId().hashCode()); hashCode = prime * hashCode + ((getRamdiskId() == null) ? 0 : getRamdiskId().hashCode()); hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); hashCode = prime * hashCode + ((getMonitoring() == null) ? 0 : getMonitoring().hashCode()); hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); hashCode = prime * hashCode + ((getDisableApiTermination() == null) ? 0 : getDisableApiTermination().hashCode()); hashCode = prime * hashCode + ((getInstanceInitiatedShutdownBehavior() == null) ? 0 : getInstanceInitiatedShutdownBehavior().hashCode()); hashCode = prime * hashCode + ((getPrivateIpAddress() == null) ? 0 : getPrivateIpAddress().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); hashCode = prime * hashCode + ((getIamInstanceProfile() == null) ? 0 : getIamInstanceProfile().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); return hashCode; } @Override public RunInstancesRequest clone() { return (RunInstancesRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy