com.amazonaws.services.datasync.AWSDataSyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-datasync 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.datasync;
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.datasync.AWSDataSyncClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.datasync.model.*;
import com.amazonaws.services.datasync.model.transform.*;
/**
* Client for accessing DataSync. All service calls made using this client are blocking, and will not return until the
* service call completes.
*
* DataSync
*
* DataSync is an online data movement and discovery service that simplifies data migration and helps you quickly,
* easily, and securely transfer your file or object data to, from, and between Amazon Web Services storage services.
*
*
* This API interface reference includes documentation for using DataSync programmatically. For complete information,
* see the DataSync User
* Guide .
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSDataSyncClient extends AmazonWebServiceClient implements AWSDataSync {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSDataSync.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "datasync";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidRequestException").withExceptionUnmarshaller(
com.amazonaws.services.datasync.model.transform.InvalidRequestExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalException").withExceptionUnmarshaller(
com.amazonaws.services.datasync.model.transform.InternalExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.datasync.model.AWSDataSyncException.class));
public static AWSDataSyncClientBuilder builder() {
return AWSDataSyncClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on DataSync 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.
*/
AWSDataSyncClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on DataSync 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.
*/
AWSDataSyncClient(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("datasync.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/datasync/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/datasync/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Creates an Amazon Web Services resource for an on-premises storage system that you want DataSync Discovery to
* collect information about.
*
*
* @param addStorageSystemRequest
* @return Result of the AddStorageSystem operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.AddStorageSystem
* @see AWS API
* Documentation
*/
@Override
public AddStorageSystemResult addStorageSystem(AddStorageSystemRequest request) {
request = beforeClientExecution(request);
return executeAddStorageSystem(request);
}
@SdkInternalApi
final AddStorageSystemResult executeAddStorageSystem(AddStorageSystemRequest addStorageSystemRequest) {
ExecutionContext executionContext = createExecutionContext(addStorageSystemRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddStorageSystemRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addStorageSystemRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddStorageSystem");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddStorageSystemResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Stops an DataSync task execution that's in progress. The transfer of some files are abruptly interrupted. File
* contents that're transferred to the destination might be incomplete or inconsistent with the source files.
*
*
* However, if you start a new task execution using the same task and allow it to finish, file content on the
* destination will be complete and consistent. This applies to other unexpected failures that interrupt a task
* execution. In all of these cases, DataSync successfully completes the transfer when you start the next task
* execution.
*
*
* @param cancelTaskExecutionRequest
* CancelTaskExecutionRequest
* @return Result of the CancelTaskExecution operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CancelTaskExecution
* @see AWS
* API Documentation
*/
@Override
public CancelTaskExecutionResult cancelTaskExecution(CancelTaskExecutionRequest request) {
request = beforeClientExecution(request);
return executeCancelTaskExecution(request);
}
@SdkInternalApi
final CancelTaskExecutionResult executeCancelTaskExecution(CancelTaskExecutionRequest cancelTaskExecutionRequest) {
ExecutionContext executionContext = createExecutionContext(cancelTaskExecutionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CancelTaskExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(cancelTaskExecutionRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelTaskExecution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CancelTaskExecutionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Activates an DataSync agent that you've deployed in your storage environment. The activation process associates
* the agent with your Amazon Web Services account.
*
*
* If you haven't deployed an agent yet, see the following topics to learn more:
*
*
* -
*
*
* -
*
* Create an agent
*
*
*
*
*
* If you're transferring between Amazon Web Services storage services, you don't need a DataSync agent.
*
*
*
* @param createAgentRequest
* CreateAgentRequest
* @return Result of the CreateAgent operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateAgent
* @see AWS API
* Documentation
*/
@Override
public CreateAgentResult createAgent(CreateAgentRequest request) {
request = beforeClientExecution(request);
return executeCreateAgent(request);
}
@SdkInternalApi
final CreateAgentResult executeCreateAgent(CreateAgentRequest createAgentRequest) {
ExecutionContext executionContext = createExecutionContext(createAgentRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAgentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAgentRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAgent");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAgentResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for a Microsoft Azure Blob Storage container. DataSync can use this location
* as a transfer source or destination.
*
*
* Before you begin, make sure you know how
* DataSync accesses Azure Blob Storage and works with access tiers and blob
* types. You also need a DataSync agent that can connect to your container.
*
*
* @param createLocationAzureBlobRequest
* @return Result of the CreateLocationAzureBlob operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationAzureBlob
* @see AWS API Documentation
*/
@Override
public CreateLocationAzureBlobResult createLocationAzureBlob(CreateLocationAzureBlobRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationAzureBlob(request);
}
@SdkInternalApi
final CreateLocationAzureBlobResult executeCreateLocationAzureBlob(CreateLocationAzureBlobRequest createLocationAzureBlobRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationAzureBlobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationAzureBlobRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createLocationAzureBlobRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationAzureBlob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateLocationAzureBlobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for an Amazon EFS file system. DataSync can use this location as a source or
* destination for transferring data.
*
*
* Before you begin, make sure that you understand how DataSync accesses Amazon EFS file systems.
*
*
* @param createLocationEfsRequest
* CreateLocationEfsRequest
* @return Result of the CreateLocationEfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationEfs
* @see AWS API
* Documentation
*/
@Override
public CreateLocationEfsResult createLocationEfs(CreateLocationEfsRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationEfs(request);
}
@SdkInternalApi
final CreateLocationEfsResult executeCreateLocationEfs(CreateLocationEfsRequest createLocationEfsRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationEfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationEfsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createLocationEfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationEfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateLocationEfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for an Amazon FSx for Lustre file system. DataSync can use this location as a
* source or destination for transferring data.
*
*
* Before you begin, make sure that you understand how DataSync accesses FSx for Lustre file systems.
*
*
* @param createLocationFsxLustreRequest
* @return Result of the CreateLocationFsxLustre operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationFsxLustre
* @see AWS API Documentation
*/
@Override
public CreateLocationFsxLustreResult createLocationFsxLustre(CreateLocationFsxLustreRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationFsxLustre(request);
}
@SdkInternalApi
final CreateLocationFsxLustreResult executeCreateLocationFsxLustre(CreateLocationFsxLustreRequest createLocationFsxLustreRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationFsxLustreRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationFsxLustreRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createLocationFsxLustreRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationFsxLustre");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateLocationFsxLustreResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for an Amazon FSx for NetApp ONTAP file system. DataSync can use this location
* as a source or destination for transferring data.
*
*
* Before you begin, make sure that you understand how DataSync accesses FSx for ONTAP file systems.
*
*
* @param createLocationFsxOntapRequest
* @return Result of the CreateLocationFsxOntap operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationFsxOntap
* @see AWS API Documentation
*/
@Override
public CreateLocationFsxOntapResult createLocationFsxOntap(CreateLocationFsxOntapRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationFsxOntap(request);
}
@SdkInternalApi
final CreateLocationFsxOntapResult executeCreateLocationFsxOntap(CreateLocationFsxOntapRequest createLocationFsxOntapRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationFsxOntapRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationFsxOntapRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createLocationFsxOntapRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationFsxOntap");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateLocationFsxOntapResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for an Amazon FSx for OpenZFS file system. DataSync can use this location as a
* source or destination for transferring data.
*
*
* Before you begin, make sure that you understand how DataSync accesses FSx for OpenZFS file systems.
*
*
*
* Request parameters related to SMB
aren't supported with the CreateLocationFsxOpenZfs
* operation.
*
*
*
* @param createLocationFsxOpenZfsRequest
* @return Result of the CreateLocationFsxOpenZfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationFsxOpenZfs
* @see AWS API Documentation
*/
@Override
public CreateLocationFsxOpenZfsResult createLocationFsxOpenZfs(CreateLocationFsxOpenZfsRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationFsxOpenZfs(request);
}
@SdkInternalApi
final CreateLocationFsxOpenZfsResult executeCreateLocationFsxOpenZfs(CreateLocationFsxOpenZfsRequest createLocationFsxOpenZfsRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationFsxOpenZfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationFsxOpenZfsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createLocationFsxOpenZfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationFsxOpenZfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateLocationFsxOpenZfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for an Amazon FSx for Windows File Server file system. DataSync can use this
* location as a source or destination for transferring data.
*
*
* Before you begin, make sure that you understand how DataSync accesses FSx for Windows File Server file systems.
*
*
* @param createLocationFsxWindowsRequest
* @return Result of the CreateLocationFsxWindows operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationFsxWindows
* @see AWS API Documentation
*/
@Override
public CreateLocationFsxWindowsResult createLocationFsxWindows(CreateLocationFsxWindowsRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationFsxWindows(request);
}
@SdkInternalApi
final CreateLocationFsxWindowsResult executeCreateLocationFsxWindows(CreateLocationFsxWindowsRequest createLocationFsxWindowsRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationFsxWindowsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationFsxWindowsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createLocationFsxWindowsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationFsxWindows");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateLocationFsxWindowsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for a Hadoop Distributed File System (HDFS). DataSync can use this location as
* a source or destination for transferring data.
*
*
* Before you begin, make sure that you understand how DataSync accesses
* HDFS clusters.
*
*
* @param createLocationHdfsRequest
* @return Result of the CreateLocationHdfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationHdfs
* @see AWS
* API Documentation
*/
@Override
public CreateLocationHdfsResult createLocationHdfs(CreateLocationHdfsRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationHdfs(request);
}
@SdkInternalApi
final CreateLocationHdfsResult executeCreateLocationHdfs(CreateLocationHdfsRequest createLocationHdfsRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationHdfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationHdfsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createLocationHdfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationHdfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateLocationHdfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for a Network File System (NFS) file server. DataSync can use this location as
* a source or destination for transferring data.
*
*
* Before you begin, make sure that you understand how DataSync accesses NFS
* file servers.
*
*
*
* If you're copying data to or from an Snowcone device, you can also use CreateLocationNfs
to create
* your transfer location. For more information, see Configuring transfers with
* Snowcone.
*
*
*
* @param createLocationNfsRequest
* CreateLocationNfsRequest
* @return Result of the CreateLocationNfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationNfs
* @see AWS API
* Documentation
*/
@Override
public CreateLocationNfsResult createLocationNfs(CreateLocationNfsRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationNfs(request);
}
@SdkInternalApi
final CreateLocationNfsResult executeCreateLocationNfs(CreateLocationNfsRequest createLocationNfsRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationNfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationNfsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createLocationNfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationNfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateLocationNfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for an object storage system. DataSync can use this location as a source or
* destination for transferring data.
*
*
* Before you begin, make sure that you understand the prerequisites for DataSync to work with object storage systems.
*
*
* @param createLocationObjectStorageRequest
* CreateLocationObjectStorageRequest
* @return Result of the CreateLocationObjectStorage operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationObjectStorage
* @see AWS API Documentation
*/
@Override
public CreateLocationObjectStorageResult createLocationObjectStorage(CreateLocationObjectStorageRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationObjectStorage(request);
}
@SdkInternalApi
final CreateLocationObjectStorageResult executeCreateLocationObjectStorage(CreateLocationObjectStorageRequest createLocationObjectStorageRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationObjectStorageRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationObjectStorageRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createLocationObjectStorageRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationObjectStorage");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateLocationObjectStorageResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for an Amazon S3 bucket. DataSync can use this location as a source or
* destination for transferring data.
*
*
*
* Before you begin, make sure that you read the following topics:
*
*
*
*
* For more information, see Configuring transfers with
* Amazon S3.
*
*
* @param createLocationS3Request
* CreateLocationS3Request
* @return Result of the CreateLocationS3 operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationS3
* @see AWS API
* Documentation
*/
@Override
public CreateLocationS3Result createLocationS3(CreateLocationS3Request request) {
request = beforeClientExecution(request);
return executeCreateLocationS3(request);
}
@SdkInternalApi
final CreateLocationS3Result executeCreateLocationS3(CreateLocationS3Request createLocationS3Request) {
ExecutionContext executionContext = createExecutionContext(createLocationS3Request);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationS3RequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createLocationS3Request));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationS3");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateLocationS3ResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a transfer location for a Server Message Block (SMB) file server. DataSync can use this location
* as a source or destination for transferring data.
*
*
* Before you begin, make sure that you understand how DataSync accesses
* SMB file servers.
*
*
* @param createLocationSmbRequest
* CreateLocationSmbRequest
* @return Result of the CreateLocationSmb operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateLocationSmb
* @see AWS API
* Documentation
*/
@Override
public CreateLocationSmbResult createLocationSmb(CreateLocationSmbRequest request) {
request = beforeClientExecution(request);
return executeCreateLocationSmb(request);
}
@SdkInternalApi
final CreateLocationSmbResult executeCreateLocationSmb(CreateLocationSmbRequest createLocationSmbRequest) {
ExecutionContext executionContext = createExecutionContext(createLocationSmbRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateLocationSmbRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createLocationSmbRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateLocationSmb");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateLocationSmbResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Configures a task, which defines where and how DataSync transfers your data.
*
*
* A task includes a source location, destination location, and transfer options (such as bandwidth limits,
* scheduling, and more).
*
*
*
* If you're planning to transfer data to or from an Amazon S3 location, review how DataSync can affect your S3 request charges and the DataSync pricing page before you begin.
*
*
*
* @param createTaskRequest
* CreateTaskRequest
* @return Result of the CreateTask operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.CreateTask
* @see AWS API
* Documentation
*/
@Override
public CreateTaskResult createTask(CreateTaskRequest request) {
request = beforeClientExecution(request);
return executeCreateTask(request);
}
@SdkInternalApi
final CreateTaskResult executeCreateTask(CreateTaskRequest createTaskRequest) {
ExecutionContext executionContext = createExecutionContext(createTaskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createTaskRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTask");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateTaskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes an DataSync agent resource from your Amazon Web Services account.
*
*
* Keep in mind that this operation (which can't be undone) doesn't remove the agent's virtual machine (VM) or
* Amazon EC2 instance from your storage environment. For next steps, you can delete the VM or instance from your
* storage environment or reuse it to activate a new agent.
*
*
* @param deleteAgentRequest
* DeleteAgentRequest
* @return Result of the DeleteAgent operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DeleteAgent
* @see AWS API
* Documentation
*/
@Override
public DeleteAgentResult deleteAgent(DeleteAgentRequest request) {
request = beforeClientExecution(request);
return executeDeleteAgent(request);
}
@SdkInternalApi
final DeleteAgentResult executeDeleteAgent(DeleteAgentRequest deleteAgentRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAgentRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAgentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAgentRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAgent");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAgentResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a transfer location resource from DataSync.
*
*
* @param deleteLocationRequest
* DeleteLocation
* @return Result of the DeleteLocation operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DeleteLocation
* @see AWS API
* Documentation
*/
@Override
public DeleteLocationResult deleteLocation(DeleteLocationRequest request) {
request = beforeClientExecution(request);
return executeDeleteLocation(request);
}
@SdkInternalApi
final DeleteLocationResult executeDeleteLocation(DeleteLocationRequest deleteLocationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteLocationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteLocationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteLocationRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteLocation");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteLocationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a transfer task resource from DataSync.
*
*
* @param deleteTaskRequest
* DeleteTask
* @return Result of the DeleteTask operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DeleteTask
* @see AWS API
* Documentation
*/
@Override
public DeleteTaskResult deleteTask(DeleteTaskRequest request) {
request = beforeClientExecution(request);
return executeDeleteTask(request);
}
@SdkInternalApi
final DeleteTaskResult executeDeleteTask(DeleteTaskRequest deleteTaskRequest) {
ExecutionContext executionContext = createExecutionContext(deleteTaskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteTaskRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTask");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteTaskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about an DataSync agent, such as its name, service endpoint type, and status.
*
*
* @param describeAgentRequest
* DescribeAgent
* @return Result of the DescribeAgent operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeAgent
* @see AWS API
* Documentation
*/
@Override
public DescribeAgentResult describeAgent(DescribeAgentRequest request) {
request = beforeClientExecution(request);
return executeDescribeAgent(request);
}
@SdkInternalApi
final DescribeAgentResult executeDescribeAgent(DescribeAgentRequest describeAgentRequest) {
ExecutionContext executionContext = createExecutionContext(describeAgentRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAgentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAgentRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAgent");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAgentResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about a DataSync discovery job.
*
*
* @param describeDiscoveryJobRequest
* @return Result of the DescribeDiscoveryJob operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeDiscoveryJob
* @see AWS
* API Documentation
*/
@Override
public DescribeDiscoveryJobResult describeDiscoveryJob(DescribeDiscoveryJobRequest request) {
request = beforeClientExecution(request);
return executeDescribeDiscoveryJob(request);
}
@SdkInternalApi
final DescribeDiscoveryJobResult executeDescribeDiscoveryJob(DescribeDiscoveryJobRequest describeDiscoveryJobRequest) {
ExecutionContext executionContext = createExecutionContext(describeDiscoveryJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeDiscoveryJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeDiscoveryJobRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDiscoveryJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeDiscoveryJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for Microsoft Azure Blob Storage is configured.
*
*
* @param describeLocationAzureBlobRequest
* @return Result of the DescribeLocationAzureBlob operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationAzureBlob
* @see AWS API Documentation
*/
@Override
public DescribeLocationAzureBlobResult describeLocationAzureBlob(DescribeLocationAzureBlobRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationAzureBlob(request);
}
@SdkInternalApi
final DescribeLocationAzureBlobResult executeDescribeLocationAzureBlob(DescribeLocationAzureBlobRequest describeLocationAzureBlobRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationAzureBlobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationAzureBlobRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeLocationAzureBlobRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationAzureBlob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeLocationAzureBlobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for an Amazon EFS file system is configured.
*
*
* @param describeLocationEfsRequest
* DescribeLocationEfsRequest
* @return Result of the DescribeLocationEfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationEfs
* @see AWS
* API Documentation
*/
@Override
public DescribeLocationEfsResult describeLocationEfs(DescribeLocationEfsRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationEfs(request);
}
@SdkInternalApi
final DescribeLocationEfsResult executeDescribeLocationEfs(DescribeLocationEfsRequest describeLocationEfsRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationEfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationEfsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeLocationEfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationEfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeLocationEfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for an Amazon FSx for Lustre file system is configured.
*
*
* @param describeLocationFsxLustreRequest
* @return Result of the DescribeLocationFsxLustre operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationFsxLustre
* @see AWS API Documentation
*/
@Override
public DescribeLocationFsxLustreResult describeLocationFsxLustre(DescribeLocationFsxLustreRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationFsxLustre(request);
}
@SdkInternalApi
final DescribeLocationFsxLustreResult executeDescribeLocationFsxLustre(DescribeLocationFsxLustreRequest describeLocationFsxLustreRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationFsxLustreRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationFsxLustreRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeLocationFsxLustreRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationFsxLustre");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeLocationFsxLustreResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for an Amazon FSx for NetApp ONTAP file system is
* configured.
*
*
*
* If your location uses SMB, the DescribeLocationFsxOntap
operation doesn't actually return a
* Password
.
*
*
*
* @param describeLocationFsxOntapRequest
* @return Result of the DescribeLocationFsxOntap operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationFsxOntap
* @see AWS API Documentation
*/
@Override
public DescribeLocationFsxOntapResult describeLocationFsxOntap(DescribeLocationFsxOntapRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationFsxOntap(request);
}
@SdkInternalApi
final DescribeLocationFsxOntapResult executeDescribeLocationFsxOntap(DescribeLocationFsxOntapRequest describeLocationFsxOntapRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationFsxOntapRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationFsxOntapRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeLocationFsxOntapRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationFsxOntap");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeLocationFsxOntapResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for an Amazon FSx for OpenZFS file system is configured.
*
*
*
* Response elements related to SMB
aren't supported with the DescribeLocationFsxOpenZfs
* operation.
*
*
*
* @param describeLocationFsxOpenZfsRequest
* @return Result of the DescribeLocationFsxOpenZfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationFsxOpenZfs
* @see AWS API Documentation
*/
@Override
public DescribeLocationFsxOpenZfsResult describeLocationFsxOpenZfs(DescribeLocationFsxOpenZfsRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationFsxOpenZfs(request);
}
@SdkInternalApi
final DescribeLocationFsxOpenZfsResult executeDescribeLocationFsxOpenZfs(DescribeLocationFsxOpenZfsRequest describeLocationFsxOpenZfsRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationFsxOpenZfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationFsxOpenZfsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeLocationFsxOpenZfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationFsxOpenZfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeLocationFsxOpenZfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for an Amazon FSx for Windows File Server file system is
* configured.
*
*
* @param describeLocationFsxWindowsRequest
* @return Result of the DescribeLocationFsxWindows operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationFsxWindows
* @see AWS API Documentation
*/
@Override
public DescribeLocationFsxWindowsResult describeLocationFsxWindows(DescribeLocationFsxWindowsRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationFsxWindows(request);
}
@SdkInternalApi
final DescribeLocationFsxWindowsResult executeDescribeLocationFsxWindows(DescribeLocationFsxWindowsRequest describeLocationFsxWindowsRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationFsxWindowsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationFsxWindowsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeLocationFsxWindowsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationFsxWindows");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeLocationFsxWindowsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for a Hadoop Distributed File System (HDFS) is
* configured.
*
*
* @param describeLocationHdfsRequest
* @return Result of the DescribeLocationHdfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationHdfs
* @see AWS
* API Documentation
*/
@Override
public DescribeLocationHdfsResult describeLocationHdfs(DescribeLocationHdfsRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationHdfs(request);
}
@SdkInternalApi
final DescribeLocationHdfsResult executeDescribeLocationHdfs(DescribeLocationHdfsRequest describeLocationHdfsRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationHdfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationHdfsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeLocationHdfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationHdfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeLocationHdfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for a Network File System (NFS) file server is
* configured.
*
*
* @param describeLocationNfsRequest
* DescribeLocationNfsRequest
* @return Result of the DescribeLocationNfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationNfs
* @see AWS
* API Documentation
*/
@Override
public DescribeLocationNfsResult describeLocationNfs(DescribeLocationNfsRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationNfs(request);
}
@SdkInternalApi
final DescribeLocationNfsResult executeDescribeLocationNfs(DescribeLocationNfsRequest describeLocationNfsRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationNfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationNfsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeLocationNfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationNfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeLocationNfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for an object storage system is configured.
*
*
* @param describeLocationObjectStorageRequest
* DescribeLocationObjectStorageRequest
* @return Result of the DescribeLocationObjectStorage operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationObjectStorage
* @see AWS API Documentation
*/
@Override
public DescribeLocationObjectStorageResult describeLocationObjectStorage(DescribeLocationObjectStorageRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationObjectStorage(request);
}
@SdkInternalApi
final DescribeLocationObjectStorageResult executeDescribeLocationObjectStorage(DescribeLocationObjectStorageRequest describeLocationObjectStorageRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationObjectStorageRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationObjectStorageRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeLocationObjectStorageRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationObjectStorage");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeLocationObjectStorageResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for an S3 bucket is configured.
*
*
* @param describeLocationS3Request
* DescribeLocationS3Request
* @return Result of the DescribeLocationS3 operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationS3
* @see AWS
* API Documentation
*/
@Override
public DescribeLocationS3Result describeLocationS3(DescribeLocationS3Request request) {
request = beforeClientExecution(request);
return executeDescribeLocationS3(request);
}
@SdkInternalApi
final DescribeLocationS3Result executeDescribeLocationS3(DescribeLocationS3Request describeLocationS3Request) {
ExecutionContext executionContext = createExecutionContext(describeLocationS3Request);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationS3RequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeLocationS3Request));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationS3");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeLocationS3ResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about how an DataSync transfer location for a Server Message Block (SMB) file server is
* configured.
*
*
* @param describeLocationSmbRequest
* DescribeLocationSmbRequest
* @return Result of the DescribeLocationSmb operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeLocationSmb
* @see AWS
* API Documentation
*/
@Override
public DescribeLocationSmbResult describeLocationSmb(DescribeLocationSmbRequest request) {
request = beforeClientExecution(request);
return executeDescribeLocationSmb(request);
}
@SdkInternalApi
final DescribeLocationSmbResult executeDescribeLocationSmb(DescribeLocationSmbRequest describeLocationSmbRequest) {
ExecutionContext executionContext = createExecutionContext(describeLocationSmbRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLocationSmbRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeLocationSmbRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLocationSmb");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeLocationSmbResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about an on-premises storage system that you're using with DataSync Discovery.
*
*
* @param describeStorageSystemRequest
* @return Result of the DescribeStorageSystem operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeStorageSystem
* @see AWS
* API Documentation
*/
@Override
public DescribeStorageSystemResult describeStorageSystem(DescribeStorageSystemRequest request) {
request = beforeClientExecution(request);
return executeDescribeStorageSystem(request);
}
@SdkInternalApi
final DescribeStorageSystemResult executeDescribeStorageSystem(DescribeStorageSystemRequest describeStorageSystemRequest) {
ExecutionContext executionContext = createExecutionContext(describeStorageSystemRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeStorageSystemRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeStorageSystemRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeStorageSystem");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeStorageSystemResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information, including performance data and capacity usage, which DataSync Discovery collects about a
* specific resource in your-premises storage system.
*
*
* @param describeStorageSystemResourceMetricsRequest
* @return Result of the DescribeStorageSystemResourceMetrics operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeStorageSystemResourceMetrics
* @see AWS API Documentation
*/
@Override
public DescribeStorageSystemResourceMetricsResult describeStorageSystemResourceMetrics(DescribeStorageSystemResourceMetricsRequest request) {
request = beforeClientExecution(request);
return executeDescribeStorageSystemResourceMetrics(request);
}
@SdkInternalApi
final DescribeStorageSystemResourceMetricsResult executeDescribeStorageSystemResourceMetrics(
DescribeStorageSystemResourceMetricsRequest describeStorageSystemResourceMetricsRequest) {
ExecutionContext executionContext = createExecutionContext(describeStorageSystemResourceMetricsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeStorageSystemResourceMetricsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeStorageSystemResourceMetricsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeStorageSystemResourceMetrics");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeStorageSystemResourceMetricsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information that DataSync Discovery collects about resources in your on-premises storage system.
*
*
* @param describeStorageSystemResourcesRequest
* @return Result of the DescribeStorageSystemResources operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeStorageSystemResources
* @see AWS API Documentation
*/
@Override
public DescribeStorageSystemResourcesResult describeStorageSystemResources(DescribeStorageSystemResourcesRequest request) {
request = beforeClientExecution(request);
return executeDescribeStorageSystemResources(request);
}
@SdkInternalApi
final DescribeStorageSystemResourcesResult executeDescribeStorageSystemResources(DescribeStorageSystemResourcesRequest describeStorageSystemResourcesRequest) {
ExecutionContext executionContext = createExecutionContext(describeStorageSystemResourcesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeStorageSystemResourcesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeStorageSystemResourcesRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeStorageSystemResources");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeStorageSystemResourcesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides information about a task, which defines where and how DataSync transfers your data.
*
*
* @param describeTaskRequest
* DescribeTaskRequest
* @return Result of the DescribeTask operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeTask
* @see AWS API
* Documentation
*/
@Override
public DescribeTaskResult describeTask(DescribeTaskRequest request) {
request = beforeClientExecution(request);
return executeDescribeTask(request);
}
@SdkInternalApi
final DescribeTaskResult executeDescribeTask(DescribeTaskRequest describeTaskRequest) {
ExecutionContext executionContext = createExecutionContext(describeTaskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeTaskRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeTask");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeTaskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides information about an execution of your DataSync task. You can use this operation to help monitor the
* progress of an ongoing transfer or check the results of the transfer.
*
*
* @param describeTaskExecutionRequest
* DescribeTaskExecutionRequest
* @return Result of the DescribeTaskExecution operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.DescribeTaskExecution
* @see AWS
* API Documentation
*/
@Override
public DescribeTaskExecutionResult describeTaskExecution(DescribeTaskExecutionRequest request) {
request = beforeClientExecution(request);
return executeDescribeTaskExecution(request);
}
@SdkInternalApi
final DescribeTaskExecutionResult executeDescribeTaskExecution(DescribeTaskExecutionRequest describeTaskExecutionRequest) {
ExecutionContext executionContext = createExecutionContext(describeTaskExecutionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeTaskExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeTaskExecutionRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeTaskExecution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeTaskExecutionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates recommendations about where to migrate your data to in Amazon Web Services. Recommendations are generated
* based on information that DataSync Discovery collects about your on-premises storage system's resources. For more
* information, see Recommendations provided by DataSync Discovery.
*
*
* Once generated, you can view your recommendations by using the DescribeStorageSystemResources operation.
*
*
* @param generateRecommendationsRequest
* @return Result of the GenerateRecommendations operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.GenerateRecommendations
* @see AWS API Documentation
*/
@Override
public GenerateRecommendationsResult generateRecommendations(GenerateRecommendationsRequest request) {
request = beforeClientExecution(request);
return executeGenerateRecommendations(request);
}
@SdkInternalApi
final GenerateRecommendationsResult executeGenerateRecommendations(GenerateRecommendationsRequest generateRecommendationsRequest) {
ExecutionContext executionContext = createExecutionContext(generateRecommendationsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GenerateRecommendationsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(generateRecommendationsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GenerateRecommendations");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GenerateRecommendationsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of DataSync agents that belong to an Amazon Web Services account in the Amazon Web Services Region
* specified in the request.
*
*
* With pagination, you can reduce the number of agents returned in a response. If you get a truncated list of
* agents in a response, the response contains a marker that you can specify in your next request to fetch the next
* page of agents.
*
*
* ListAgents
is eventually consistent. This means the result of running the operation might not
* reflect that you just created or deleted an agent. For example, if you create an agent with CreateAgent and then
* immediately run ListAgents
, that agent might not show up in the list right away. In situations like
* this, you can always confirm whether an agent has been created (or deleted) by using DescribeAgent.
*
*
* @param listAgentsRequest
* ListAgentsRequest
* @return Result of the ListAgents operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.ListAgents
* @see AWS API
* Documentation
*/
@Override
public ListAgentsResult listAgents(ListAgentsRequest request) {
request = beforeClientExecution(request);
return executeListAgents(request);
}
@SdkInternalApi
final ListAgentsResult executeListAgents(ListAgentsRequest listAgentsRequest) {
ExecutionContext executionContext = createExecutionContext(listAgentsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAgentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAgentsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAgents");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAgentsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides a list of the existing discovery jobs in the Amazon Web Services Region and Amazon Web Services account
* where you're using DataSync Discovery.
*
*
* @param listDiscoveryJobsRequest
* @return Result of the ListDiscoveryJobs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.ListDiscoveryJobs
* @see AWS API
* Documentation
*/
@Override
public ListDiscoveryJobsResult listDiscoveryJobs(ListDiscoveryJobsRequest request) {
request = beforeClientExecution(request);
return executeListDiscoveryJobs(request);
}
@SdkInternalApi
final ListDiscoveryJobsResult executeListDiscoveryJobs(ListDiscoveryJobsRequest listDiscoveryJobsRequest) {
ExecutionContext executionContext = createExecutionContext(listDiscoveryJobsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListDiscoveryJobsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDiscoveryJobsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDiscoveryJobs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDiscoveryJobsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of source and destination locations.
*
*
* If you have more locations than are returned in a response (that is, the response returns only a truncated list
* of your agents), the response contains a token that you can specify in your next request to fetch the next page
* of locations.
*
*
* @param listLocationsRequest
* ListLocationsRequest
* @return Result of the ListLocations operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.ListLocations
* @see AWS API
* Documentation
*/
@Override
public ListLocationsResult listLocations(ListLocationsRequest request) {
request = beforeClientExecution(request);
return executeListLocations(request);
}
@SdkInternalApi
final ListLocationsResult executeListLocations(ListLocationsRequest listLocationsRequest) {
ExecutionContext executionContext = createExecutionContext(listLocationsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListLocationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listLocationsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListLocations");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListLocationsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the on-premises storage systems that you're using with DataSync Discovery.
*
*
* @param listStorageSystemsRequest
* @return Result of the ListStorageSystems operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.ListStorageSystems
* @see AWS
* API Documentation
*/
@Override
public ListStorageSystemsResult listStorageSystems(ListStorageSystemsRequest request) {
request = beforeClientExecution(request);
return executeListStorageSystems(request);
}
@SdkInternalApi
final ListStorageSystemsResult executeListStorageSystems(ListStorageSystemsRequest listStorageSystemsRequest) {
ExecutionContext executionContext = createExecutionContext(listStorageSystemsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListStorageSystemsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listStorageSystemsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListStorageSystems");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListStorageSystemsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns all the tags associated with an Amazon Web Services resource.
*
*
* @param listTagsForResourceRequest
* ListTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.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, "DataSync");
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 executions for an DataSync transfer task.
*
*
* @param listTaskExecutionsRequest
* ListTaskExecutions
* @return Result of the ListTaskExecutions operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.ListTaskExecutions
* @see AWS
* API Documentation
*/
@Override
public ListTaskExecutionsResult listTaskExecutions(ListTaskExecutionsRequest request) {
request = beforeClientExecution(request);
return executeListTaskExecutions(request);
}
@SdkInternalApi
final ListTaskExecutionsResult executeListTaskExecutions(ListTaskExecutionsRequest listTaskExecutionsRequest) {
ExecutionContext executionContext = createExecutionContext(listTaskExecutionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTaskExecutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTaskExecutionsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTaskExecutions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTaskExecutionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of the DataSync tasks you created.
*
*
* @param listTasksRequest
* ListTasksRequest
* @return Result of the ListTasks operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.ListTasks
* @see AWS API
* Documentation
*/
@Override
public ListTasksResult listTasks(ListTasksRequest request) {
request = beforeClientExecution(request);
return executeListTasks(request);
}
@SdkInternalApi
final ListTasksResult executeListTasks(ListTasksRequest listTasksRequest) {
ExecutionContext executionContext = createExecutionContext(listTasksRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTasksRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTasksRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTasks");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTasksResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Permanently removes a storage system resource from DataSync Discovery, including the associated discovery jobs,
* collected data, and recommendations.
*
*
* @param removeStorageSystemRequest
* @return Result of the RemoveStorageSystem operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.RemoveStorageSystem
* @see AWS
* API Documentation
*/
@Override
public RemoveStorageSystemResult removeStorageSystem(RemoveStorageSystemRequest request) {
request = beforeClientExecution(request);
return executeRemoveStorageSystem(request);
}
@SdkInternalApi
final RemoveStorageSystemResult executeRemoveStorageSystem(RemoveStorageSystemRequest removeStorageSystemRequest) {
ExecutionContext executionContext = createExecutionContext(removeStorageSystemRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new RemoveStorageSystemRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(removeStorageSystemRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveStorageSystem");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemoveStorageSystemResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Runs a DataSync discovery job on your on-premises storage system. If you haven't added the storage system to
* DataSync Discovery yet, do this first by using the AddStorageSystem
* operation.
*
*
* @param startDiscoveryJobRequest
* @return Result of the StartDiscoveryJob operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.StartDiscoveryJob
* @see AWS API
* Documentation
*/
@Override
public StartDiscoveryJobResult startDiscoveryJob(StartDiscoveryJobRequest request) {
request = beforeClientExecution(request);
return executeStartDiscoveryJob(request);
}
@SdkInternalApi
final StartDiscoveryJobResult executeStartDiscoveryJob(StartDiscoveryJobRequest startDiscoveryJobRequest) {
ExecutionContext executionContext = createExecutionContext(startDiscoveryJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartDiscoveryJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startDiscoveryJobRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartDiscoveryJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartDiscoveryJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Starts an DataSync transfer task. For each task, you can only run one task execution at a time.
*
*
* There are several phases to a task execution. For more information, see Task execution statuses.
*
*
*
* If you're planning to transfer data to or from an Amazon S3 location, review how DataSync can affect your S3 request charges and the DataSync pricing page before you begin.
*
*
*
* @param startTaskExecutionRequest
* StartTaskExecutionRequest
* @return Result of the StartTaskExecution operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.StartTaskExecution
* @see AWS
* API Documentation
*/
@Override
public StartTaskExecutionResult startTaskExecution(StartTaskExecutionRequest request) {
request = beforeClientExecution(request);
return executeStartTaskExecution(request);
}
@SdkInternalApi
final StartTaskExecutionResult executeStartTaskExecution(StartTaskExecutionRequest startTaskExecutionRequest) {
ExecutionContext executionContext = createExecutionContext(startTaskExecutionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartTaskExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startTaskExecutionRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartTaskExecution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartTaskExecutionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Stops a running DataSync discovery job.
*
*
* You can stop a discovery job anytime. A job that's stopped before it's scheduled to end likely will provide you
* some information about your on-premises storage system resources. To get recommendations for a stopped job, you
* must use the
* GenerateRecommendations operation.
*
*
* @param stopDiscoveryJobRequest
* @return Result of the StopDiscoveryJob operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.StopDiscoveryJob
* @see AWS API
* Documentation
*/
@Override
public StopDiscoveryJobResult stopDiscoveryJob(StopDiscoveryJobRequest request) {
request = beforeClientExecution(request);
return executeStopDiscoveryJob(request);
}
@SdkInternalApi
final StopDiscoveryJobResult executeStopDiscoveryJob(StopDiscoveryJobRequest stopDiscoveryJobRequest) {
ExecutionContext executionContext = createExecutionContext(stopDiscoveryJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StopDiscoveryJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopDiscoveryJobRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopDiscoveryJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopDiscoveryJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Applies a tag to an Amazon Web Services resource. Tags are key-value pairs that can help you manage,
* filter, and search for your resources.
*
*
* These include DataSync resources, such as locations, tasks, and task executions.
*
*
* @param tagResourceRequest
* TagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.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, "DataSync");
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 tags from an Amazon Web Services resource.
*
*
* @param untagResourceRequest
* UntagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.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, "DataSync");
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 name of an DataSync agent.
*
*
* @param updateAgentRequest
* UpdateAgentRequest
* @return Result of the UpdateAgent operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateAgent
* @see AWS API
* Documentation
*/
@Override
public UpdateAgentResult updateAgent(UpdateAgentRequest request) {
request = beforeClientExecution(request);
return executeUpdateAgent(request);
}
@SdkInternalApi
final UpdateAgentResult executeUpdateAgent(UpdateAgentRequest updateAgentRequest) {
ExecutionContext executionContext = createExecutionContext(updateAgentRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateAgentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAgentRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAgent");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAgentResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Edits a DataSync discovery job configuration.
*
*
* @param updateDiscoveryJobRequest
* @return Result of the UpdateDiscoveryJob operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateDiscoveryJob
* @see AWS
* API Documentation
*/
@Override
public UpdateDiscoveryJobResult updateDiscoveryJob(UpdateDiscoveryJobRequest request) {
request = beforeClientExecution(request);
return executeUpdateDiscoveryJob(request);
}
@SdkInternalApi
final UpdateDiscoveryJobResult executeUpdateDiscoveryJob(UpdateDiscoveryJobRequest updateDiscoveryJobRequest) {
ExecutionContext executionContext = createExecutionContext(updateDiscoveryJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateDiscoveryJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateDiscoveryJobRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDiscoveryJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateDiscoveryJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Modifies some configurations of the Microsoft Azure Blob Storage transfer location that you're using with
* DataSync.
*
*
* @param updateLocationAzureBlobRequest
* @return Result of the UpdateLocationAzureBlob operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateLocationAzureBlob
* @see AWS API Documentation
*/
@Override
public UpdateLocationAzureBlobResult updateLocationAzureBlob(UpdateLocationAzureBlobRequest request) {
request = beforeClientExecution(request);
return executeUpdateLocationAzureBlob(request);
}
@SdkInternalApi
final UpdateLocationAzureBlobResult executeUpdateLocationAzureBlob(UpdateLocationAzureBlobRequest updateLocationAzureBlobRequest) {
ExecutionContext executionContext = createExecutionContext(updateLocationAzureBlobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateLocationAzureBlobRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateLocationAzureBlobRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLocationAzureBlob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateLocationAzureBlobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates some parameters of a previously created location for a Hadoop Distributed File System cluster.
*
*
* @param updateLocationHdfsRequest
* @return Result of the UpdateLocationHdfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateLocationHdfs
* @see AWS
* API Documentation
*/
@Override
public UpdateLocationHdfsResult updateLocationHdfs(UpdateLocationHdfsRequest request) {
request = beforeClientExecution(request);
return executeUpdateLocationHdfs(request);
}
@SdkInternalApi
final UpdateLocationHdfsResult executeUpdateLocationHdfs(UpdateLocationHdfsRequest updateLocationHdfsRequest) {
ExecutionContext executionContext = createExecutionContext(updateLocationHdfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateLocationHdfsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateLocationHdfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLocationHdfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateLocationHdfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Modifies some configurations of the Network File System (NFS) transfer location that you're using with DataSync.
*
*
* For more information, see Configuring transfers to or
* from an NFS file server.
*
*
* @param updateLocationNfsRequest
* @return Result of the UpdateLocationNfs operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateLocationNfs
* @see AWS API
* Documentation
*/
@Override
public UpdateLocationNfsResult updateLocationNfs(UpdateLocationNfsRequest request) {
request = beforeClientExecution(request);
return executeUpdateLocationNfs(request);
}
@SdkInternalApi
final UpdateLocationNfsResult executeUpdateLocationNfs(UpdateLocationNfsRequest updateLocationNfsRequest) {
ExecutionContext executionContext = createExecutionContext(updateLocationNfsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateLocationNfsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateLocationNfsRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLocationNfs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateLocationNfsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates some parameters of an existing DataSync location for an object storage system.
*
*
* @param updateLocationObjectStorageRequest
* @return Result of the UpdateLocationObjectStorage operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateLocationObjectStorage
* @see AWS API Documentation
*/
@Override
public UpdateLocationObjectStorageResult updateLocationObjectStorage(UpdateLocationObjectStorageRequest request) {
request = beforeClientExecution(request);
return executeUpdateLocationObjectStorage(request);
}
@SdkInternalApi
final UpdateLocationObjectStorageResult executeUpdateLocationObjectStorage(UpdateLocationObjectStorageRequest updateLocationObjectStorageRequest) {
ExecutionContext executionContext = createExecutionContext(updateLocationObjectStorageRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateLocationObjectStorageRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateLocationObjectStorageRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLocationObjectStorage");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateLocationObjectStorageResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates some of the parameters of a Server Message Block (SMB) file server location that you can use for DataSync
* transfers.
*
*
* @param updateLocationSmbRequest
* @return Result of the UpdateLocationSmb operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateLocationSmb
* @see AWS API
* Documentation
*/
@Override
public UpdateLocationSmbResult updateLocationSmb(UpdateLocationSmbRequest request) {
request = beforeClientExecution(request);
return executeUpdateLocationSmb(request);
}
@SdkInternalApi
final UpdateLocationSmbResult executeUpdateLocationSmb(UpdateLocationSmbRequest updateLocationSmbRequest) {
ExecutionContext executionContext = createExecutionContext(updateLocationSmbRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateLocationSmbRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateLocationSmbRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLocationSmb");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateLocationSmbResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Modifies some configurations of an on-premises storage system resource that you're using with DataSync Discovery.
*
*
* @param updateStorageSystemRequest
* @return Result of the UpdateStorageSystem operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateStorageSystem
* @see AWS
* API Documentation
*/
@Override
public UpdateStorageSystemResult updateStorageSystem(UpdateStorageSystemRequest request) {
request = beforeClientExecution(request);
return executeUpdateStorageSystem(request);
}
@SdkInternalApi
final UpdateStorageSystemResult executeUpdateStorageSystem(UpdateStorageSystemRequest updateStorageSystemRequest) {
ExecutionContext executionContext = createExecutionContext(updateStorageSystemRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateStorageSystemRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateStorageSystemRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateStorageSystem");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "discovery-";
String resolvedHostPrefix = String.format("discovery-");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateStorageSystemResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the configuration of a task, which defines where and how DataSync transfers your data.
*
*
* @param updateTaskRequest
* UpdateTaskResponse
* @return Result of the UpdateTask operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateTask
* @see AWS API
* Documentation
*/
@Override
public UpdateTaskResult updateTask(UpdateTaskRequest request) {
request = beforeClientExecution(request);
return executeUpdateTask(request);
}
@SdkInternalApi
final UpdateTaskResult executeUpdateTask(UpdateTaskRequest updateTaskRequest) {
ExecutionContext executionContext = createExecutionContext(updateTaskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateTaskRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateTask");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateTaskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the configuration of a running DataSync task execution.
*
*
*
* Currently, the only Option
that you can modify with UpdateTaskExecution
is
* BytesPerSecond
* , which throttles bandwidth for a running or queued task execution.
*
*
*
* @param updateTaskExecutionRequest
* @return Result of the UpdateTaskExecution operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalException
* This exception is thrown when an error occurs in the DataSync service.
* @sample AWSDataSync.UpdateTaskExecution
* @see AWS
* API Documentation
*/
@Override
public UpdateTaskExecutionResult updateTaskExecution(UpdateTaskExecutionRequest request) {
request = beforeClientExecution(request);
return executeUpdateTaskExecution(request);
}
@SdkInternalApi
final UpdateTaskExecutionResult executeUpdateTaskExecution(UpdateTaskExecutionRequest updateTaskExecutionRequest) {
ExecutionContext executionContext = createExecutionContext(updateTaskExecutionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateTaskExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateTaskExecutionRequest));
// 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, "DataSync");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateTaskExecution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateTaskExecutionResultJsonUnmarshaller());
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();
}
}