public java.util.List<String> getGlobalNodeGroupsToRetain() {
        if (globalNodeGroupsToRetain == null) {
            globalNodeGroupsToRetain = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return globalNodeGroupsToRetain;
    }
<p>
If the value of NodeGroupCount is less than the current number of node groups (shards), then either
NodeGroupsToRemove or NodeGroupsToRetain is required. GlobalNodeGroupsToRetain is a list of NodeGroupIds to
retain from the cluster. ElastiCache (Redis OSS) will attempt to retain all node groups listed by
GlobalNodeGroupsToRetain from the cluster.
</p>

@return If the value of NodeGroupCount is less than the current number of node groups (shards), then either
        NodeGroupsToRemove or NodeGroupsToRetain is required. GlobalNodeGroupsToRetain is a list of NodeGroupIds
        to retain from the cluster. ElastiCache (Redis OSS) will attempt to retain all node groups listed by
        GlobalNodeGroupsToRetain from the cluster.
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/model/DecreaseNodeGroupsInGlobalReplicationGroupRequest.java