@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ModifyImageAttributeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<ModifyImageAttributeRequest>
Contains the parameters for ModifyImageAttribute.
NOOP| Constructor and Description | 
|---|
| ModifyImageAttributeRequest()Default constructor for ModifyImageAttributeRequest object. | 
| ModifyImageAttributeRequest(String imageId,
                           String attribute)Constructs a new ModifyImageAttributeRequest object. | 
| Modifier and Type | Method and Description | 
|---|---|
| ModifyImageAttributeRequest | clone() | 
| boolean | equals(Object obj) | 
| String | getAttribute()
 The name of the attribute to modify. | 
| String | getDescription()
 A new description for the AMI. | 
| Request<ModifyImageAttributeRequest> | getDryRunRequest()This method is intended for internal use only. | 
| String | getImageId()
 The ID of the AMI. | 
| String | getImdsSupport()
 Set to  v2.0to indicate that IMDSv2 is specified in the AMI. | 
| LaunchPermissionModifications | getLaunchPermission()
 A new launch permission for the AMI. | 
| String | getOperationType()
 The operation type. | 
| List<String> | getOrganizationalUnitArns()
 The Amazon Resource Name (ARN) of an organizational unit (OU). | 
| List<String> | getOrganizationArns()
 The Amazon Resource Name (ARN) of an organization. | 
| List<String> | getProductCodes()
 Not supported. | 
| List<String> | getUserGroups()
 The user groups. | 
| List<String> | getUserIds()
 The Amazon Web Services account IDs. | 
| String | getValue()
 The value of the attribute being modified. | 
| int | hashCode() | 
| void | setAttribute(String attribute)
 The name of the attribute to modify. | 
| void | setDescription(String description)
 A new description for the AMI. | 
| void | setImageId(String imageId)
 The ID of the AMI. | 
| void | setImdsSupport(String imdsSupport)
 Set to  v2.0to indicate that IMDSv2 is specified in the AMI. | 
| void | setLaunchPermission(LaunchPermissionModifications launchPermission)
 A new launch permission for the AMI. | 
| void | setOperationType(OperationType operationType)
 The operation type. | 
| void | setOperationType(String operationType)
 The operation type. | 
| void | setOrganizationalUnitArns(Collection<String> organizationalUnitArns)
 The Amazon Resource Name (ARN) of an organizational unit (OU). | 
| void | setOrganizationArns(Collection<String> organizationArns)
 The Amazon Resource Name (ARN) of an organization. | 
| void | setProductCodes(Collection<String> productCodes)
 Not supported. | 
| void | setUserGroups(Collection<String> userGroups)
 The user groups. | 
| void | setUserIds(Collection<String> userIds)
 The Amazon Web Services account IDs. | 
| void | setValue(String value)
 The value of the attribute being modified. | 
| String | toString()Returns a string representation of this object. | 
| ModifyImageAttributeRequest | withAttribute(String attribute)
 The name of the attribute to modify. | 
| ModifyImageAttributeRequest | withDescription(String description)
 A new description for the AMI. | 
| ModifyImageAttributeRequest | withImageId(String imageId)
 The ID of the AMI. | 
| ModifyImageAttributeRequest | withImdsSupport(String imdsSupport)
 Set to  v2.0to indicate that IMDSv2 is specified in the AMI. | 
| ModifyImageAttributeRequest | withLaunchPermission(LaunchPermissionModifications launchPermission)
 A new launch permission for the AMI. | 
| ModifyImageAttributeRequest | withOperationType(OperationType operationType)
 The operation type. | 
| ModifyImageAttributeRequest | withOperationType(String operationType)
 The operation type. | 
| ModifyImageAttributeRequest | withOrganizationalUnitArns(Collection<String> organizationalUnitArns)
 The Amazon Resource Name (ARN) of an organizational unit (OU). | 
| ModifyImageAttributeRequest | withOrganizationalUnitArns(String... organizationalUnitArns)
 The Amazon Resource Name (ARN) of an organizational unit (OU). | 
| ModifyImageAttributeRequest | withOrganizationArns(Collection<String> organizationArns)
 The Amazon Resource Name (ARN) of an organization. | 
| ModifyImageAttributeRequest | withOrganizationArns(String... organizationArns)
 The Amazon Resource Name (ARN) of an organization. | 
| ModifyImageAttributeRequest | withProductCodes(Collection<String> productCodes)
 Not supported. | 
| ModifyImageAttributeRequest | withProductCodes(String... productCodes)
 Not supported. | 
| ModifyImageAttributeRequest | withUserGroups(Collection<String> userGroups)
 The user groups. | 
| ModifyImageAttributeRequest | withUserGroups(String... userGroups)
 The user groups. | 
| ModifyImageAttributeRequest | withUserIds(Collection<String> userIds)
 The Amazon Web Services account IDs. | 
| ModifyImageAttributeRequest | withUserIds(String... userIds)
 The Amazon Web Services account IDs. | 
| ModifyImageAttributeRequest | withValue(String value)
 The value of the attribute being modified. | 
addHandlerContext, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeoutpublic ModifyImageAttributeRequest()
public ModifyImageAttributeRequest(String imageId, String attribute)
imageId - The ID of the AMI.attribute - The name of the attribute to modify.
        
        Valid values: description | imdsSupport | launchPermission
public void setAttribute(String attribute)
The name of the attribute to modify.
 Valid values: description | imdsSupport | launchPermission
 
attribute - The name of the attribute to modify.
        
        Valid values: description | imdsSupport | launchPermission
public String getAttribute()
The name of the attribute to modify.
 Valid values: description | imdsSupport | launchPermission
 
         Valid values: description | imdsSupport | launchPermission
public ModifyImageAttributeRequest withAttribute(String attribute)
The name of the attribute to modify.
 Valid values: description | imdsSupport | launchPermission
 
attribute - The name of the attribute to modify.
        
        Valid values: description | imdsSupport | launchPermission
public void setDescription(String description)
A new description for the AMI.
description - A new description for the AMI.public String getDescription()
A new description for the AMI.
public ModifyImageAttributeRequest withDescription(String description)
A new description for the AMI.
description - A new description for the AMI.public void setImageId(String imageId)
The ID of the AMI.
imageId - The ID of the AMI.public String getImageId()
The ID of the AMI.
public ModifyImageAttributeRequest withImageId(String imageId)
The ID of the AMI.
imageId - The ID of the AMI.public void setLaunchPermission(LaunchPermissionModifications launchPermission)
A new launch permission for the AMI.
launchPermission - A new launch permission for the AMI.public LaunchPermissionModifications getLaunchPermission()
A new launch permission for the AMI.
public ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)
A new launch permission for the AMI.
launchPermission - A new launch permission for the AMI.public void setOperationType(String operationType)
 The operation type. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
operationType - The operation type. This parameter can be used only when the Attribute parameter is
        launchPermission.OperationTypepublic String getOperationType()
 The operation type. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
Attribute parameter is
         launchPermission.OperationTypepublic ModifyImageAttributeRequest withOperationType(String operationType)
 The operation type. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
operationType - The operation type. This parameter can be used only when the Attribute parameter is
        launchPermission.OperationTypepublic void setOperationType(OperationType operationType)
 The operation type. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
operationType - The operation type. This parameter can be used only when the Attribute parameter is
        launchPermission.OperationTypepublic ModifyImageAttributeRequest withOperationType(OperationType operationType)
 The operation type. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
operationType - The operation type. This parameter can be used only when the Attribute parameter is
        launchPermission.OperationTypepublic void setProductCodes(Collection<String> productCodes)
Not supported.
productCodes - Not supported.public ModifyImageAttributeRequest withProductCodes(String... productCodes)
Not supported.
 NOTE: This method appends the values to the existing list (if any). Use
 setProductCodes(java.util.Collection) or withProductCodes(java.util.Collection) if you want to
 override the existing values.
 
productCodes - Not supported.public ModifyImageAttributeRequest withProductCodes(Collection<String> productCodes)
Not supported.
productCodes - Not supported.public List<String> getUserGroups()
 The user groups. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
Attribute parameter is
         launchPermission.public void setUserGroups(Collection<String> userGroups)
 The user groups. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
userGroups - The user groups. This parameter can be used only when the Attribute parameter is
        launchPermission.public ModifyImageAttributeRequest withUserGroups(String... userGroups)
 The user groups. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
 NOTE: This method appends the values to the existing list (if any). Use
 setUserGroups(java.util.Collection) or withUserGroups(java.util.Collection) if you want to
 override the existing values.
 
userGroups - The user groups. This parameter can be used only when the Attribute parameter is
        launchPermission.public ModifyImageAttributeRequest withUserGroups(Collection<String> userGroups)
 The user groups. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
userGroups - The user groups. This parameter can be used only when the Attribute parameter is
        launchPermission.public List<String> getUserIds()
 The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
Attribute
         parameter is launchPermission.public void setUserIds(Collection<String> userIds)
 The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
userIds - The Amazon Web Services account IDs. This parameter can be used only when the Attribute
        parameter is launchPermission.public ModifyImageAttributeRequest withUserIds(String... userIds)
 The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
 NOTE: This method appends the values to the existing list (if any). Use
 setUserIds(java.util.Collection) or withUserIds(java.util.Collection) if you want to override
 the existing values.
 
userIds - The Amazon Web Services account IDs. This parameter can be used only when the Attribute
        parameter is launchPermission.public ModifyImageAttributeRequest withUserIds(Collection<String> userIds)
 The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is
 launchPermission.
 
userIds - The Amazon Web Services account IDs. This parameter can be used only when the Attribute
        parameter is launchPermission.public void setValue(String value)
 The value of the attribute being modified. This parameter can be used only when the Attribute
 parameter is description or imdsSupport.
 
value - The value of the attribute being modified. This parameter can be used only when the Attribute
        parameter is description or imdsSupport.public String getValue()
 The value of the attribute being modified. This parameter can be used only when the Attribute
 parameter is description or imdsSupport.
 
Attribute parameter is description or imdsSupport.public ModifyImageAttributeRequest withValue(String value)
 The value of the attribute being modified. This parameter can be used only when the Attribute
 parameter is description or imdsSupport.
 
value - The value of the attribute being modified. This parameter can be used only when the Attribute
        parameter is description or imdsSupport.public List<String> getOrganizationArns()
 The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
 Attribute parameter is launchPermission.
 
Attribute parameter is launchPermission.public void setOrganizationArns(Collection<String> organizationArns)
 The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
 Attribute parameter is launchPermission.
 
organizationArns - The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
        Attribute parameter is launchPermission.public ModifyImageAttributeRequest withOrganizationArns(String... organizationArns)
 The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
 Attribute parameter is launchPermission.
 
 NOTE: This method appends the values to the existing list (if any). Use
 setOrganizationArns(java.util.Collection) or withOrganizationArns(java.util.Collection) if you
 want to override the existing values.
 
organizationArns - The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
        Attribute parameter is launchPermission.public ModifyImageAttributeRequest withOrganizationArns(Collection<String> organizationArns)
 The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
 Attribute parameter is launchPermission.
 
organizationArns - The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
        Attribute parameter is launchPermission.public List<String> getOrganizationalUnitArns()
 The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
 Attribute parameter is launchPermission.
 
Attribute parameter is launchPermission.public void setOrganizationalUnitArns(Collection<String> organizationalUnitArns)
 The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
 Attribute parameter is launchPermission.
 
organizationalUnitArns - The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
        Attribute parameter is launchPermission.public ModifyImageAttributeRequest withOrganizationalUnitArns(String... organizationalUnitArns)
 The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
 Attribute parameter is launchPermission.
 
 NOTE: This method appends the values to the existing list (if any). Use
 setOrganizationalUnitArns(java.util.Collection) or
 withOrganizationalUnitArns(java.util.Collection) if you want to override the existing values.
 
organizationalUnitArns - The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
        Attribute parameter is launchPermission.public ModifyImageAttributeRequest withOrganizationalUnitArns(Collection<String> organizationalUnitArns)
 The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
 Attribute parameter is launchPermission.
 
organizationalUnitArns - The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
        Attribute parameter is launchPermission.public void setImdsSupport(String imdsSupport)
 Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will
 have HttpTokens automatically set to required so that, by default, the instance
 requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit
 is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide.
 
 Do not use this parameter unless your AMI software supports IMDSv2. After you set the value to v2.0,
 you can't undo it. The only way to “reset” your AMI is to create a new AMI from the underlying snapshot.
 
imdsSupport - Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI
        will have HttpTokens automatically set to required so that, by default, the
        instance requires that IMDSv2 is used when requesting instance metadata. In addition,
        HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. 
        Do not use this parameter unless your AMI software supports IMDSv2. After you set the value to
        v2.0, you can't undo it. The only way to “reset” your AMI is to create a new AMI from the
        underlying snapshot.
        
public String getImdsSupport()
 Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will
 have HttpTokens automatically set to required so that, by default, the instance
 requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit
 is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide.
 
 Do not use this parameter unless your AMI software supports IMDSv2. After you set the value to v2.0,
 you can't undo it. The only way to “reset” your AMI is to create a new AMI from the underlying snapshot.
 
v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this
         AMI will have HttpTokens automatically set to required so that, by default, the
         instance requires that IMDSv2 is used when requesting instance metadata. In addition,
         HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. 
         Do not use this parameter unless your AMI software supports IMDSv2. After you set the value to
         v2.0, you can't undo it. The only way to “reset” your AMI is to create a new AMI from the
         underlying snapshot.
         
public ModifyImageAttributeRequest withImdsSupport(String imdsSupport)
 Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will
 have HttpTokens automatically set to required so that, by default, the instance
 requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit
 is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide.
 
 Do not use this parameter unless your AMI software supports IMDSv2. After you set the value to v2.0,
 you can't undo it. The only way to “reset” your AMI is to create a new AMI from the underlying snapshot.
 
imdsSupport - Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI
        will have HttpTokens automatically set to required so that, by default, the
        instance requires that IMDSv2 is used when requesting instance metadata. In addition,
        HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide. 
        Do not use this parameter unless your AMI software supports IMDSv2. After you set the value to
        v2.0, you can't undo it. The only way to “reset” your AMI is to create a new AMI from the
        underlying snapshot.
        
public Request<ModifyImageAttributeRequest> getDryRunRequest()
getDryRunRequest in interface DryRunSupportedRequest<ModifyImageAttributeRequest>public String toString()
toString in class ObjectObject.toString()public ModifyImageAttributeRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2024. All rights reserved.