public class ModifySnapshotAttributeRequest extends AmazonWebServiceRequest implements java.io.Serializable, 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 .
NOTE: Snapshots with AWS Marketplace product codes cannot be made public.
Constructor and Description |
---|
ModifySnapshotAttributeRequest()
Default constructor for a new ModifySnapshotAttributeRequest object.
|
ModifySnapshotAttributeRequest(java.lang.String snapshotId,
SnapshotAttributeName attribute,
OperationType operationType)
Constructs a new ModifySnapshotAttributeRequest object.
|
ModifySnapshotAttributeRequest(java.lang.String snapshotId,
java.lang.String attribute,
java.lang.String operationType)
Constructs a new ModifySnapshotAttributeRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.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.
|
java.util.List<java.lang.String> |
getGroupNames()
The group to modify for the snapshot.
|
java.lang.String |
getOperationType()
The type of operation to perform to the attribute.
|
java.lang.String |
getSnapshotId()
The ID of the snapshot.
|
java.util.List<java.lang.String> |
getUserIds()
The account ID to modify for the snapshot.
|
int |
hashCode() |
void |
setAttribute(SnapshotAttributeName attribute)
The snapshot attribute to modify.
|
void |
setAttribute(java.lang.String attribute)
The snapshot attribute to modify.
|
void |
setCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
A JSON representation of the snapshot attribute modification.
|
void |
setGroupNames(java.util.Collection<java.lang.String> groupNames)
The group to modify for the snapshot.
|
void |
setOperationType(OperationType operationType)
The type of operation to perform to the attribute.
|
void |
setOperationType(java.lang.String operationType)
The type of operation to perform to the attribute.
|
void |
setSnapshotId(java.lang.String snapshotId)
The ID of the snapshot.
|
void |
setUserIds(java.util.Collection<java.lang.String> userIds)
The account ID to modify for the snapshot.
|
java.lang.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(java.lang.String attribute)
The snapshot attribute to modify.
|
ModifySnapshotAttributeRequest |
withCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)
A JSON representation of the snapshot attribute modification.
|
ModifySnapshotAttributeRequest |
withGroupNames(java.util.Collection<java.lang.String> groupNames)
The group to modify for the snapshot.
|
ModifySnapshotAttributeRequest |
withGroupNames(java.lang.String... groupNames)
The group to modify for the snapshot.
|
ModifySnapshotAttributeRequest |
withOperationType(OperationType operationType)
The type of operation to perform to the attribute.
|
ModifySnapshotAttributeRequest |
withOperationType(java.lang.String operationType)
The type of operation to perform to the attribute.
|
ModifySnapshotAttributeRequest |
withSnapshotId(java.lang.String snapshotId)
The ID of the snapshot.
|
ModifySnapshotAttributeRequest |
withUserIds(java.util.Collection<java.lang.String> userIds)
The account ID to modify for the snapshot.
|
ModifySnapshotAttributeRequest |
withUserIds(java.lang.String... userIds)
The account ID to modify for the snapshot.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public ModifySnapshotAttributeRequest()
public ModifySnapshotAttributeRequest(java.lang.String snapshotId, java.lang.String attribute, java.lang.String operationType)
snapshotId
- The ID of the snapshot.attribute
- The snapshot attribute to modify. Only volume creation permissions may be modified at the customer level.
operationType
- The type of operation to perform to the
attribute.public ModifySnapshotAttributeRequest(java.lang.String snapshotId, SnapshotAttributeName attribute, OperationType operationType)
snapshotId
- The ID of the snapshot.attribute
- The snapshot attribute to modify. Only volume creation permissions may be modified at the customer level.
operationType
- The type of operation to perform to the
attribute.public java.lang.String getSnapshotId()
public void setSnapshotId(java.lang.String snapshotId)
snapshotId
- The ID of the snapshot.public ModifySnapshotAttributeRequest withSnapshotId(java.lang.String snapshotId)
Returns a reference to this object so that method calls can be chained together.
snapshotId
- The ID of the snapshot.public java.lang.String getAttribute()
Only volume creation permissions may be modified at the customer level.
Constraints:
Allowed Values: productCodes, createVolumePermission
Only volume creation permissions may be modified at the customer level.
SnapshotAttributeName
public void setAttribute(java.lang.String attribute)
Only volume creation permissions may be modified at the customer level.
Constraints:
Allowed Values: productCodes, createVolumePermission
attribute
- The snapshot attribute to modify. Only volume creation permissions may be modified at the customer level.
SnapshotAttributeName
public ModifySnapshotAttributeRequest withAttribute(java.lang.String attribute)
Only volume creation permissions may be modified at the customer level.
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. Only volume creation permissions may be modified at the customer level.
SnapshotAttributeName
public void setAttribute(SnapshotAttributeName attribute)
Only volume creation permissions may be modified at the customer level.
Constraints:
Allowed Values: productCodes, createVolumePermission
attribute
- The snapshot attribute to modify. Only volume creation permissions may be modified at the customer level.
SnapshotAttributeName
public ModifySnapshotAttributeRequest withAttribute(SnapshotAttributeName attribute)
Only volume creation permissions may be modified at the customer level.
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. Only volume creation permissions may be modified at the customer level.
SnapshotAttributeName
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 type of operation to perform to the attribute.OperationType
public ModifySnapshotAttributeRequest 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 type of operation to perform to the attribute.OperationType
public void setOperationType(OperationType operationType)
Constraints:
Allowed Values: add, remove
operationType
- The type of operation to perform to the attribute.OperationType
public ModifySnapshotAttributeRequest withOperationType(OperationType operationType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: add, remove
operationType
- The type of operation to perform to the attribute.OperationType
public java.util.List<java.lang.String> getUserIds()
public void setUserIds(java.util.Collection<java.lang.String> userIds)
userIds
- The account ID to modify for the snapshot.public ModifySnapshotAttributeRequest withUserIds(java.lang.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(java.util.Collection<java.lang.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 java.util.List<java.lang.String> getGroupNames()
public void setGroupNames(java.util.Collection<java.lang.String> groupNames)
groupNames
- The group to modify for the snapshot.public ModifySnapshotAttributeRequest withGroupNames(java.lang.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(java.util.Collection<java.lang.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 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.