public ScanRequest withIndexName(String indexName) {
        setIndexName(indexName);
        return this;
    }
<p>
The name of a secondary index to scan. This index can be any local secondary index or global secondary index.
Note that if you use the <code>IndexName</code> parameter, you must also provide <code>TableName</code>.
</p>

@param indexName
       The name of a secondary index to scan. This index can be any local secondary index or global secondary
       index. Note that if you use the <code>IndexName</code> parameter, you must also provide
       <code>TableName</code>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/ScanRequest.java