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

software.amazon.awssdk.services.iotanalytics.DefaultIoTAnalyticsClient Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.iotanalytics;

import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.iotanalytics.model.BatchPutMessageRequest;
import software.amazon.awssdk.services.iotanalytics.model.BatchPutMessageResponse;
import software.amazon.awssdk.services.iotanalytics.model.CancelPipelineReprocessingRequest;
import software.amazon.awssdk.services.iotanalytics.model.CancelPipelineReprocessingResponse;
import software.amazon.awssdk.services.iotanalytics.model.CreateChannelRequest;
import software.amazon.awssdk.services.iotanalytics.model.CreateChannelResponse;
import software.amazon.awssdk.services.iotanalytics.model.CreateDatasetContentRequest;
import software.amazon.awssdk.services.iotanalytics.model.CreateDatasetContentResponse;
import software.amazon.awssdk.services.iotanalytics.model.CreateDatasetRequest;
import software.amazon.awssdk.services.iotanalytics.model.CreateDatasetResponse;
import software.amazon.awssdk.services.iotanalytics.model.CreateDatastoreRequest;
import software.amazon.awssdk.services.iotanalytics.model.CreateDatastoreResponse;
import software.amazon.awssdk.services.iotanalytics.model.CreatePipelineRequest;
import software.amazon.awssdk.services.iotanalytics.model.CreatePipelineResponse;
import software.amazon.awssdk.services.iotanalytics.model.DeleteChannelRequest;
import software.amazon.awssdk.services.iotanalytics.model.DeleteChannelResponse;
import software.amazon.awssdk.services.iotanalytics.model.DeleteDatasetContentRequest;
import software.amazon.awssdk.services.iotanalytics.model.DeleteDatasetContentResponse;
import software.amazon.awssdk.services.iotanalytics.model.DeleteDatasetRequest;
import software.amazon.awssdk.services.iotanalytics.model.DeleteDatasetResponse;
import software.amazon.awssdk.services.iotanalytics.model.DeleteDatastoreRequest;
import software.amazon.awssdk.services.iotanalytics.model.DeleteDatastoreResponse;
import software.amazon.awssdk.services.iotanalytics.model.DeletePipelineRequest;
import software.amazon.awssdk.services.iotanalytics.model.DeletePipelineResponse;
import software.amazon.awssdk.services.iotanalytics.model.DescribeChannelRequest;
import software.amazon.awssdk.services.iotanalytics.model.DescribeChannelResponse;
import software.amazon.awssdk.services.iotanalytics.model.DescribeDatasetRequest;
import software.amazon.awssdk.services.iotanalytics.model.DescribeDatasetResponse;
import software.amazon.awssdk.services.iotanalytics.model.DescribeDatastoreRequest;
import software.amazon.awssdk.services.iotanalytics.model.DescribeDatastoreResponse;
import software.amazon.awssdk.services.iotanalytics.model.DescribeLoggingOptionsRequest;
import software.amazon.awssdk.services.iotanalytics.model.DescribeLoggingOptionsResponse;
import software.amazon.awssdk.services.iotanalytics.model.DescribePipelineRequest;
import software.amazon.awssdk.services.iotanalytics.model.DescribePipelineResponse;
import software.amazon.awssdk.services.iotanalytics.model.GetDatasetContentRequest;
import software.amazon.awssdk.services.iotanalytics.model.GetDatasetContentResponse;
import software.amazon.awssdk.services.iotanalytics.model.InternalFailureException;
import software.amazon.awssdk.services.iotanalytics.model.InvalidRequestException;
import software.amazon.awssdk.services.iotanalytics.model.IoTAnalyticsException;
import software.amazon.awssdk.services.iotanalytics.model.IoTAnalyticsRequest;
import software.amazon.awssdk.services.iotanalytics.model.LimitExceededException;
import software.amazon.awssdk.services.iotanalytics.model.ListChannelsRequest;
import software.amazon.awssdk.services.iotanalytics.model.ListChannelsResponse;
import software.amazon.awssdk.services.iotanalytics.model.ListDatasetContentsRequest;
import software.amazon.awssdk.services.iotanalytics.model.ListDatasetContentsResponse;
import software.amazon.awssdk.services.iotanalytics.model.ListDatasetsRequest;
import software.amazon.awssdk.services.iotanalytics.model.ListDatasetsResponse;
import software.amazon.awssdk.services.iotanalytics.model.ListDatastoresRequest;
import software.amazon.awssdk.services.iotanalytics.model.ListDatastoresResponse;
import software.amazon.awssdk.services.iotanalytics.model.ListPipelinesRequest;
import software.amazon.awssdk.services.iotanalytics.model.ListPipelinesResponse;
import software.amazon.awssdk.services.iotanalytics.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.iotanalytics.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.iotanalytics.model.PutLoggingOptionsRequest;
import software.amazon.awssdk.services.iotanalytics.model.PutLoggingOptionsResponse;
import software.amazon.awssdk.services.iotanalytics.model.ResourceAlreadyExistsException;
import software.amazon.awssdk.services.iotanalytics.model.ResourceNotFoundException;
import software.amazon.awssdk.services.iotanalytics.model.RunPipelineActivityRequest;
import software.amazon.awssdk.services.iotanalytics.model.RunPipelineActivityResponse;
import software.amazon.awssdk.services.iotanalytics.model.SampleChannelDataRequest;
import software.amazon.awssdk.services.iotanalytics.model.SampleChannelDataResponse;
import software.amazon.awssdk.services.iotanalytics.model.ServiceUnavailableException;
import software.amazon.awssdk.services.iotanalytics.model.StartPipelineReprocessingRequest;
import software.amazon.awssdk.services.iotanalytics.model.StartPipelineReprocessingResponse;
import software.amazon.awssdk.services.iotanalytics.model.TagResourceRequest;
import software.amazon.awssdk.services.iotanalytics.model.TagResourceResponse;
import software.amazon.awssdk.services.iotanalytics.model.ThrottlingException;
import software.amazon.awssdk.services.iotanalytics.model.UntagResourceRequest;
import software.amazon.awssdk.services.iotanalytics.model.UntagResourceResponse;
import software.amazon.awssdk.services.iotanalytics.model.UpdateChannelRequest;
import software.amazon.awssdk.services.iotanalytics.model.UpdateChannelResponse;
import software.amazon.awssdk.services.iotanalytics.model.UpdateDatasetRequest;
import software.amazon.awssdk.services.iotanalytics.model.UpdateDatasetResponse;
import software.amazon.awssdk.services.iotanalytics.model.UpdateDatastoreRequest;
import software.amazon.awssdk.services.iotanalytics.model.UpdateDatastoreResponse;
import software.amazon.awssdk.services.iotanalytics.model.UpdatePipelineRequest;
import software.amazon.awssdk.services.iotanalytics.model.UpdatePipelineResponse;
import software.amazon.awssdk.services.iotanalytics.paginators.ListChannelsIterable;
import software.amazon.awssdk.services.iotanalytics.paginators.ListDatasetContentsIterable;
import software.amazon.awssdk.services.iotanalytics.paginators.ListDatasetsIterable;
import software.amazon.awssdk.services.iotanalytics.paginators.ListDatastoresIterable;
import software.amazon.awssdk.services.iotanalytics.paginators.ListPipelinesIterable;
import software.amazon.awssdk.services.iotanalytics.transform.BatchPutMessageRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.CancelPipelineReprocessingRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.CreateChannelRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.CreateDatasetContentRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.CreateDatasetRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.CreateDatastoreRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.CreatePipelineRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DeleteChannelRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DeleteDatasetContentRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DeleteDatasetRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DeleteDatastoreRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DeletePipelineRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DescribeChannelRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DescribeDatasetRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DescribeDatastoreRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DescribeLoggingOptionsRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.DescribePipelineRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.GetDatasetContentRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.ListChannelsRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.ListDatasetContentsRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.ListDatasetsRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.ListDatastoresRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.ListPipelinesRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.PutLoggingOptionsRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.RunPipelineActivityRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.SampleChannelDataRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.StartPipelineReprocessingRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.UpdateChannelRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.UpdateDatasetRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.UpdateDatastoreRequestMarshaller;
import software.amazon.awssdk.services.iotanalytics.transform.UpdatePipelineRequestMarshaller;

/**
 * Internal implementation of {@link IoTAnalyticsClient}.
 *
 * @see IoTAnalyticsClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultIoTAnalyticsClient implements IoTAnalyticsClient {
    private final SyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultIoTAnalyticsClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    @Override
    public final String serviceName() {
        return SERVICE_NAME;
    }

    /**
     * 

* Sends messages to a channel. *

* * @param batchPutMessageRequest * @return Result of the BatchPutMessage operation returned by the service. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.BatchPutMessage * @see AWS * API Documentation */ @Override public BatchPutMessageResponse batchPutMessage(BatchPutMessageRequest batchPutMessageRequest) throws ResourceNotFoundException, InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, BatchPutMessageResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("BatchPutMessage").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(batchPutMessageRequest) .withMarshaller(new BatchPutMessageRequestMarshaller(protocolFactory))); } /** *

* Cancels the reprocessing of data through the pipeline. *

* * @param cancelPipelineReprocessingRequest * @return Result of the CancelPipelineReprocessing operation returned by the service. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.CancelPipelineReprocessing * @see AWS API Documentation */ @Override public CancelPipelineReprocessingResponse cancelPipelineReprocessing( CancelPipelineReprocessingRequest cancelPipelineReprocessingRequest) throws ResourceNotFoundException, InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CancelPipelineReprocessingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CancelPipelineReprocessing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(cancelPipelineReprocessingRequest) .withMarshaller(new CancelPipelineReprocessingRequestMarshaller(protocolFactory))); } /** *

* Creates a channel. A channel collects data from an MQTT topic and archives the raw, unprocessed messages before * publishing the data to a pipeline. *

* * @param createChannelRequest * @return Result of the CreateChannel operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceAlreadyExistsException * A resource with the same name already exists. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws LimitExceededException * The command caused an internal limit to be exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.CreateChannel * @see AWS API * Documentation */ @Override public CreateChannelResponse createChannel(CreateChannelRequest createChannelRequest) throws InvalidRequestException, ResourceAlreadyExistsException, InternalFailureException, ServiceUnavailableException, ThrottlingException, LimitExceededException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateChannelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateChannel").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createChannelRequest) .withMarshaller(new CreateChannelRequestMarshaller(protocolFactory))); } /** *

* Creates a data set. A data set stores data retrieved from a data store by applying a "queryAction" (a SQL query) * or a "containerAction" (executing a containerized application). This operation creates the skeleton of a data * set. The data set can be populated manually by calling "CreateDatasetContent" or automatically according to a * "trigger" you specify. *

* * @param createDatasetRequest * @return Result of the CreateDataset operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceAlreadyExistsException * A resource with the same name already exists. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws LimitExceededException * The command caused an internal limit to be exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.CreateDataset * @see AWS API * Documentation */ @Override public CreateDatasetResponse createDataset(CreateDatasetRequest createDatasetRequest) throws InvalidRequestException, ResourceAlreadyExistsException, InternalFailureException, ServiceUnavailableException, ThrottlingException, LimitExceededException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDataset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDatasetRequest) .withMarshaller(new CreateDatasetRequestMarshaller(protocolFactory))); } /** *

* Creates the content of a data set by applying a "queryAction" (a SQL query) or a "containerAction" (executing a * containerized application). *

* * @param createDatasetContentRequest * @return Result of the CreateDatasetContent operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.CreateDatasetContent * @see AWS API Documentation */ @Override public CreateDatasetContentResponse createDatasetContent(CreateDatasetContentRequest createDatasetContentRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateDatasetContentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDatasetContent").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDatasetContentRequest) .withMarshaller(new CreateDatasetContentRequestMarshaller(protocolFactory))); } /** *

* Creates a data store, which is a repository for messages. *

* * @param createDatastoreRequest * @return Result of the CreateDatastore operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceAlreadyExistsException * A resource with the same name already exists. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws LimitExceededException * The command caused an internal limit to be exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.CreateDatastore * @see AWS * API Documentation */ @Override public CreateDatastoreResponse createDatastore(CreateDatastoreRequest createDatastoreRequest) throws InvalidRequestException, ResourceAlreadyExistsException, InternalFailureException, ServiceUnavailableException, ThrottlingException, LimitExceededException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateDatastoreResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDatastore").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDatastoreRequest) .withMarshaller(new CreateDatastoreRequestMarshaller(protocolFactory))); } /** *

* Creates a pipeline. A pipeline consumes messages from a channel and allows you to process the messages before * storing them in a data store. You must specify both a channel and a datastore activity * and, optionally, as many as 23 additional activities in the pipelineActivities array. *

* * @param createPipelineRequest * @return Result of the CreatePipeline operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceAlreadyExistsException * A resource with the same name already exists. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws LimitExceededException * The command caused an internal limit to be exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.CreatePipeline * @see AWS * API Documentation */ @Override public CreatePipelineResponse createPipeline(CreatePipelineRequest createPipelineRequest) throws InvalidRequestException, ResourceAlreadyExistsException, InternalFailureException, ServiceUnavailableException, ThrottlingException, LimitExceededException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreatePipelineResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreatePipeline").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createPipelineRequest) .withMarshaller(new CreatePipelineRequestMarshaller(protocolFactory))); } /** *

* Deletes the specified channel. *

* * @param deleteChannelRequest * @return Result of the DeleteChannel operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DeleteChannel * @see AWS API * Documentation */ @Override public DeleteChannelResponse deleteChannel(DeleteChannelRequest deleteChannelRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteChannelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteChannel").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteChannelRequest) .withMarshaller(new DeleteChannelRequestMarshaller(protocolFactory))); } /** *

* Deletes the specified data set. *

*

* You do not have to delete the content of the data set before you perform this operation. *

* * @param deleteDatasetRequest * @return Result of the DeleteDataset operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DeleteDataset * @see AWS API * Documentation */ @Override public DeleteDatasetResponse deleteDataset(DeleteDatasetRequest deleteDatasetRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteDataset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDatasetRequest) .withMarshaller(new DeleteDatasetRequestMarshaller(protocolFactory))); } /** *

* Deletes the content of the specified data set. *

* * @param deleteDatasetContentRequest * @return Result of the DeleteDatasetContent operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DeleteDatasetContent * @see AWS API Documentation */ @Override public DeleteDatasetContentResponse deleteDatasetContent(DeleteDatasetContentRequest deleteDatasetContentRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteDatasetContentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteDatasetContent").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDatasetContentRequest) .withMarshaller(new DeleteDatasetContentRequestMarshaller(protocolFactory))); } /** *

* Deletes the specified data store. *

* * @param deleteDatastoreRequest * @return Result of the DeleteDatastore operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DeleteDatastore * @see AWS * API Documentation */ @Override public DeleteDatastoreResponse deleteDatastore(DeleteDatastoreRequest deleteDatastoreRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteDatastoreResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteDatastore").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDatastoreRequest) .withMarshaller(new DeleteDatastoreRequestMarshaller(protocolFactory))); } /** *

* Deletes the specified pipeline. *

* * @param deletePipelineRequest * @return Result of the DeletePipeline operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DeletePipeline * @see AWS * API Documentation */ @Override public DeletePipelineResponse deletePipeline(DeletePipelineRequest deletePipelineRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeletePipelineResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeletePipeline").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deletePipelineRequest) .withMarshaller(new DeletePipelineRequestMarshaller(protocolFactory))); } /** *

* Retrieves information about a channel. *

* * @param describeChannelRequest * @return Result of the DescribeChannel operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DescribeChannel * @see AWS * API Documentation */ @Override public DescribeChannelResponse describeChannel(DescribeChannelRequest describeChannelRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeChannelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeChannel").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeChannelRequest) .withMarshaller(new DescribeChannelRequestMarshaller(protocolFactory))); } /** *

* Retrieves information about a data set. *

* * @param describeDatasetRequest * @return Result of the DescribeDataset operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DescribeDataset * @see AWS * API Documentation */ @Override public DescribeDatasetResponse describeDataset(DescribeDatasetRequest describeDatasetRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeDataset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDatasetRequest) .withMarshaller(new DescribeDatasetRequestMarshaller(protocolFactory))); } /** *

* Retrieves information about a data store. *

* * @param describeDatastoreRequest * @return Result of the DescribeDatastore operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DescribeDatastore * @see AWS * API Documentation */ @Override public DescribeDatastoreResponse describeDatastore(DescribeDatastoreRequest describeDatastoreRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeDatastoreResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeDatastore").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDatastoreRequest) .withMarshaller(new DescribeDatastoreRequestMarshaller(protocolFactory))); } /** *

* Retrieves the current settings of the AWS IoT Analytics logging options. *

* * @param describeLoggingOptionsRequest * @return Result of the DescribeLoggingOptions operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DescribeLoggingOptions * @see AWS API Documentation */ @Override public DescribeLoggingOptionsResponse describeLoggingOptions(DescribeLoggingOptionsRequest describeLoggingOptionsRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeLoggingOptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeLoggingOptions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeLoggingOptionsRequest) .withMarshaller(new DescribeLoggingOptionsRequestMarshaller(protocolFactory))); } /** *

* Retrieves information about a pipeline. *

* * @param describePipelineRequest * @return Result of the DescribePipeline operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.DescribePipeline * @see AWS * API Documentation */ @Override public DescribePipelineResponse describePipeline(DescribePipelineRequest describePipelineRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribePipelineResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribePipeline").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describePipelineRequest) .withMarshaller(new DescribePipelineRequestMarshaller(protocolFactory))); } /** *

* Retrieves the contents of a data set as pre-signed URIs. *

* * @param getDatasetContentRequest * @return Result of the GetDatasetContent operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.GetDatasetContent * @see AWS * API Documentation */ @Override public GetDatasetContentResponse getDatasetContent(GetDatasetContentRequest getDatasetContentRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetDatasetContentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetDatasetContent").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getDatasetContentRequest) .withMarshaller(new GetDatasetContentRequestMarshaller(protocolFactory))); } /** *

* Retrieves a list of channels. *

* * @param listChannelsRequest * @return Result of the ListChannels operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListChannels * @see AWS API * Documentation */ @Override public ListChannelsResponse listChannels(ListChannelsRequest listChannelsRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListChannelsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListChannels").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listChannelsRequest) .withMarshaller(new ListChannelsRequestMarshaller(protocolFactory))); } /** *

* Retrieves a list of channels. *

*
*

* This is a variant of * {@link #listChannels(software.amazon.awssdk.services.iotanalytics.model.ListChannelsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListChannelsIterable responses = client.listChannelsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iotanalytics.paginators.ListChannelsIterable responses = client
     *             .listChannelsPaginator(request);
     *     for (software.amazon.awssdk.services.iotanalytics.model.ListChannelsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListChannelsIterable responses = client.listChannelsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listChannels(software.amazon.awssdk.services.iotanalytics.model.ListChannelsRequest)} operation. *

* * @param listChannelsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListChannels * @see AWS API * Documentation */ @Override public ListChannelsIterable listChannelsPaginator(ListChannelsRequest listChannelsRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { return new ListChannelsIterable(this, applyPaginatorUserAgent(listChannelsRequest)); } /** *

* Lists information about data set contents that have been created. *

* * @param listDatasetContentsRequest * @return Result of the ListDatasetContents operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListDatasetContents * @see AWS API Documentation */ @Override public ListDatasetContentsResponse listDatasetContents(ListDatasetContentsRequest listDatasetContentsRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, ResourceNotFoundException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListDatasetContentsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListDatasetContents").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listDatasetContentsRequest) .withMarshaller(new ListDatasetContentsRequestMarshaller(protocolFactory))); } /** *

* Lists information about data set contents that have been created. *

*
*

* This is a variant of * {@link #listDatasetContents(software.amazon.awssdk.services.iotanalytics.model.ListDatasetContentsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListDatasetContentsIterable responses = client.listDatasetContentsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iotanalytics.paginators.ListDatasetContentsIterable responses = client
     *             .listDatasetContentsPaginator(request);
     *     for (software.amazon.awssdk.services.iotanalytics.model.ListDatasetContentsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListDatasetContentsIterable responses = client.listDatasetContentsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDatasetContents(software.amazon.awssdk.services.iotanalytics.model.ListDatasetContentsRequest)} * operation. *

* * @param listDatasetContentsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListDatasetContents * @see AWS API Documentation */ @Override public ListDatasetContentsIterable listDatasetContentsPaginator(ListDatasetContentsRequest listDatasetContentsRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, ResourceNotFoundException, AwsServiceException, SdkClientException, IoTAnalyticsException { return new ListDatasetContentsIterable(this, applyPaginatorUserAgent(listDatasetContentsRequest)); } /** *

* Retrieves information about data sets. *

* * @param listDatasetsRequest * @return Result of the ListDatasets operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListDatasets * @see AWS API * Documentation */ @Override public ListDatasetsResponse listDatasets(ListDatasetsRequest listDatasetsRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListDatasetsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListDatasets").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listDatasetsRequest) .withMarshaller(new ListDatasetsRequestMarshaller(protocolFactory))); } /** *

* Retrieves information about data sets. *

*
*

* This is a variant of * {@link #listDatasets(software.amazon.awssdk.services.iotanalytics.model.ListDatasetsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListDatasetsIterable responses = client.listDatasetsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iotanalytics.paginators.ListDatasetsIterable responses = client
     *             .listDatasetsPaginator(request);
     *     for (software.amazon.awssdk.services.iotanalytics.model.ListDatasetsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListDatasetsIterable responses = client.listDatasetsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDatasets(software.amazon.awssdk.services.iotanalytics.model.ListDatasetsRequest)} operation. *

* * @param listDatasetsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListDatasets * @see AWS API * Documentation */ @Override public ListDatasetsIterable listDatasetsPaginator(ListDatasetsRequest listDatasetsRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { return new ListDatasetsIterable(this, applyPaginatorUserAgent(listDatasetsRequest)); } /** *

* Retrieves a list of data stores. *

* * @param listDatastoresRequest * @return Result of the ListDatastores operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListDatastores * @see AWS * API Documentation */ @Override public ListDatastoresResponse listDatastores(ListDatastoresRequest listDatastoresRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListDatastoresResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListDatastores").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listDatastoresRequest) .withMarshaller(new ListDatastoresRequestMarshaller(protocolFactory))); } /** *

* Retrieves a list of data stores. *

*
*

* This is a variant of * {@link #listDatastores(software.amazon.awssdk.services.iotanalytics.model.ListDatastoresRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListDatastoresIterable responses = client.listDatastoresPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iotanalytics.paginators.ListDatastoresIterable responses = client
     *             .listDatastoresPaginator(request);
     *     for (software.amazon.awssdk.services.iotanalytics.model.ListDatastoresResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListDatastoresIterable responses = client.listDatastoresPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDatastores(software.amazon.awssdk.services.iotanalytics.model.ListDatastoresRequest)} operation. *

* * @param listDatastoresRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListDatastores * @see AWS * API Documentation */ @Override public ListDatastoresIterable listDatastoresPaginator(ListDatastoresRequest listDatastoresRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { return new ListDatastoresIterable(this, applyPaginatorUserAgent(listDatastoresRequest)); } /** *

* Retrieves a list of pipelines. *

* * @param listPipelinesRequest * @return Result of the ListPipelines operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListPipelines * @see AWS API * Documentation */ @Override public ListPipelinesResponse listPipelines(ListPipelinesRequest listPipelinesRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListPipelinesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListPipelines").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listPipelinesRequest) .withMarshaller(new ListPipelinesRequestMarshaller(protocolFactory))); } /** *

* Retrieves a list of pipelines. *

*
*

* This is a variant of * {@link #listPipelines(software.amazon.awssdk.services.iotanalytics.model.ListPipelinesRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListPipelinesIterable responses = client.listPipelinesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iotanalytics.paginators.ListPipelinesIterable responses = client
     *             .listPipelinesPaginator(request);
     *     for (software.amazon.awssdk.services.iotanalytics.model.ListPipelinesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iotanalytics.paginators.ListPipelinesIterable responses = client.listPipelinesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listPipelines(software.amazon.awssdk.services.iotanalytics.model.ListPipelinesRequest)} operation. *

* * @param listPipelinesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListPipelines * @see AWS API * Documentation */ @Override public ListPipelinesIterable listPipelinesPaginator(ListPipelinesRequest listPipelinesRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { return new ListPipelinesIterable(this, applyPaginatorUserAgent(listPipelinesRequest)); } /** *

* Lists the tags (metadata) which you have assigned to the resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws LimitExceededException * The command caused an internal limit to be exceeded. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.ListTagsForResource * @see AWS API Documentation */ @Override public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, LimitExceededException, ResourceNotFoundException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listTagsForResourceRequest) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory))); } /** *

* Sets or updates the AWS IoT Analytics logging options. *

*

* Note that if you update the value of any loggingOptions field, it takes up to one minute for the * change to take effect. Also, if you change the policy attached to the role you specified in the roleArn field * (for example, to correct an invalid policy) it takes up to 5 minutes for that change to take effect. *

* * @param putLoggingOptionsRequest * @return Result of the PutLoggingOptions operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.PutLoggingOptions * @see AWS * API Documentation */ @Override public PutLoggingOptionsResponse putLoggingOptions(PutLoggingOptionsRequest putLoggingOptionsRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, PutLoggingOptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("PutLoggingOptions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(putLoggingOptionsRequest) .withMarshaller(new PutLoggingOptionsRequestMarshaller(protocolFactory))); } /** *

* Simulates the results of running a pipeline activity on a message payload. *

* * @param runPipelineActivityRequest * @return Result of the RunPipelineActivity operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.RunPipelineActivity * @see AWS API Documentation */ @Override public RunPipelineActivityResponse runPipelineActivity(RunPipelineActivityRequest runPipelineActivityRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RunPipelineActivityResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("RunPipelineActivity").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(runPipelineActivityRequest) .withMarshaller(new RunPipelineActivityRequestMarshaller(protocolFactory))); } /** *

* Retrieves a sample of messages from the specified channel ingested during the specified timeframe. Up to 10 * messages can be retrieved. *

* * @param sampleChannelDataRequest * @return Result of the SampleChannelData operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.SampleChannelData * @see AWS * API Documentation */ @Override public SampleChannelDataResponse sampleChannelData(SampleChannelDataRequest sampleChannelDataRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SampleChannelDataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("SampleChannelData").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(sampleChannelDataRequest) .withMarshaller(new SampleChannelDataRequestMarshaller(protocolFactory))); } /** *

* Starts the reprocessing of raw message data through the pipeline. *

* * @param startPipelineReprocessingRequest * @return Result of the StartPipelineReprocessing operation returned by the service. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws ResourceAlreadyExistsException * A resource with the same name already exists. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.StartPipelineReprocessing * @see AWS API Documentation */ @Override public StartPipelineReprocessingResponse startPipelineReprocessing( StartPipelineReprocessingRequest startPipelineReprocessingRequest) throws ResourceNotFoundException, ResourceAlreadyExistsException, InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartPipelineReprocessingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartPipelineReprocessing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(startPipelineReprocessingRequest) .withMarshaller(new StartPipelineReprocessingRequestMarshaller(protocolFactory))); } /** *

* Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws LimitExceededException * The command caused an internal limit to be exceeded. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.TagResource * @see AWS API * Documentation */ @Override public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, LimitExceededException, ResourceNotFoundException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TagResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(tagResourceRequest) .withMarshaller(new TagResourceRequestMarshaller(protocolFactory))); } /** *

* Removes the given tags (metadata) from the resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws LimitExceededException * The command caused an internal limit to be exceeded. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.UntagResource * @see AWS API * Documentation */ @Override public UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws InvalidRequestException, InternalFailureException, ServiceUnavailableException, ThrottlingException, LimitExceededException, ResourceNotFoundException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UntagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UntagResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(untagResourceRequest) .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory))); } /** *

* Updates the settings of a channel. *

* * @param updateChannelRequest * @return Result of the UpdateChannel operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.UpdateChannel * @see AWS API * Documentation */ @Override public UpdateChannelResponse updateChannel(UpdateChannelRequest updateChannelRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateChannelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateChannel").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateChannelRequest) .withMarshaller(new UpdateChannelRequestMarshaller(protocolFactory))); } /** *

* Updates the settings of a data set. *

* * @param updateDatasetRequest * @return Result of the UpdateDataset operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.UpdateDataset * @see AWS API * Documentation */ @Override public UpdateDatasetResponse updateDataset(UpdateDatasetRequest updateDatasetRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateDataset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateDatasetRequest) .withMarshaller(new UpdateDatasetRequestMarshaller(protocolFactory))); } /** *

* Updates the settings of a data store. *

* * @param updateDatastoreRequest * @return Result of the UpdateDatastore operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.UpdateDatastore * @see AWS * API Documentation */ @Override public UpdateDatastoreResponse updateDatastore(UpdateDatastoreRequest updateDatastoreRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateDatastoreResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateDatastore").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateDatastoreRequest) .withMarshaller(new UpdateDatastoreRequestMarshaller(protocolFactory))); } /** *

* Updates the settings of a pipeline. You must specify both a channel and a datastore * activity and, optionally, as many as 23 additional activities in the pipelineActivities array. *

* * @param updatePipelineRequest * @return Result of the UpdatePipeline operation returned by the service. * @throws InvalidRequestException * The request was not valid. * @throws ResourceNotFoundException * A resource with the specified name could not be found. * @throws InternalFailureException * There was an internal failure. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws ThrottlingException * The request was denied due to request throttling. * @throws LimitExceededException * The command caused an internal limit to be exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IoTAnalyticsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IoTAnalyticsClient.UpdatePipeline * @see AWS * API Documentation */ @Override public UpdatePipelineResponse updatePipeline(UpdatePipelineRequest updatePipelineRequest) throws InvalidRequestException, ResourceNotFoundException, InternalFailureException, ServiceUnavailableException, ThrottlingException, LimitExceededException, AwsServiceException, SdkClientException, IoTAnalyticsException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdatePipelineResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdatePipeline").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updatePipelineRequest) .withMarshaller(new UpdatePipelineRequestMarshaller(protocolFactory))); } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(IoTAnalyticsException::builder) .protocol(AwsJsonProtocol.REST_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("InternalFailureException") .exceptionBuilderSupplier(InternalFailureException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidRequestException") .exceptionBuilderSupplier(InvalidRequestException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(429).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceededException") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(410).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceUnavailableException") .exceptionBuilderSupplier(ServiceUnavailableException::builder).httpStatusCode(503).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceAlreadyExistsException") .exceptionBuilderSupplier(ResourceAlreadyExistsException::builder).httpStatusCode(409).build()); } @Override public void close() { clientHandler.close(); } private T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy