Class ModifyInstanceAttributeRequest

    • Constructor Detail

      • ModifyInstanceAttributeRequest

        public ModifyInstanceAttributeRequest()
        Default constructor for ModifyInstanceAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
      • ModifyInstanceAttributeRequest

        public ModifyInstanceAttributeRequest​(String instanceId,
                                              String 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.
      • ModifyInstanceAttributeRequest

        public ModifyInstanceAttributeRequest​(String instanceId,
                                              InstanceAttributeName 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.
    • Method Detail

      • setInstanceId

        public void setInstanceId​(String instanceId)

        The ID of the instance.

        Parameters:
        instanceId - The ID of the instance.
      • getInstanceId

        public String getInstanceId()

        The ID of the instance.

        Returns:
        The ID of the instance.
      • withInstanceId

        public ModifyInstanceAttributeRequest withInstanceId​(String instanceId)

        The ID of the instance.

        Parameters:
        instanceId - The ID of the instance.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setAttribute

        public void setAttribute​(String attribute)

        The name of the attribute.

        Parameters:
        attribute - The name of the attribute.
        See Also:
        InstanceAttributeName
      • getAttribute

        public String getAttribute()

        The name of the attribute.

        Returns:
        The name of the attribute.
        See Also:
        InstanceAttributeName
      • withAttribute

        public ModifyInstanceAttributeRequest withAttribute​(String attribute)

        The name of the attribute.

        Parameters:
        attribute - The name of the attribute.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        InstanceAttributeName
      • setValue

        public void setValue​(String value)

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

        Parameters:
        value - A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or instanceInitiatedShutdownBehavior attribute.
      • getValue

        public String getValue()

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

        Returns:
        A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or instanceInitiatedShutdownBehavior attribute.
      • withValue

        public ModifyInstanceAttributeRequest withValue​(String value)

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

        Parameters:
        value - A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or instanceInitiatedShutdownBehavior attribute.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getBlockDeviceMappings

        public List<InstanceBlockDeviceMappingSpecification> getBlockDeviceMappings()

        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.

      • setBlockDeviceMappings

        public void setBlockDeviceMappings​(Collection<InstanceBlockDeviceMappingSpecification> 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.

        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.

      • withBlockDeviceMappings

        public ModifyInstanceAttributeRequest withBlockDeviceMappings​(InstanceBlockDeviceMappingSpecification... 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.

        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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • withBlockDeviceMappings

        public ModifyInstanceAttributeRequest withBlockDeviceMappings​(Collection<InstanceBlockDeviceMappingSpecification> 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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • setSourceDestCheck

        public void setSourceDestCheck​(Boolean 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.

        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.
      • getSourceDestCheck

        public Boolean getSourceDestCheck()

        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.
      • withSourceDestCheck

        public ModifyInstanceAttributeRequest withSourceDestCheck​(Boolean 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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • isSourceDestCheck

        public Boolean isSourceDestCheck()

        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.
      • setDisableApiTermination

        public void setDisableApiTermination​(Boolean disableApiTermination)

        If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.

        Parameters:
        disableApiTermination - If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
      • getDisableApiTermination

        public Boolean getDisableApiTermination()

        If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.

        Returns:
        If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
      • withDisableApiTermination

        public ModifyInstanceAttributeRequest withDisableApiTermination​(Boolean disableApiTermination)

        If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.

        Parameters:
        disableApiTermination - If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • isDisableApiTermination

        public Boolean isDisableApiTermination()

        If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.

        Returns:
        If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
      • setInstanceType

        public void setInstanceType​(String 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.

        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.
      • getInstanceType

        public String getInstanceType()

        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.
      • withInstanceType

        public ModifyInstanceAttributeRequest withInstanceType​(String 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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • setKernel

        public void setKernel​(String 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.

        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.
      • getKernel

        public String getKernel()

        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.
      • withKernel

        public ModifyInstanceAttributeRequest withKernel​(String 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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • setRamdisk

        public void setRamdisk​(String 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.

        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.
      • getRamdisk

        public String getRamdisk()

        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.
      • withRamdisk

        public ModifyInstanceAttributeRequest withRamdisk​(String 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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • setUserData

        public void setUserData​(String userData)

        Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.

        Parameters:
        userData - Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.
      • getUserData

        public String getUserData()

        Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.

        Returns:
        Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.
      • withUserData

        public ModifyInstanceAttributeRequest withUserData​(String userData)

        Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.

        Parameters:
        userData - Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setInstanceInitiatedShutdownBehavior

        public void setInstanceInitiatedShutdownBehavior​(String instanceInitiatedShutdownBehavior)

        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).
      • getInstanceInitiatedShutdownBehavior

        public String getInstanceInitiatedShutdownBehavior()

        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).
      • withInstanceInitiatedShutdownBehavior

        public ModifyInstanceAttributeRequest withInstanceInitiatedShutdownBehavior​(String instanceInitiatedShutdownBehavior)

        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).
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getGroups

        public List<String> getGroups()

        [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.
      • setGroups

        public void setGroups​(Collection<String> 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.

        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.
      • withGroups

        public ModifyInstanceAttributeRequest withGroups​(String... 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.

        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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • withGroups

        public ModifyInstanceAttributeRequest withGroups​(Collection<String> 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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • setEbsOptimized

        public void setEbsOptimized​(Boolean 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.

        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.
      • getEbsOptimized

        public Boolean getEbsOptimized()

        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.
      • withEbsOptimized

        public ModifyInstanceAttributeRequest withEbsOptimized​(Boolean 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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • isEbsOptimized

        public Boolean isEbsOptimized()

        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.
      • setSriovNetSupport

        public void setSriovNetSupport​(String 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.

        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.

      • getSriovNetSupport

        public String getSriovNetSupport()

        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.

      • withSriovNetSupport

        public ModifyInstanceAttributeRequest withSriovNetSupport​(String 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.

        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:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object