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.route53.model;
 
 
Container for the parameters to the ListResourceRecordSets operation.

Imagine all the resource record sets in a zone listed out in front of you. Imagine them sorted lexicographically first by DNS name (with the labels reversed, like "com.amazon.www" for example), and secondarily, lexicographically by record type. This operation retrieves at most MaxItems resource record sets from this list, in order, starting at a position specified by the Name and Type arguments:

  • If both Name and Type are omitted, this means start the results at the first RRSET in the HostedZone.
  • If Name is specified but Type is omitted, this means start the results at the first RRSET in the list whose name is greater than or equal to Name.
  • If both Name and Type are specified, this means start the results at the first RRSET in the list whose name is greater than or equal to Name and whose type is greater than or equal to Type.
  • It is an error to specify the Type but not the Name.

Use ListResourceRecordSets to retrieve a single known record set by specifying the record set's name and type, and setting MaxItems = 1

To retrieve all the records in a HostedZone, first pause any processes making calls to ChangeResourceRecordSets. Initially call ListResourceRecordSets without a Name and Type to get the first page of record sets. For subsequent calls, set Name and Type to the NextName and NextType values returned by the previous response.

In the presence of concurrent ChangeResourceRecordSets calls, there is no consistency of results across calls to ListResourceRecordSets. The only way to get a consistent multi-page snapshot of all RRSETs in a zone is to stop making changes while pagination is in progress.

However, the results from ListResourceRecordSets are consistent within a page. If MakeChange calls are taking place concurrently, the result of each one will either be completely visible in your results or not at all. You will not see partial changes, or changes that do not ultimately succeed. (This follows from the fact that MakeChange is atomic)

The results from ListResourceRecordSets are strongly consistent with ChangeResourceRecordSets. To be precise, if a single process makes a call to ChangeResourceRecordSets and receives a successful response, the effects of that change will be visible in a subsequent call to ListResourceRecordSets by that process.

 
 public class ListResourceRecordSetsRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The ID of the hosted zone that contains the resource record sets that you want to get.

Constraints:
Length: 0 - 32

 
     private String hostedZoneId;

    
The first name in the lexicographic ordering of domain names that you want the ListResourceRecordSets request to list.

Constraints:
Length: 0 - 1024

 
     private String startRecordName;

    
The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

Constraints:
Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA

    private String startRecordType;

    
Weighted resource record sets only: If results were truncated for a given DNS name and type, specify the value of ListResourceRecordSetsResponse$NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.

Constraints:
Length: 1 - 128

    private String startRecordIdentifier;

    
The maximum number of records you want in the response body.
    private String maxItems;

    
Default constructor for a new ListResourceRecordSetsRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
    public ListResourceRecordSetsRequest() {}
    
    
Constructs a new ListResourceRecordSetsRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
hostedZoneId The ID of the hosted zone that contains the resource record sets that you want to get.
    public ListResourceRecordSetsRequest(String hostedZoneId) {
        setHostedZoneId(hostedZoneId);
    }

    
The ID of the hosted zone that contains the resource record sets that you want to get.

Constraints:
Length: 0 - 32

Returns:
The ID of the hosted zone that contains the resource record sets that you want to get.
    public String getHostedZoneId() {
        return ;
    }
    
    
The ID of the hosted zone that contains the resource record sets that you want to get.

Constraints:
Length: 0 - 32

Parameters:
hostedZoneId The ID of the hosted zone that contains the resource record sets that you want to get.
    public void setHostedZoneId(String hostedZoneId) {
        this. = hostedZoneId;
    }
    
    
The ID of the hosted zone that contains the resource record sets that you want to get.

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

Constraints:
Length: 0 - 32

Parameters:
hostedZoneId The ID of the hosted zone that contains the resource record sets that you want to get.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListResourceRecordSetsRequest withHostedZoneId(String hostedZoneId) {
        this. = hostedZoneId;
        return this;
    }

    
The first name in the lexicographic ordering of domain names that you want the ListResourceRecordSets request to list.

Constraints:
Length: 0 - 1024

Returns:
The first name in the lexicographic ordering of domain names that you want the ListResourceRecordSets request to list.
    public String getStartRecordName() {
        return ;
    }
    
    
The first name in the lexicographic ordering of domain names that you want the ListResourceRecordSets request to list.

Constraints:
Length: 0 - 1024

Parameters:
startRecordName The first name in the lexicographic ordering of domain names that you want the ListResourceRecordSets request to list.
    public void setStartRecordName(String startRecordName) {
        this. = startRecordName;
    }
    
    
The first name in the lexicographic ordering of domain names that you want the ListResourceRecordSets request to list.

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

Constraints:
Length: 0 - 1024

Parameters:
startRecordName The first name in the lexicographic ordering of domain names that you want the ListResourceRecordSets request to list.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListResourceRecordSetsRequest withStartRecordName(String startRecordName) {
        this. = startRecordName;
        return this;
    }

    
The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

Constraints:
Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA

Returns:
The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

See also:
RRType
    public String getStartRecordType() {
        return ;
    }
    
    
The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

Constraints:
Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA

Parameters:
startRecordType The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

See also:
RRType
    public void setStartRecordType(String startRecordType) {
        this. = startRecordType;
    }
    
    
The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

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

Constraints:
Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA

Parameters:
startRecordType The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RRType
    public ListResourceRecordSetsRequest withStartRecordType(String startRecordType) {
        this. = startRecordType;
        return this;
    }

    
The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

Constraints:
Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA

Parameters:
startRecordType The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

See also:
RRType
    public void setStartRecordType(RRType startRecordType) {
        this. = startRecordType.toString();
    }
    
    
The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

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

Constraints:
Allowed Values: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA

Parameters:
startRecordType The DNS type at which to begin the listing of resource record sets.

Valid values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT

Values for Weighted Resource Record Sets: A | AAAA | CNAME | TXT

Values for Regional Resource Record Sets: A | AAAA | CNAME | TXT

Values for Alias Resource Record Sets: A | AAAA

Constraint: Specifying type without specifying name returns an InvalidInput error.

Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RRType
    public ListResourceRecordSetsRequest withStartRecordType(RRType startRecordType) {
        this. = startRecordType.toString();
        return this;
    }

    
Weighted resource record sets only: If results were truncated for a given DNS name and type, specify the value of ListResourceRecordSetsResponse$NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.

Constraints:
Length: 1 - 128

Returns:
Weighted resource record sets only: If results were truncated for a given DNS name and type, specify the value of ListResourceRecordSetsResponse$NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.
    public String getStartRecordIdentifier() {
        return ;
    }
    
    
Weighted resource record sets only: If results were truncated for a given DNS name and type, specify the value of ListResourceRecordSetsResponse$NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.

Constraints:
Length: 1 - 128

Parameters:
startRecordIdentifier Weighted resource record sets only: If results were truncated for a given DNS name and type, specify the value of ListResourceRecordSetsResponse$NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.
    public void setStartRecordIdentifier(String startRecordIdentifier) {
        this. = startRecordIdentifier;
    }
    
    
Weighted resource record sets only: If results were truncated for a given DNS name and type, specify the value of ListResourceRecordSetsResponse$NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.

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

Constraints:
Length: 1 - 128

Parameters:
startRecordIdentifier Weighted resource record sets only: If results were truncated for a given DNS name and type, specify the value of ListResourceRecordSetsResponse$NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListResourceRecordSetsRequest withStartRecordIdentifier(String startRecordIdentifier) {
        this. = startRecordIdentifier;
        return this;
    }

    
The maximum number of records you want in the response body.

Returns:
The maximum number of records you want in the response body.
    public String getMaxItems() {
        return ;
    }
    
    
The maximum number of records you want in the response body.

Parameters:
maxItems The maximum number of records you want in the response body.
    public void setMaxItems(String maxItems) {
        this. = maxItems;
    }
    
    
The maximum number of records you want in the response body.

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

Parameters:
maxItems The maximum number of records you want in the response body.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = maxItems;
        return this;
    }

    
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 (getHostedZoneId() != nullsb.append("HostedZoneId: " + getHostedZoneId() + ",");
        if (getStartRecordName() != nullsb.append("StartRecordName: " + getStartRecordName() + ",");
        if (getStartRecordType() != nullsb.append("StartRecordType: " + getStartRecordType() + ",");
        if (getStartRecordIdentifier() != nullsb.append("StartRecordIdentifier: " + getStartRecordIdentifier() + ",");
        if (getMaxItems() != nullsb.append("MaxItems: " + getMaxItems() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getHostedZoneId() == null) ? 0 : getHostedZoneId().hashCode()); 
        hashCode = prime * hashCode + ((getStartRecordName() == null) ? 0 : getStartRecordName().hashCode()); 
        hashCode = prime * hashCode + ((getStartRecordType() == null) ? 0 : getStartRecordType().hashCode()); 
        hashCode = prime * hashCode + ((getStartRecordIdentifier() == null) ? 0 : getStartRecordIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getMaxItems() == null) ? 0 : getMaxItems().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ListResourceRecordSetsRequest == falsereturn false;
        
        if (other.getHostedZoneId() == null ^ this.getHostedZoneId() == nullreturn false;
        if (other.getHostedZoneId() != null && other.getHostedZoneId().equals(this.getHostedZoneId()) == falsereturn false
        if (other.getStartRecordName() == null ^ this.getStartRecordName() == nullreturn false;
        if (other.getStartRecordName() != null && other.getStartRecordName().equals(this.getStartRecordName()) == falsereturn false
        if (other.getStartRecordType() == null ^ this.getStartRecordType() == nullreturn false;
        if (other.getStartRecordType() != null && other.getStartRecordType().equals(this.getStartRecordType()) == falsereturn false
        if (other.getStartRecordIdentifier() == null ^ this.getStartRecordIdentifier() == nullreturn false;
        if (other.getStartRecordIdentifier() != null && other.getStartRecordIdentifier().equals(this.getStartRecordIdentifier()) == falsereturn false
        if (other.getMaxItems() == null ^ this.getMaxItems() == nullreturn false;
        if (other.getMaxItems() != null && other.getMaxItems().equals(this.getMaxItems()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (ListResourceRecordSetsRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X