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.ec2.model;
  
  
Container for the parameters to the ModifyInstanceAttribute operation.

Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

To modify some attributes, the instance must be stopped. For more information, see Modifying Attributes of a Stopped Instance in the Amazon Elastic Compute Cloud User Guide .

  
The ID of the instance.
  
      private String instanceId;

    
The name of the attribute.

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

  
      private String attribute;

    
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.
  
      private String value;

    
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

  
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.
  
      private Boolean sourceDestCheck;

    
If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.
  
      private Boolean disableApiTermination;

    
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.
  
      private String instanceType;

    
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
 
     private String kernel;

    
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
 
     private String ramdisk;

    
Changes the instance's user data to the specified value.
 
     private String userData;

    
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
 
     private String instanceInitiatedShutdownBehavior;

    
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
 
Specifies 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.
 
     private Boolean ebsOptimized;

    
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

 
     private String sriovNetSupport;

    
Default constructor for a new ModifyInstanceAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public ModifyInstanceAttributeRequest() {}
    
    
Constructs a new ModifyInstanceAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
instanceId The ID of the instance.
attribute The name of the attribute.
 
     public ModifyInstanceAttributeRequest(String instanceIdString attribute) {
         setInstanceId(instanceId);
         setAttribute(attribute);
     }

    
Constructs a new ModifyInstanceAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
instanceId The ID of the instance.
attribute The name of the attribute.
 
     public ModifyInstanceAttributeRequest(String instanceIdInstanceAttributeName attribute) {
         this. = instanceId;
         this. = attribute.toString();
     }

    
The ID of the instance.

Returns:
The ID of the instance.
 
     public String getInstanceId() {
         return ;
     }
    
    
The ID of the instance.

Parameters:
instanceId The ID of the instance.
 
     public void setInstanceId(String instanceId) {
         this. = instanceId;
     }
    
    
The ID of the instance.

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

Parameters:
instanceId The ID of the instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withInstanceId(String instanceId) {
         this. = instanceId;
         return this;
     }

    
The name of the attribute.

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Returns:
The name of the attribute.
See also:
InstanceAttributeName
 
     public String getAttribute() {
         return ;
     }
    
    
The name of the attribute.

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Parameters:
attribute The name of the attribute.
See also:
InstanceAttributeName
 
     public void setAttribute(String attribute) {
         this. = attribute;
     }
    
    
The name of the attribute.

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

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Parameters:
attribute The name of the attribute.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
InstanceAttributeName
 
     public ModifyInstanceAttributeRequest withAttribute(String attribute) {
         this. = attribute;
         return this;
     }

    
The name of the attribute.

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Parameters:
attribute The name of the attribute.
See also:
InstanceAttributeName
 
     public void setAttribute(InstanceAttributeName attribute) {
         this. = attribute.toString();
     }
    
    
The name of the attribute.

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

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Parameters:
attribute The name of the attribute.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
InstanceAttributeName
 
         this. = attribute.toString();
         return this;
     }

    
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.

Returns:
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.
 
     public String getValue() {
         return ;
     }
    
    
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.

Parameters:
value A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.
 
     public void setValue(String value) {
         this. = value;
     }
    
    
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.

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

Parameters:
value A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withValue(String value) {
         this. = value;
         return this;
     }

    
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

Returns:
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

Parameters:
blockDeviceMappings Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

 
         if (blockDeviceMappings == null) {
             this. = null;
             return;
         }
         blockDeviceMappingsCopy.addAll(blockDeviceMappings);
         this. = blockDeviceMappingsCopy;
     }
    
    
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

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 Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (getBlockDeviceMappings() == nullsetBlockDeviceMappings(new java.util.ArrayList<InstanceBlockDeviceMappingSpecification>(blockDeviceMappings.length));
         for (InstanceBlockDeviceMappingSpecification value : blockDeviceMappings) {
             getBlockDeviceMappings().add(value);
         }
         return this;
     }
    
    
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

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

Parameters:
blockDeviceMappings Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (blockDeviceMappings == null) {
             this. = null;
         } else {
             blockDeviceMappingsCopy.addAll(blockDeviceMappings);
             this. = blockDeviceMappingsCopy;
         }
 
         return this;
     }

    
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

Returns:
Specifies whether source/destination checking is enabled. A value of true means that 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 ;
     }
    
    
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

Parameters:
sourceDestCheck Specifies whether source/destination checking is enabled. A value of true means that 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;
     }
    
    
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

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

Parameters:
sourceDestCheck Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withSourceDestCheck(Boolean sourceDestCheck) {
         this. = sourceDestCheck;
         return this;
     }

    
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

Returns:
Specifies whether source/destination checking is enabled. A value of true means that 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 ;
     }

    
If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.

Returns:
If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.
 
     public Boolean isDisableApiTermination() {
         return ;
     }
    
    
If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.

Parameters:
disableApiTermination If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.
 
     public void setDisableApiTermination(Boolean disableApiTermination) {
         this. = disableApiTermination;
     }
    
    
If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.

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

Parameters:
disableApiTermination If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withDisableApiTermination(Boolean disableApiTermination) {
         this. = disableApiTermination;
         return this;
     }

    
If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.

Returns:
If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.
 
     public Boolean getDisableApiTermination() {
         return ;
     }

    
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

Returns:
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.
 
     public String getInstanceType() {
         return ;
     }
    
    
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

Parameters:
instanceType Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.
 
     public void setInstanceType(String instanceType) {
         this. = instanceType;
     }
    
    
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

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

Parameters:
instanceType Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withInstanceType(String instanceType) {
         this. = instanceType;
         return this;
     }

    
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.

Returns:
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
 
     public String getKernel() {
         return ;
     }
    
    
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.

Parameters:
kernel Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
 
     public void setKernel(String kernel) {
         this. = kernel;
     }
    
    
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.

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

Parameters:
kernel Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withKernel(String kernel) {
         this. = kernel;
         return this;
     }

    
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.

Returns:
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
 
     public String getRamdisk() {
         return ;
     }
    
    
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.

Parameters:
ramdisk Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
 
     public void setRamdisk(String ramdisk) {
         this. = ramdisk;
     }
    
    
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.

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

Parameters:
ramdisk Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withRamdisk(String ramdisk) {
         this. = ramdisk;
         return this;
     }

    
Changes the instance's user data to the specified value.

Returns:
Changes the instance's user data to the specified value.
 
     public String getUserData() {
         return ;
     }
    
    
Changes the instance's user data to the specified value.

Parameters:
userData Changes the instance's user data to the specified value.
 
     public void setUserData(String userData) {
         this. = userData;
     }
    
    
Changes the instance's user data to the specified value.

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

Parameters:
userData Changes the instance's user data to the specified value.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withUserData(String userData) {
         this. = userData;
         return this;
     }

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

Returns:
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
 
         return ;
     }
    
    
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

Parameters:
instanceInitiatedShutdownBehavior Specifies 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;
     }
    
    
Specifies 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.

Parameters:
instanceInitiatedShutdownBehavior Specifies 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 updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior) {
         this. = instanceInitiatedShutdownBehavior;
         return this;
     }

    
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

Returns:
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
 
     public java.util.List<StringgetGroups() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

Parameters:
groups [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
 
     public void setGroups(java.util.Collection<Stringgroups) {
         if (groups == null) {
             this. = null;
             return;
         }
         groupsCopy.addAll(groups);
         this. = groupsCopy;
     }
    
    
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

NOTE: This method appends the values to the existing list (if any). Use setGroups(java.util.Collection) or withGroups(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:
groups [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withGroups(String... groups) {
         if (getGroups() == nullsetGroups(new java.util.ArrayList<String>(groups.length));
         for (String value : groups) {
             getGroups().add(value);
         }
         return this;
     }
    
    
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

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

Parameters:
groups [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (groups == null) {
             this. = null;
         } else {
             groupsCopy.addAll(groups);
             this. = groupsCopy;
         }
 
         return this;
     }

    
Specifies 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.

Returns:
Specifies 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.
 
     public Boolean isEbsOptimized() {
         return ;
     }
    
    
Specifies 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.

Parameters:
ebsOptimized Specifies 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.
 
     public void setEbsOptimized(Boolean ebsOptimized) {
         this. = ebsOptimized;
     }
    
    
Specifies 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.

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

Parameters:
ebsOptimized Specifies 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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ModifyInstanceAttributeRequest withEbsOptimized(Boolean ebsOptimized) {
         this. = ebsOptimized;
         return this;
     }

    
Specifies 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.

Returns:
Specifies 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.
    public Boolean getEbsOptimized() {
        return ;
    }

    
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

Returns:
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

    public String getSriovNetSupport() {
        return ;
    }
    
    
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

Parameters:
sriovNetSupport Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

    public void setSriovNetSupport(String sriovNetSupport) {
        this. = sriovNetSupport;
    }
    
    
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

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

Parameters:
sriovNetSupport Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyInstanceAttributeRequest withSriovNetSupport(String sriovNetSupport) {
        this. = sriovNetSupport;
        return this;
    }

    
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
    @Override
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
    
    
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 (getInstanceId() != nullsb.append("InstanceId: " + getInstanceId() + ",");
        if (getAttribute() != nullsb.append("Attribute: " + getAttribute() + ",");
        if (getValue() != nullsb.append("Value: " + getValue() + ",");
        if (getBlockDeviceMappings() != nullsb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ",");
        if (isSourceDestCheck() != nullsb.append("SourceDestCheck: " + isSourceDestCheck() + ",");
        if (isDisableApiTermination() != nullsb.append("DisableApiTermination: " + isDisableApiTermination() + ",");
        if (getInstanceType() != nullsb.append("InstanceType: " + getInstanceType() + ",");
        if (getKernel() != nullsb.append("Kernel: " + getKernel() + ",");
        if (getRamdisk() != nullsb.append("Ramdisk: " + getRamdisk() + ",");
        if (getUserData() != nullsb.append("UserData: " + getUserData() + ",");
        if (getInstanceInitiatedShutdownBehavior() != nullsb.append("InstanceInitiatedShutdownBehavior: " + getInstanceInitiatedShutdownBehavior() + ",");
        if (getGroups() != nullsb.append("Groups: " + getGroups() + ",");
        if (isEbsOptimized() != nullsb.append("EbsOptimized: " + isEbsOptimized() + ",");
        if (getSriovNetSupport() != nullsb.append("SriovNetSupport: " + getSriovNetSupport() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); 
        hashCode = prime * hashCode + ((getAttribute() == null) ? 0 : getAttribute().hashCode()); 
        hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); 
        hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); 
        hashCode = prime * hashCode + ((isSourceDestCheck() == null) ? 0 : isSourceDestCheck().hashCode()); 
        hashCode = prime * hashCode + ((isDisableApiTermination() == null) ? 0 : isDisableApiTermination().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); 
        hashCode = prime * hashCode + ((getKernel() == null) ? 0 : getKernel().hashCode()); 
        hashCode = prime * hashCode + ((getRamdisk() == null) ? 0 : getRamdisk().hashCode()); 
        hashCode = prime * hashCode + ((getUserData() == null) ? 0 : getUserData().hashCode()); 
        hashCode = prime * hashCode + ((getInstanceInitiatedShutdownBehavior() == null) ? 0 : getInstanceInitiatedShutdownBehavior().hashCode()); 
        hashCode = prime * hashCode + ((getGroups() == null) ? 0 : getGroups().hashCode()); 
        hashCode = prime * hashCode + ((isEbsOptimized() == null) ? 0 : isEbsOptimized().hashCode()); 
        hashCode = prime * hashCode + ((getSriovNetSupport() == null) ? 0 : getSriovNetSupport().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ModifyInstanceAttributeRequest == falsereturn false;
        
        if (other.getInstanceId() == null ^ this.getInstanceId() == nullreturn false;
        if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == falsereturn false
        if (other.getAttribute() == null ^ this.getAttribute() == nullreturn false;
        if (other.getAttribute() != null && other.getAttribute().equals(this.getAttribute()) == falsereturn false
        if (other.getValue() == null ^ this.getValue() == nullreturn false;
        if (other.getValue() != null && other.getValue().equals(this.getValue()) == falsereturn false
        if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == nullreturn false;
        if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == falsereturn false
        if (other.isSourceDestCheck() == null ^ this.isSourceDestCheck() == nullreturn false;
        if (other.isSourceDestCheck() != null && other.isSourceDestCheck().equals(this.isSourceDestCheck()) == falsereturn false
        if (other.isDisableApiTermination() == null ^ this.isDisableApiTermination() == nullreturn false;
        if (other.isDisableApiTermination() != null && other.isDisableApiTermination().equals(this.isDisableApiTermination()) == falsereturn false
        if (other.getInstanceType() == null ^ this.getInstanceType() == nullreturn false;
        if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == falsereturn false
        if (other.getKernel() == null ^ this.getKernel() == nullreturn false;
        if (other.getKernel() != null && other.getKernel().equals(this.getKernel()) == falsereturn false
        if (other.getRamdisk() == null ^ this.getRamdisk() == nullreturn false;
        if (other.getRamdisk() != null && other.getRamdisk().equals(this.getRamdisk()) == falsereturn false
        if (other.getUserData() == null ^ this.getUserData() == nullreturn false;
        if (other.getUserData() != null && other.getUserData().equals(this.getUserData()) == falsereturn false
        if (other.getInstanceInitiatedShutdownBehavior() == null ^ this.getInstanceInitiatedShutdownBehavior() == nullreturn false;
        if (other.getInstanceInitiatedShutdownBehavior() != null && other.getInstanceInitiatedShutdownBehavior().equals(this.getInstanceInitiatedShutdownBehavior()) == falsereturn false
        if (other.getGroups() == null ^ this.getGroups() == nullreturn false;
        if (other.getGroups() != null && other.getGroups().equals(this.getGroups()) == falsereturn false
        if (other.isEbsOptimized() == null ^ this.isEbsOptimized() == nullreturn false;
        if (other.isEbsOptimized() != null && other.isEbsOptimized().equals(this.isEbsOptimized()) == falsereturn false
        if (other.getSriovNetSupport() == null ^ this.getSriovNetSupport() == nullreturn false;
        if (other.getSriovNetSupport() != null && other.getSriovNetSupport().equals(this.getSriovNetSupport()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (ModifyInstanceAttributeRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X