public class ModifySnapshotAttributeRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<ModifySnapshotAttributeRequest>
ModifySnapshotAttribute operation.
Adds or removes permission settings for the specified snapshot.
For more information on modifying snapshot permissions, see Sharing Snapshots in the Amazon Elastic Compute Cloud User Guide .
NOTE: Snapshots with AWS Marketplace product codes cannot be made public.
| 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 |
|---|---|
boolean |
equals(Object obj) |
String |
getAttribute()
Constraints:
Allowed Values: productCodes, createVolumePermission |
CreateVolumePermissionModifications |
getCreateVolumePermission() |
Request<ModifySnapshotAttributeRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
List<String> |
getGroupNames() |
String |
getOperationType() |
String |
getSnapshotId()
The ID of the snapshot.
|
List<String> |
getUserIds() |
int |
hashCode() |
void |
setAttribute(SnapshotAttributeName attribute)
Constraints:
Allowed Values: productCodes, createVolumePermission |
void |
setAttribute(String attribute)
Constraints:
Allowed Values: productCodes, createVolumePermission |
void |
setCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission) |
void |
setGroupNames(Collection<String> groupNames) |
void |
setOperationType(String operationType) |
void |
setSnapshotId(String snapshotId)
The ID of the snapshot.
|
void |
setUserIds(Collection<String> userIds) |
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ModifySnapshotAttributeRequest |
withAttribute(SnapshotAttributeName attribute)
Returns a reference to this object so that method calls can be chained together.
|
ModifySnapshotAttributeRequest |
withAttribute(String attribute)
Returns a reference to this object so that method calls can be chained together.
|
ModifySnapshotAttributeRequest |
withCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
Returns a reference to this object so that method calls can be chained together.
|
ModifySnapshotAttributeRequest |
withGroupNames(Collection<String> groupNames)
Returns a reference to this object so that method calls can be chained together.
|
ModifySnapshotAttributeRequest |
withGroupNames(String... groupNames)
Returns a reference to this object so that method calls can be chained together.
|
ModifySnapshotAttributeRequest |
withOperationType(String operationType)
Returns a reference to this object so that method calls can be chained together.
|
ModifySnapshotAttributeRequest |
withSnapshotId(String snapshotId)
The ID of the snapshot.
|
ModifySnapshotAttributeRequest |
withUserIds(Collection<String> userIds)
Returns a reference to this object so that method calls can be chained together.
|
ModifySnapshotAttributeRequest |
withUserIds(String... userIds)
Returns a reference to this object so that method calls can be chained together.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollectorpublic ModifySnapshotAttributeRequest()
public ModifySnapshotAttributeRequest(String snapshotId, String attribute, String operationType)
snapshotId - The ID of the snapshot.attribute - operationType - public ModifySnapshotAttributeRequest(String snapshotId, SnapshotAttributeName attribute, String operationType)
snapshotId - The ID of the snapshot.attribute - operationType - 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 - 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 - SnapshotAttributeNamepublic void setAttribute(SnapshotAttributeName attribute)
Constraints:
Allowed Values: productCodes, createVolumePermission
attribute - 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 - SnapshotAttributeNamepublic String getOperationType()
public void setOperationType(String operationType)
operationType - public ModifySnapshotAttributeRequest withOperationType(String operationType)
Returns a reference to this object so that method calls can be chained together.
operationType - public void setUserIds(Collection<String> userIds)
userIds - public ModifySnapshotAttributeRequest withUserIds(String... userIds)
Returns a reference to this object so that method calls can be chained together.
userIds - public ModifySnapshotAttributeRequest withUserIds(Collection<String> userIds)
Returns a reference to this object so that method calls can be chained together.
userIds - public void setGroupNames(Collection<String> groupNames)
groupNames - public ModifySnapshotAttributeRequest withGroupNames(String... groupNames)
Returns a reference to this object so that method calls can be chained together.
groupNames - public ModifySnapshotAttributeRequest withGroupNames(Collection<String> groupNames)
Returns a reference to this object so that method calls can be chained together.
groupNames - public CreateVolumePermissionModifications getCreateVolumePermission()
public void setCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
createVolumePermission - public ModifySnapshotAttributeRequest withCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
Returns a reference to this object so that method calls can be chained together.
createVolumePermission - public Request<ModifySnapshotAttributeRequest> getDryRunRequest()
getDryRunRequest in interface DryRunSupportedRequest<ModifySnapshotAttributeRequest>public String toString()
toString in class ObjectObject.toString()Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.