
com.amazonaws.services.kafka.AWSKafkaClient Maven / Gradle / Ivy
/*
* 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.kafka;
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.kafka.AWSKafkaClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.kafka.model.*;
import com.amazonaws.services.kafka.model.transform.*;
/**
* Client for accessing Kafka. All service calls made using this client are blocking, and will not return until the
* service call completes.
*
*
*
* The operations for managing an Amazon MSK cluster.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSKafkaClient extends AmazonWebServiceClient implements AWSKafka {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSKafka.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "kafka";
/** 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)
.withContentTypeOverride("application/json")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ForbiddenException").withExceptionUnmarshaller(
com.amazonaws.services.kafka.model.transform.ForbiddenExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("NotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.kafka.model.transform.NotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("UnauthorizedException").withExceptionUnmarshaller(
com.amazonaws.services.kafka.model.transform.UnauthorizedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller(
com.amazonaws.services.kafka.model.transform.ConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceUnavailableException").withExceptionUnmarshaller(
com.amazonaws.services.kafka.model.transform.ServiceUnavailableExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("TooManyRequestsException").withExceptionUnmarshaller(
com.amazonaws.services.kafka.model.transform.TooManyRequestsExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("BadRequestException").withExceptionUnmarshaller(
com.amazonaws.services.kafka.model.transform.BadRequestExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerErrorException").withExceptionUnmarshaller(
com.amazonaws.services.kafka.model.transform.InternalServerErrorExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.kafka.model.AWSKafkaException.class));
public static AWSKafkaClientBuilder builder() {
return AWSKafkaClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on Kafka 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.
*/
AWSKafkaClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on Kafka 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.
*/
AWSKafkaClient(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("kafka.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/kafka/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/kafka/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Associates one or more Scram Secrets with an Amazon MSK cluster.
*
*
* @param batchAssociateScramSecretRequest
*
* Associates sasl scram secrets to cluster.
*
* @return Result of the BatchAssociateScramSecret operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @sample AWSKafka.BatchAssociateScramSecret
* @see AWS API Documentation
*/
@Override
public BatchAssociateScramSecretResult batchAssociateScramSecret(BatchAssociateScramSecretRequest request) {
request = beforeClientExecution(request);
return executeBatchAssociateScramSecret(request);
}
@SdkInternalApi
final BatchAssociateScramSecretResult executeBatchAssociateScramSecret(BatchAssociateScramSecretRequest batchAssociateScramSecretRequest) {
ExecutionContext executionContext = createExecutionContext(batchAssociateScramSecretRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchAssociateScramSecretRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchAssociateScramSecretRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchAssociateScramSecret");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchAssociateScramSecretResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Disassociates one or more Scram Secrets from an Amazon MSK cluster.
*
*
* @param batchDisassociateScramSecretRequest
*
* Disassociates sasl scram secrets to cluster.
*
* @return Result of the BatchDisassociateScramSecret operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @sample AWSKafka.BatchDisassociateScramSecret
* @see AWS API Documentation
*/
@Override
public BatchDisassociateScramSecretResult batchDisassociateScramSecret(BatchDisassociateScramSecretRequest request) {
request = beforeClientExecution(request);
return executeBatchDisassociateScramSecret(request);
}
@SdkInternalApi
final BatchDisassociateScramSecretResult executeBatchDisassociateScramSecret(BatchDisassociateScramSecretRequest batchDisassociateScramSecretRequest) {
ExecutionContext executionContext = createExecutionContext(batchDisassociateScramSecretRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchDisassociateScramSecretRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchDisassociateScramSecretRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDisassociateScramSecret");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchDisassociateScramSecretResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new MSK cluster.
*
*
* @param createClusterRequest
* @return Result of the CreateCluster operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @throws ConflictException
*
* This cluster name already exists. Retry your request using another name.
*
* @sample AWSKafka.CreateCluster
* @see AWS API
* Documentation
*/
@Override
public CreateClusterResult createCluster(CreateClusterRequest request) {
request = beforeClientExecution(request);
return executeCreateCluster(request);
}
@SdkInternalApi
final CreateClusterResult executeCreateCluster(CreateClusterRequest createClusterRequest) {
ExecutionContext executionContext = createExecutionContext(createClusterRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateClusterRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createClusterRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCluster");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateClusterResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new MSK cluster.
*
*
* @param createClusterV2Request
* @return Result of the CreateClusterV2 operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @throws ConflictException
*
* This cluster name already exists. Retry your request using another name.
*
* @sample AWSKafka.CreateClusterV2
* @see AWS API
* Documentation
*/
@Override
public CreateClusterV2Result createClusterV2(CreateClusterV2Request request) {
request = beforeClientExecution(request);
return executeCreateClusterV2(request);
}
@SdkInternalApi
final CreateClusterV2Result executeCreateClusterV2(CreateClusterV2Request createClusterV2Request) {
ExecutionContext executionContext = createExecutionContext(createClusterV2Request);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateClusterV2RequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createClusterV2Request));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateClusterV2");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateClusterV2ResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new MSK configuration.
*
*
* @param createConfigurationRequest
* @return Result of the CreateConfiguration operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @throws ConflictException
*
* This cluster name already exists. Retry your request using another name.
*
* @sample AWSKafka.CreateConfiguration
* @see AWS API
* Documentation
*/
@Override
public CreateConfigurationResult createConfiguration(CreateConfigurationRequest request) {
request = beforeClientExecution(request);
return executeCreateConfiguration(request);
}
@SdkInternalApi
final CreateConfigurationResult executeCreateConfiguration(CreateConfigurationRequest createConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(createConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createConfigurationRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates the replicator.
*
*
* @param createReplicatorRequest
* Creates a replicator using the specified configuration.
* @return Result of the CreateReplicator operation returned by the service.
* @throws BadRequestException
* HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
* @throws UnauthorizedException
* HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
* @throws InternalServerErrorException
* HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
* @throws ForbiddenException
* HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
* @throws NotFoundException
* HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
* @throws ServiceUnavailableException
* HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
* @throws TooManyRequestsException
* HTTP Status Code 429: Limit exceeded. Resource limit reached.
* @throws ConflictException
* HTTP Status Code 409: Conflict. This replicator name already exists. Retry your request with another
* name.
* @sample AWSKafka.CreateReplicator
* @see AWS API
* Documentation
*/
@Override
public CreateReplicatorResult createReplicator(CreateReplicatorRequest request) {
request = beforeClientExecution(request);
return executeCreateReplicator(request);
}
@SdkInternalApi
final CreateReplicatorResult executeCreateReplicator(CreateReplicatorRequest createReplicatorRequest) {
ExecutionContext executionContext = createExecutionContext(createReplicatorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateReplicatorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createReplicatorRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateReplicator");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateReplicatorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new MSK VPC connection.
*
*
* @param createVpcConnectionRequest
* @return Result of the CreateVpcConnection operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @sample AWSKafka.CreateVpcConnection
* @see AWS API
* Documentation
*/
@Override
public CreateVpcConnectionResult createVpcConnection(CreateVpcConnectionRequest request) {
request = beforeClientExecution(request);
return executeCreateVpcConnection(request);
}
@SdkInternalApi
final CreateVpcConnectionResult executeCreateVpcConnection(CreateVpcConnectionRequest createVpcConnectionRequest) {
ExecutionContext executionContext = createExecutionContext(createVpcConnectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateVpcConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createVpcConnectionRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateVpcConnection");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateVpcConnectionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the MSK cluster specified by the Amazon Resource Name (ARN) in the request.
*
*
* @param deleteClusterRequest
* @return Result of the DeleteCluster operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.DeleteCluster
* @see AWS API
* Documentation
*/
@Override
public DeleteClusterResult deleteCluster(DeleteClusterRequest request) {
request = beforeClientExecution(request);
return executeDeleteCluster(request);
}
@SdkInternalApi
final DeleteClusterResult executeDeleteCluster(DeleteClusterRequest deleteClusterRequest) {
ExecutionContext executionContext = createExecutionContext(deleteClusterRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteClusterRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteClusterRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCluster");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteClusterResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the MSK cluster policy specified by the Amazon Resource Name (ARN) in the request.
*
*
* @param deleteClusterPolicyRequest
* @return Result of the DeleteClusterPolicy operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.DeleteClusterPolicy
* @see AWS API
* Documentation
*/
@Override
public DeleteClusterPolicyResult deleteClusterPolicy(DeleteClusterPolicyRequest request) {
request = beforeClientExecution(request);
return executeDeleteClusterPolicy(request);
}
@SdkInternalApi
final DeleteClusterPolicyResult executeDeleteClusterPolicy(DeleteClusterPolicyRequest deleteClusterPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(deleteClusterPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteClusterPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteClusterPolicyRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteClusterPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteClusterPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an MSK Configuration.
*
*
* @param deleteConfigurationRequest
* @return Result of the DeleteConfiguration operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.DeleteConfiguration
* @see AWS API
* Documentation
*/
@Override
public DeleteConfigurationResult deleteConfiguration(DeleteConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeleteConfiguration(request);
}
@SdkInternalApi
final DeleteConfigurationResult executeDeleteConfiguration(DeleteConfigurationRequest deleteConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteConfigurationRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a replicator.
*
*
* @param deleteReplicatorRequest
* @return Result of the DeleteReplicator operation returned by the service.
* @throws BadRequestException
* HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
* @throws UnauthorizedException
* HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
* @throws InternalServerErrorException
* HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
* @throws ForbiddenException
* HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
* @throws NotFoundException
* HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
* @throws ServiceUnavailableException
* HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
* @throws TooManyRequestsException
* HTTP Status Code 429: Limit exceeded. Resource limit reached.
* @sample AWSKafka.DeleteReplicator
* @see AWS API
* Documentation
*/
@Override
public DeleteReplicatorResult deleteReplicator(DeleteReplicatorRequest request) {
request = beforeClientExecution(request);
return executeDeleteReplicator(request);
}
@SdkInternalApi
final DeleteReplicatorResult executeDeleteReplicator(DeleteReplicatorRequest deleteReplicatorRequest) {
ExecutionContext executionContext = createExecutionContext(deleteReplicatorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteReplicatorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteReplicatorRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteReplicator");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteReplicatorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a MSK VPC connection.
*
*
* @param deleteVpcConnectionRequest
* @return Result of the DeleteVpcConnection operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.DeleteVpcConnection
* @see AWS API
* Documentation
*/
@Override
public DeleteVpcConnectionResult deleteVpcConnection(DeleteVpcConnectionRequest request) {
request = beforeClientExecution(request);
return executeDeleteVpcConnection(request);
}
@SdkInternalApi
final DeleteVpcConnectionResult executeDeleteVpcConnection(DeleteVpcConnectionRequest deleteVpcConnectionRequest) {
ExecutionContext executionContext = createExecutionContext(deleteVpcConnectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteVpcConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteVpcConnectionRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteVpcConnection");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteVpcConnectionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a description of the MSK cluster whose Amazon Resource Name (ARN) is specified in the request.
*
*
* @param describeClusterRequest
* @return Result of the DescribeCluster operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.DescribeCluster
* @see AWS API
* Documentation
*/
@Override
public DescribeClusterResult describeCluster(DescribeClusterRequest request) {
request = beforeClientExecution(request);
return executeDescribeCluster(request);
}
@SdkInternalApi
final DescribeClusterResult executeDescribeCluster(DescribeClusterRequest describeClusterRequest) {
ExecutionContext executionContext = createExecutionContext(describeClusterRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeClusterRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeClusterRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCluster");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeClusterResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a description of the cluster operation specified by the ARN.
*
*
* @param describeClusterOperationRequest
* @return Result of the DescribeClusterOperation operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.DescribeClusterOperation
* @see AWS
* API Documentation
*/
@Override
public DescribeClusterOperationResult describeClusterOperation(DescribeClusterOperationRequest request) {
request = beforeClientExecution(request);
return executeDescribeClusterOperation(request);
}
@SdkInternalApi
final DescribeClusterOperationResult executeDescribeClusterOperation(DescribeClusterOperationRequest describeClusterOperationRequest) {
ExecutionContext executionContext = createExecutionContext(describeClusterOperationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeClusterOperationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeClusterOperationRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeClusterOperation");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeClusterOperationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a description of the cluster operation specified by the ARN.
*
*
* @param describeClusterOperationV2Request
* @return Result of the DescribeClusterOperationV2 operation returned by the service.
* @throws BadRequestException
*
* HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
*
* @throws UnauthorizedException
*
* HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
*
* @throws NotFoundException
*
* HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
*
* @throws ServiceUnavailableException
*
* HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
*
* @throws TooManyRequestsException
*
* HTTP Status Code 429: Limit exceeded. Resource limit reached.
*
* @sample AWSKafka.DescribeClusterOperationV2
* @see AWS API Documentation
*/
@Override
public DescribeClusterOperationV2Result describeClusterOperationV2(DescribeClusterOperationV2Request request) {
request = beforeClientExecution(request);
return executeDescribeClusterOperationV2(request);
}
@SdkInternalApi
final DescribeClusterOperationV2Result executeDescribeClusterOperationV2(DescribeClusterOperationV2Request describeClusterOperationV2Request) {
ExecutionContext executionContext = createExecutionContext(describeClusterOperationV2Request);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeClusterOperationV2RequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeClusterOperationV2Request));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeClusterOperationV2");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeClusterOperationV2ResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a description of the MSK cluster whose Amazon Resource Name (ARN) is specified in the request.
*
*
* @param describeClusterV2Request
* @return Result of the DescribeClusterV2 operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.DescribeClusterV2
* @see AWS API
* Documentation
*/
@Override
public DescribeClusterV2Result describeClusterV2(DescribeClusterV2Request request) {
request = beforeClientExecution(request);
return executeDescribeClusterV2(request);
}
@SdkInternalApi
final DescribeClusterV2Result executeDescribeClusterV2(DescribeClusterV2Request describeClusterV2Request) {
ExecutionContext executionContext = createExecutionContext(describeClusterV2Request);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeClusterV2RequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeClusterV2Request));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeClusterV2");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeClusterV2ResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a description of this MSK configuration.
*
*
* @param describeConfigurationRequest
* @return Result of the DescribeConfiguration operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @sample AWSKafka.DescribeConfiguration
* @see AWS
* API Documentation
*/
@Override
public DescribeConfigurationResult describeConfiguration(DescribeConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDescribeConfiguration(request);
}
@SdkInternalApi
final DescribeConfigurationResult executeDescribeConfiguration(DescribeConfigurationRequest describeConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(describeConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeConfigurationRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a description of this revision of the configuration.
*
*
* @param describeConfigurationRevisionRequest
* @return Result of the DescribeConfigurationRevision operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @sample AWSKafka.DescribeConfigurationRevision
* @see AWS API Documentation
*/
@Override
public DescribeConfigurationRevisionResult describeConfigurationRevision(DescribeConfigurationRevisionRequest request) {
request = beforeClientExecution(request);
return executeDescribeConfigurationRevision(request);
}
@SdkInternalApi
final DescribeConfigurationRevisionResult executeDescribeConfigurationRevision(DescribeConfigurationRevisionRequest describeConfigurationRevisionRequest) {
ExecutionContext executionContext = createExecutionContext(describeConfigurationRevisionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeConfigurationRevisionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeConfigurationRevisionRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConfigurationRevision");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeConfigurationRevisionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes a replicator.
*
*
* @param describeReplicatorRequest
* @return Result of the DescribeReplicator operation returned by the service.
* @throws BadRequestException
* HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
* @throws UnauthorizedException
* HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
* @throws InternalServerErrorException
* HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
* @throws ForbiddenException
* HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
* @throws NotFoundException
* HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
* @throws ServiceUnavailableException
* HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
* @throws TooManyRequestsException
* HTTP Status Code 429: Limit exceeded. Resource limit reached.
* @sample AWSKafka.DescribeReplicator
* @see AWS API
* Documentation
*/
@Override
public DescribeReplicatorResult describeReplicator(DescribeReplicatorRequest request) {
request = beforeClientExecution(request);
return executeDescribeReplicator(request);
}
@SdkInternalApi
final DescribeReplicatorResult executeDescribeReplicator(DescribeReplicatorRequest describeReplicatorRequest) {
ExecutionContext executionContext = createExecutionContext(describeReplicatorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeReplicatorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeReplicatorRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeReplicator");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeReplicatorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a description of this MSK VPC connection.
*
*
* @param describeVpcConnectionRequest
* @return Result of the DescribeVpcConnection operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @sample AWSKafka.DescribeVpcConnection
* @see AWS
* API Documentation
*/
@Override
public DescribeVpcConnectionResult describeVpcConnection(DescribeVpcConnectionRequest request) {
request = beforeClientExecution(request);
return executeDescribeVpcConnection(request);
}
@SdkInternalApi
final DescribeVpcConnectionResult executeDescribeVpcConnection(DescribeVpcConnectionRequest describeVpcConnectionRequest) {
ExecutionContext executionContext = createExecutionContext(describeVpcConnectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeVpcConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeVpcConnectionRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeVpcConnection");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeVpcConnectionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* A list of brokers that a client application can use to bootstrap.
*
*
* @param getBootstrapBrokersRequest
* @return Result of the GetBootstrapBrokers operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ConflictException
*
* This cluster name already exists. Retry your request using another name.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.GetBootstrapBrokers
* @see AWS API
* Documentation
*/
@Override
public GetBootstrapBrokersResult getBootstrapBrokers(GetBootstrapBrokersRequest request) {
request = beforeClientExecution(request);
return executeGetBootstrapBrokers(request);
}
@SdkInternalApi
final GetBootstrapBrokersResult executeGetBootstrapBrokers(GetBootstrapBrokersRequest getBootstrapBrokersRequest) {
ExecutionContext executionContext = createExecutionContext(getBootstrapBrokersRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetBootstrapBrokersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBootstrapBrokersRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBootstrapBrokers");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBootstrapBrokersResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Get the MSK cluster policy specified by the Amazon Resource Name (ARN) in the request.
*
*
* @param getClusterPolicyRequest
* @return Result of the GetClusterPolicy operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.GetClusterPolicy
* @see AWS API
* Documentation
*/
@Override
public GetClusterPolicyResult getClusterPolicy(GetClusterPolicyRequest request) {
request = beforeClientExecution(request);
return executeGetClusterPolicy(request);
}
@SdkInternalApi
final GetClusterPolicyResult executeGetClusterPolicy(GetClusterPolicyRequest getClusterPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(getClusterPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetClusterPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getClusterPolicyRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetClusterPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetClusterPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the Apache Kafka versions to which you can update the MSK cluster.
*
*
* @param getCompatibleKafkaVersionsRequest
* @return Result of the GetCompatibleKafkaVersions operation returned by the service.
* @throws BadRequestException
* n
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* n
* @throws UnauthorizedException
* n
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* n
* @throws InternalServerErrorException
* n
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* n
* @throws ForbiddenException
* n
*
* Access forbidden. Check your credentials and then retry your request.
*
* n
* @throws NotFoundException
* n
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* n
* @throws ServiceUnavailableException
* n
*
* 503 response
*
* n
* @throws TooManyRequestsException
* n
*
* 429 response
*
* n
* @sample AWSKafka.GetCompatibleKafkaVersions
* @see AWS API Documentation
*/
@Override
public GetCompatibleKafkaVersionsResult getCompatibleKafkaVersions(GetCompatibleKafkaVersionsRequest request) {
request = beforeClientExecution(request);
return executeGetCompatibleKafkaVersions(request);
}
@SdkInternalApi
final GetCompatibleKafkaVersionsResult executeGetCompatibleKafkaVersions(GetCompatibleKafkaVersionsRequest getCompatibleKafkaVersionsRequest) {
ExecutionContext executionContext = createExecutionContext(getCompatibleKafkaVersionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetCompatibleKafkaVersionsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getCompatibleKafkaVersionsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCompatibleKafkaVersions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetCompatibleKafkaVersionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of all the VPC connections in this Region.
*
*
* @param listClientVpcConnectionsRequest
* @return Result of the ListClientVpcConnections operation returned by the service.
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.ListClientVpcConnections
* @see AWS
* API Documentation
*/
@Override
public ListClientVpcConnectionsResult listClientVpcConnections(ListClientVpcConnectionsRequest request) {
request = beforeClientExecution(request);
return executeListClientVpcConnections(request);
}
@SdkInternalApi
final ListClientVpcConnectionsResult executeListClientVpcConnections(ListClientVpcConnectionsRequest listClientVpcConnectionsRequest) {
ExecutionContext executionContext = createExecutionContext(listClientVpcConnectionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListClientVpcConnectionsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listClientVpcConnectionsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListClientVpcConnections");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListClientVpcConnectionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of all the operations that have been performed on the specified MSK cluster.
*
*
* @param listClusterOperationsRequest
* @return Result of the ListClusterOperations operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.ListClusterOperations
* @see AWS
* API Documentation
*/
@Override
public ListClusterOperationsResult listClusterOperations(ListClusterOperationsRequest request) {
request = beforeClientExecution(request);
return executeListClusterOperations(request);
}
@SdkInternalApi
final ListClusterOperationsResult executeListClusterOperations(ListClusterOperationsRequest listClusterOperationsRequest) {
ExecutionContext executionContext = createExecutionContext(listClusterOperationsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListClusterOperationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listClusterOperationsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListClusterOperations");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListClusterOperationsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of all the operations that have been performed on the specified MSK cluster.
*
*
* @param listClusterOperationsV2Request
* @return Result of the ListClusterOperationsV2 operation returned by the service.
* @throws BadRequestException
*
* HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
*
* @throws UnauthorizedException
*
* HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
*
* @throws NotFoundException
*
* HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
*
* @throws ServiceUnavailableException
*
* HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
*
* @throws TooManyRequestsException
*
* HTTP Status Code 429: Limit exceeded. Resource limit reached.
*
* @sample AWSKafka.ListClusterOperationsV2
* @see AWS
* API Documentation
*/
@Override
public ListClusterOperationsV2Result listClusterOperationsV2(ListClusterOperationsV2Request request) {
request = beforeClientExecution(request);
return executeListClusterOperationsV2(request);
}
@SdkInternalApi
final ListClusterOperationsV2Result executeListClusterOperationsV2(ListClusterOperationsV2Request listClusterOperationsV2Request) {
ExecutionContext executionContext = createExecutionContext(listClusterOperationsV2Request);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListClusterOperationsV2RequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listClusterOperationsV2Request));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListClusterOperationsV2");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListClusterOperationsV2ResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of all the MSK clusters in the current Region.
*
*
* @param listClustersRequest
* @return Result of the ListClusters operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.ListClusters
* @see AWS API
* Documentation
*/
@Override
public ListClustersResult listClusters(ListClustersRequest request) {
request = beforeClientExecution(request);
return executeListClusters(request);
}
@SdkInternalApi
final ListClustersResult executeListClusters(ListClustersRequest listClustersRequest) {
ExecutionContext executionContext = createExecutionContext(listClustersRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListClustersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listClustersRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListClusters");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListClustersResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of all the MSK clusters in the current Region.
*
*
* @param listClustersV2Request
* @return Result of the ListClustersV2 operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.ListClustersV2
* @see AWS API
* Documentation
*/
@Override
public ListClustersV2Result listClustersV2(ListClustersV2Request request) {
request = beforeClientExecution(request);
return executeListClustersV2(request);
}
@SdkInternalApi
final ListClustersV2Result executeListClustersV2(ListClustersV2Request listClustersV2Request) {
ExecutionContext executionContext = createExecutionContext(listClustersV2Request);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListClustersV2RequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listClustersV2Request));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListClustersV2");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListClustersV2ResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of all the MSK configurations in this Region.
*
*
* @param listConfigurationRevisionsRequest
* @return Result of the ListConfigurationRevisions operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @sample AWSKafka.ListConfigurationRevisions
* @see AWS API Documentation
*/
@Override
public ListConfigurationRevisionsResult listConfigurationRevisions(ListConfigurationRevisionsRequest request) {
request = beforeClientExecution(request);
return executeListConfigurationRevisions(request);
}
@SdkInternalApi
final ListConfigurationRevisionsResult executeListConfigurationRevisions(ListConfigurationRevisionsRequest listConfigurationRevisionsRequest) {
ExecutionContext executionContext = createExecutionContext(listConfigurationRevisionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListConfigurationRevisionsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listConfigurationRevisionsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConfigurationRevisions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListConfigurationRevisionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of all the MSK configurations in this Region.
*
*
* @param listConfigurationsRequest
* @return Result of the ListConfigurations operation returned by the service.
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.ListConfigurations
* @see AWS API
* Documentation
*/
@Override
public ListConfigurationsResult listConfigurations(ListConfigurationsRequest request) {
request = beforeClientExecution(request);
return executeListConfigurations(request);
}
@SdkInternalApi
final ListConfigurationsResult executeListConfigurations(ListConfigurationsRequest listConfigurationsRequest) {
ExecutionContext executionContext = createExecutionContext(listConfigurationsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConfigurationsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConfigurations");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListConfigurationsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of Apache Kafka versions.
*
*
* @param listKafkaVersionsRequest
* @return Result of the ListKafkaVersions operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.ListKafkaVersions
* @see AWS API
* Documentation
*/
@Override
public ListKafkaVersionsResult listKafkaVersions(ListKafkaVersionsRequest request) {
request = beforeClientExecution(request);
return executeListKafkaVersions(request);
}
@SdkInternalApi
final ListKafkaVersionsResult executeListKafkaVersions(ListKafkaVersionsRequest listKafkaVersionsRequest) {
ExecutionContext executionContext = createExecutionContext(listKafkaVersionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListKafkaVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listKafkaVersionsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListKafkaVersions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListKafkaVersionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of the broker nodes in the cluster.
*
*
* @param listNodesRequest
* @return Result of the ListNodes operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.ListNodes
* @see AWS API
* Documentation
*/
@Override
public ListNodesResult listNodes(ListNodesRequest request) {
request = beforeClientExecution(request);
return executeListNodes(request);
}
@SdkInternalApi
final ListNodesResult executeListNodes(ListNodesRequest listNodesRequest) {
ExecutionContext executionContext = createExecutionContext(listNodesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListNodesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listNodesRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListNodes");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListNodesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the replicators.
*
*
* @param listReplicatorsRequest
* @return Result of the ListReplicators operation returned by the service.
* @throws BadRequestException
* HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
* @throws UnauthorizedException
* HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
* @throws InternalServerErrorException
* HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
* @throws ForbiddenException
* HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
* @throws NotFoundException
* HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
* @throws ServiceUnavailableException
* HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
* @throws TooManyRequestsException
* HTTP Status Code 429: Limit exceeded. Resource limit reached.
* @sample AWSKafka.ListReplicators
* @see AWS API
* Documentation
*/
@Override
public ListReplicatorsResult listReplicators(ListReplicatorsRequest request) {
request = beforeClientExecution(request);
return executeListReplicators(request);
}
@SdkInternalApi
final ListReplicatorsResult executeListReplicators(ListReplicatorsRequest listReplicatorsRequest) {
ExecutionContext executionContext = createExecutionContext(listReplicatorsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListReplicatorsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listReplicatorsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListReplicators");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListReplicatorsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of the Scram Secrets associated with an Amazon MSK cluster.
*
*
* @param listScramSecretsRequest
* @return Result of the ListScramSecrets operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @sample AWSKafka.ListScramSecrets
* @see AWS API
* Documentation
*/
@Override
public ListScramSecretsResult listScramSecrets(ListScramSecretsRequest request) {
request = beforeClientExecution(request);
return executeListScramSecrets(request);
}
@SdkInternalApi
final ListScramSecretsResult executeListScramSecrets(ListScramSecretsRequest listScramSecretsRequest) {
ExecutionContext executionContext = createExecutionContext(listScramSecretsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListScramSecretsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listScramSecretsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListScramSecrets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListScramSecretsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of the tags associated with the specified resource.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @sample AWSKafka.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, "Kafka");
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);
}
}
/**
*
* Returns a list of all the VPC connections in this Region.
*
*
* @param listVpcConnectionsRequest
* @return Result of the ListVpcConnections operation returned by the service.
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.ListVpcConnections
* @see AWS API
* Documentation
*/
@Override
public ListVpcConnectionsResult listVpcConnections(ListVpcConnectionsRequest request) {
request = beforeClientExecution(request);
return executeListVpcConnections(request);
}
@SdkInternalApi
final ListVpcConnectionsResult executeListVpcConnections(ListVpcConnectionsRequest listVpcConnectionsRequest) {
ExecutionContext executionContext = createExecutionContext(listVpcConnectionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListVpcConnectionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listVpcConnectionsRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListVpcConnections");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListVpcConnectionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates or updates the MSK cluster policy specified by the cluster Amazon Resource Name (ARN) in the request.
*
*
* @param putClusterPolicyRequest
* @return Result of the PutClusterPolicy operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.PutClusterPolicy
* @see AWS API
* Documentation
*/
@Override
public PutClusterPolicyResult putClusterPolicy(PutClusterPolicyRequest request) {
request = beforeClientExecution(request);
return executePutClusterPolicy(request);
}
@SdkInternalApi
final PutClusterPolicyResult executePutClusterPolicy(PutClusterPolicyRequest putClusterPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(putClusterPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutClusterPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putClusterPolicyRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutClusterPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutClusterPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Reboots brokers.
*
* @param rebootBrokerRequest
* Reboots a node.
* @return Result of the RebootBroker operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @sample AWSKafka.RebootBroker
* @see AWS API
* Documentation
*/
@Override
public RebootBrokerResult rebootBroker(RebootBrokerRequest request) {
request = beforeClientExecution(request);
return executeRebootBroker(request);
}
@SdkInternalApi
final RebootBrokerResult executeRebootBroker(RebootBrokerRequest rebootBrokerRequest) {
ExecutionContext executionContext = createExecutionContext(rebootBrokerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new RebootBrokerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(rebootBrokerRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RebootBroker");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RebootBrokerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns empty response.
*
*
* @param rejectClientVpcConnectionRequest
* @return Result of the RejectClientVpcConnection operation returned by the service.
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.RejectClientVpcConnection
* @see AWS API Documentation
*/
@Override
public RejectClientVpcConnectionResult rejectClientVpcConnection(RejectClientVpcConnectionRequest request) {
request = beforeClientExecution(request);
return executeRejectClientVpcConnection(request);
}
@SdkInternalApi
final RejectClientVpcConnectionResult executeRejectClientVpcConnection(RejectClientVpcConnectionRequest rejectClientVpcConnectionRequest) {
ExecutionContext executionContext = createExecutionContext(rejectClientVpcConnectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new RejectClientVpcConnectionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(rejectClientVpcConnectionRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RejectClientVpcConnection");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new RejectClientVpcConnectionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds tags to the specified MSK resource.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @sample AWSKafka.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, "Kafka");
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 the tags associated with the keys that are provided in the query.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @sample AWSKafka.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, "Kafka");
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 the number of broker nodes in the cluster.
*
*
* @param updateBrokerCountRequest
* @return Result of the UpdateBrokerCount operation returned by the service.
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.UpdateBrokerCount
* @see AWS API
* Documentation
*/
@Override
public UpdateBrokerCountResult updateBrokerCount(UpdateBrokerCountRequest request) {
request = beforeClientExecution(request);
return executeUpdateBrokerCount(request);
}
@SdkInternalApi
final UpdateBrokerCountResult executeUpdateBrokerCount(UpdateBrokerCountRequest updateBrokerCountRequest) {
ExecutionContext executionContext = createExecutionContext(updateBrokerCountRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateBrokerCountRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBrokerCountRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBrokerCount");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBrokerCountResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the EBS storage associated with MSK brokers.
*
*
* @param updateBrokerStorageRequest
* @return Result of the UpdateBrokerStorage operation returned by the service.
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.UpdateBrokerStorage
* @see AWS API
* Documentation
*/
@Override
public UpdateBrokerStorageResult updateBrokerStorage(UpdateBrokerStorageRequest request) {
request = beforeClientExecution(request);
return executeUpdateBrokerStorage(request);
}
@SdkInternalApi
final UpdateBrokerStorageResult executeUpdateBrokerStorage(UpdateBrokerStorageRequest updateBrokerStorageRequest) {
ExecutionContext executionContext = createExecutionContext(updateBrokerStorageRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateBrokerStorageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBrokerStorageRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBrokerStorage");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBrokerStorageResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates EC2 instance type.
*
*
* @param updateBrokerTypeRequest
* @return Result of the UpdateBrokerType operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @sample AWSKafka.UpdateBrokerType
* @see AWS API
* Documentation
*/
@Override
public UpdateBrokerTypeResult updateBrokerType(UpdateBrokerTypeRequest request) {
request = beforeClientExecution(request);
return executeUpdateBrokerType(request);
}
@SdkInternalApi
final UpdateBrokerTypeResult executeUpdateBrokerType(UpdateBrokerTypeRequest updateBrokerTypeRequest) {
ExecutionContext executionContext = createExecutionContext(updateBrokerTypeRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateBrokerTypeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBrokerTypeRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBrokerType");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBrokerTypeResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the cluster with the configuration that is specified in the request body.
*
*
* @param updateClusterConfigurationRequest
* @return Result of the UpdateClusterConfiguration operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @sample AWSKafka.UpdateClusterConfiguration
* @see AWS API Documentation
*/
@Override
public UpdateClusterConfigurationResult updateClusterConfiguration(UpdateClusterConfigurationRequest request) {
request = beforeClientExecution(request);
return executeUpdateClusterConfiguration(request);
}
@SdkInternalApi
final UpdateClusterConfigurationResult executeUpdateClusterConfiguration(UpdateClusterConfigurationRequest updateClusterConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(updateClusterConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateClusterConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateClusterConfigurationRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateClusterConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateClusterConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the Apache Kafka version for the cluster.
*
*
* @param updateClusterKafkaVersionRequest
* @return Result of the UpdateClusterKafkaVersion operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws TooManyRequestsException
*
* 429 response
*
* @sample AWSKafka.UpdateClusterKafkaVersion
* @see AWS API Documentation
*/
@Override
public UpdateClusterKafkaVersionResult updateClusterKafkaVersion(UpdateClusterKafkaVersionRequest request) {
request = beforeClientExecution(request);
return executeUpdateClusterKafkaVersion(request);
}
@SdkInternalApi
final UpdateClusterKafkaVersionResult executeUpdateClusterKafkaVersion(UpdateClusterKafkaVersionRequest updateClusterKafkaVersionRequest) {
ExecutionContext executionContext = createExecutionContext(updateClusterKafkaVersionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateClusterKafkaVersionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateClusterKafkaVersionRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateClusterKafkaVersion");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateClusterKafkaVersionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an MSK configuration.
*
*
* @param updateConfigurationRequest
* @return Result of the UpdateConfiguration operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @sample AWSKafka.UpdateConfiguration
* @see AWS API
* Documentation
*/
@Override
public UpdateConfigurationResult updateConfiguration(UpdateConfigurationRequest request) {
request = beforeClientExecution(request);
return executeUpdateConfiguration(request);
}
@SdkInternalApi
final UpdateConfigurationResult executeUpdateConfiguration(UpdateConfigurationRequest updateConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(updateConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateConfigurationRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the cluster's connectivity configuration.
*
*
* @param updateConnectivityRequest
* Request body for UpdateConnectivity.
* @return Result of the UpdateConnectivity operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* 503 response
*
* @sample AWSKafka.UpdateConnectivity
* @see AWS API
* Documentation
*/
@Override
public UpdateConnectivityResult updateConnectivity(UpdateConnectivityRequest request) {
request = beforeClientExecution(request);
return executeUpdateConnectivity(request);
}
@SdkInternalApi
final UpdateConnectivityResult executeUpdateConnectivity(UpdateConnectivityRequest updateConnectivityRequest) {
ExecutionContext executionContext = createExecutionContext(updateConnectivityRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateConnectivityRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateConnectivityRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConnectivity");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateConnectivityResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the monitoring settings for the cluster. You can use this operation to specify which Apache Kafka metrics
* you want Amazon MSK to send to Amazon CloudWatch. You can also specify settings for open monitoring with
* Prometheus.
*
*
* @param updateMonitoringRequest
* Request body for UpdateMonitoring.
* @return Result of the UpdateMonitoring operation returned by the service.
* @throws ServiceUnavailableException
*
* 503 response
*
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @sample AWSKafka.UpdateMonitoring
* @see AWS API
* Documentation
*/
@Override
public UpdateMonitoringResult updateMonitoring(UpdateMonitoringRequest request) {
request = beforeClientExecution(request);
return executeUpdateMonitoring(request);
}
@SdkInternalApi
final UpdateMonitoringResult executeUpdateMonitoring(UpdateMonitoringRequest updateMonitoringRequest) {
ExecutionContext executionContext = createExecutionContext(updateMonitoringRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateMonitoringRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateMonitoringRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateMonitoring");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateMonitoringResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates replication info of a replicator.
*
*
* @param updateReplicationInfoRequest
* Update information relating to replication between a given source and target Kafka cluster.
* @return Result of the UpdateReplicationInfo operation returned by the service.
* @throws BadRequestException
* HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
* @throws UnauthorizedException
* HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
* @throws InternalServerErrorException
* HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
* @throws ForbiddenException
* HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
* @throws NotFoundException
* HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
* @throws ServiceUnavailableException
* HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
* @throws TooManyRequestsException
* HTTP Status Code 429: Limit exceeded. Resource limit reached.
* @sample AWSKafka.UpdateReplicationInfo
* @see AWS
* API Documentation
*/
@Override
public UpdateReplicationInfoResult updateReplicationInfo(UpdateReplicationInfoRequest request) {
request = beforeClientExecution(request);
return executeUpdateReplicationInfo(request);
}
@SdkInternalApi
final UpdateReplicationInfoResult executeUpdateReplicationInfo(UpdateReplicationInfoRequest updateReplicationInfoRequest) {
ExecutionContext executionContext = createExecutionContext(updateReplicationInfoRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateReplicationInfoRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateReplicationInfoRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateReplicationInfo");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateReplicationInfoResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the security settings for the cluster. You can use this operation to specify encryption and
* authentication on existing clusters.
*
*
* @param updateSecurityRequest
* @return Result of the UpdateSecurity operation returned by the service.
* @throws BadRequestException
*
* The request isn't valid because the input is incorrect. Correct your input and then submit it again.
*
* @throws UnauthorizedException
*
* The request is not authorized. The provided credentials couldn't be validated.
*
* @throws InternalServerErrorException
*
* There was an unexpected internal server error. Retrying your request might resolve the issue.
*
* @throws ForbiddenException
*
* Access forbidden. Check your credentials and then retry your request.
*
* @throws NotFoundException
*
* The resource could not be found due to incorrect input. Correct the input, then retry the request.
*
* @throws ServiceUnavailableException
*
* The service cannot complete the request.
*
* @throws TooManyRequestsException
*
* The request throughput limit was exceeded.
*
* @sample AWSKafka.UpdateSecurity
* @see AWS API
* Documentation
*/
@Override
public UpdateSecurityResult updateSecurity(UpdateSecurityRequest request) {
request = beforeClientExecution(request);
return executeUpdateSecurity(request);
}
@SdkInternalApi
final UpdateSecurityResult executeUpdateSecurity(UpdateSecurityRequest updateSecurityRequest) {
ExecutionContext executionContext = createExecutionContext(updateSecurityRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateSecurityRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateSecurityRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateSecurity");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateSecurityResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Updates cluster broker volume size (or) sets cluster storage mode to TIERED.
*
* @param updateStorageRequest
*
* Request object for UpdateStorage api. Its used to update the storage attributes for the cluster.
*
* @return Result of the UpdateStorage operation returned by the service.
* @throws BadRequestException
* HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.
* @throws UnauthorizedException
* HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.
* @throws InternalServerErrorException
* HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.
* @throws ForbiddenException
* HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.
* @throws NotFoundException
* HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.
* @throws ServiceUnavailableException
* HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.
* @throws TooManyRequestsException
* HTTP Status Code 429: Limit exceeded. Resource limit reached.
* @sample AWSKafka.UpdateStorage
* @see AWS API
* Documentation
*/
@Override
public UpdateStorageResult updateStorage(UpdateStorageRequest request) {
request = beforeClientExecution(request);
return executeUpdateStorage(request);
}
@SdkInternalApi
final UpdateStorageResult executeUpdateStorage(UpdateStorageRequest updateStorageRequest) {
ExecutionContext executionContext = createExecutionContext(updateStorageRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateStorageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateStorageRequest));
// 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, "Kafka");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateStorage");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateStorageResultJsonUnmarshaller());
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();
}
}