@SdkInternalApi
    final SubscribeToDatasetResult executeSubscribeToDataset(SubscribeToDatasetRequest subscribeToDatasetRequest) {

        ExecutionContext executionContext = createExecutionContext(subscribeToDatasetRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<SubscribeToDatasetRequest> request = null;
        Response<SubscribeToDatasetResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new SubscribeToDatasetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(subscribeToDatasetRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Cognito Sync");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SubscribeToDataset");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            HttpResponseHandler<AmazonWebServiceResponse<SubscribeToDatasetResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SubscribeToDatasetResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Subscribes to receive notifications when a dataset is modified by another device.
</p>
<p>
This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API
with developer credentials.
</p>

@param subscribeToDatasetRequest
       A request to SubscribeToDatasetRequest.
@return Result of the SubscribeToDataset operation returned by the service.
@throws NotAuthorizedException
        Thrown when a user is not authorized to access the requested resource.
@throws InvalidParameterException
        Thrown when a request parameter does not comply with the associated constraints.
@throws ResourceNotFoundException
        Thrown if the resource doesn't exist.
@throws InternalErrorException
        Indicates an internal service error.
@throws InvalidConfigurationException
@throws TooManyRequestsException
        Thrown if the request is throttled.
@sample AmazonCognitoSync.SubscribeToDataset
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDataset"
     target="_top">AWS API Documentation</a>
aws-java-sdk-cognitosync/src/main/java/com/amazonaws/services/cognitosync/AmazonCognitoSyncClient.java