Class ModifyImageAttributeRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.ec2.model.ModifyImageAttributeRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,DryRunSupportedRequest<ModifyImageAttributeRequest>
,Serializable
,Cloneable
public class ModifyImageAttributeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<ModifyImageAttributeRequest>
Contains the parameters for ModifyImageAttribute.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description ModifyImageAttributeRequest()
Default constructor for ModifyImageAttributeRequest object.ModifyImageAttributeRequest(String imageId, String attribute)
Constructs a new ModifyImageAttributeRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModifyImageAttributeRequest
clone()
Creates a shallow clone of this request.boolean
equals(Object obj)
String
getAttribute()
The name of the attribute to modify.String
getDescription()
A description for the AMI.Request<ModifyImageAttributeRequest>
getDryRunRequest()
This method is intended for internal use only.String
getImageId()
The ID of the AMI.LaunchPermissionModifications
getLaunchPermission()
A launch permission modification.String
getOperationType()
The operation type.List<String>
getProductCodes()
One or more product codes.List<String>
getUserGroups()
One or more user groups.List<String>
getUserIds()
One or more AWS 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 description for the AMI.void
setImageId(String imageId)
The ID of the AMI.void
setLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.void
setOperationType(OperationType operationType)
The operation type.void
setOperationType(String operationType)
The operation type.void
setProductCodes(Collection<String> productCodes)
One or more product codes.void
setUserGroups(Collection<String> userGroups)
One or more user groups.void
setUserIds(Collection<String> userIds)
One or more AWS account IDs.void
setValue(String value)
The value of the attribute being modified.String
toString()
Returns a string representation of this object; useful for testing and debugging.ModifyImageAttributeRequest
withAttribute(String attribute)
The name of the attribute to modify.ModifyImageAttributeRequest
withDescription(String description)
A description for the AMI.ModifyImageAttributeRequest
withImageId(String imageId)
The ID of the AMI.ModifyImageAttributeRequest
withLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.ModifyImageAttributeRequest
withOperationType(OperationType operationType)
The operation type.ModifyImageAttributeRequest
withOperationType(String operationType)
The operation type.ModifyImageAttributeRequest
withProductCodes(String... productCodes)
One or more product codes.ModifyImageAttributeRequest
withProductCodes(Collection<String> productCodes)
One or more product codes.ModifyImageAttributeRequest
withUserGroups(String... userGroups)
One or more user groups.ModifyImageAttributeRequest
withUserGroups(Collection<String> userGroups)
One or more user groups.ModifyImageAttributeRequest
withUserIds(String... userIds)
One or more AWS account IDs.ModifyImageAttributeRequest
withUserIds(Collection<String> userIds)
One or more AWS account IDs.ModifyImageAttributeRequest
withValue(String value)
The value of the attribute being modified.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Constructor Detail
-
ModifyImageAttributeRequest
public ModifyImageAttributeRequest()
Default constructor for ModifyImageAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
ModifyImageAttributeRequest
public ModifyImageAttributeRequest(String imageId, String attribute)
Constructs a new ModifyImageAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
imageId
- The ID of the AMI.attribute
- The name of the attribute to modify.
-
-
Method Detail
-
setImageId
public void setImageId(String imageId)
The ID of the AMI.
- Parameters:
imageId
- The ID of the AMI.
-
getImageId
public String getImageId()
The ID of the AMI.
- Returns:
- The ID of the AMI.
-
withImageId
public ModifyImageAttributeRequest withImageId(String imageId)
The ID of the AMI.
- Parameters:
imageId
- The ID of the AMI.- 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 to modify.
- Parameters:
attribute
- The name of the attribute to modify.
-
getAttribute
public String getAttribute()
The name of the attribute to modify.
- Returns:
- The name of the attribute to modify.
-
withAttribute
public ModifyImageAttributeRequest withAttribute(String attribute)
The name of the attribute to modify.
- Parameters:
attribute
- The name of the attribute to modify.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setOperationType
public void setOperationType(String operationType)
The operation type.
- Parameters:
operationType
- The operation type.- See Also:
OperationType
-
getOperationType
public String getOperationType()
The operation type.
- Returns:
- The operation type.
- See Also:
OperationType
-
withOperationType
public ModifyImageAttributeRequest withOperationType(String operationType)
The operation type.
- Parameters:
operationType
- The operation type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
OperationType
-
setOperationType
public void setOperationType(OperationType operationType)
The operation type.
- Parameters:
operationType
- The operation type.- See Also:
OperationType
-
withOperationType
public ModifyImageAttributeRequest withOperationType(OperationType operationType)
The operation type.
- Parameters:
operationType
- The operation type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
OperationType
-
getUserIds
public List<String> getUserIds()
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.- Returns:
- One or more AWS account IDs. This is only valid when modifying
the
launchPermission
attribute.
-
setUserIds
public void setUserIds(Collection<String> userIds)
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.- Parameters:
userIds
- One or more AWS account IDs. This is only valid when modifying thelaunchPermission
attribute.
-
withUserIds
public ModifyImageAttributeRequest withUserIds(String... userIds)
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.NOTE: This method appends the values to the existing list (if any). Use
setUserIds(java.util.Collection)
orwithUserIds(java.util.Collection)
if you want to override the existing values.- Parameters:
userIds
- One or more AWS account IDs. This is only valid when modifying thelaunchPermission
attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withUserIds
public ModifyImageAttributeRequest withUserIds(Collection<String> userIds)
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.- Parameters:
userIds
- One or more AWS account IDs. This is only valid when modifying thelaunchPermission
attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getUserGroups
public List<String> getUserGroups()
One or more user groups. This is only valid when modifying the
launchPermission
attribute.- Returns:
- One or more user groups. This is only valid when modifying the
launchPermission
attribute.
-
setUserGroups
public void setUserGroups(Collection<String> userGroups)
One or more user groups. This is only valid when modifying the
launchPermission
attribute.- Parameters:
userGroups
- One or more user groups. This is only valid when modifying thelaunchPermission
attribute.
-
withUserGroups
public ModifyImageAttributeRequest withUserGroups(String... userGroups)
One or more user groups. This is only valid when modifying the
launchPermission
attribute.NOTE: This method appends the values to the existing list (if any). Use
setUserGroups(java.util.Collection)
orwithUserGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
userGroups
- One or more user groups. This is only valid when modifying thelaunchPermission
attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withUserGroups
public ModifyImageAttributeRequest withUserGroups(Collection<String> userGroups)
One or more user groups. This is only valid when modifying the
launchPermission
attribute.- Parameters:
userGroups
- One or more user groups. This is only valid when modifying thelaunchPermission
attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getProductCodes
public List<String> getProductCodes()
One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the
productCodes
attribute.- Returns:
- One or more product codes. After you add a product code to an
AMI, it can't be removed. This is only valid when modifying the
productCodes
attribute.
-
setProductCodes
public void setProductCodes(Collection<String> productCodes)
One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the
productCodes
attribute.- Parameters:
productCodes
- One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying theproductCodes
attribute.
-
withProductCodes
public ModifyImageAttributeRequest withProductCodes(String... productCodes)
One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the
productCodes
attribute.NOTE: This method appends the values to the existing list (if any). Use
setProductCodes(java.util.Collection)
orwithProductCodes(java.util.Collection)
if you want to override the existing values.- Parameters:
productCodes
- One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying theproductCodes
attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withProductCodes
public ModifyImageAttributeRequest withProductCodes(Collection<String> productCodes)
One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the
productCodes
attribute.- Parameters:
productCodes
- One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying theproductCodes
attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setValue
public void setValue(String value)
The value of the attribute being modified. This is only valid when modifying the
description
attribute.- Parameters:
value
- The value of the attribute being modified. This is only valid when modifying thedescription
attribute.
-
getValue
public String getValue()
The value of the attribute being modified. This is only valid when modifying the
description
attribute.- Returns:
- The value of the attribute being modified. This is only valid
when modifying the
description
attribute.
-
withValue
public ModifyImageAttributeRequest withValue(String value)
The value of the attribute being modified. This is only valid when modifying the
description
attribute.- Parameters:
value
- The value of the attribute being modified. This is only valid when modifying thedescription
attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLaunchPermission
public void setLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.
- Parameters:
launchPermission
- A launch permission modification.
-
getLaunchPermission
public LaunchPermissionModifications getLaunchPermission()
A launch permission modification.
- Returns:
- A launch permission modification.
-
withLaunchPermission
public ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.
- Parameters:
launchPermission
- A launch permission modification.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDescription
public void setDescription(String description)
A description for the AMI.
- Parameters:
description
- A description for the AMI.
-
getDescription
public String getDescription()
A description for the AMI.
- Returns:
- A description for the AMI.
-
withDescription
public ModifyImageAttributeRequest withDescription(String description)
A description for the AMI.
- Parameters:
description
- A description for the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getDryRunRequest
public Request<ModifyImageAttributeRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.- Specified by:
getDryRunRequest
in interfaceDryRunSupportedRequest<ModifyImageAttributeRequest>
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public ModifyImageAttributeRequest clone()
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
Object.clone()
-
-