Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.ec2.model;
 
 
Container for the parameters to the DescribeSnapshots operation.

Describes one or more of the EBS snapshots available to you. Available snapshots include public snapshots available for any AWS account to launch, private snapshots that you own, and private snapshots owned by another AWS account but for which you've been given explicit create volume permissions.

The create volume permissions fall into the following categories:

  • public : The owner of the snapshot granted create volume permissions for the snapshot to the all group. All AWS accounts have create volume permissions for these snapshots.
  • explicit : The owner of the snapshot granted create volume permissions to a specific AWS account.
  • implicit : An AWS account has implicit create volume permissions for all snapshots it owns.

The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or AWS accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.

If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.

If you specify one or more snapshot owners, only snapshots from the specified owners and for which you have access are returned. The results can include the AWS account IDs of the specified owners, amazon for snapshots owned by Amazon, or self for snapshots that you own.

If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify AWS account IDs (if you own the snapshots), self for snapshots for which you own or have explicit permissions, or all for public snapshots.

If you are describing a long list of snapshots, you can paginate the output to make the list more manageable. The MaxResults parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeSnapshots request to retrieve the remaining results.

For more information about EBS snapshots, see Amazon EBS Snapshots in the Amazon Elastic Compute Cloud User Guide .

 
One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

 
Returns the snapshots owned by the specified owner. Multiple owners can be specified.
One or more AWS accounts IDs that can create volumes from the snapshot.
One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
    private String nextToken;

    
The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
    private Integer maxResults;

    
One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

Returns:
One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

    public java.util.List<StringgetSnapshotIds() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

Parameters:
snapshotIds One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

    public void setSnapshotIds(java.util.Collection<StringsnapshotIds) {
        if (snapshotIds == null) {
            this. = null;
            return;
        }
        snapshotIdsCopy.addAll(snapshotIds);
        this. = snapshotIdsCopy;
    }
    
    
One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
snapshotIds One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeSnapshotsRequest withSnapshotIds(String... snapshotIds) {
        if (getSnapshotIds() == nullsetSnapshotIds(new java.util.ArrayList<String>(snapshotIds.length));
        for (String value : snapshotIds) {
            getSnapshotIds().add(value);
        }
        return this;
    }
    
    
One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

Returns a reference to this object so that method calls can be chained together.

Parameters:
snapshotIds One or more snapshot IDs.

Default: Describes snapshots for which you have launch permissions.

Returns:
A reference to this updated object so that method calls can be chained together.
        if (snapshotIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringsnapshotIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(snapshotIds.size());
            snapshotIdsCopy.addAll(snapshotIds);
            this. = snapshotIdsCopy;
        }
        return this;
    }

    
Returns the snapshots owned by the specified owner. Multiple owners can be specified.

Returns:
Returns the snapshots owned by the specified owner. Multiple owners can be specified.
    public java.util.List<StringgetOwnerIds() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Returns the snapshots owned by the specified owner. Multiple owners can be specified.

Parameters:
ownerIds Returns the snapshots owned by the specified owner. Multiple owners can be specified.
    public void setOwnerIds(java.util.Collection<StringownerIds) {
        if (ownerIds == null) {
            this. = null;
            return;
        }
        ownerIdsCopy.addAll(ownerIds);
        this. = ownerIdsCopy;
    }
    
    
Returns the snapshots owned by the specified owner. Multiple owners can be specified.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
ownerIds Returns the snapshots owned by the specified owner. Multiple owners can be specified.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeSnapshotsRequest withOwnerIds(String... ownerIds) {
        if (getOwnerIds() == nullsetOwnerIds(new java.util.ArrayList<String>(ownerIds.length));
        for (String value : ownerIds) {
            getOwnerIds().add(value);
        }
        return this;
    }
    
    
Returns the snapshots owned by the specified owner. Multiple owners can be specified.

Returns a reference to this object so that method calls can be chained together.

Parameters:
ownerIds Returns the snapshots owned by the specified owner. Multiple owners can be specified.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (ownerIds == null) {
            this. = null;
        } else {
            ownerIdsCopy.addAll(ownerIds);
            this. = ownerIdsCopy;
        }
        return this;
    }

    
One or more AWS accounts IDs that can create volumes from the snapshot.

Returns:
One or more AWS accounts IDs that can create volumes from the snapshot.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more AWS accounts IDs that can create volumes from the snapshot.

Parameters:
restorableByUserIds One or more AWS accounts IDs that can create volumes from the snapshot.
    public void setRestorableByUserIds(java.util.Collection<StringrestorableByUserIds) {
        if (restorableByUserIds == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringrestorableByUserIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(restorableByUserIds.size());
        restorableByUserIdsCopy.addAll(restorableByUserIds);
        this. = restorableByUserIdsCopy;
    }
    
    
One or more AWS accounts IDs that can create volumes from the snapshot.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
restorableByUserIds One or more AWS accounts IDs that can create volumes from the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeSnapshotsRequest withRestorableByUserIds(String... restorableByUserIds) {
        if (getRestorableByUserIds() == nullsetRestorableByUserIds(new java.util.ArrayList<String>(restorableByUserIds.length));
        for (String value : restorableByUserIds) {
            getRestorableByUserIds().add(value);
        }
        return this;
    }
    
    
One or more AWS accounts IDs that can create volumes from the snapshot.

Returns a reference to this object so that method calls can be chained together.

Parameters:
restorableByUserIds One or more AWS accounts IDs that can create volumes from the snapshot.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (restorableByUserIds == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringrestorableByUserIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(restorableByUserIds.size());
            restorableByUserIdsCopy.addAll(restorableByUserIds);
            this. = restorableByUserIdsCopy;
        }
        return this;
    }

    
One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

Returns:
One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

    public java.util.List<FiltergetFilters() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Filter>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

Parameters:
filters One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

    public void setFilters(java.util.Collection<Filterfilters) {
        if (filters == null) {
            this. = null;
            return;
        }
        filtersCopy.addAll(filters);
        this. = filtersCopy;
    }
    
    
One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

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

Returns a reference to this object so that method calls can be chained together.

Parameters:
filters One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeSnapshotsRequest withFilters(Filter... filters) {
        if (getFilters() == nullsetFilters(new java.util.ArrayList<Filter>(filters.length));
        for (Filter value : filters) {
            getFilters().add(value);
        }
        return this;
    }
    
    
One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

Returns a reference to this object so that method calls can be chained together.

Parameters:
filters One or more filters.
  • description - A description of the snapshot.

  • owner-alias - The AWS account alias (for example, amazon) that owns the snapshot.

  • owner-id - The ID of the AWS account that owns the snapshot.

  • progress - The progress of the snapshot, as a percentage (for example, 80%).

  • snapshot-id - The snapshot ID.

  • start-time - The time stamp when the snapshot was initiated.

  • status - The status of the snapshot (pending | completed | error).

  • tag:key=value - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • volume-id - The ID of the volume the snapshot is for.

  • volume-size - The size of the volume, in GiB.

Returns:
A reference to this updated object so that method calls can be chained together.
        if (filters == null) {
            this. = null;
        } else {
            filtersCopy.addAll(filters);
            this. = filtersCopy;
        }
        return this;
    }

    
The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

Returns:
The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
    public String getNextToken() {
        return ;
    }
    
    
The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

Parameters:
nextToken The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
    public void setNextToken(String nextToken) {
        this. = nextToken;
    }
    
    
The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

Returns a reference to this object so that method calls can be chained together.

Parameters:
nextToken The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeSnapshotsRequest withNextToken(String nextToken) {
        this. = nextToken;
        return this;
    }

    
The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

Returns:
The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
    public Integer getMaxResults() {
        return ;
    }
    
    
The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

Parameters:
maxResults The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
    public void setMaxResults(Integer maxResults) {
        this. = maxResults;
    }
    
    
The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

Returns a reference to this object so that method calls can be chained together.

Parameters:
maxResults The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeSnapshotsRequest withMaxResults(Integer maxResults) {
        this. = maxResults;
        return this;
    }

    
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
    @Override
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
    
    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getSnapshotIds() != nullsb.append("SnapshotIds: " + getSnapshotIds() + ",");
        if (getOwnerIds() != nullsb.append("OwnerIds: " + getOwnerIds() + ",");
        if (getRestorableByUserIds() != nullsb.append("RestorableByUserIds: " + getRestorableByUserIds() + ",");
        if (getFilters() != nullsb.append("Filters: " + getFilters() + ",");
        if (getNextToken() != nullsb.append("NextToken: " + getNextToken() + ",");
        if (getMaxResults() != nullsb.append("MaxResults: " + getMaxResults() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSnapshotIds() == null) ? 0 : getSnapshotIds().hashCode()); 
        hashCode = prime * hashCode + ((getOwnerIds() == null) ? 0 : getOwnerIds().hashCode()); 
        hashCode = prime * hashCode + ((getRestorableByUserIds() == null) ? 0 : getRestorableByUserIds().hashCode()); 
        hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode()); 
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); 
        hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeSnapshotsRequest == falsereturn false;
        DescribeSnapshotsRequest other = (DescribeSnapshotsRequest)obj;
        
        if (other.getSnapshotIds() == null ^ this.getSnapshotIds() == nullreturn false;
        if (other.getSnapshotIds() != null && other.getSnapshotIds().equals(this.getSnapshotIds()) == falsereturn false
        if (other.getOwnerIds() == null ^ this.getOwnerIds() == nullreturn false;
        if (other.getOwnerIds() != null && other.getOwnerIds().equals(this.getOwnerIds()) == falsereturn false
        if (other.getRestorableByUserIds() == null ^ this.getRestorableByUserIds() == nullreturn false;
        if (other.getRestorableByUserIds() != null && other.getRestorableByUserIds().equals(this.getRestorableByUserIds()) == falsereturn false
        if (other.getFilters() == null ^ this.getFilters() == nullreturn false;
        if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == falsereturn false
        if (other.getNextToken() == null ^ this.getNextToken() == nullreturn false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == falsereturn false
        if (other.getMaxResults() == null ^ this.getMaxResults() == nullreturn false;
        if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeSnapshotsRequest clone() {
        
            return (DescribeSnapshotsRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X