public class ModifySnapshotAttributeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<ModifySnapshotAttributeRequest>
ModifySnapshotAttribute operation.
 Adds or removes permission settings for the specified snapshot. You may add or remove specified AWS account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single API call. If you need to both add and remove account IDs for a snapshot, you must use multiple API calls.
For more information on modifying snapshot permissions, see Sharing Snapshots in the Amazon Elastic Compute Cloud User Guide for Linux .
NOTE: Snapshots with AWS Marketplace product codes cannot be made public.
NOOP| Constructor and Description | 
|---|
| ModifySnapshotAttributeRequest()Default constructor for a new ModifySnapshotAttributeRequest object. | 
| ModifySnapshotAttributeRequest(String snapshotId,
                              SnapshotAttributeName attribute,
                              String operationType)Constructs a new ModifySnapshotAttributeRequest object. | 
| ModifySnapshotAttributeRequest(String snapshotId,
                              String attribute,
                              String operationType)Constructs a new ModifySnapshotAttributeRequest object. | 
| Modifier and Type | Method and Description | 
|---|---|
| ModifySnapshotAttributeRequest | clone() | 
| boolean | equals(Object obj) | 
| String | getAttribute()The snapshot attribute to modify. | 
| CreateVolumePermissionModifications | getCreateVolumePermission()A JSON representation of the snapshot attribute modification. | 
| Request<ModifySnapshotAttributeRequest> | getDryRunRequest()This method is intended for internal use only. | 
| List<String> | getGroupNames()The group to modify for the snapshot. | 
| String | getOperationType()The type of operation to perform to the attribute. | 
| String | getSnapshotId()The ID of the snapshot. | 
| List<String> | getUserIds()The account ID to modify for the snapshot. | 
| int | hashCode() | 
| void | setAttribute(SnapshotAttributeName attribute)The snapshot attribute to modify. | 
| void | setAttribute(String attribute)The snapshot attribute to modify. | 
| void | setCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)A JSON representation of the snapshot attribute modification. | 
| void | setGroupNames(Collection<String> groupNames)The group to modify for the snapshot. | 
| void | setOperationType(String operationType)The type of operation to perform to the attribute. | 
| void | setSnapshotId(String snapshotId)The ID of the snapshot. | 
| void | setUserIds(Collection<String> userIds)The account ID to modify for the snapshot. | 
| String | toString()Returns a string representation of this object; useful for testing and
 debugging. | 
| ModifySnapshotAttributeRequest | withAttribute(SnapshotAttributeName attribute)The snapshot attribute to modify. | 
| ModifySnapshotAttributeRequest | withAttribute(String attribute)The snapshot attribute to modify. | 
| ModifySnapshotAttributeRequest | withCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)A JSON representation of the snapshot attribute modification. | 
| ModifySnapshotAttributeRequest | withGroupNames(Collection<String> groupNames)The group to modify for the snapshot. | 
| ModifySnapshotAttributeRequest | withGroupNames(String... groupNames)The group to modify for the snapshot. | 
| ModifySnapshotAttributeRequest | withOperationType(String operationType)The type of operation to perform to the attribute. | 
| ModifySnapshotAttributeRequest | withSnapshotId(String snapshotId)The ID of the snapshot. | 
| ModifySnapshotAttributeRequest | withUserIds(Collection<String> userIds)The account ID to modify for the snapshot. | 
| ModifySnapshotAttributeRequest | withUserIds(String... userIds)The account ID to modify for the snapshot. | 
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic ModifySnapshotAttributeRequest()
public ModifySnapshotAttributeRequest(String snapshotId, String attribute, String operationType)
snapshotId - The ID of the snapshot.attribute - The snapshot attribute to modify.operationType - The type of operation to perform to the
 attribute.public ModifySnapshotAttributeRequest(String snapshotId, SnapshotAttributeName attribute, String operationType)
snapshotId - The ID of the snapshot.attribute - The snapshot attribute to modify.operationType - The type of operation to perform to the
 attribute.public String getSnapshotId()
public void setSnapshotId(String snapshotId)
snapshotId - The ID of the snapshot.public ModifySnapshotAttributeRequest withSnapshotId(String snapshotId)
Returns a reference to this object so that method calls can be chained together.
snapshotId - The ID of the snapshot.public String getAttribute()
 Constraints:
 Allowed Values: productCodes, createVolumePermission
SnapshotAttributeNamepublic void setAttribute(String attribute)
 Constraints:
 Allowed Values: productCodes, createVolumePermission
attribute - The snapshot attribute to modify.SnapshotAttributeNamepublic ModifySnapshotAttributeRequest withAttribute(String attribute)
Returns a reference to this object so that method calls can be chained together.
 Constraints:
 Allowed Values: productCodes, createVolumePermission
attribute - The snapshot attribute to modify.SnapshotAttributeNamepublic void setAttribute(SnapshotAttributeName attribute)
 Constraints:
 Allowed Values: productCodes, createVolumePermission
attribute - The snapshot attribute to modify.SnapshotAttributeNamepublic ModifySnapshotAttributeRequest withAttribute(SnapshotAttributeName attribute)
Returns a reference to this object so that method calls can be chained together.
 Constraints:
 Allowed Values: productCodes, createVolumePermission
attribute - The snapshot attribute to modify.SnapshotAttributeNamepublic String getOperationType()
public void setOperationType(String operationType)
operationType - The type of operation to perform to the attribute.public ModifySnapshotAttributeRequest withOperationType(String operationType)
Returns a reference to this object so that method calls can be chained together.
operationType - The type of operation to perform to the attribute.public List<String> getUserIds()
public void setUserIds(Collection<String> userIds)
userIds - The account ID to modify for the snapshot.public ModifySnapshotAttributeRequest withUserIds(String... userIds)
Returns a reference to this object so that method calls can be chained together.
userIds - The account ID to modify for the snapshot.public ModifySnapshotAttributeRequest withUserIds(Collection<String> userIds)
Returns a reference to this object so that method calls can be chained together.
userIds - The account ID to modify for the snapshot.public List<String> getGroupNames()
public void setGroupNames(Collection<String> groupNames)
groupNames - The group to modify for the snapshot.public ModifySnapshotAttributeRequest withGroupNames(String... groupNames)
Returns a reference to this object so that method calls can be chained together.
groupNames - The group to modify for the snapshot.public ModifySnapshotAttributeRequest withGroupNames(Collection<String> groupNames)
Returns a reference to this object so that method calls can be chained together.
groupNames - The group to modify for the snapshot.public CreateVolumePermissionModifications getCreateVolumePermission()
public void setCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
createVolumePermission - A JSON representation of the snapshot attribute modification.public ModifySnapshotAttributeRequest withCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
Returns a reference to this object so that method calls can be chained together.
createVolumePermission - A JSON representation of the snapshot attribute modification.public Request<ModifySnapshotAttributeRequest> getDryRunRequest()
getDryRunRequest in interface DryRunSupportedRequest<ModifySnapshotAttributeRequest>public String toString()
toString in class ObjectObject.toString()public ModifySnapshotAttributeRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2015. All rights reserved.