Class ModifySnapshotAttributeRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.ModifySnapshotAttributeRequest
All Implemented Interfaces:
ReadLimitInfo, DryRunSupportedRequest<ModifySnapshotAttributeRequest>, Serializable, Cloneable

public class ModifySnapshotAttributeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<ModifySnapshotAttributeRequest>

Contains the parameters for ModifySnapshotAttribute.

See Also:
  • Constructor Details

    • ModifySnapshotAttributeRequest

      public ModifySnapshotAttributeRequest()
      Default constructor for ModifySnapshotAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • ModifySnapshotAttributeRequest

      public ModifySnapshotAttributeRequest(String snapshotId, String attribute, String operationType)
      Constructs a new ModifySnapshotAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      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.
    • ModifySnapshotAttributeRequest

      public ModifySnapshotAttributeRequest(String snapshotId, SnapshotAttributeName attribute, OperationType operationType)
      Constructs a new ModifySnapshotAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      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.
  • Method Details

    • setSnapshotId

      public void setSnapshotId(String snapshotId)

      The ID of the snapshot.

      Parameters:
      snapshotId - The ID of the snapshot.
    • getSnapshotId

      public String getSnapshotId()

      The ID of the snapshot.

      Returns:
      The ID of the snapshot.
    • withSnapshotId

      public ModifySnapshotAttributeRequest withSnapshotId(String snapshotId)

      The ID of the snapshot.

      Parameters:
      snapshotId - The ID of the snapshot.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setAttribute

      public void setAttribute(String attribute)

      The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      Parameters:
      attribute - The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      See Also:
    • getAttribute

      public String getAttribute()

      The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      Returns:
      The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      See Also:
    • withAttribute

      public ModifySnapshotAttributeRequest withAttribute(String attribute)

      The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      Parameters:
      attribute - The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setAttribute

      public void setAttribute(SnapshotAttributeName attribute)

      The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      Parameters:
      attribute - The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      See Also:
    • withAttribute

      public ModifySnapshotAttributeRequest withAttribute(SnapshotAttributeName attribute)

      The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      Parameters:
      attribute - The snapshot attribute to modify.

      Only volume creation permissions may be modified at the customer level.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setOperationType

      public void setOperationType(String operationType)

      The type of operation to perform to the attribute.

      Parameters:
      operationType - The type of operation to perform to the attribute.
      See Also:
    • getOperationType

      public String getOperationType()

      The type of operation to perform to the attribute.

      Returns:
      The type of operation to perform to the attribute.
      See Also:
    • withOperationType

      public ModifySnapshotAttributeRequest withOperationType(String operationType)

      The type of operation to perform to the attribute.

      Parameters:
      operationType - The type of operation to perform to the attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setOperationType

      public void setOperationType(OperationType operationType)

      The type of operation to perform to the attribute.

      Parameters:
      operationType - The type of operation to perform to the attribute.
      See Also:
    • withOperationType

      public ModifySnapshotAttributeRequest withOperationType(OperationType operationType)

      The type of operation to perform to the attribute.

      Parameters:
      operationType - The type of operation to perform to the attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • getUserIds

      public List<String> getUserIds()

      The account ID to modify for the snapshot.

      Returns:
      The account ID to modify for the snapshot.
    • setUserIds

      public void setUserIds(Collection<String> userIds)

      The account ID to modify for the snapshot.

      Parameters:
      userIds - The account ID to modify for the snapshot.
    • withUserIds

      public ModifySnapshotAttributeRequest withUserIds(String... userIds)

      The account ID to modify for the snapshot.

      NOTE: This method appends the values to the existing list (if any). Use setUserIds(java.util.Collection) or withUserIds(java.util.Collection) if you want to override the existing values.

      Parameters:
      userIds - The account ID to modify for the snapshot.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withUserIds

      public ModifySnapshotAttributeRequest withUserIds(Collection<String> userIds)

      The account ID to modify for the snapshot.

      Parameters:
      userIds - The account ID to modify for the snapshot.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getGroupNames

      public List<String> getGroupNames()

      The group to modify for the snapshot.

      Returns:
      The group to modify for the snapshot.
    • setGroupNames

      public void setGroupNames(Collection<String> groupNames)

      The group to modify for the snapshot.

      Parameters:
      groupNames - The group to modify for the snapshot.
    • withGroupNames

      public ModifySnapshotAttributeRequest withGroupNames(String... groupNames)

      The group to modify for the snapshot.

      NOTE: This method appends the values to the existing list (if any). Use setGroupNames(java.util.Collection) or withGroupNames(java.util.Collection) if you want to override the existing values.

      Parameters:
      groupNames - The group to modify for the snapshot.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withGroupNames

      public ModifySnapshotAttributeRequest withGroupNames(Collection<String> groupNames)

      The group to modify for the snapshot.

      Parameters:
      groupNames - The group to modify for the snapshot.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setCreateVolumePermission

      public void setCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)

      A JSON representation of the snapshot attribute modification.

      Parameters:
      createVolumePermission - A JSON representation of the snapshot attribute modification.
    • getCreateVolumePermission

      public CreateVolumePermissionModifications getCreateVolumePermission()

      A JSON representation of the snapshot attribute modification.

      Returns:
      A JSON representation of the snapshot attribute modification.
    • withCreateVolumePermission

      public ModifySnapshotAttributeRequest withCreateVolumePermission(CreateVolumePermissionModifications createVolumePermission)

      A JSON representation of the snapshot attribute modification.

      Parameters:
      createVolumePermission - A JSON representation of the snapshot attribute modification.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getDryRunRequest

      public Request<ModifySnapshotAttributeRequest> getDryRunRequest()
      This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
      Specified by:
      getDryRunRequest in interface DryRunSupportedRequest<ModifySnapshotAttributeRequest>
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      Description copied from class: AmazonWebServiceRequest
      Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.
      Overrides:
      clone in class AmazonWebServiceRequest
      See Also: