Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 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.autoscaling.model;
  

Describes a launch configuration.

  
  public class LaunchConfiguration implements SerializableCloneable {

    
The name of the launch configuration.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String launchConfigurationName;

    
The Amazon Resource Name (ARN) of the launch configuration.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String launchConfigurationARN;

    
The ID of the Amazon Machine Image (AMI).

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String imageId;

    
The name of the key pair.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String keyName;

    
The security groups to associate with the instances.
  
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.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String classicLinkVPCId;

    
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.
  
The user data available to the instances.

Constraints:
Length: 0 - 21847
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String userData;

    
The instance type for the instances.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String instanceType;

    
The ID of the kernel associated with the AMI.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String kernelId;

    
The ID of the RAM disk associated with the AMI.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String ramdiskId;

    
A block device mapping, which specifies the block devices for the instance.
 
Controls whether instances in this group are launched with detailed monitoring.
 
     private InstanceMonitoring instanceMonitoring;

    
The price to bid when launching Spot Instances.

Constraints:
Length: 1 - 255

 
     private String spotPrice;

    
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String iamInstanceProfile;

    
The creation date and time for the launch configuration.
 
     private java.util.Date createdTime;

    
Controls whether the instance is optimized for EBS I/O (true) or not (false).
 
     private Boolean ebsOptimized;

    
Specifies whether the instances are associated with a public IP address (true) or not (false).
 
     private Boolean associatePublicIpAddress;

    
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.

Constraints:
Length: 1 - 64
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String placementTenancy;

    
The name of the launch configuration.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name of the launch configuration.
 
     public String getLaunchConfigurationName() {
         return ;
     }
    
    
The name of the launch configuration.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
launchConfigurationName The name of the launch configuration.
 
     public void setLaunchConfigurationName(String launchConfigurationName) {
         this. = launchConfigurationName;
     }
    
    
The name of the launch configuration.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
launchConfigurationName The name of the launch configuration.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withLaunchConfigurationName(String launchConfigurationName) {
         this. = launchConfigurationName;
         return this;
     }

    
The Amazon Resource Name (ARN) of the launch configuration.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The Amazon Resource Name (ARN) of the launch configuration.
 
     public String getLaunchConfigurationARN() {
         return ;
     }
    
    
The Amazon Resource Name (ARN) of the launch configuration.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
launchConfigurationARN The Amazon Resource Name (ARN) of the launch configuration.
 
     public void setLaunchConfigurationARN(String launchConfigurationARN) {
         this. = launchConfigurationARN;
     }
    
    
The Amazon Resource Name (ARN) of the launch configuration.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
launchConfigurationARN The Amazon Resource Name (ARN) of the launch configuration.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withLaunchConfigurationARN(String launchConfigurationARN) {
         this. = launchConfigurationARN;
         return this;
     }

    
The ID of the Amazon Machine Image (AMI).

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The ID of the Amazon Machine Image (AMI).
 
     public String getImageId() {
         return ;
     }
    
    
The ID of the Amazon Machine Image (AMI).

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
imageId The ID of the Amazon Machine Image (AMI).
 
     public void setImageId(String imageId) {
         this. = imageId;
     }
    
    
The ID of the Amazon Machine Image (AMI).

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
imageId The ID of the Amazon Machine Image (AMI).
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withImageId(String imageId) {
         this. = imageId;
         return this;
     }

    
The name of the key pair.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name of the key pair.
 
     public String getKeyName() {
         return ;
     }
    
    
The name of the key pair.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
keyName The name of the key pair.
 
     public void setKeyName(String keyName) {
         this. = keyName;
     }
    
    
The name of the key pair.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
keyName The name of the key pair.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withKeyName(String keyName) {
         this. = keyName;
         return this;
     }

    
The security groups to associate with the instances.

Returns:
The security groups to associate with the instances.
 
     public java.util.List<StringgetSecurityGroups() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The security groups to associate with the instances.

Parameters:
securityGroups The security groups to associate with the instances.
 
     public void setSecurityGroups(java.util.Collection<StringsecurityGroups) {
         if (securityGroups == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringsecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(securityGroups.size());
         securityGroupsCopy.addAll(securityGroups);
         this. = securityGroupsCopy;
     }
    
    
The security groups to associate with the instances.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
securityGroups The security groups to associate with the instances.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withSecurityGroups(String... securityGroups) {
         if (getSecurityGroups() == nullsetSecurityGroups(new java.util.ArrayList<String>(securityGroups.length));
         for (String value : securityGroups) {
             getSecurityGroups().add(value);
         }
         return this;
     }
    
    
The security groups to associate with the instances.

Returns a reference to this object so that method calls can be chained together.

Parameters:
securityGroups The security groups to associate with the instances.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withSecurityGroups(java.util.Collection<StringsecurityGroups) {
         if (securityGroups == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringsecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(securityGroups.size());
             securityGroupsCopy.addAll(securityGroups);
             this. = securityGroupsCopy;
         }
 
         return this;
     }

    
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.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
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.
 
     public String getClassicLinkVPCId() {
         return ;
     }
    
    
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.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
classicLinkVPCId 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.
 
     public void setClassicLinkVPCId(String classicLinkVPCId) {
         this. = classicLinkVPCId;
     }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
classicLinkVPCId 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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withClassicLinkVPCId(String classicLinkVPCId) {
         this. = classicLinkVPCId;
         return this;
     }

    
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.

Returns:
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.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
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.

Parameters:
classicLinkVPCSecurityGroups 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.
 
     public void setClassicLinkVPCSecurityGroups(java.util.Collection<StringclassicLinkVPCSecurityGroups) {
         if (classicLinkVPCSecurityGroups == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringclassicLinkVPCSecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(classicLinkVPCSecurityGroups.size());
         classicLinkVPCSecurityGroupsCopy.addAll(classicLinkVPCSecurityGroups);
         this. = classicLinkVPCSecurityGroupsCopy;
     }
    
    
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.

NOTE: This method appends the values to the existing list (if any). Use setClassicLinkVPCSecurityGroups(java.util.Collection) or withClassicLinkVPCSecurityGroups(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
classicLinkVPCSecurityGroups 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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withClassicLinkVPCSecurityGroups(String... classicLinkVPCSecurityGroups) {
         if (getClassicLinkVPCSecurityGroups() == nullsetClassicLinkVPCSecurityGroups(new java.util.ArrayList<String>(classicLinkVPCSecurityGroups.length));
         for (String value : classicLinkVPCSecurityGroups) {
             getClassicLinkVPCSecurityGroups().add(value);
         }
         return this;
     }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
classicLinkVPCSecurityGroups 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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withClassicLinkVPCSecurityGroups(java.util.Collection<StringclassicLinkVPCSecurityGroups) {
         if (classicLinkVPCSecurityGroups == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringclassicLinkVPCSecurityGroupsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(classicLinkVPCSecurityGroups.size());
             classicLinkVPCSecurityGroupsCopy.addAll(classicLinkVPCSecurityGroups);
             this. = classicLinkVPCSecurityGroupsCopy;
         }
 
         return this;
     }

    
The user data available to the instances.

Constraints:
Length: 0 - 21847
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The user data available to the instances.
 
     public String getUserData() {
         return ;
     }
    
    
The user data available to the instances.

Constraints:
Length: 0 - 21847
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
userData The user data available to the instances.
 
     public void setUserData(String userData) {
         this. = userData;
     }
    
    
The user data available to the instances.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 21847
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
userData The user data available to the instances.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withUserData(String userData) {
         this. = userData;
         return this;
     }

    
The instance type for the instances.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The instance type for the instances.
 
     public String getInstanceType() {
         return ;
     }
    
    
The instance type for the instances.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
instanceType The instance type for the instances.
 
     public void setInstanceType(String instanceType) {
         this. = instanceType;
     }
    
    
The instance type for the instances.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
instanceType The instance type for the instances.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withInstanceType(String instanceType) {
         this. = instanceType;
         return this;
     }

    
The ID of the kernel associated with the AMI.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The ID of the kernel associated with the AMI.
 
     public String getKernelId() {
         return ;
     }
    
    
The ID of the kernel associated with the AMI.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
kernelId The ID of the kernel associated with the AMI.
 
     public void setKernelId(String kernelId) {
         this. = kernelId;
     }
    
    
The ID of the kernel associated with the AMI.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
kernelId The ID of the kernel associated with the AMI.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withKernelId(String kernelId) {
         this. = kernelId;
         return this;
     }

    
The ID of the RAM disk associated with the AMI.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The ID of the RAM disk associated with the AMI.
 
     public String getRamdiskId() {
         return ;
     }
    
    
The ID of the RAM disk associated with the AMI.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
ramdiskId The ID of the RAM disk associated with the AMI.
 
     public void setRamdiskId(String ramdiskId) {
         this. = ramdiskId;
     }
    
    
The ID of the RAM disk associated with the AMI.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
ramdiskId The ID of the RAM disk associated with the AMI.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withRamdiskId(String ramdiskId) {
         this. = ramdiskId;
         return this;
     }

    
A block device mapping, which specifies the block devices for the instance.

Returns:
A block device mapping, which specifies the block devices for the instance.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A block device mapping, which specifies the block devices for the instance.

Parameters:
blockDeviceMappings A block device mapping, which specifies the block devices for the instance.
 
     public void setBlockDeviceMappings(java.util.Collection<BlockDeviceMappingblockDeviceMappings) {
         if (blockDeviceMappings == null) {
             this. = null;
             return;
         }
         blockDeviceMappingsCopy.addAll(blockDeviceMappings);
         this. = blockDeviceMappingsCopy;
     }
    
    
A block device mapping, which specifies the block devices for the instance.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
blockDeviceMappings A block device mapping, which specifies the block devices for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) {
         if (getBlockDeviceMappings() == nullsetBlockDeviceMappings(new java.util.ArrayList<BlockDeviceMapping>(blockDeviceMappings.length));
         for (BlockDeviceMapping value : blockDeviceMappings) {
             getBlockDeviceMappings().add(value);
         }
         return this;
     }
    
    
A block device mapping, which specifies the block devices for the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
blockDeviceMappings A block device mapping, which specifies the block devices for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (blockDeviceMappings == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<BlockDeviceMappingblockDeviceMappingsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<BlockDeviceMapping>(blockDeviceMappings.size());
             blockDeviceMappingsCopy.addAll(blockDeviceMappings);
             this. = blockDeviceMappingsCopy;
         }
 
         return this;
     }

    
Controls whether instances in this group are launched with detailed monitoring.

Returns:
Controls whether instances in this group are launched with detailed monitoring.
 
         return ;
     }
    
    
Controls whether instances in this group are launched with detailed monitoring.

Parameters:
instanceMonitoring Controls whether instances in this group are launched with detailed monitoring.
 
     public void setInstanceMonitoring(InstanceMonitoring instanceMonitoring) {
         this. = instanceMonitoring;
     }
    
    
Controls whether instances in this group are launched with detailed monitoring.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceMonitoring Controls whether instances in this group are launched with detailed monitoring.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withInstanceMonitoring(InstanceMonitoring instanceMonitoring) {
         this. = instanceMonitoring;
         return this;
     }

    
The price to bid when launching Spot Instances.

Constraints:
Length: 1 - 255

Returns:
The price to bid when launching Spot Instances.
 
     public String getSpotPrice() {
         return ;
     }
    
    
The price to bid when launching Spot Instances.

Constraints:
Length: 1 - 255

Parameters:
spotPrice The price to bid when launching Spot Instances.
 
     public void setSpotPrice(String spotPrice) {
         this. = spotPrice;
     }
    
    
The price to bid when launching Spot Instances.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255

Parameters:
spotPrice The price to bid when launching Spot Instances.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public LaunchConfiguration withSpotPrice(String spotPrice) {
         this. = spotPrice;
         return this;
     }

    
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
 
     public String getIamInstanceProfile() {
         return ;
     }
    
    
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
iamInstanceProfile The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
 
     public void setIamInstanceProfile(String iamInstanceProfile) {
         this. = iamInstanceProfile;
     }
    
    
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
iamInstanceProfile The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LaunchConfiguration withIamInstanceProfile(String iamInstanceProfile) {
        this. = iamInstanceProfile;
        return this;
    }

    
The creation date and time for the launch configuration.

Returns:
The creation date and time for the launch configuration.
    public java.util.Date getCreatedTime() {
        return ;
    }
    
    
The creation date and time for the launch configuration.

Parameters:
createdTime The creation date and time for the launch configuration.
    public void setCreatedTime(java.util.Date createdTime) {
        this. = createdTime;
    }
    
    
The creation date and time for the launch configuration.

Returns a reference to this object so that method calls can be chained together.

Parameters:
createdTime The creation date and time for the launch configuration.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LaunchConfiguration withCreatedTime(java.util.Date createdTime) {
        this. = createdTime;
        return this;
    }

    
Controls whether the instance is optimized for EBS I/O (true) or not (false).

Returns:
Controls whether the instance is optimized for EBS I/O (true) or not (false).
    public Boolean isEbsOptimized() {
        return ;
    }
    
    
Controls whether the instance is optimized for EBS I/O (true) or not (false).

Parameters:
ebsOptimized Controls whether the instance is optimized for EBS I/O (true) or not (false).
    public void setEbsOptimized(Boolean ebsOptimized) {
        this. = ebsOptimized;
    }
    
    
Controls whether the instance is optimized for EBS I/O (true) or not (false).

Returns a reference to this object so that method calls can be chained together.

Parameters:
ebsOptimized Controls whether the instance is optimized for EBS I/O (true) or not (false).
Returns:
A reference to this updated object so that method calls can be chained together.
    public LaunchConfiguration withEbsOptimized(Boolean ebsOptimized) {
        this. = ebsOptimized;
        return this;
    }

    
Controls whether the instance is optimized for EBS I/O (true) or not (false).

Returns:
Controls whether the instance is optimized for EBS I/O (true) or not (false).
    public Boolean getEbsOptimized() {
        return ;
    }

    
Specifies whether the instances are associated with a public IP address (true) or not (false).

Returns:
Specifies whether the instances are associated with a public IP address (true) or not (false).
        return ;
    }
    
    
Specifies whether the instances are associated with a public IP address (true) or not (false).

Parameters:
associatePublicIpAddress Specifies whether the instances are associated with a public IP address (true) or not (false).
    public void setAssociatePublicIpAddress(Boolean associatePublicIpAddress) {
        this. = associatePublicIpAddress;
    }
    
    
Specifies whether the instances are associated with a public IP address (true) or not (false).

Returns a reference to this object so that method calls can be chained together.

Parameters:
associatePublicIpAddress Specifies whether the instances are associated with a public IP address (true) or not (false).
Returns:
A reference to this updated object so that method calls can be chained together.
    public LaunchConfiguration withAssociatePublicIpAddress(Boolean associatePublicIpAddress) {
        this. = associatePublicIpAddress;
        return this;
    }

    
Specifies whether the instances are associated with a public IP address (true) or not (false).

Returns:
Specifies whether the instances are associated with a public IP address (true) or not (false).
        return ;
    }

    
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.

Constraints:
Length: 1 - 64
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
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.
    public String getPlacementTenancy() {
        return ;
    }
    
    
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.

Constraints:
Length: 1 - 64
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
placementTenancy 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.
    public void setPlacementTenancy(String placementTenancy) {
        this. = placementTenancy;
    }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 64
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
placementTenancy 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.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LaunchConfiguration withPlacementTenancy(String placementTenancy) {
        this. = placementTenancy;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getLaunchConfigurationName() != nullsb.append("LaunchConfigurationName: " + getLaunchConfigurationName() + ",");
        if (getLaunchConfigurationARN() != nullsb.append("LaunchConfigurationARN: " + getLaunchConfigurationARN() + ",");
        if (getImageId() != nullsb.append("ImageId: " + getImageId() + ",");
        if (getKeyName() != nullsb.append("KeyName: " + getKeyName() + ",");
        if (getSecurityGroups() != nullsb.append("SecurityGroups: " + getSecurityGroups() + ",");
        if (getClassicLinkVPCId() != nullsb.append("ClassicLinkVPCId: " + getClassicLinkVPCId() + ",");
        if (getClassicLinkVPCSecurityGroups() != nullsb.append("ClassicLinkVPCSecurityGroups: " + getClassicLinkVPCSecurityGroups() + ",");
        if (getUserData() != nullsb.append("UserData: " + getUserData() + ",");
        if (getInstanceType() != nullsb.append("InstanceType: " + getInstanceType() + ",");
        if (getKernelId() != nullsb.append("KernelId: " + getKernelId() + ",");
        if (getRamdiskId() != nullsb.append("RamdiskId: " + getRamdiskId() + ",");
        if (getBlockDeviceMappings() != nullsb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ",");
        if (getInstanceMonitoring() != nullsb.append("InstanceMonitoring: " + getInstanceMonitoring() + ",");
        if (getSpotPrice() != nullsb.append("SpotPrice: " + getSpotPrice() + ",");
        if (getIamInstanceProfile() != nullsb.append("IamInstanceProfile: " + getIamInstanceProfile() + ",");
        if (getCreatedTime() != nullsb.append("CreatedTime: " + getCreatedTime() + ",");
        if (isEbsOptimized() != nullsb.append("EbsOptimized: " + isEbsOptimized() + ",");
        if (isAssociatePublicIpAddress() != nullsb.append("AssociatePublicIpAddress: " + isAssociatePublicIpAddress() + ",");
        if (getPlacementTenancy() != nullsb.append("PlacementTenancy: " + getPlacementTenancy() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getLaunchConfigurationName() == null) ? 0 : getLaunchConfigurationName().hashCode()); 
        hashCode = prime * hashCode + ((getLaunchConfigurationARN() == null) ? 0 : getLaunchConfigurationARN().hashCode()); 
        hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); 
        hashCode = prime * hashCode + ((getKeyName() == null) ? 0 : getKeyName().hashCode()); 
        hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode()); 
        hashCode = prime * hashCode + ((getClassicLinkVPCId() == null) ? 0 : getClassicLinkVPCId().hashCode()); 
        hashCode = prime * hashCode + ((getClassicLinkVPCSecurityGroups() == null) ? 0 : getClassicLinkVPCSecurityGroups().hashCode()); 
        hashCode = prime * hashCode + ((getUserData() == null) ? 0 : getUserData().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().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 + ((getInstanceMonitoring() == null) ? 0 : getInstanceMonitoring().hashCode()); 
        hashCode = prime * hashCode + ((getSpotPrice() == null) ? 0 : getSpotPrice().hashCode()); 
        hashCode = prime * hashCode + ((getIamInstanceProfile() == null) ? 0 : getIamInstanceProfile().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); 
        hashCode = prime * hashCode + ((isEbsOptimized() == null) ? 0 : isEbsOptimized().hashCode()); 
        hashCode = prime * hashCode + ((isAssociatePublicIpAddress() == null) ? 0 : isAssociatePublicIpAddress().hashCode()); 
        hashCode = prime * hashCode + ((getPlacementTenancy() == null) ? 0 : getPlacementTenancy().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof LaunchConfiguration == falsereturn false;
        LaunchConfiguration other = (LaunchConfiguration)obj;
        
        if (other.getLaunchConfigurationName() == null ^ this.getLaunchConfigurationName() == nullreturn false;
        if (other.getLaunchConfigurationName() != null && other.getLaunchConfigurationName().equals(this.getLaunchConfigurationName()) == falsereturn false
        if (other.getLaunchConfigurationARN() == null ^ this.getLaunchConfigurationARN() == nullreturn false;
        if (other.getLaunchConfigurationARN() != null && other.getLaunchConfigurationARN().equals(this.getLaunchConfigurationARN()) == falsereturn false
        if (other.getImageId() == null ^ this.getImageId() == nullreturn false;
        if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == falsereturn false
        if (other.getKeyName() == null ^ this.getKeyName() == nullreturn false;
        if (other.getKeyName() != null && other.getKeyName().equals(this.getKeyName()) == falsereturn false
        if (other.getSecurityGroups() == null ^ this.getSecurityGroups() == nullreturn false;
        if (other.getSecurityGroups() != null && other.getSecurityGroups().equals(this.getSecurityGroups()) == falsereturn false
        if (other.getClassicLinkVPCId() == null ^ this.getClassicLinkVPCId() == nullreturn false;
        if (other.getClassicLinkVPCId() != null && other.getClassicLinkVPCId().equals(this.getClassicLinkVPCId()) == falsereturn false
        if (other.getClassicLinkVPCSecurityGroups() == null ^ this.getClassicLinkVPCSecurityGroups() == nullreturn false;
        if (other.getClassicLinkVPCSecurityGroups() != null && other.getClassicLinkVPCSecurityGroups().equals(this.getClassicLinkVPCSecurityGroups()) == falsereturn false
        if (other.getUserData() == null ^ this.getUserData() == nullreturn false;
        if (other.getUserData() != null && other.getUserData().equals(this.getUserData()) == falsereturn false
        if (other.getInstanceType() == null ^ this.getInstanceType() == nullreturn false;
        if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == falsereturn false
        if (other.getKernelId() == null ^ this.getKernelId() == nullreturn false;
        if (other.getKernelId() != null && other.getKernelId().equals(this.getKernelId()) == falsereturn false
        if (other.getRamdiskId() == null ^ this.getRamdiskId() == nullreturn false;
        if (other.getRamdiskId() != null && other.getRamdiskId().equals(this.getRamdiskId()) == falsereturn false
        if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == nullreturn false;
        if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == falsereturn false
        if (other.getInstanceMonitoring() == null ^ this.getInstanceMonitoring() == nullreturn false;
        if (other.getInstanceMonitoring() != null && other.getInstanceMonitoring().equals(this.getInstanceMonitoring()) == falsereturn false
        if (other.getSpotPrice() == null ^ this.getSpotPrice() == nullreturn false;
        if (other.getSpotPrice() != null && other.getSpotPrice().equals(this.getSpotPrice()) == falsereturn false
        if (other.getIamInstanceProfile() == null ^ this.getIamInstanceProfile() == nullreturn false;
        if (other.getIamInstanceProfile() != null && other.getIamInstanceProfile().equals(this.getIamInstanceProfile()) == falsereturn false
        if (other.getCreatedTime() == null ^ this.getCreatedTime() == nullreturn false;
        if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == falsereturn false
        if (other.isEbsOptimized() == null ^ this.isEbsOptimized() == nullreturn false;
        if (other.isEbsOptimized() != null && other.isEbsOptimized().equals(this.isEbsOptimized()) == falsereturn false
        if (other.isAssociatePublicIpAddress() == null ^ this.isAssociatePublicIpAddress() == nullreturn false;
        if (other.isAssociatePublicIpAddress() != null && other.isAssociatePublicIpAddress().equals(this.isAssociatePublicIpAddress()) == falsereturn false
        if (other.getPlacementTenancy() == null ^ this.getPlacementTenancy() == nullreturn false;
        if (other.getPlacementTenancy() != null && other.getPlacementTenancy().equals(this.getPlacementTenancy()) == falsereturn false
        return true;
    }
    
    @Override
    public LaunchConfiguration clone() {
        try {
            return (LaunchConfigurationsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X