/* * Copyright 2010-2018 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; /** *
* Describes an instance attribute. *
*/ public class InstanceAttribute implements Serializable { /** * The ID of the instance. */ private String instanceId; /** * The instance type. */ private String instanceType; /** * The kernel ID. */ private String kernelId; /** * The RAM disk ID. */ private String ramdiskId; /** * The Base64-encoded MIME user data. */ private String userData; /** * If the value istrue
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*/
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).
*/
private String instanceInitiatedShutdownBehavior;
/**
* The name of the root device (for example, /dev/sda1
or
* /dev/xvda
).
*/
private String rootDeviceName;
/**
* The block device mapping of the instance.
*/
private com.amazonaws.internal.ListWithAutoConstructFlagtrue
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
*/
private Boolean sourceDestCheck;
/**
* The security groups associated with the instance.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag* Returns a reference to this object so that method calls can be chained together. * * @param instanceId The ID of the instance. * * @return A reference to this updated object so that method calls can be chained * together. */ public InstanceAttribute withInstanceId(String instanceId) { this.instanceId = instanceId; return this; } /** * The instance type. * * @return The instance type. */ public String getInstanceType() { return instanceType; } /** * The instance type. * * @param instanceType The instance type. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** * The instance type. *
* Returns a reference to this object so that method calls can be chained together. * * @param instanceType The instance type. * * @return A reference to this updated object so that method calls can be chained * together. */ public InstanceAttribute withInstanceType(String instanceType) { this.instanceType = instanceType; return this; } /** * The kernel ID. * * @return The kernel ID. */ public String getKernelId() { return kernelId; } /** * The kernel ID. * * @param kernelId The kernel ID. */ public void setKernelId(String kernelId) { this.kernelId = kernelId; } /** * The kernel ID. *
* Returns a reference to this object so that method calls can be chained together. * * @param kernelId The kernel ID. * * @return A reference to this updated object so that method calls can be chained * together. */ public InstanceAttribute withKernelId(String kernelId) { this.kernelId = kernelId; return this; } /** * The RAM disk ID. * * @return The RAM disk ID. */ public String getRamdiskId() { return ramdiskId; } /** * The RAM disk ID. * * @param ramdiskId The RAM disk ID. */ public void setRamdiskId(String ramdiskId) { this.ramdiskId = ramdiskId; } /** * The RAM disk ID. *
* Returns a reference to this object so that method calls can be chained together. * * @param ramdiskId The RAM disk ID. * * @return A reference to this updated object so that method calls can be chained * together. */ public InstanceAttribute withRamdiskId(String ramdiskId) { this.ramdiskId = ramdiskId; return this; } /** * The Base64-encoded MIME user data. * * @return The Base64-encoded MIME user data. */ public String getUserData() { return userData; } /** * The Base64-encoded MIME user data. * * @param userData The Base64-encoded MIME user data. */ public void setUserData(String userData) { this.userData = userData; } /** * The Base64-encoded MIME user data. *
* Returns a reference to this object so that method calls can be chained together.
*
* @param userData The Base64-encoded MIME user data.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withUserData(String userData) {
this.userData = userData;
return this;
}
/**
* If the value is true
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*
* @return If the value is true
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*/
public Boolean isDisableApiTermination() {
return disableApiTermination;
}
/**
* If the value is true
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*
* @param disableApiTermination If the value is true
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*/
public void setDisableApiTermination(Boolean disableApiTermination) {
this.disableApiTermination = disableApiTermination;
}
/**
* If the value is true
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param disableApiTermination If the value is true
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withDisableApiTermination(Boolean disableApiTermination) {
this.disableApiTermination = disableApiTermination;
return this;
}
/**
* If the value is true
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*
* @return If the value is true
, you can't terminate the instance
* through the Amazon EC2 console, CLI, or API; otherwise, you can.
*/
public Boolean getDisableApiTermination() {
return disableApiTermination;
}
/**
* Indicates whether an instance stops or terminates when you initiate
* shutdown from the instance (using the operating system command for
* system shutdown).
*
* @return Indicates whether an instance stops or terminates when you initiate
* shutdown from the instance (using the operating system command for
* system shutdown).
*/
public String getInstanceInitiatedShutdownBehavior() {
return instanceInitiatedShutdownBehavior;
}
/**
* Indicates whether an instance stops or terminates when you initiate
* shutdown from the instance (using the operating system command for
* system shutdown).
*
* @param instanceInitiatedShutdownBehavior Indicates whether an instance stops or terminates when you initiate
* shutdown from the instance (using the operating system command for
* system shutdown).
*/
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).
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param instanceInitiatedShutdownBehavior Indicates whether an instance stops or terminates when you initiate
* shutdown from the instance (using the operating system command for
* system shutdown).
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior) {
this.instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehavior;
return this;
}
/**
* The name of the root device (for example, /dev/sda1
or
* /dev/xvda
).
*
* @return The name of the root device (for example, /dev/sda1
or
* /dev/xvda
).
*/
public String getRootDeviceName() {
return rootDeviceName;
}
/**
* The name of the root device (for example, /dev/sda1
or
* /dev/xvda
).
*
* @param rootDeviceName The name of the root device (for example, /dev/sda1
or
* /dev/xvda
).
*/
public void setRootDeviceName(String rootDeviceName) {
this.rootDeviceName = rootDeviceName;
}
/**
* The name of the root device (for example, /dev/sda1
or
* /dev/xvda
).
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param rootDeviceName The name of the root device (for example,
* Returns a reference to this object so that method calls can be chained together.
*
* @param blockDeviceMappings The block device mapping of the instance.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings) {
if (getBlockDeviceMappings() == null) setBlockDeviceMappings(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param blockDeviceMappings The block device mapping of the instance.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withBlockDeviceMappings(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param productCodes A list of product codes.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withProductCodes(ProductCode... productCodes) {
if (getProductCodes() == null) setProductCodes(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param productCodes A list of product codes.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withProductCodes(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param ebsOptimized Indicates whether the instance is optimized for EBS I/O.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withEbsOptimized(Boolean ebsOptimized) {
this.ebsOptimized = ebsOptimized;
return this;
}
/**
* Indicates whether the instance is optimized for EBS I/O.
*
* @return Indicates whether the instance is optimized for EBS I/O.
*/
public Boolean getEbsOptimized() {
return ebsOptimized;
}
/**
* The value to use for a resource attribute.
*
* @return The value to use for a resource attribute.
*/
public String getSriovNetSupport() {
return sriovNetSupport;
}
/**
* The value to use for a resource attribute.
*
* @param sriovNetSupport The value to use for a resource attribute.
*/
public void setSriovNetSupport(String sriovNetSupport) {
this.sriovNetSupport = sriovNetSupport;
}
/**
* The value to use for a resource attribute.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param sriovNetSupport The value to use for a resource attribute.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withSriovNetSupport(String sriovNetSupport) {
this.sriovNetSupport = sriovNetSupport;
return this;
}
/**
* Indicates whether source/destination checking is enabled. A value of
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param sourceDestCheck Indicates whether source/destination checking is enabled. A value of
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param groups The security groups associated with the instance.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withGroups(GroupIdentifier... groups) {
if (getGroups() == null) setGroups(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param groups The security groups associated with the instance.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withGroups(java.util.Collection/dev/sda1
or
* /dev/xvda
).
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withRootDeviceName(String rootDeviceName) {
this.rootDeviceName = rootDeviceName;
return this;
}
/**
* The block device mapping of the instance.
*
* @return The block device mapping of the instance.
*/
public java.util.Listtrue
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
*
* @return Indicates whether source/destination checking is enabled. A value of
* true
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
*/
public Boolean isSourceDestCheck() {
return sourceDestCheck;
}
/**
* Indicates whether source/destination checking is enabled. A value of
* true
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
*
* @param sourceDestCheck Indicates whether source/destination checking is enabled. A value of
* true
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
*/
public void setSourceDestCheck(Boolean sourceDestCheck) {
this.sourceDestCheck = sourceDestCheck;
}
/**
* Indicates whether source/destination checking is enabled. A value of
* true
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
* true
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public InstanceAttribute withSourceDestCheck(Boolean sourceDestCheck) {
this.sourceDestCheck = sourceDestCheck;
return this;
}
/**
* Indicates whether source/destination checking is enabled. A value of
* true
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
*
* @return Indicates whether source/destination checking is enabled. A value of
* true
means checking is enabled, and false
* means checking is disabled. This value must be false
for
* a NAT instance to perform NAT.
*/
public Boolean getSourceDestCheck() {
return sourceDestCheck;
}
/**
* The security groups associated with the instance.
*
* @return The security groups associated with the instance.
*/
public java.util.List