Search in sources :

Example 1 with ForecastClient

use of software.amazon.awssdk.services.forecast.ForecastClient in project aws-doc-sdk-examples by awsdocs.

the class ListForecasts method main.

public static void main(String[] args) {
    Region region = Region.US_WEST_2;
    ForecastClient forecast = ForecastClient.builder().region(region).build();
    listAllForeCasts(forecast);
    forecast.close();
}
Also used : ForecastClient(software.amazon.awssdk.services.forecast.ForecastClient) Region(software.amazon.awssdk.regions.Region)

Example 2 with ForecastClient

use of software.amazon.awssdk.services.forecast.ForecastClient in project aws-doc-sdk-examples by awsdocs.

the class ListDataSetGroups method main.

public static void main(String[] args) {
    Region region = Region.US_WEST_2;
    ForecastClient forecast = ForecastClient.builder().region(region).build();
    listDataGroups(forecast);
    forecast.close();
}
Also used : ForecastClient(software.amazon.awssdk.services.forecast.ForecastClient) Region(software.amazon.awssdk.regions.Region)

Example 3 with ForecastClient

use of software.amazon.awssdk.services.forecast.ForecastClient in project aws-doc-sdk-examples by awsdocs.

the class CreateForecast method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <name> <predictorArn> \n\n" + "Where:\n" + "    name - the name of the forecast. \n\n" + "    predictorArn - the arn of the predictor to use. \n\n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String name = args[0];
    String predictorArn = args[1];
    Region region = Region.US_WEST_2;
    ForecastClient forecast = ForecastClient.builder().region(region).build();
    String forecastArn = createNewForecast(forecast, name, predictorArn);
    System.out.println("The ARN of the new forecast is " + forecastArn);
    forecast.close();
}
Also used : ForecastClient(software.amazon.awssdk.services.forecast.ForecastClient) Region(software.amazon.awssdk.regions.Region)

Example 4 with ForecastClient

use of software.amazon.awssdk.services.forecast.ForecastClient in project aws-doc-sdk-examples by awsdocs.

the class DeleteForecast method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <forecastArn> \n\n" + "Where:\n" + "    forecastArn - the ARN that belongs to the forecast to delete. \n\n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String forecastArn = args[0];
    Region region = Region.US_WEST_2;
    ForecastClient forecast = ForecastClient.builder().region(region).build();
    delForecast(forecast, forecastArn);
    forecast.close();
}
Also used : ForecastClient(software.amazon.awssdk.services.forecast.ForecastClient) Region(software.amazon.awssdk.regions.Region)

Example 5 with ForecastClient

use of software.amazon.awssdk.services.forecast.ForecastClient in project aws-doc-sdk-examples by awsdocs.

the class CreateDataSet method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <name> \n\n" + "Where:\n" + "    name - the name of the data set. \n\n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String name = args[0];
    Region region = Region.US_WEST_2;
    ForecastClient forecast = ForecastClient.builder().region(region).build();
    String myDataSetARN = createForecastDataSet(forecast, name);
    System.out.println("The ARN of the new data set is " + myDataSetARN);
    forecast.close();
}
Also used : ForecastClient(software.amazon.awssdk.services.forecast.ForecastClient) Region(software.amazon.awssdk.regions.Region)

Aggregations

Region (software.amazon.awssdk.regions.Region)8 ForecastClient (software.amazon.awssdk.services.forecast.ForecastClient)8