All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hashicorp.nomad.javasdk.RegionsApi Maven / Gradle / Ivy

There is a newer version: 0.11.3.0
Show newest version
package com.hashicorp.nomad.javasdk;


import java.io.IOException;
import java.util.List;

/**
 * API for querying for information about regions,
 * exposing the functionality of the {@code /v1/regions} endpoint of the
 * Nomad HTTP API.
 */
public class RegionsApi extends ApiBase {

    RegionsApi(NomadApiClient apiClient) {
        super(apiClient);
    }

    /**
     * List the names of the known regions in the cluster.
     *
     * @throws IOException    if there is an HTTP or lower-level problem
     * @throws NomadException if the response signals an error or cannot be deserialized
     * @see {@code GET /v1/regions}
     */
    public NomadResponse> list() throws IOException, NomadException {
        return executePlain(get("/v1/regions"), NomadJson.parserForListOf(String.class));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy