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 ModifyImageAttributeRequestclone()Creates a shallow clone of this request.booleanequals(Object obj)StringgetAttribute()The name of the attribute to modify.StringgetDescription()A description for the AMI.Request<ModifyImageAttributeRequest>getDryRunRequest()This method is intended for internal use only.StringgetImageId()The ID of the AMI.LaunchPermissionModificationsgetLaunchPermission()A launch permission modification.StringgetOperationType()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.StringgetValue()The value of the attribute being modified.inthashCode()voidsetAttribute(String attribute)The name of the attribute to modify.voidsetDescription(String description)A description for the AMI.voidsetImageId(String imageId)The ID of the AMI.voidsetLaunchPermission(LaunchPermissionModifications launchPermission)A launch permission modification.voidsetOperationType(OperationType operationType)The operation type.voidsetOperationType(String operationType)The operation type.voidsetProductCodes(Collection<String> productCodes)One or more product codes.voidsetUserGroups(Collection<String> userGroups)One or more user groups.voidsetUserIds(Collection<String> userIds)One or more AWS account IDs.voidsetValue(String value)The value of the attribute being modified.StringtoString()Returns a string representation of this object; useful for testing and debugging.ModifyImageAttributeRequestwithAttribute(String attribute)The name of the attribute to modify.ModifyImageAttributeRequestwithDescription(String description)A description for the AMI.ModifyImageAttributeRequestwithImageId(String imageId)The ID of the AMI.ModifyImageAttributeRequestwithLaunchPermission(LaunchPermissionModifications launchPermission)A launch permission modification.ModifyImageAttributeRequestwithOperationType(OperationType operationType)The operation type.ModifyImageAttributeRequestwithOperationType(String operationType)The operation type.ModifyImageAttributeRequestwithProductCodes(String... productCodes)One or more product codes.ModifyImageAttributeRequestwithProductCodes(Collection<String> productCodes)One or more product codes.ModifyImageAttributeRequestwithUserGroups(String... userGroups)One or more user groups.ModifyImageAttributeRequestwithUserGroups(Collection<String> userGroups)One or more user groups.ModifyImageAttributeRequestwithUserIds(String... userIds)One or more AWS account IDs.ModifyImageAttributeRequestwithUserIds(Collection<String> userIds)One or more AWS account IDs.ModifyImageAttributeRequestwithValue(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
launchPermissionattribute.- Returns:
- One or more AWS account IDs. This is only valid when modifying
the
launchPermissionattribute.
-
setUserIds
public void setUserIds(Collection<String> userIds)
One or more AWS account IDs. This is only valid when modifying the
launchPermissionattribute.- Parameters:
userIds- One or more AWS account IDs. This is only valid when modifying thelaunchPermissionattribute.
-
withUserIds
public ModifyImageAttributeRequest withUserIds(String... userIds)
One or more AWS account IDs. This is only valid when modifying the
launchPermissionattribute.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 thelaunchPermissionattribute.- 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
launchPermissionattribute.- Parameters:
userIds- One or more AWS account IDs. This is only valid when modifying thelaunchPermissionattribute.- 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
launchPermissionattribute.- Returns:
- One or more user groups. This is only valid when modifying the
launchPermissionattribute.
-
setUserGroups
public void setUserGroups(Collection<String> userGroups)
One or more user groups. This is only valid when modifying the
launchPermissionattribute.- Parameters:
userGroups- One or more user groups. This is only valid when modifying thelaunchPermissionattribute.
-
withUserGroups
public ModifyImageAttributeRequest withUserGroups(String... userGroups)
One or more user groups. This is only valid when modifying the
launchPermissionattribute.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 thelaunchPermissionattribute.- 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
launchPermissionattribute.- Parameters:
userGroups- One or more user groups. This is only valid when modifying thelaunchPermissionattribute.- 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
productCodesattribute.- 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
productCodesattribute.
-
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
productCodesattribute.- 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 theproductCodesattribute.
-
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
productCodesattribute.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 theproductCodesattribute.- 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
productCodesattribute.- 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 theproductCodesattribute.- 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
descriptionattribute.- Parameters:
value- The value of the attribute being modified. This is only valid when modifying thedescriptionattribute.
-
getValue
public String getValue()
The value of the attribute being modified. This is only valid when modifying the
descriptionattribute.- Returns:
- The value of the attribute being modified. This is only valid
when modifying the
descriptionattribute.
-
withValue
public ModifyImageAttributeRequest withValue(String value)
The value of the attribute being modified. This is only valid when modifying the
descriptionattribute.- Parameters:
value- The value of the attribute being modified. This is only valid when modifying thedescriptionattribute.- 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:
getDryRunRequestin interfaceDryRunSupportedRequest<ModifyImageAttributeRequest>
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public ModifyImageAttributeRequest clone()
Description copied from class:AmazonWebServiceRequestCreates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clonein classAmazonWebServiceRequest- See Also:
Object.clone()
-
-