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()
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.
|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public 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
SnapshotAttributeName
public void setAttribute(String attribute)
Constraints:
Allowed Values: productCodes, createVolumePermission
attribute
- The snapshot attribute to modify.SnapshotAttributeName
public 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.SnapshotAttributeName
public void setAttribute(SnapshotAttributeName attribute)
Constraints:
Allowed Values: productCodes, createVolumePermission
attribute
- The snapshot attribute to modify.SnapshotAttributeName
public 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.SnapshotAttributeName
public 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 Object
Object.toString()
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.