com.amazonaws.services.appflow.AmazonAppflowClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-appflow Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.appflow;
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.appflow.AmazonAppflowClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.appflow.model.*;
import com.amazonaws.services.appflow.model.transform.*;
/**
* Client for accessing Amazon Appflow. All service calls made using this client are blocking, and will not return until
* the service call completes.
*
*
* Welcome to the Amazon AppFlow API reference. This guide is for developers who need detailed information about the
* Amazon AppFlow API operations, data types, and errors.
*
*
* Amazon AppFlow is a fully managed integration service that enables you to securely transfer data between software as
* a service (SaaS) applications like Salesforce, Marketo, Slack, and ServiceNow, and Amazon Web Services like Amazon S3
* and Amazon Redshift.
*
*
* Use the following links to get started on the Amazon AppFlow API:
*
*
* -
*
* Actions: An alphabetical list
* of all Amazon AppFlow API operations.
*
*
* -
*
* Data types: An alphabetical list of
* all Amazon AppFlow data types.
*
*
* -
*
* Common parameters:
* Parameters that all Query operations can use.
*
*
* -
*
* Common errors: Client and server
* errors that all operations can return.
*
*
*
*
* If you're new to Amazon AppFlow, we recommend that you review the Amazon AppFlow User Guide.
*
*
* Amazon AppFlow API users can use vendor-specific mechanisms for OAuth, and include applicable OAuth attributes (such
* as auth-code
and redirecturi
) with the connector-specific
* ConnectorProfileProperties
when creating a new connector profile using Amazon AppFlow API operations.
* For example, Salesforce users can refer to the Authorize Apps with OAuth
* documentation.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonAppflowClient extends AmazonWebServiceClient implements AmazonAppflow {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AmazonAppflow.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "appflow";
/** 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("ServiceQuotaExceededException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.InternalServerExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("UnsupportedOperationException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.UnsupportedOperationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.ValidationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConnectorAuthenticationException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.ConnectorAuthenticationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConnectorServerException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.ConnectorServerExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller(
com.amazonaws.services.appflow.model.transform.ConflictExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.appflow.model.AmazonAppflowException.class));
public static AmazonAppflowClientBuilder builder() {
return AmazonAppflowClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on Amazon Appflow 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.
*/
AmazonAppflowClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on Amazon Appflow 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.
*/
AmazonAppflowClient(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("appflow.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/appflow/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/appflow/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Cancels active runs for a flow.
*
*
* You can cancel all of the active runs for a flow, or you can cancel specific runs by providing their IDs.
*
*
* You can cancel a flow run only when the run is in progress. You can't cancel a run that has already completed or
* failed. You also can't cancel a run that's scheduled to occur but hasn't started yet. To prevent a scheduled run,
* you can deactivate the flow with the StopFlow
action.
*
*
* You cannot resume a run after you cancel it.
*
*
* When you send your request, the status for each run becomes CancelStarted
. When the cancellation
* completes, the status becomes Canceled
.
*
*
*
* When you cancel a run, you still incur charges for any data that the run already processed before the
* cancellation. If the run had already written some data to the flow destination, then that data remains in the
* destination. If you configured the flow to use a batch API (such as the Salesforce Bulk API 2.0), then the run
* will finish reading or writing its entire batch of data after the cancellation. For these operations, the data
* processing charges for Amazon AppFlow apply. For the pricing information, see Amazon AppFlow pricing.
*
*
*
* @param cancelFlowExecutionsRequest
* @return Result of the CancelFlowExecutions operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws AccessDeniedException
* AppFlow/Requester has invalid or missing permissions.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ThrottlingException
* API calls have exceeded the maximum allowed API request rate per account and per Region.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.CancelFlowExecutions
* @see AWS
* API Documentation
*/
@Override
public CancelFlowExecutionsResult cancelFlowExecutions(CancelFlowExecutionsRequest request) {
request = beforeClientExecution(request);
return executeCancelFlowExecutions(request);
}
@SdkInternalApi
final CancelFlowExecutionsResult executeCancelFlowExecutions(CancelFlowExecutionsRequest cancelFlowExecutionsRequest) {
ExecutionContext executionContext = createExecutionContext(cancelFlowExecutionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CancelFlowExecutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(cancelFlowExecutionsRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelFlowExecutions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CancelFlowExecutionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new connector profile associated with your Amazon Web Services account. There is a soft quota of 100
* connector profiles per Amazon Web Services account. If you need more connector profiles than this quota allows,
* you can submit a request to the Amazon AppFlow team through the Amazon AppFlow support channel. In each connector
* profile that you create, you can provide the credentials and properties for only one connector.
*
*
* @param createConnectorProfileRequest
* @return Result of the CreateConnectorProfile operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws ServiceQuotaExceededException
* The request would cause a service quota (such as the number of flows) to be exceeded.
* @throws ConnectorAuthenticationException
* An error occurred when authenticating with the connector endpoint.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.CreateConnectorProfile
* @see AWS
* API Documentation
*/
@Override
public CreateConnectorProfileResult createConnectorProfile(CreateConnectorProfileRequest request) {
request = beforeClientExecution(request);
return executeCreateConnectorProfile(request);
}
@SdkInternalApi
final CreateConnectorProfileResult executeCreateConnectorProfile(CreateConnectorProfileRequest createConnectorProfileRequest) {
ExecutionContext executionContext = createExecutionContext(createConnectorProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateConnectorProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createConnectorProfileRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateConnectorProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateConnectorProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Enables your application to create a new flow using Amazon AppFlow. You must create a connector profile before
* calling this API. Please note that the Request Syntax below shows syntax for multiple destinations, however, you
* can only transfer data to one item in this list at a time. Amazon AppFlow does not currently support flows to
* multiple destinations at once.
*
*
* @param createFlowRequest
* @return Result of the CreateFlow operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ServiceQuotaExceededException
* The request would cause a service quota (such as the number of flows) to be exceeded.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws ConnectorAuthenticationException
* An error occurred when authenticating with the connector endpoint.
* @throws ConnectorServerException
* An error occurred when retrieving data from the connector endpoint.
* @throws AccessDeniedException
* AppFlow/Requester has invalid or missing permissions.
* @sample AmazonAppflow.CreateFlow
* @see AWS API
* Documentation
*/
@Override
public CreateFlowResult createFlow(CreateFlowRequest request) {
request = beforeClientExecution(request);
return executeCreateFlow(request);
}
@SdkInternalApi
final CreateFlowResult executeCreateFlow(CreateFlowRequest createFlowRequest) {
ExecutionContext executionContext = createExecutionContext(createFlowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateFlowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createFlowRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateFlow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateFlowResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Enables you to delete an existing connector profile.
*
*
* @param deleteConnectorProfileRequest
* @return Result of the DeleteConnectorProfile operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.DeleteConnectorProfile
* @see AWS
* API Documentation
*/
@Override
public DeleteConnectorProfileResult deleteConnectorProfile(DeleteConnectorProfileRequest request) {
request = beforeClientExecution(request);
return executeDeleteConnectorProfile(request);
}
@SdkInternalApi
final DeleteConnectorProfileResult executeDeleteConnectorProfile(DeleteConnectorProfileRequest deleteConnectorProfileRequest) {
ExecutionContext executionContext = createExecutionContext(deleteConnectorProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteConnectorProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteConnectorProfileRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConnectorProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteConnectorProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Enables your application to delete an existing flow. Before deleting the flow, Amazon AppFlow validates the
* request by checking the flow configuration and status. You can delete flows one at a time.
*
*
* @param deleteFlowRequest
* @return Result of the DeleteFlow operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.DeleteFlow
* @see AWS API
* Documentation
*/
@Override
public DeleteFlowResult deleteFlow(DeleteFlowRequest request) {
request = beforeClientExecution(request);
return executeDeleteFlow(request);
}
@SdkInternalApi
final DeleteFlowResult executeDeleteFlow(DeleteFlowRequest deleteFlowRequest) {
ExecutionContext executionContext = createExecutionContext(deleteFlowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteFlowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteFlowRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteFlow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteFlowResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the given custom connector registered in your Amazon Web Services account. This API can be used for
* custom connectors that are registered in your account and also for Amazon authored connectors.
*
*
* @param describeConnectorRequest
* @return Result of the DescribeConnector operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @sample AmazonAppflow.DescribeConnector
* @see AWS API
* Documentation
*/
@Override
public DescribeConnectorResult describeConnector(DescribeConnectorRequest request) {
request = beforeClientExecution(request);
return executeDescribeConnector(request);
}
@SdkInternalApi
final DescribeConnectorResult executeDescribeConnector(DescribeConnectorRequest describeConnectorRequest) {
ExecutionContext executionContext = createExecutionContext(describeConnectorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeConnectorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeConnectorRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConnector");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeConnectorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details regarding the entity used with the connector, with a description of the data model for each
* field in that entity.
*
*
* @param describeConnectorEntityRequest
* @return Result of the DescribeConnectorEntity operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ConnectorAuthenticationException
* An error occurred when authenticating with the connector endpoint.
* @throws ConnectorServerException
* An error occurred when retrieving data from the connector endpoint.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.DescribeConnectorEntity
* @see AWS API Documentation
*/
@Override
public DescribeConnectorEntityResult describeConnectorEntity(DescribeConnectorEntityRequest request) {
request = beforeClientExecution(request);
return executeDescribeConnectorEntity(request);
}
@SdkInternalApi
final DescribeConnectorEntityResult executeDescribeConnectorEntity(DescribeConnectorEntityRequest describeConnectorEntityRequest) {
ExecutionContext executionContext = createExecutionContext(describeConnectorEntityRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeConnectorEntityRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeConnectorEntityRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConnectorEntity");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeConnectorEntityResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of connector-profile
details matching the provided connector-profile
* names and connector-types
. Both input lists are optional, and you can use them to filter the result.
*
*
* If no names or connector-types
are provided, returns all connector profiles in a paginated form. If
* there is no match, this operation returns an empty list.
*
*
* @param describeConnectorProfilesRequest
* @return Result of the DescribeConnectorProfiles operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.DescribeConnectorProfiles
* @see AWS API Documentation
*/
@Override
public DescribeConnectorProfilesResult describeConnectorProfiles(DescribeConnectorProfilesRequest request) {
request = beforeClientExecution(request);
return executeDescribeConnectorProfiles(request);
}
@SdkInternalApi
final DescribeConnectorProfilesResult executeDescribeConnectorProfiles(DescribeConnectorProfilesRequest describeConnectorProfilesRequest) {
ExecutionContext executionContext = createExecutionContext(describeConnectorProfilesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeConnectorProfilesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeConnectorProfilesRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConnectorProfiles");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeConnectorProfilesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the connectors vended by Amazon AppFlow for specified connector types. If you don't specify a connector
* type, this operation describes all connectors vended by Amazon AppFlow. If there are more connectors than can be
* returned in one page, the response contains a nextToken
object, which can be be passed in to the
* next call to the DescribeConnectors
API operation to retrieve the next page.
*
*
* @param describeConnectorsRequest
* @return Result of the DescribeConnectors operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.DescribeConnectors
* @see AWS API
* Documentation
*/
@Override
public DescribeConnectorsResult describeConnectors(DescribeConnectorsRequest request) {
request = beforeClientExecution(request);
return executeDescribeConnectors(request);
}
@SdkInternalApi
final DescribeConnectorsResult executeDescribeConnectors(DescribeConnectorsRequest describeConnectorsRequest) {
ExecutionContext executionContext = createExecutionContext(describeConnectorsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeConnectorsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeConnectorsRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConnectors");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeConnectorsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides a description of the specified flow.
*
*
* @param describeFlowRequest
* @return Result of the DescribeFlow operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.DescribeFlow
* @see AWS API
* Documentation
*/
@Override
public DescribeFlowResult describeFlow(DescribeFlowRequest request) {
request = beforeClientExecution(request);
return executeDescribeFlow(request);
}
@SdkInternalApi
final DescribeFlowResult executeDescribeFlow(DescribeFlowRequest describeFlowRequest) {
ExecutionContext executionContext = createExecutionContext(describeFlowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeFlowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeFlowRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeFlow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeFlowResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Fetches the execution history of the flow.
*
*
* @param describeFlowExecutionRecordsRequest
* @return Result of the DescribeFlowExecutionRecords operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.DescribeFlowExecutionRecords
* @see AWS API Documentation
*/
@Override
public DescribeFlowExecutionRecordsResult describeFlowExecutionRecords(DescribeFlowExecutionRecordsRequest request) {
request = beforeClientExecution(request);
return executeDescribeFlowExecutionRecords(request);
}
@SdkInternalApi
final DescribeFlowExecutionRecordsResult executeDescribeFlowExecutionRecords(DescribeFlowExecutionRecordsRequest describeFlowExecutionRecordsRequest) {
ExecutionContext executionContext = createExecutionContext(describeFlowExecutionRecordsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeFlowExecutionRecordsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeFlowExecutionRecordsRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeFlowExecutionRecords");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeFlowExecutionRecordsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the list of available connector entities supported by Amazon AppFlow. For example, you can query
* Salesforce for Account and Opportunity entities, or query ServiceNow for the Incident
* entity.
*
*
* @param listConnectorEntitiesRequest
* @return Result of the ListConnectorEntities operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ConnectorAuthenticationException
* An error occurred when authenticating with the connector endpoint.
* @throws ConnectorServerException
* An error occurred when retrieving data from the connector endpoint.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.ListConnectorEntities
* @see AWS
* API Documentation
*/
@Override
public ListConnectorEntitiesResult listConnectorEntities(ListConnectorEntitiesRequest request) {
request = beforeClientExecution(request);
return executeListConnectorEntities(request);
}
@SdkInternalApi
final ListConnectorEntitiesResult executeListConnectorEntities(ListConnectorEntitiesRequest listConnectorEntitiesRequest) {
ExecutionContext executionContext = createExecutionContext(listConnectorEntitiesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListConnectorEntitiesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConnectorEntitiesRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConnectorEntities");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListConnectorEntitiesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the list of all registered custom connectors in your Amazon Web Services account. This API lists only
* custom connectors registered in this account, not the Amazon Web Services authored connectors.
*
*
* @param listConnectorsRequest
* @return Result of the ListConnectors operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.ListConnectors
* @see AWS API
* Documentation
*/
@Override
public ListConnectorsResult listConnectors(ListConnectorsRequest request) {
request = beforeClientExecution(request);
return executeListConnectors(request);
}
@SdkInternalApi
final ListConnectorsResult executeListConnectors(ListConnectorsRequest listConnectorsRequest) {
ExecutionContext executionContext = createExecutionContext(listConnectorsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListConnectorsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConnectorsRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConnectors");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListConnectorsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all of the flows associated with your account.
*
*
* @param listFlowsRequest
* @return Result of the ListFlows operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.ListFlows
* @see AWS API
* Documentation
*/
@Override
public ListFlowsResult listFlows(ListFlowsRequest request) {
request = beforeClientExecution(request);
return executeListFlows(request);
}
@SdkInternalApi
final ListFlowsResult executeListFlows(ListFlowsRequest listFlowsRequest) {
ExecutionContext executionContext = createExecutionContext(listFlowsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListFlowsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listFlowsRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFlows");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFlowsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves the tags that are associated with a specified flow.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @sample AmazonAppflow.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, "Appflow");
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);
}
}
/**
*
* Registers a new custom connector with your Amazon Web Services account. Before you can register the connector,
* you must deploy the associated AWS lambda function in your account.
*
*
* @param registerConnectorRequest
* @return Result of the RegisterConnector operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws AccessDeniedException
* AppFlow/Requester has invalid or missing permissions.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ServiceQuotaExceededException
* The request would cause a service quota (such as the number of flows) to be exceeded.
* @throws ThrottlingException
* API calls have exceeded the maximum allowed API request rate per account and per Region.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws ConnectorServerException
* An error occurred when retrieving data from the connector endpoint.
* @throws ConnectorAuthenticationException
* An error occurred when authenticating with the connector endpoint.
* @sample AmazonAppflow.RegisterConnector
* @see AWS API
* Documentation
*/
@Override
public RegisterConnectorResult registerConnector(RegisterConnectorRequest request) {
request = beforeClientExecution(request);
return executeRegisterConnector(request);
}
@SdkInternalApi
final RegisterConnectorResult executeRegisterConnector(RegisterConnectorRequest registerConnectorRequest) {
ExecutionContext executionContext = createExecutionContext(registerConnectorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new RegisterConnectorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(registerConnectorRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RegisterConnector");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RegisterConnectorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Resets metadata about your connector entities that Amazon AppFlow stored in its cache. Use this action when you
* want Amazon AppFlow to return the latest information about the data that you have in a source application.
*
*
* Amazon AppFlow returns metadata about your entities when you use the ListConnectorEntities or
* DescribeConnectorEntities actions. Following these actions, Amazon AppFlow caches the metadata to reduce the
* number of API requests that it must send to the source application. Amazon AppFlow automatically resets the cache
* once every hour, but you can use this action when you want to get the latest metadata right away.
*
*
* @param resetConnectorMetadataCacheRequest
* @return Result of the ResetConnectorMetadataCache operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.ResetConnectorMetadataCache
* @see AWS API Documentation
*/
@Override
public ResetConnectorMetadataCacheResult resetConnectorMetadataCache(ResetConnectorMetadataCacheRequest request) {
request = beforeClientExecution(request);
return executeResetConnectorMetadataCache(request);
}
@SdkInternalApi
final ResetConnectorMetadataCacheResult executeResetConnectorMetadataCache(ResetConnectorMetadataCacheRequest resetConnectorMetadataCacheRequest) {
ExecutionContext executionContext = createExecutionContext(resetConnectorMetadataCacheRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ResetConnectorMetadataCacheRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(resetConnectorMetadataCacheRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ResetConnectorMetadataCache");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ResetConnectorMetadataCacheResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Activates an existing flow. For on-demand flows, this operation runs the flow immediately. For schedule and
* event-triggered flows, this operation activates the flow.
*
*
* @param startFlowRequest
* @return Result of the StartFlow operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws ServiceQuotaExceededException
* The request would cause a service quota (such as the number of flows) to be exceeded.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @sample AmazonAppflow.StartFlow
* @see AWS API
* Documentation
*/
@Override
public StartFlowResult startFlow(StartFlowRequest request) {
request = beforeClientExecution(request);
return executeStartFlow(request);
}
@SdkInternalApi
final StartFlowResult executeStartFlow(StartFlowRequest startFlowRequest) {
ExecutionContext executionContext = createExecutionContext(startFlowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartFlowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startFlowRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartFlow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartFlowResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deactivates the existing flow. For on-demand flows, this operation returns an
* unsupportedOperationException
error message. For schedule and event-triggered flows, this operation
* deactivates the flow.
*
*
* @param stopFlowRequest
* @return Result of the StopFlow operation returned by the service.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws UnsupportedOperationException
* The requested operation is not supported for the current flow.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.StopFlow
* @see AWS API
* Documentation
*/
@Override
public StopFlowResult stopFlow(StopFlowRequest request) {
request = beforeClientExecution(request);
return executeStopFlow(request);
}
@SdkInternalApi
final StopFlowResult executeStopFlow(StopFlowRequest stopFlowRequest) {
ExecutionContext executionContext = createExecutionContext(stopFlowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StopFlowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopFlowRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopFlow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopFlowResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Applies a tag to the specified flow.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @sample AmazonAppflow.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, "Appflow");
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);
}
}
/**
*
* Unregisters the custom connector registered in your account that matches the connector label provided in the
* request.
*
*
* @param unregisterConnectorRequest
* @return Result of the UnregisterConnector operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.UnregisterConnector
* @see AWS
* API Documentation
*/
@Override
public UnregisterConnectorResult unregisterConnector(UnregisterConnectorRequest request) {
request = beforeClientExecution(request);
return executeUnregisterConnector(request);
}
@SdkInternalApi
final UnregisterConnectorResult executeUnregisterConnector(UnregisterConnectorRequest unregisterConnectorRequest) {
ExecutionContext executionContext = createExecutionContext(unregisterConnectorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UnregisterConnectorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(unregisterConnectorRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UnregisterConnector");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UnregisterConnectorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes a tag from the specified flow.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @sample AmazonAppflow.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, "Appflow");
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 a given connector profile associated with your account.
*
*
* @param updateConnectorProfileRequest
* @return Result of the UpdateConnectorProfile operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws ConnectorAuthenticationException
* An error occurred when authenticating with the connector endpoint.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @sample AmazonAppflow.UpdateConnectorProfile
* @see AWS
* API Documentation
*/
@Override
public UpdateConnectorProfileResult updateConnectorProfile(UpdateConnectorProfileRequest request) {
request = beforeClientExecution(request);
return executeUpdateConnectorProfile(request);
}
@SdkInternalApi
final UpdateConnectorProfileResult executeUpdateConnectorProfile(UpdateConnectorProfileRequest updateConnectorProfileRequest) {
ExecutionContext executionContext = createExecutionContext(updateConnectorProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateConnectorProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateConnectorProfileRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConnectorProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateConnectorProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates a custom connector that you've previously registered. This operation updates the connector with one of
* the following:
*
*
* -
*
* The latest version of the AWS Lambda function that's assigned to the connector
*
*
* -
*
* A new AWS Lambda function that you specify
*
*
*
*
* @param updateConnectorRegistrationRequest
* @return Result of the UpdateConnectorRegistration operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws AccessDeniedException
* AppFlow/Requester has invalid or missing permissions.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ServiceQuotaExceededException
* The request would cause a service quota (such as the number of flows) to be exceeded.
* @throws ThrottlingException
* API calls have exceeded the maximum allowed API request rate per account and per Region.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws ConnectorServerException
* An error occurred when retrieving data from the connector endpoint.
* @throws ConnectorAuthenticationException
* An error occurred when authenticating with the connector endpoint.
* @sample AmazonAppflow.UpdateConnectorRegistration
* @see AWS API Documentation
*/
@Override
public UpdateConnectorRegistrationResult updateConnectorRegistration(UpdateConnectorRegistrationRequest request) {
request = beforeClientExecution(request);
return executeUpdateConnectorRegistration(request);
}
@SdkInternalApi
final UpdateConnectorRegistrationResult executeUpdateConnectorRegistration(UpdateConnectorRegistrationRequest updateConnectorRegistrationRequest) {
ExecutionContext executionContext = createExecutionContext(updateConnectorRegistrationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateConnectorRegistrationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateConnectorRegistrationRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConnectorRegistration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateConnectorRegistrationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an existing flow.
*
*
* @param updateFlowRequest
* @return Result of the UpdateFlow operation returned by the service.
* @throws ValidationException
* The request has invalid or missing parameters.
* @throws ResourceNotFoundException
* The resource specified in the request (such as the source or destination connector profile) is not found.
* @throws ServiceQuotaExceededException
* The request would cause a service quota (such as the number of flows) to be exceeded.
* @throws ConflictException
* There was a conflict when processing the request (for example, a flow with the given name already exists
* within the account. Check for conflicting resource names and try again.
* @throws ConnectorAuthenticationException
* An error occurred when authenticating with the connector endpoint.
* @throws ConnectorServerException
* An error occurred when retrieving data from the connector endpoint.
* @throws InternalServerException
* An internal service error occurred during the processing of your request. Try again later.
* @throws AccessDeniedException
* AppFlow/Requester has invalid or missing permissions.
* @sample AmazonAppflow.UpdateFlow
* @see AWS API
* Documentation
*/
@Override
public UpdateFlowResult updateFlow(UpdateFlowRequest request) {
request = beforeClientExecution(request);
return executeUpdateFlow(request);
}
@SdkInternalApi
final UpdateFlowResult executeUpdateFlow(UpdateFlowRequest updateFlowRequest) {
ExecutionContext executionContext = createExecutionContext(updateFlowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateFlowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateFlowRequest));
// 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, "Appflow");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateFlow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateFlowResultJsonUnmarshaller());
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();
}
}