Search in sources :

Example 1 with FirehoseClient

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

the class ListDeliveryStreams method main.

public static void main(String[] args) throws Exception {
    Region region = Region.US_EAST_1;
    FirehoseClient firehoseClient = FirehoseClient.builder().region(region).build();
    listStreams(firehoseClient);
    firehoseClient.close();
}
Also used : FirehoseClient(software.amazon.awssdk.services.firehose.FirehoseClient) Region(software.amazon.awssdk.regions.Region)

Example 2 with FirehoseClient

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

the class DeleteStream method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <streamName> \n\n" + "Where:\n" + "    streamName - the data stream name to delete. \n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String streamName = args[0];
    Region region = Region.US_WEST_2;
    FirehoseClient firehoseClient = FirehoseClient.builder().region(region).build();
    delStream(firehoseClient, streamName);
    firehoseClient.close();
}
Also used : FirehoseClient(software.amazon.awssdk.services.firehose.FirehoseClient) Region(software.amazon.awssdk.regions.Region)

Example 3 with FirehoseClient

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

the class PutBatchRecords method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <streamName> \n\n" + "Where:\n" + "    streamName - the data stream name \n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String streamName = args[0];
    Region region = Region.US_WEST_2;
    FirehoseClient firehoseClient = FirehoseClient.builder().region(region).build();
    addStockTradeData(firehoseClient, streamName);
    firehoseClient.close();
}
Also used : FirehoseClient(software.amazon.awssdk.services.firehose.FirehoseClient) Region(software.amazon.awssdk.regions.Region)

Example 4 with FirehoseClient

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

the class PutRecord method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <textValue> <streamName> \n\n" + "Where:\n" + "    textValue - the text used as the data to write to the data stream. \n\n" + "    streamName - the data stream name. \n";
    if (args.length != 2) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String textValue = args[0];
    String streamName = args[1];
    Region region = Region.US_WEST_2;
    FirehoseClient firehoseClient = FirehoseClient.builder().region(region).build();
    putSingleRecord(firehoseClient, textValue, streamName);
    firehoseClient.close();
}
Also used : FirehoseClient(software.amazon.awssdk.services.firehose.FirehoseClient) Region(software.amazon.awssdk.regions.Region)

Example 5 with FirehoseClient

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

the class CreateDeliveryStream method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <bucketARN> <roleARN> <streamName> \n\n" + "Where:\n" + "    bucketARN - the ARN of the Amazon S3 bucket where the data stream is written. \n\n" + "    roleARN - the ARN of the IAM role that has the permissions that Kinesis Data Firehose needs. \n" + "    streamName - the name of the delivery stream. \n";
    if (args.length != 3) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String bucketARN = args[0];
    String roleARN = args[1];
    String streamName = args[2];
    Region region = Region.US_WEST_2;
    FirehoseClient firehoseClient = FirehoseClient.builder().region(region).build();
    createStream(firehoseClient, bucketARN, roleARN, streamName);
    firehoseClient.close();
}
Also used : FirehoseClient(software.amazon.awssdk.services.firehose.FirehoseClient) Region(software.amazon.awssdk.regions.Region)

Aggregations

Region (software.amazon.awssdk.regions.Region)5 FirehoseClient (software.amazon.awssdk.services.firehose.FirehoseClient)5