com.amazonaws.services.kinesisanalyticsv2.AmazonKinesisAnalyticsV2Client Maven / Gradle / Ivy
Show all versions of aws-java-sdk-kinesisanalyticsv2 Show documentation
/*
* Copyright 2019-2024 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 com.amazonaws.services.kinesisanalyticsv2;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import javax.annotation.Generated;
import org.apache.commons.logging.*;
import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;
import com.amazonaws.services.kinesisanalyticsv2.AmazonKinesisAnalyticsV2ClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.kinesisanalyticsv2.model.*;
import com.amazonaws.services.kinesisanalyticsv2.model.transform.*;
/**
* Client for accessing Kinesis Analytics V2. All service calls made using this client are blocking, and will not return
* until the service call completes.
*
*
*
* Amazon Managed Service for Apache Flink was previously known as Amazon Kinesis Data Analytics for Apache Flink.
*
*
*
* Amazon Managed Service for Apache Flink is a fully managed service that you can use to process and analyze streaming
* data using Java, Python, SQL, or Scala. The service enables you to quickly author and run Java, SQL, or Scala code
* against streaming sources to perform time series analytics, feed real-time dashboards, and create real-time metrics.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonKinesisAnalyticsV2Client extends AmazonWebServiceClient implements AmazonKinesisAnalyticsV2 {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AmazonKinesisAnalyticsV2.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "kinesisanalytics";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConcurrentModificationException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.ConcurrentModificationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("UnableToDetectSchemaException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.UnableToDetectSchemaExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidRequestException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.InvalidRequestExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceProvisionedThroughputExceededException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.ResourceProvisionedThroughputExceededExceptionUnmarshaller
.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("LimitExceededException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.LimitExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("UnsupportedOperationException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.UnsupportedOperationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceInUseException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.ResourceInUseExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidApplicationConfigurationException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.InvalidApplicationConfigurationExceptionUnmarshaller
.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("TooManyTagsException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.TooManyTagsExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("CodeValidationException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.CodeValidationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidArgumentException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.InvalidArgumentExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceUnavailableException").withExceptionUnmarshaller(
com.amazonaws.services.kinesisanalyticsv2.model.transform.ServiceUnavailableExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.kinesisanalyticsv2.model.AmazonKinesisAnalyticsV2Exception.class));
public static AmazonKinesisAnalyticsV2ClientBuilder builder() {
return AmazonKinesisAnalyticsV2ClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on Kinesis Analytics V2 using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AmazonKinesisAnalyticsV2Client(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on Kinesis Analytics V2 using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AmazonKinesisAnalyticsV2Client(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
super(clientParams);
this.awsCredentialsProvider = clientParams.getCredentialsProvider();
this.advancedConfig = clientParams.getAdvancedConfig();
init();
}
private void init() {
setServiceNameIntern(DEFAULT_SIGNING_NAME);
setEndpointPrefix(ENDPOINT_PREFIX);
// calling this.setEndPoint(...) will also modify the signer accordingly
setEndpoint("kinesisanalytics.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/kinesisanalyticsv2/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/kinesisanalyticsv2/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Adds an Amazon CloudWatch log stream to monitor application configuration errors.
*
*
* @param addApplicationCloudWatchLoggingOptionRequest
* @return Result of the AddApplicationCloudWatchLoggingOption operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @sample AmazonKinesisAnalyticsV2.AddApplicationCloudWatchLoggingOption
* @see AWS API Documentation
*/
@Override
public AddApplicationCloudWatchLoggingOptionResult addApplicationCloudWatchLoggingOption(AddApplicationCloudWatchLoggingOptionRequest request) {
request = beforeClientExecution(request);
return executeAddApplicationCloudWatchLoggingOption(request);
}
@SdkInternalApi
final AddApplicationCloudWatchLoggingOptionResult executeAddApplicationCloudWatchLoggingOption(
AddApplicationCloudWatchLoggingOptionRequest addApplicationCloudWatchLoggingOptionRequest) {
ExecutionContext executionContext = createExecutionContext(addApplicationCloudWatchLoggingOptionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddApplicationCloudWatchLoggingOptionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(addApplicationCloudWatchLoggingOptionRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddApplicationCloudWatchLoggingOption");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AddApplicationCloudWatchLoggingOptionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a streaming source to your SQL-based Kinesis Data Analytics application.
*
*
* You can add a streaming source when you create an application, or you can use this operation to add a streaming
* source after you create an application. For more information, see CreateApplication.
*
*
* Any configuration update, including adding a streaming source using this operation, results in a new version of
* the application. You can use the DescribeApplication operation to find the current application version.
*
*
* @param addApplicationInputRequest
* @return Result of the AddApplicationInput operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws CodeValidationException
* The user-provided application code (query) is not valid. This can be a simple syntax error.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.AddApplicationInput
* @see AWS API Documentation
*/
@Override
public AddApplicationInputResult addApplicationInput(AddApplicationInputRequest request) {
request = beforeClientExecution(request);
return executeAddApplicationInput(request);
}
@SdkInternalApi
final AddApplicationInputResult executeAddApplicationInput(AddApplicationInputRequest addApplicationInputRequest) {
ExecutionContext executionContext = createExecutionContext(addApplicationInputRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddApplicationInputRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addApplicationInputRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddApplicationInput");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddApplicationInputResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds an InputProcessingConfiguration to a SQL-based Kinesis Data Analytics application. An input processor
* pre-processes records on the input stream before the application's SQL code executes. Currently, the only input
* processor available is Amazon Lambda.
*
*
* @param addApplicationInputProcessingConfigurationRequest
* @return Result of the AddApplicationInputProcessingConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.AddApplicationInputProcessingConfiguration
* @see AWS API Documentation
*/
@Override
public AddApplicationInputProcessingConfigurationResult addApplicationInputProcessingConfiguration(AddApplicationInputProcessingConfigurationRequest request) {
request = beforeClientExecution(request);
return executeAddApplicationInputProcessingConfiguration(request);
}
@SdkInternalApi
final AddApplicationInputProcessingConfigurationResult executeAddApplicationInputProcessingConfiguration(
AddApplicationInputProcessingConfigurationRequest addApplicationInputProcessingConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(addApplicationInputProcessingConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddApplicationInputProcessingConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(addApplicationInputProcessingConfigurationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddApplicationInputProcessingConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AddApplicationInputProcessingConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds an external destination to your SQL-based Kinesis Data Analytics application.
*
*
* If you want Kinesis Data Analytics to deliver data from an in-application stream within your application to an
* external destination (such as an Kinesis data stream, a Kinesis Data Firehose delivery stream, or an Amazon
* Lambda function), you add the relevant configuration to your application using this operation. You can configure
* one or more outputs for your application. Each output configuration maps an in-application stream and an external
* destination.
*
*
* You can use one of the output configurations to deliver data from your in-application error stream to an external
* destination so that you can analyze the errors.
*
*
* Any configuration update, including adding a streaming source using this operation, results in a new version of
* the application. You can use the DescribeApplication operation to find the current application version.
*
*
* @param addApplicationOutputRequest
* @return Result of the AddApplicationOutput operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.AddApplicationOutput
* @see AWS API Documentation
*/
@Override
public AddApplicationOutputResult addApplicationOutput(AddApplicationOutputRequest request) {
request = beforeClientExecution(request);
return executeAddApplicationOutput(request);
}
@SdkInternalApi
final AddApplicationOutputResult executeAddApplicationOutput(AddApplicationOutputRequest addApplicationOutputRequest) {
ExecutionContext executionContext = createExecutionContext(addApplicationOutputRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddApplicationOutputRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addApplicationOutputRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddApplicationOutput");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddApplicationOutputResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a reference data source to an existing SQL-based Kinesis Data Analytics application.
*
*
* Kinesis Data Analytics reads reference data (that is, an Amazon S3 object) and creates an in-application table
* within your application. In the request, you provide the source (S3 bucket name and object key name), name of the
* in-application table to create, and the necessary mapping information that describes how data in an Amazon S3
* object maps to columns in the resulting in-application table.
*
*
* @param addApplicationReferenceDataSourceRequest
* @return Result of the AddApplicationReferenceDataSource operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.AddApplicationReferenceDataSource
* @see AWS API Documentation
*/
@Override
public AddApplicationReferenceDataSourceResult addApplicationReferenceDataSource(AddApplicationReferenceDataSourceRequest request) {
request = beforeClientExecution(request);
return executeAddApplicationReferenceDataSource(request);
}
@SdkInternalApi
final AddApplicationReferenceDataSourceResult executeAddApplicationReferenceDataSource(
AddApplicationReferenceDataSourceRequest addApplicationReferenceDataSourceRequest) {
ExecutionContext executionContext = createExecutionContext(addApplicationReferenceDataSourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddApplicationReferenceDataSourceRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(addApplicationReferenceDataSourceRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddApplicationReferenceDataSource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AddApplicationReferenceDataSourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a Virtual Private Cloud (VPC) configuration to the application. Applications can use VPCs to store and
* access resources securely.
*
*
* Note the following about VPC configurations for Managed Service for Apache Flink applications:
*
*
* -
*
* VPC configurations are not supported for SQL applications.
*
*
* -
*
* When a VPC is added to a Managed Service for Apache Flink application, the application can no longer be accessed
* from the Internet directly. To enable Internet access to the application, add an Internet gateway to your VPC.
*
*
*
*
* @param addApplicationVpcConfigurationRequest
* @return Result of the AddApplicationVpcConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @sample AmazonKinesisAnalyticsV2.AddApplicationVpcConfiguration
* @see AWS API Documentation
*/
@Override
public AddApplicationVpcConfigurationResult addApplicationVpcConfiguration(AddApplicationVpcConfigurationRequest request) {
request = beforeClientExecution(request);
return executeAddApplicationVpcConfiguration(request);
}
@SdkInternalApi
final AddApplicationVpcConfigurationResult executeAddApplicationVpcConfiguration(AddApplicationVpcConfigurationRequest addApplicationVpcConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(addApplicationVpcConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddApplicationVpcConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(addApplicationVpcConfigurationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddApplicationVpcConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AddApplicationVpcConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a Managed Service for Apache Flink application. For information about creating a Managed Service for
* Apache Flink application, see Creating an Application.
*
*
* @param createApplicationRequest
* @return Result of the CreateApplication operation returned by the service.
* @throws CodeValidationException
* The user-provided application code (query) is not valid. This can be a simple syntax error.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws LimitExceededException
* The number of allowed resources has been exceeded.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws TooManyTagsException
* Application created with too many tags, or too many tags added to an application. Note that the maximum
* number of application tags includes system tags. The maximum number of user-defined application tags is
* 50.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.CreateApplication
* @see AWS API Documentation
*/
@Override
public CreateApplicationResult createApplication(CreateApplicationRequest request) {
request = beforeClientExecution(request);
return executeCreateApplication(request);
}
@SdkInternalApi
final CreateApplicationResult executeCreateApplication(CreateApplicationRequest createApplicationRequest) {
ExecutionContext executionContext = createExecutionContext(createApplicationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createApplicationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateApplication");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateApplicationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates and returns a URL that you can use to connect to an application's extension.
*
*
* The IAM role or user used to call this API defines the permissions to access the extension. After the presigned
* URL is created, no additional permission is required to access this URL. IAM authorization policies for this API
* are also enforced for every HTTP request that attempts to connect to the extension.
*
*
* You control the amount of time that the URL will be valid using the
* SessionExpirationDurationInSeconds
parameter. If you do not provide this parameter, the returned URL
* is valid for twelve hours.
*
*
*
* The URL that you get from a call to CreateApplicationPresignedUrl must be used within 3 minutes to be valid. If
* you first try to use the URL after the 3-minute limit expires, the service returns an HTTP 403 Forbidden error.
*
*
*
* @param createApplicationPresignedUrlRequest
* @return Result of the CreateApplicationPresignedUrl operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @sample AmazonKinesisAnalyticsV2.CreateApplicationPresignedUrl
* @see AWS API Documentation
*/
@Override
public CreateApplicationPresignedUrlResult createApplicationPresignedUrl(CreateApplicationPresignedUrlRequest request) {
request = beforeClientExecution(request);
return executeCreateApplicationPresignedUrl(request);
}
@SdkInternalApi
final CreateApplicationPresignedUrlResult executeCreateApplicationPresignedUrl(CreateApplicationPresignedUrlRequest createApplicationPresignedUrlRequest) {
ExecutionContext executionContext = createExecutionContext(createApplicationPresignedUrlRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateApplicationPresignedUrlRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createApplicationPresignedUrlRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateApplicationPresignedUrl");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateApplicationPresignedUrlResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a snapshot of the application's state data.
*
*
* @param createApplicationSnapshotRequest
* @return Result of the CreateApplicationSnapshot operation returned by the service.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws LimitExceededException
* The number of allowed resources has been exceeded.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @sample AmazonKinesisAnalyticsV2.CreateApplicationSnapshot
* @see AWS API Documentation
*/
@Override
public CreateApplicationSnapshotResult createApplicationSnapshot(CreateApplicationSnapshotRequest request) {
request = beforeClientExecution(request);
return executeCreateApplicationSnapshot(request);
}
@SdkInternalApi
final CreateApplicationSnapshotResult executeCreateApplicationSnapshot(CreateApplicationSnapshotRequest createApplicationSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(createApplicationSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateApplicationSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createApplicationSnapshotRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateApplicationSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateApplicationSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified application. Managed Service for Apache Flink halts application execution and deletes the
* application.
*
*
* @param deleteApplicationRequest
* @return Result of the DeleteApplication operation returned by the service.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @sample AmazonKinesisAnalyticsV2.DeleteApplication
* @see AWS API Documentation
*/
@Override
public DeleteApplicationResult deleteApplication(DeleteApplicationRequest request) {
request = beforeClientExecution(request);
return executeDeleteApplication(request);
}
@SdkInternalApi
final DeleteApplicationResult executeDeleteApplication(DeleteApplicationRequest deleteApplicationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteApplicationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteApplicationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplication");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteApplicationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an Amazon CloudWatch log stream from an SQL-based Kinesis Data Analytics application.
*
*
* @param deleteApplicationCloudWatchLoggingOptionRequest
* @return Result of the DeleteApplicationCloudWatchLoggingOption operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @sample AmazonKinesisAnalyticsV2.DeleteApplicationCloudWatchLoggingOption
* @see AWS API Documentation
*/
@Override
public DeleteApplicationCloudWatchLoggingOptionResult deleteApplicationCloudWatchLoggingOption(DeleteApplicationCloudWatchLoggingOptionRequest request) {
request = beforeClientExecution(request);
return executeDeleteApplicationCloudWatchLoggingOption(request);
}
@SdkInternalApi
final DeleteApplicationCloudWatchLoggingOptionResult executeDeleteApplicationCloudWatchLoggingOption(
DeleteApplicationCloudWatchLoggingOptionRequest deleteApplicationCloudWatchLoggingOptionRequest) {
ExecutionContext executionContext = createExecutionContext(deleteApplicationCloudWatchLoggingOptionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteApplicationCloudWatchLoggingOptionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteApplicationCloudWatchLoggingOptionRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplicationCloudWatchLoggingOption");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteApplicationCloudWatchLoggingOptionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an InputProcessingConfiguration from an input.
*
*
* @param deleteApplicationInputProcessingConfigurationRequest
* @return Result of the DeleteApplicationInputProcessingConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.DeleteApplicationInputProcessingConfiguration
* @see AWS API Documentation
*/
@Override
public DeleteApplicationInputProcessingConfigurationResult deleteApplicationInputProcessingConfiguration(
DeleteApplicationInputProcessingConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeleteApplicationInputProcessingConfiguration(request);
}
@SdkInternalApi
final DeleteApplicationInputProcessingConfigurationResult executeDeleteApplicationInputProcessingConfiguration(
DeleteApplicationInputProcessingConfigurationRequest deleteApplicationInputProcessingConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteApplicationInputProcessingConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteApplicationInputProcessingConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteApplicationInputProcessingConfigurationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplicationInputProcessingConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteApplicationInputProcessingConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the output destination configuration from your SQL-based Kinesis Data Analytics application's
* configuration. Kinesis Data Analytics will no longer write data from the corresponding in-application stream to
* the external output destination.
*
*
* @param deleteApplicationOutputRequest
* @return Result of the DeleteApplicationOutput operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.DeleteApplicationOutput
* @see AWS API Documentation
*/
@Override
public DeleteApplicationOutputResult deleteApplicationOutput(DeleteApplicationOutputRequest request) {
request = beforeClientExecution(request);
return executeDeleteApplicationOutput(request);
}
@SdkInternalApi
final DeleteApplicationOutputResult executeDeleteApplicationOutput(DeleteApplicationOutputRequest deleteApplicationOutputRequest) {
ExecutionContext executionContext = createExecutionContext(deleteApplicationOutputRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteApplicationOutputRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteApplicationOutputRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplicationOutput");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteApplicationOutputResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a reference data source configuration from the specified SQL-based Kinesis Data Analytics application's
* configuration.
*
*
* If the application is running, Kinesis Data Analytics immediately removes the in-application table that you
* created using the AddApplicationReferenceDataSource operation.
*
*
* @param deleteApplicationReferenceDataSourceRequest
* @return Result of the DeleteApplicationReferenceDataSource operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.DeleteApplicationReferenceDataSource
* @see AWS API Documentation
*/
@Override
public DeleteApplicationReferenceDataSourceResult deleteApplicationReferenceDataSource(DeleteApplicationReferenceDataSourceRequest request) {
request = beforeClientExecution(request);
return executeDeleteApplicationReferenceDataSource(request);
}
@SdkInternalApi
final DeleteApplicationReferenceDataSourceResult executeDeleteApplicationReferenceDataSource(
DeleteApplicationReferenceDataSourceRequest deleteApplicationReferenceDataSourceRequest) {
ExecutionContext executionContext = createExecutionContext(deleteApplicationReferenceDataSourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteApplicationReferenceDataSourceRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteApplicationReferenceDataSourceRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplicationReferenceDataSource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteApplicationReferenceDataSourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a snapshot of application state.
*
*
* @param deleteApplicationSnapshotRequest
* @return Result of the DeleteApplicationSnapshot operation returned by the service.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @sample AmazonKinesisAnalyticsV2.DeleteApplicationSnapshot
* @see AWS API Documentation
*/
@Override
public DeleteApplicationSnapshotResult deleteApplicationSnapshot(DeleteApplicationSnapshotRequest request) {
request = beforeClientExecution(request);
return executeDeleteApplicationSnapshot(request);
}
@SdkInternalApi
final DeleteApplicationSnapshotResult executeDeleteApplicationSnapshot(DeleteApplicationSnapshotRequest deleteApplicationSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(deleteApplicationSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteApplicationSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteApplicationSnapshotRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplicationSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteApplicationSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes a VPC configuration from a Managed Service for Apache Flink application.
*
*
* @param deleteApplicationVpcConfigurationRequest
* @return Result of the DeleteApplicationVpcConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @sample AmazonKinesisAnalyticsV2.DeleteApplicationVpcConfiguration
* @see AWS API Documentation
*/
@Override
public DeleteApplicationVpcConfigurationResult deleteApplicationVpcConfiguration(DeleteApplicationVpcConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeleteApplicationVpcConfiguration(request);
}
@SdkInternalApi
final DeleteApplicationVpcConfigurationResult executeDeleteApplicationVpcConfiguration(
DeleteApplicationVpcConfigurationRequest deleteApplicationVpcConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteApplicationVpcConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteApplicationVpcConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteApplicationVpcConfigurationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplicationVpcConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteApplicationVpcConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about a specific Managed Service for Apache Flink application.
*
*
* If you want to retrieve a list of all applications in your account, use the ListApplications operation.
*
*
* @param describeApplicationRequest
* @return Result of the DescribeApplication operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.DescribeApplication
* @see AWS API Documentation
*/
@Override
public DescribeApplicationResult describeApplication(DescribeApplicationRequest request) {
request = beforeClientExecution(request);
return executeDescribeApplication(request);
}
@SdkInternalApi
final DescribeApplicationResult executeDescribeApplication(DescribeApplicationRequest describeApplicationRequest) {
ExecutionContext executionContext = createExecutionContext(describeApplicationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeApplicationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeApplication");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeApplicationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Returns information about a specific operation performed on a Managed Service for Apache Flink application
*
* @param describeApplicationOperationRequest
* Request for information about a specific operation performed on a Managed Service for Apache Flink
* application
* @return Result of the DescribeApplicationOperation operation returned by the service.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.DescribeApplicationOperation
* @see AWS API Documentation
*/
@Override
public DescribeApplicationOperationResult describeApplicationOperation(DescribeApplicationOperationRequest request) {
request = beforeClientExecution(request);
return executeDescribeApplicationOperation(request);
}
@SdkInternalApi
final DescribeApplicationOperationResult executeDescribeApplicationOperation(DescribeApplicationOperationRequest describeApplicationOperationRequest) {
ExecutionContext executionContext = createExecutionContext(describeApplicationOperationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeApplicationOperationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeApplicationOperationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeApplicationOperation");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeApplicationOperationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about a snapshot of application state data.
*
*
* @param describeApplicationSnapshotRequest
* @return Result of the DescribeApplicationSnapshot operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.DescribeApplicationSnapshot
* @see AWS API Documentation
*/
@Override
public DescribeApplicationSnapshotResult describeApplicationSnapshot(DescribeApplicationSnapshotRequest request) {
request = beforeClientExecution(request);
return executeDescribeApplicationSnapshot(request);
}
@SdkInternalApi
final DescribeApplicationSnapshotResult executeDescribeApplicationSnapshot(DescribeApplicationSnapshotRequest describeApplicationSnapshotRequest) {
ExecutionContext executionContext = createExecutionContext(describeApplicationSnapshotRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeApplicationSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeApplicationSnapshotRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeApplicationSnapshot");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeApplicationSnapshotResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides a detailed description of a specified version of the application. To see a list of all the versions of
* an application, invoke the ListApplicationVersions operation.
*
*
*
* This operation is supported only for Managed Service for Apache Flink.
*
*
*
* @param describeApplicationVersionRequest
* @return Result of the DescribeApplicationVersion operation returned by the service.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.DescribeApplicationVersion
* @see AWS API Documentation
*/
@Override
public DescribeApplicationVersionResult describeApplicationVersion(DescribeApplicationVersionRequest request) {
request = beforeClientExecution(request);
return executeDescribeApplicationVersion(request);
}
@SdkInternalApi
final DescribeApplicationVersionResult executeDescribeApplicationVersion(DescribeApplicationVersionRequest describeApplicationVersionRequest) {
ExecutionContext executionContext = createExecutionContext(describeApplicationVersionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeApplicationVersionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeApplicationVersionRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeApplicationVersion");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeApplicationVersionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Infers a schema for a SQL-based Kinesis Data Analytics application by evaluating sample records on the specified
* streaming source (Kinesis data stream or Kinesis Data Firehose delivery stream) or Amazon S3 object. In the
* response, the operation returns the inferred schema and also the sample records that the operation used to infer
* the schema.
*
*
* You can use the inferred schema when configuring a streaming source for your application. When you create an
* application using the Kinesis Data Analytics console, the console uses this operation to infer a schema and show
* it in the console user interface.
*
*
* @param discoverInputSchemaRequest
* @return Result of the DiscoverInputSchema operation returned by the service.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws UnableToDetectSchemaException
* The data format is not valid. Kinesis Data Analytics cannot detect the schema for the given streaming
* source.
* @throws ResourceProvisionedThroughputExceededException
* Discovery failed to get a record from the streaming source because of the Kinesis Streams
* ProvisionedThroughputExceededException
. For more information, see GetRecords in the
* Amazon Kinesis Streams API Reference.
* @throws ServiceUnavailableException
* The service cannot complete the request.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.DiscoverInputSchema
* @see AWS API Documentation
*/
@Override
public DiscoverInputSchemaResult discoverInputSchema(DiscoverInputSchemaRequest request) {
request = beforeClientExecution(request);
return executeDiscoverInputSchema(request);
}
@SdkInternalApi
final DiscoverInputSchemaResult executeDiscoverInputSchema(DiscoverInputSchemaRequest discoverInputSchemaRequest) {
ExecutionContext executionContext = createExecutionContext(discoverInputSchemaRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DiscoverInputSchemaRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(discoverInputSchemaRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DiscoverInputSchema");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DiscoverInputSchemaResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Lists information about operations performed on a Managed Service for Apache Flink application
*
* @param listApplicationOperationsRequest
* Request to list operations performed on an application
* @return Result of the ListApplicationOperations operation returned by the service.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.ListApplicationOperations
* @see AWS API Documentation
*/
@Override
public ListApplicationOperationsResult listApplicationOperations(ListApplicationOperationsRequest request) {
request = beforeClientExecution(request);
return executeListApplicationOperations(request);
}
@SdkInternalApi
final ListApplicationOperationsResult executeListApplicationOperations(ListApplicationOperationsRequest listApplicationOperationsRequest) {
ExecutionContext executionContext = createExecutionContext(listApplicationOperationsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListApplicationOperationsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listApplicationOperationsRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListApplicationOperations");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListApplicationOperationsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists information about the current application snapshots.
*
*
* @param listApplicationSnapshotsRequest
* @return Result of the ListApplicationSnapshots operation returned by the service.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.ListApplicationSnapshots
* @see AWS API Documentation
*/
@Override
public ListApplicationSnapshotsResult listApplicationSnapshots(ListApplicationSnapshotsRequest request) {
request = beforeClientExecution(request);
return executeListApplicationSnapshots(request);
}
@SdkInternalApi
final ListApplicationSnapshotsResult executeListApplicationSnapshots(ListApplicationSnapshotsRequest listApplicationSnapshotsRequest) {
ExecutionContext executionContext = createExecutionContext(listApplicationSnapshotsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListApplicationSnapshotsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listApplicationSnapshotsRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListApplicationSnapshots");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListApplicationSnapshotsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all the versions for the specified application, including versions that were rolled back. The response also
* includes a summary of the configuration associated with each version.
*
*
* To get the complete description of a specific application version, invoke the DescribeApplicationVersion
* operation.
*
*
*
* This operation is supported only for Managed Service for Apache Flink.
*
*
*
* @param listApplicationVersionsRequest
* @return Result of the ListApplicationVersions operation returned by the service.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.ListApplicationVersions
* @see AWS API Documentation
*/
@Override
public ListApplicationVersionsResult listApplicationVersions(ListApplicationVersionsRequest request) {
request = beforeClientExecution(request);
return executeListApplicationVersions(request);
}
@SdkInternalApi
final ListApplicationVersionsResult executeListApplicationVersions(ListApplicationVersionsRequest listApplicationVersionsRequest) {
ExecutionContext executionContext = createExecutionContext(listApplicationVersionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListApplicationVersionsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listApplicationVersionsRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListApplicationVersions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListApplicationVersionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of Managed Service for Apache Flink applications in your account. For each application, the
* response includes the application name, Amazon Resource Name (ARN), and status.
*
*
* If you want detailed information about a specific application, use DescribeApplication.
*
*
* @param listApplicationsRequest
* @return Result of the ListApplications operation returned by the service.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.ListApplications
* @see AWS API Documentation
*/
@Override
public ListApplicationsResult listApplications(ListApplicationsRequest request) {
request = beforeClientExecution(request);
return executeListApplications(request);
}
@SdkInternalApi
final ListApplicationsResult executeListApplications(ListApplicationsRequest listApplicationsRequest) {
ExecutionContext executionContext = createExecutionContext(listApplicationsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListApplicationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listApplicationsRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListApplications");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListApplicationsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves the list of key-value tags assigned to the application. For more information, see Using Tagging.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @sample AmazonKinesisAnalyticsV2.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) {
request = beforeClientExecution(request);
return executeListTagsForResource(request);
}
@SdkInternalApi
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {
ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Reverts the application to the previous running version. You can roll back an application if you suspect it is
* stuck in a transient status or in the running status.
*
*
* You can roll back an application only if it is in the UPDATING
, AUTOSCALING
, or
* RUNNING
statuses.
*
*
* When you rollback an application, it loads state data from the last successful snapshot. If the application has
* no snapshots, Managed Service for Apache Flink rejects the rollback request.
*
*
* @param rollbackApplicationRequest
* @return Result of the RollbackApplication operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.RollbackApplication
* @see AWS API Documentation
*/
@Override
public RollbackApplicationResult rollbackApplication(RollbackApplicationRequest request) {
request = beforeClientExecution(request);
return executeRollbackApplication(request);
}
@SdkInternalApi
final RollbackApplicationResult executeRollbackApplication(RollbackApplicationRequest rollbackApplicationRequest) {
ExecutionContext executionContext = createExecutionContext(rollbackApplicationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new RollbackApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(rollbackApplicationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RollbackApplication");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RollbackApplicationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Starts the specified Managed Service for Apache Flink application. After creating an application, you must
* exclusively call this operation to start your application.
*
*
* @param startApplicationRequest
* @return Result of the StartApplication operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @sample AmazonKinesisAnalyticsV2.StartApplication
* @see AWS API Documentation
*/
@Override
public StartApplicationResult startApplication(StartApplicationRequest request) {
request = beforeClientExecution(request);
return executeStartApplication(request);
}
@SdkInternalApi
final StartApplicationResult executeStartApplication(StartApplicationRequest startApplicationRequest) {
ExecutionContext executionContext = createExecutionContext(startApplicationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startApplicationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartApplication");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartApplicationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Stops the application from processing data. You can stop an application only if it is in the running status,
* unless you set the Force
parameter to true
.
*
*
* You can use the DescribeApplication operation to find the application status.
*
*
* Managed Service for Apache Flink takes a snapshot when the application is stopped, unless Force
is
* set to true
.
*
*
* @param stopApplicationRequest
* @return Result of the StopApplication operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @sample AmazonKinesisAnalyticsV2.StopApplication
* @see AWS API Documentation
*/
@Override
public StopApplicationResult stopApplication(StopApplicationRequest request) {
request = beforeClientExecution(request);
return executeStopApplication(request);
}
@SdkInternalApi
final StopApplicationResult executeStopApplication(StopApplicationRequest stopApplicationRequest) {
ExecutionContext executionContext = createExecutionContext(stopApplicationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StopApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopApplicationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopApplication");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopApplicationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds one or more key-value tags to a Managed Service for Apache Flink application. Note that the maximum number
* of application tags includes system tags. The maximum number of user-defined application tags is 50. For more
* information, see Using
* Tagging.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws TooManyTagsException
* Application created with too many tags, or too many tags added to an application. Note that the maximum
* number of application tags includes system tags. The maximum number of user-defined application tags is
* 50.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @sample AmazonKinesisAnalyticsV2.TagResource
* @see AWS
* API Documentation
*/
@Override
public TagResourceResult tagResource(TagResourceRequest request) {
request = beforeClientExecution(request);
return executeTagResource(request);
}
@SdkInternalApi
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {
ExecutionContext executionContext = createExecutionContext(tagResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes one or more tags from a Managed Service for Apache Flink application. For more information, see Using Tagging.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws TooManyTagsException
* Application created with too many tags, or too many tags added to an application. Note that the maximum
* number of application tags includes system tags. The maximum number of user-defined application tags is
* 50.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @sample AmazonKinesisAnalyticsV2.UntagResource
* @see AWS API Documentation
*/
@Override
public UntagResourceResult untagResource(UntagResourceRequest request) {
request = beforeClientExecution(request);
return executeUntagResource(request);
}
@SdkInternalApi
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {
ExecutionContext executionContext = createExecutionContext(untagResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an existing Managed Service for Apache Flink application. Using this operation, you can update
* application code, input configuration, and output configuration.
*
*
* Managed Service for Apache Flink updates the ApplicationVersionId
each time you update your
* application.
*
*
* @param updateApplicationRequest
* @return Result of the UpdateApplication operation returned by the service.
* @throws CodeValidationException
* The user-provided application code (query) is not valid. This can be a simple syntax error.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws InvalidRequestException
* The request JSON is not valid for the operation.
* @throws InvalidApplicationConfigurationException
* The user-provided application configuration is not valid.
* @throws LimitExceededException
* The number of allowed resources has been exceeded.
* @sample AmazonKinesisAnalyticsV2.UpdateApplication
* @see AWS API Documentation
*/
@Override
public UpdateApplicationResult updateApplication(UpdateApplicationRequest request) {
request = beforeClientExecution(request);
return executeUpdateApplication(request);
}
@SdkInternalApi
final UpdateApplicationResult executeUpdateApplication(UpdateApplicationRequest updateApplicationRequest) {
ExecutionContext executionContext = createExecutionContext(updateApplicationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateApplicationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateApplication");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateApplicationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the maintenance configuration of the Managed Service for Apache Flink application.
*
*
* You can invoke this operation on an application that is in one of the two following states: READY
or
* RUNNING
. If you invoke it when the application is in a state other than these two states, it throws
* a ResourceInUseException
. The service makes use of the updated configuration the next time it
* schedules maintenance for the application. If you invoke this operation after the service schedules maintenance,
* the service will apply the configuration update the next time it schedules maintenance for the application. This
* means that you might not see the maintenance configuration update applied to the maintenance process that follows
* a successful invocation of this operation, but to the following maintenance process instead.
*
*
* To see the current maintenance configuration of your application, invoke the DescribeApplication
* operation.
*
*
* For information about application maintenance, see Managed Service for Apache Flink
* for Apache Flink Maintenance.
*
*
*
* This operation is supported only for Managed Service for Apache Flink.
*
*
*
* @param updateApplicationMaintenanceConfigurationRequest
* @return Result of the UpdateApplicationMaintenanceConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* Specified application can't be found.
* @throws ResourceInUseException
* The application is not available for this operation.
* @throws InvalidArgumentException
* The specified input parameter value is not valid.
* @throws ConcurrentModificationException
* Exception thrown as a result of concurrent modifications to an application. This error can be the result
* of attempting to modify an application without using the current application ID.
* @throws UnsupportedOperationException
* The request was rejected because a specified parameter is not supported or a specified resource is not
* valid for this operation.
* @sample AmazonKinesisAnalyticsV2.UpdateApplicationMaintenanceConfiguration
* @see AWS API Documentation
*/
@Override
public UpdateApplicationMaintenanceConfigurationResult updateApplicationMaintenanceConfiguration(UpdateApplicationMaintenanceConfigurationRequest request) {
request = beforeClientExecution(request);
return executeUpdateApplicationMaintenanceConfiguration(request);
}
@SdkInternalApi
final UpdateApplicationMaintenanceConfigurationResult executeUpdateApplicationMaintenanceConfiguration(
UpdateApplicationMaintenanceConfigurationRequest updateApplicationMaintenanceConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(updateApplicationMaintenanceConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateApplicationMaintenanceConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateApplicationMaintenanceConfigurationRequest));
// 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, "Kinesis Analytics V2");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateApplicationMaintenanceConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateApplicationMaintenanceConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Returns additional metadata for a previously executed successful, request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
*
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext) {
return invoke(request, responseHandler, executionContext, null, null);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) {
executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider));
return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait);
}
/**
* Invoke with no authentication. Credentials are not required and any credentials set on the client or request will
* be ignored for this operation.
**/
private Response anonymousInvoke(Request request,
HttpResponseHandler> responseHandler, ExecutionContext executionContext) {
return doInvoke(request, responseHandler, executionContext, null, null);
}
/**
* Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the
* ExecutionContext beforehand.
**/
private Response doInvoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {
if (discoveredEndpoint != null) {
request.setEndpoint(discoveredEndpoint);
request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery");
} else if (uriFromEndpointTrait != null) {
request.setEndpoint(uriFromEndpointTrait);
} else {
request.setEndpoint(endpoint);
}
request.setTimeOffset(timeOffset);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());
return client.execute(request, responseHandler, errorResponseHandler, executionContext);
}
@com.amazonaws.annotation.SdkInternalApi
static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() {
return protocolFactory;
}
@Override
public void shutdown() {
super.shutdown();
}
}