public NeptuneEndpointsInfoLambda()

in neptune-endpoints-info-lambda/src/main/java/software/amazon/lambda/NeptuneEndpointsInfoLambda.java [51:70]


    public NeptuneEndpointsInfoLambda(String clusterId, int pollingIntervalSeconds, String suspendedEndpoints) {

        this.refreshAgent = ClusterEndpointsRefreshAgent.managementApi(clusterId,
                RegionUtils.getCurrentRegionName(),
                DefaultCredentialsProvider.create());
        this.neptuneClusterMetadata.set(refreshAgent.getClusterMetadata());
        this.suspendedEndpoints = suspendedEndpoints.toLowerCase();

        System.out.println(String.format("clusterId: %s", clusterId));
        System.out.println(String.format("pollingIntervalSeconds: %s", pollingIntervalSeconds));
        System.out.println(String.format("suspendedEndpoints: %s", this.suspendedEndpoints));

        refreshAgent.startPollingNeptuneAPI(
                (OnNewClusterMetadata) metadata -> {
                    neptuneClusterMetadata.set(metadata);
                    System.out.println("Refreshed cluster metadata");
                },
                pollingIntervalSeconds,
                TimeUnit.SECONDS);
    }