public class ModifyImageAttributeRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<ModifyImageAttributeRequest>
ModifyImageAttribute operation
.
Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
NOTE: AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.
Constructor and Description |
---|
ModifyImageAttributeRequest()
Default constructor for a new ModifyImageAttributeRequest object.
|
ModifyImageAttributeRequest(java.lang.String imageId,
java.lang.String attribute)
Constructs a new ModifyImageAttributeRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAttribute()
The name of the attribute to modify.
|
java.lang.String |
getDescription()
A description for the AMI.
|
Request<ModifyImageAttributeRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.String |
getImageId()
The ID of the AMI.
|
LaunchPermissionModifications |
getLaunchPermission()
A launch permission modification.
|
java.lang.String |
getOperationType()
The operation type.
|
java.util.List<java.lang.String> |
getProductCodes()
One or more product codes.
|
java.util.List<java.lang.String> |
getUserGroups()
One or more user groups.
|
java.util.List<java.lang.String> |
getUserIds()
One or more AWS account IDs.
|
java.lang.String |
getValue()
The value of the attribute being modified.
|
int |
hashCode() |
void |
setAttribute(java.lang.String attribute)
The name of the attribute to modify.
|
void |
setDescription(java.lang.String description)
A description for the AMI.
|
void |
setImageId(java.lang.String imageId)
The ID of the AMI.
|
void |
setLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.
|
void |
setOperationType(OperationType operationType)
The operation type.
|
void |
setOperationType(java.lang.String operationType)
The operation type.
|
void |
setProductCodes(java.util.Collection<java.lang.String> productCodes)
One or more product codes.
|
void |
setUserGroups(java.util.Collection<java.lang.String> userGroups)
One or more user groups.
|
void |
setUserIds(java.util.Collection<java.lang.String> userIds)
One or more AWS account IDs.
|
void |
setValue(java.lang.String value)
The value of the attribute being modified.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ModifyImageAttributeRequest |
withAttribute(java.lang.String attribute)
The name of the attribute to modify.
|
ModifyImageAttributeRequest |
withDescription(java.lang.String description)
A description for the AMI.
|
ModifyImageAttributeRequest |
withImageId(java.lang.String imageId)
The ID of the AMI.
|
ModifyImageAttributeRequest |
withLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.
|
ModifyImageAttributeRequest |
withOperationType(OperationType operationType)
The operation type.
|
ModifyImageAttributeRequest |
withOperationType(java.lang.String operationType)
The operation type.
|
ModifyImageAttributeRequest |
withProductCodes(java.util.Collection<java.lang.String> productCodes)
One or more product codes.
|
ModifyImageAttributeRequest |
withProductCodes(java.lang.String... productCodes)
One or more product codes.
|
ModifyImageAttributeRequest |
withUserGroups(java.util.Collection<java.lang.String> userGroups)
One or more user groups.
|
ModifyImageAttributeRequest |
withUserGroups(java.lang.String... userGroups)
One or more user groups.
|
ModifyImageAttributeRequest |
withUserIds(java.util.Collection<java.lang.String> userIds)
One or more AWS account IDs.
|
ModifyImageAttributeRequest |
withUserIds(java.lang.String... userIds)
One or more AWS account IDs.
|
ModifyImageAttributeRequest |
withValue(java.lang.String value)
The value of the attribute being modified.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public ModifyImageAttributeRequest()
public ModifyImageAttributeRequest(java.lang.String imageId, java.lang.String attribute)
imageId
- The ID of the AMI.attribute
- The name of the attribute to modify.public java.lang.String getImageId()
public void setImageId(java.lang.String imageId)
imageId
- The ID of the AMI.public ModifyImageAttributeRequest withImageId(java.lang.String imageId)
Returns a reference to this object so that method calls can be chained together.
imageId
- The ID of the AMI.public java.lang.String getAttribute()
public void setAttribute(java.lang.String attribute)
attribute
- The name of the attribute to modify.public ModifyImageAttributeRequest withAttribute(java.lang.String attribute)
Returns a reference to this object so that method calls can be chained together.
attribute
- The name of the attribute to modify.public java.lang.String getOperationType()
Constraints:
Allowed Values: add, remove
OperationType
public void setOperationType(java.lang.String operationType)
Constraints:
Allowed Values: add, remove
operationType
- The operation type.OperationType
public ModifyImageAttributeRequest withOperationType(java.lang.String operationType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: add, remove
operationType
- The operation type.OperationType
public void setOperationType(OperationType operationType)
Constraints:
Allowed Values: add, remove
operationType
- The operation type.OperationType
public ModifyImageAttributeRequest withOperationType(OperationType operationType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: add, remove
operationType
- The operation type.OperationType
public java.util.List<java.lang.String> getUserIds()
launchPermission
attribute.launchPermission
attribute.public void setUserIds(java.util.Collection<java.lang.String> userIds)
launchPermission
attribute.userIds
- One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.public ModifyImageAttributeRequest withUserIds(java.lang.String... userIds)
launchPermission
attribute.
Returns a reference to this object so that method calls can be chained together.
userIds
- One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.public ModifyImageAttributeRequest withUserIds(java.util.Collection<java.lang.String> userIds)
launchPermission
attribute.
Returns a reference to this object so that method calls can be chained together.
userIds
- One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.public java.util.List<java.lang.String> getUserGroups()
launchPermission
attribute.launchPermission
attribute.public void setUserGroups(java.util.Collection<java.lang.String> userGroups)
launchPermission
attribute.userGroups
- One or more user groups. This is only valid when modifying the
launchPermission
attribute.public ModifyImageAttributeRequest withUserGroups(java.lang.String... userGroups)
launchPermission
attribute.
Returns a reference to this object so that method calls can be chained together.
userGroups
- One or more user groups. This is only valid when modifying the
launchPermission
attribute.public ModifyImageAttributeRequest withUserGroups(java.util.Collection<java.lang.String> userGroups)
launchPermission
attribute.
Returns a reference to this object so that method calls can be chained together.
userGroups
- One or more user groups. This is only valid when modifying the
launchPermission
attribute.public java.util.List<java.lang.String> getProductCodes()
productCodes
attribute.productCodes
attribute.public void setProductCodes(java.util.Collection<java.lang.String> productCodes)
productCodes
attribute.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.public ModifyImageAttributeRequest withProductCodes(java.lang.String... productCodes)
productCodes
attribute.
Returns a reference to this object so that method calls can be chained together.
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.public ModifyImageAttributeRequest withProductCodes(java.util.Collection<java.lang.String> productCodes)
productCodes
attribute.
Returns a reference to this object so that method calls can be chained together.
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.public java.lang.String getValue()
description
attribute.description
attribute.public void setValue(java.lang.String value)
description
attribute.value
- The value of the attribute being modified. This is only valid when
modifying the description
attribute.public ModifyImageAttributeRequest withValue(java.lang.String value)
description
attribute.
Returns a reference to this object so that method calls can be chained together.
value
- The value of the attribute being modified. This is only valid when
modifying the description
attribute.public LaunchPermissionModifications getLaunchPermission()
public void setLaunchPermission(LaunchPermissionModifications launchPermission)
launchPermission
- A launch permission modification.public ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)
Returns a reference to this object so that method calls can be chained together.
launchPermission
- A launch permission modification.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- A description for the AMI.public ModifyImageAttributeRequest withDescription(java.lang.String description)
Returns a reference to this object so that method calls can be chained together.
description
- A description for the AMI.public Request<ModifyImageAttributeRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<ModifyImageAttributeRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.