
com.amazonaws.services.autoscaling.model.LaunchConfiguration Maven / Gradle / Ivy
/*
* Copyright 2010-2011 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;
/**
*
*
*
*/
public class LaunchConfiguration {
/**
* Specifies 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;
/**
* Provides the unique ID of the Amazon Machine Image (AMI) that
* was assigned during registration.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String imageId;
/**
* Provides the name of the EC2 key pair.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String keyName;
/**
* Contains a description of the security groups to associate with the
* EC2 instances.
*/
private java.util.List securityGroups;
/**
* Contains the user data available to the launched EC2 instances.
*
* Constraints:
* Length: 0 - 21847
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String userData;
/**
* Specifies the instance type of the EC2 instance.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String instanceType;
/**
* Provides the ID of the kernel associated with the EC2 AMI.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String kernelId;
/**
* Provides ID of the RAM disk associated with the EC2 AMI.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*/
private String ramdiskId;
/**
* Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*/
private java.util.List blockDeviceMappings;
/**
* Provides the creation date and time for this launch configuration.
*/
private java.util.Date createdTime;
/**
* Specifies the name of the launch configuration.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return Specifies the name of the launch configuration.
*/
public String getLaunchConfigurationName() {
return launchConfigurationName;
}
/**
* Specifies the name of the launch configuration.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param launchConfigurationName Specifies the name of the launch configuration.
*/
public void setLaunchConfigurationName(String launchConfigurationName) {
this.launchConfigurationName = launchConfigurationName;
}
/**
* Specifies 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]*
*
* @param launchConfigurationName Specifies the name of the launch configuration.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withLaunchConfigurationName(String launchConfigurationName) {
this.launchConfigurationName = launchConfigurationName;
return this;
}
/**
* Provides the unique ID of the Amazon Machine Image (AMI) that
* was assigned during registration.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return Provides the unique ID of the Amazon Machine Image (AMI) that
* was assigned during registration.
*/
public String getImageId() {
return imageId;
}
/**
* Provides the unique ID of the Amazon Machine Image (AMI) that
* was assigned during registration.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param imageId Provides the unique ID of the Amazon Machine Image (AMI) that
* was assigned during registration.
*/
public void setImageId(String imageId) {
this.imageId = imageId;
}
/**
* Provides the unique ID of the Amazon Machine Image (AMI) that
* was assigned during registration.
*
* 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]*
*
* @param imageId Provides the unique ID of the Amazon Machine Image (AMI) that
* was assigned during registration.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withImageId(String imageId) {
this.imageId = imageId;
return this;
}
/**
* Provides the name of the EC2 key pair.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return Provides the name of the EC2 key pair.
*/
public String getKeyName() {
return keyName;
}
/**
* Provides the name of the EC2 key pair.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param keyName Provides the name of the EC2 key pair.
*/
public void setKeyName(String keyName) {
this.keyName = keyName;
}
/**
* Provides the name of the EC2 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]*
*
* @param keyName Provides the name of the EC2 key pair.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withKeyName(String keyName) {
this.keyName = keyName;
return this;
}
/**
* Contains a description of the security groups to associate with the
* EC2 instances.
*
* @return Contains a description of the security groups to associate with the
* EC2 instances.
*/
public java.util.List getSecurityGroups() {
if (securityGroups == null) {
securityGroups = new java.util.ArrayList();
}
return securityGroups;
}
/**
* Contains a description of the security groups to associate with the
* EC2 instances.
*
* @param securityGroups Contains a description of the security groups to associate with the
* EC2 instances.
*/
public void setSecurityGroups(java.util.Collection securityGroups) {
java.util.List securityGroupsCopy = new java.util.ArrayList();
if (securityGroups != null) {
securityGroupsCopy.addAll(securityGroups);
}
this.securityGroups = securityGroupsCopy;
}
/**
* Contains a description of the security groups to associate with the
* EC2 instances.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param securityGroups Contains a description of the security groups to associate with the
* EC2 instances.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withSecurityGroups(String... securityGroups) {
for (String value : securityGroups) {
getSecurityGroups().add(value);
}
return this;
}
/**
* Contains a description of the security groups to associate with the
* EC2 instances.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param securityGroups Contains a description of the security groups to associate with the
* EC2 instances.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withSecurityGroups(java.util.Collection securityGroups) {
java.util.List securityGroupsCopy = new java.util.ArrayList();
if (securityGroups != null) {
securityGroupsCopy.addAll(securityGroups);
}
this.securityGroups = securityGroupsCopy;
return this;
}
/**
* Contains the user data available to the launched EC2 instances.
*
* Constraints:
* Length: 0 - 21847
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return Contains the user data available to the launched EC2 instances.
*/
public String getUserData() {
return userData;
}
/**
* Contains the user data available to the launched EC2 instances.
*
* Constraints:
* Length: 0 - 21847
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param userData Contains the user data available to the launched EC2 instances.
*/
public void setUserData(String userData) {
this.userData = userData;
}
/**
* Contains the user data available to the launched EC2 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]*
*
* @param userData Contains the user data available to the launched EC2 instances.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withUserData(String userData) {
this.userData = userData;
return this;
}
/**
* Specifies the instance type of the EC2 instance.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return Specifies the instance type of the EC2 instance.
*/
public String getInstanceType() {
return instanceType;
}
/**
* Specifies the instance type of the EC2 instance.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param instanceType Specifies the instance type of the EC2 instance.
*/
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}
/**
* Specifies the instance type of the EC2 instance.
*
* 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]*
*
* @param instanceType Specifies the instance type of the EC2 instance.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withInstanceType(String instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* Provides the ID of the kernel associated with the EC2 AMI.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return Provides the ID of the kernel associated with the EC2 AMI.
*/
public String getKernelId() {
return kernelId;
}
/**
* Provides the ID of the kernel associated with the EC2 AMI.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param kernelId Provides the ID of the kernel associated with the EC2 AMI.
*/
public void setKernelId(String kernelId) {
this.kernelId = kernelId;
}
/**
* Provides the ID of the kernel associated with the EC2 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]*
*
* @param kernelId Provides the ID of the kernel associated with the EC2 AMI.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withKernelId(String kernelId) {
this.kernelId = kernelId;
return this;
}
/**
* Provides ID of the RAM disk associated with the EC2 AMI.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @return Provides ID of the RAM disk associated with the EC2 AMI.
*/
public String getRamdiskId() {
return ramdiskId;
}
/**
* Provides ID of the RAM disk associated with the EC2 AMI.
*
* Constraints:
* Length: 1 - 255
* Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
*
* @param ramdiskId Provides ID of the RAM disk associated with the EC2 AMI.
*/
public void setRamdiskId(String ramdiskId) {
this.ramdiskId = ramdiskId;
}
/**
* Provides ID of the RAM disk associated with the EC2 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]*
*
* @param ramdiskId Provides ID of the RAM disk associated with the EC2 AMI.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withRamdiskId(String ramdiskId) {
this.ramdiskId = ramdiskId;
return this;
}
/**
* Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*
* @return Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*/
public java.util.List getBlockDeviceMappings() {
if (blockDeviceMappings == null) {
blockDeviceMappings = new java.util.ArrayList();
}
return blockDeviceMappings;
}
/**
* Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*
* @param blockDeviceMappings Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*/
public void setBlockDeviceMappings(java.util.Collection blockDeviceMappings) {
java.util.List blockDeviceMappingsCopy = new java.util.ArrayList();
if (blockDeviceMappings != null) {
blockDeviceMappingsCopy.addAll(blockDeviceMappings);
}
this.blockDeviceMappings = blockDeviceMappingsCopy;
}
/**
* Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param blockDeviceMappings Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) {
for (BlockDeviceMapping value : blockDeviceMappings) {
getBlockDeviceMappings().add(value);
}
return this;
}
/**
* Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param blockDeviceMappings Specifies how block devices are exposed to the instance. Each mapping
* is made up of a virtualName and a deviceName.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withBlockDeviceMappings(java.util.Collection blockDeviceMappings) {
java.util.List blockDeviceMappingsCopy = new java.util.ArrayList();
if (blockDeviceMappings != null) {
blockDeviceMappingsCopy.addAll(blockDeviceMappings);
}
this.blockDeviceMappings = blockDeviceMappingsCopy;
return this;
}
/**
* Provides the creation date and time for this launch configuration.
*
* @return Provides the creation date and time for this launch configuration.
*/
public java.util.Date getCreatedTime() {
return createdTime;
}
/**
* Provides the creation date and time for this launch configuration.
*
* @param createdTime Provides the creation date and time for this launch configuration.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
* Provides the creation date and time for this launch configuration.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param createdTime Provides the creation date and time for this launch configuration.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public LaunchConfiguration withCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
return this;
}
/**
* 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("{");
sb.append("LaunchConfigurationName: " + launchConfigurationName + ", ");
sb.append("ImageId: " + imageId + ", ");
sb.append("KeyName: " + keyName + ", ");
sb.append("SecurityGroups: " + securityGroups + ", ");
sb.append("UserData: " + userData + ", ");
sb.append("InstanceType: " + instanceType + ", ");
sb.append("KernelId: " + kernelId + ", ");
sb.append("RamdiskId: " + ramdiskId + ", ");
sb.append("BlockDeviceMappings: " + blockDeviceMappings + ", ");
sb.append("CreatedTime: " + createdTime + ", ");
sb.append("}");
return sb.toString();
}
}