com.amazonaws.services.transfer.AWSTransferClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-transfer 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.transfer;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import java.util.Map.Entry;
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.transfer.AWSTransferClientBuilder;
import com.amazonaws.services.transfer.waiters.AWSTransferWaiters;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.transfer.model.*;
import com.amazonaws.services.transfer.model.transform.*;
/**
* Client for accessing AWS Transfer. All service calls made using this client are blocking, and will not return until
* the service call completes.
*
*
* Transfer Family is a fully managed service that enables the transfer of files over the File Transfer Protocol (FTP),
* File Transfer Protocol over SSL (FTPS), or Secure Shell (SSH) File Transfer Protocol (SFTP) directly into and out of
* Amazon Simple Storage Service (Amazon S3) or Amazon EFS. Additionally, you can use Applicability Statement 2 (AS2) to
* transfer files into and out of Amazon S3. Amazon Web Services helps you seamlessly migrate your file transfer
* workflows to Transfer Family by integrating with existing authentication systems, and providing DNS routing with
* Amazon Route 53 so nothing changes for your customers and partners, or their applications. With your data in Amazon
* S3, you can use it with Amazon Web Services for processing, analytics, machine learning, and archiving. Getting
* started with Transfer Family is easy since there is no infrastructure to buy and set up.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSTransferClient extends AmazonWebServiceClient implements AWSTransfer {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSTransfer.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "transfer";
private volatile AWSTransferWaiters waiters;
/** 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.transfer.model.transform.InvalidRequestExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidNextTokenException").withExceptionUnmarshaller(
com.amazonaws.services.transfer.model.transform.InvalidNextTokenExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.transfer.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServiceError").withExceptionUnmarshaller(
com.amazonaws.services.transfer.model.transform.InternalServiceErrorExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceExistsException").withExceptionUnmarshaller(
com.amazonaws.services.transfer.model.transform.ResourceExistsExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.transfer.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.transfer.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller(
com.amazonaws.services.transfer.model.transform.ConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceUnavailableException").withExceptionUnmarshaller(
com.amazonaws.services.transfer.model.transform.ServiceUnavailableExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.transfer.model.AWSTransferException.class));
public static AWSTransferClientBuilder builder() {
return AWSTransferClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on AWS Transfer 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.
*/
AWSTransferClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on AWS Transfer 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.
*/
AWSTransferClient(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("transfer.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/transfer/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/transfer/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Used by administrators to choose which groups in the directory should have access to upload and download files
* over the enabled protocols using Transfer Family. For example, a Microsoft Active Directory might contain 50,000
* users, but only a small fraction might need the ability to transfer files to the server. An administrator can use
* CreateAccess
to limit the access to the correct set of users who need this ability.
*
*
* @param createAccessRequest
* @return Result of the CreateAccess operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.CreateAccess
* @see AWS API
* Documentation
*/
@Override
public CreateAccessResult createAccess(CreateAccessRequest request) {
request = beforeClientExecution(request);
return executeCreateAccess(request);
}
@SdkInternalApi
final CreateAccessResult executeCreateAccess(CreateAccessRequest createAccessRequest) {
ExecutionContext executionContext = createExecutionContext(createAccessRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAccessRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAccessRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAccess");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAccessResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an Transfer
* Family server and an AS2 process. The agreement defines the file and message transfer relationship between the
* server and the AS2 process. To define an agreement, Transfer Family combines a server, local profile, partner
* profile, certificate, and other attributes.
*
*
* The partner is identified with the PartnerProfileId
, and the AS2 process is identified with the
* LocalProfileId
.
*
*
* @param createAgreementRequest
* @return Result of the CreateAgreement operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.CreateAgreement
* @see AWS API
* Documentation
*/
@Override
public CreateAgreementResult createAgreement(CreateAgreementRequest request) {
request = beforeClientExecution(request);
return executeCreateAgreement(request);
}
@SdkInternalApi
final CreateAgreementResult executeCreateAgreement(CreateAgreementRequest createAgreementRequest) {
ExecutionContext executionContext = createExecutionContext(createAgreementRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAgreementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAgreementRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAgreement");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAgreementResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates the connector, which captures the parameters for a connection for the AS2 or SFTP protocol. For AS2, the
* connector is required for sending files to an externally hosted AS2 server. For SFTP, the connector is required
* when sending files to an SFTP server or receiving files from an SFTP server. For more details about connectors,
* see Configure AS2
* connectors and Create SFTP
* connectors.
*
*
*
* You must specify exactly one configuration object: either for AS2 (As2Config
) or SFTP (
* SftpConfig
).
*
*
*
* @param createConnectorRequest
* @return Result of the CreateConnector operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.CreateConnector
* @see AWS API
* Documentation
*/
@Override
public CreateConnectorResult createConnector(CreateConnectorRequest request) {
request = beforeClientExecution(request);
return executeCreateConnector(request);
}
@SdkInternalApi
final CreateConnectorResult executeCreateConnector(CreateConnectorRequest createConnectorRequest) {
ExecutionContext executionContext = createExecutionContext(createConnectorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateConnectorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createConnectorRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateConnector");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateConnectorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates the local or partner profile to use for AS2 transfers.
*
*
* @param createProfileRequest
* @return Result of the CreateProfile operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.CreateProfile
* @see AWS API
* Documentation
*/
@Override
public CreateProfileResult createProfile(CreateProfileRequest request) {
request = beforeClientExecution(request);
return executeCreateProfile(request);
}
@SdkInternalApi
final CreateProfileResult executeCreateProfile(CreateProfileRequest createProfileRequest) {
ExecutionContext executionContext = createExecutionContext(createProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createProfileRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Instantiates an auto-scaling virtual server based on the selected file transfer protocol in Amazon Web Services.
* When you make updates to your file transfer protocol-enabled server or when you work with users, use the
* service-generated ServerId
property that is assigned to the newly created server.
*
*
* @param createServerRequest
* @return Result of the CreateServer operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AWSTransfer.CreateServer
* @see AWS API
* Documentation
*/
@Override
public CreateServerResult createServer(CreateServerRequest request) {
request = beforeClientExecution(request);
return executeCreateServer(request);
}
@SdkInternalApi
final CreateServerResult executeCreateServer(CreateServerRequest createServerRequest) {
ExecutionContext executionContext = createExecutionContext(createServerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateServerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createServerRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateServer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateServerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a user and associates them with an existing file transfer protocol-enabled server. You can only create
* and associate users with servers that have the IdentityProviderType
set to
* SERVICE_MANAGED
. Using parameters for CreateUser
, you can specify the user name, set
* the home directory, store the user's public key, and assign the user's Identity and Access Management (IAM) role.
* You can also optionally add a session policy, and assign metadata with tags that can be used to group and search
* for users.
*
*
* @param createUserRequest
* @return Result of the CreateUser operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.CreateUser
* @see AWS API
* Documentation
*/
@Override
public CreateUserResult createUser(CreateUserRequest request) {
request = beforeClientExecution(request);
return executeCreateUser(request);
}
@SdkInternalApi
final CreateUserResult executeCreateUser(CreateUserRequest createUserRequest) {
ExecutionContext executionContext = createExecutionContext(createUserRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createUserRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateUser");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateUserResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Allows you to create a workflow with specified steps and step details the workflow invokes after file transfer
* completes. After creating a workflow, you can associate the workflow created with any transfer servers by
* specifying the workflow-details
field in CreateServer
and UpdateServer
* operations.
*
*
* @param createWorkflowRequest
* @return Result of the CreateWorkflow operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AWSTransfer.CreateWorkflow
* @see AWS API
* Documentation
*/
@Override
public CreateWorkflowResult createWorkflow(CreateWorkflowRequest request) {
request = beforeClientExecution(request);
return executeCreateWorkflow(request);
}
@SdkInternalApi
final CreateWorkflowResult executeCreateWorkflow(CreateWorkflowRequest createWorkflowRequest) {
ExecutionContext executionContext = createExecutionContext(createWorkflowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateWorkflowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createWorkflowRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateWorkflow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateWorkflowResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Allows you to delete the access specified in the ServerID
and ExternalID
parameters.
*
*
* @param deleteAccessRequest
* @return Result of the DeleteAccess operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DeleteAccess
* @see AWS API
* Documentation
*/
@Override
public DeleteAccessResult deleteAccess(DeleteAccessRequest request) {
request = beforeClientExecution(request);
return executeDeleteAccess(request);
}
@SdkInternalApi
final DeleteAccessResult executeDeleteAccess(DeleteAccessRequest deleteAccessRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAccessRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAccessRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAccessRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAccess");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAccessResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Delete the agreement that's specified in the provided AgreementId
.
*
*
* @param deleteAgreementRequest
* @return Result of the DeleteAgreement operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DeleteAgreement
* @see AWS API
* Documentation
*/
@Override
public DeleteAgreementResult deleteAgreement(DeleteAgreementRequest request) {
request = beforeClientExecution(request);
return executeDeleteAgreement(request);
}
@SdkInternalApi
final DeleteAgreementResult executeDeleteAgreement(DeleteAgreementRequest deleteAgreementRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAgreementRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAgreementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAgreementRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAgreement");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAgreementResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the certificate that's specified in the CertificateId
parameter.
*
*
* @param deleteCertificateRequest
* @return Result of the DeleteCertificate operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DeleteCertificate
* @see AWS API
* Documentation
*/
@Override
public DeleteCertificateResult deleteCertificate(DeleteCertificateRequest request) {
request = beforeClientExecution(request);
return executeDeleteCertificate(request);
}
@SdkInternalApi
final DeleteCertificateResult executeDeleteCertificate(DeleteCertificateRequest deleteCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(deleteCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteCertificateRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the connector that's specified in the provided ConnectorId
.
*
*
* @param deleteConnectorRequest
* @return Result of the DeleteConnector operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DeleteConnector
* @see AWS API
* Documentation
*/
@Override
public DeleteConnectorResult deleteConnector(DeleteConnectorRequest request) {
request = beforeClientExecution(request);
return executeDeleteConnector(request);
}
@SdkInternalApi
final DeleteConnectorResult executeDeleteConnector(DeleteConnectorRequest deleteConnectorRequest) {
ExecutionContext executionContext = createExecutionContext(deleteConnectorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteConnectorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteConnectorRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConnector");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteConnectorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the host key that's specified in the HostKeyId
parameter.
*
*
* @param deleteHostKeyRequest
* @return Result of the DeleteHostKey operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DeleteHostKey
* @see AWS API
* Documentation
*/
@Override
public DeleteHostKeyResult deleteHostKey(DeleteHostKeyRequest request) {
request = beforeClientExecution(request);
return executeDeleteHostKey(request);
}
@SdkInternalApi
final DeleteHostKeyResult executeDeleteHostKey(DeleteHostKeyRequest deleteHostKeyRequest) {
ExecutionContext executionContext = createExecutionContext(deleteHostKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteHostKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteHostKeyRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteHostKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteHostKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the profile that's specified in the ProfileId
parameter.
*
*
* @param deleteProfileRequest
* @return Result of the DeleteProfile operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DeleteProfile
* @see AWS API
* Documentation
*/
@Override
public DeleteProfileResult deleteProfile(DeleteProfileRequest request) {
request = beforeClientExecution(request);
return executeDeleteProfile(request);
}
@SdkInternalApi
final DeleteProfileResult executeDeleteProfile(DeleteProfileRequest deleteProfileRequest) {
ExecutionContext executionContext = createExecutionContext(deleteProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteProfileRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the file transfer protocol-enabled server that you specify.
*
*
* No response returns from this operation.
*
*
* @param deleteServerRequest
* @return Result of the DeleteServer operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AWSTransfer.DeleteServer
* @see AWS API
* Documentation
*/
@Override
public DeleteServerResult deleteServer(DeleteServerRequest request) {
request = beforeClientExecution(request);
return executeDeleteServer(request);
}
@SdkInternalApi
final DeleteServerResult executeDeleteServer(DeleteServerRequest deleteServerRequest) {
ExecutionContext executionContext = createExecutionContext(deleteServerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteServerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteServerRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteServer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteServerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a user's Secure Shell (SSH) public key.
*
*
* @param deleteSshPublicKeyRequest
* @return Result of the DeleteSshPublicKey operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DeleteSshPublicKey
* @see AWS
* API Documentation
*/
@Override
public DeleteSshPublicKeyResult deleteSshPublicKey(DeleteSshPublicKeyRequest request) {
request = beforeClientExecution(request);
return executeDeleteSshPublicKey(request);
}
@SdkInternalApi
final DeleteSshPublicKeyResult executeDeleteSshPublicKey(DeleteSshPublicKeyRequest deleteSshPublicKeyRequest) {
ExecutionContext executionContext = createExecutionContext(deleteSshPublicKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteSshPublicKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSshPublicKeyRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSshPublicKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteSshPublicKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the user belonging to a file transfer protocol-enabled server you specify.
*
*
* No response returns from this operation.
*
*
*
* When you delete a user from a server, the user's information is lost.
*
*
*
* @param deleteUserRequest
* @return Result of the DeleteUser operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DeleteUser
* @see AWS API
* Documentation
*/
@Override
public DeleteUserResult deleteUser(DeleteUserRequest request) {
request = beforeClientExecution(request);
return executeDeleteUser(request);
}
@SdkInternalApi
final DeleteUserResult executeDeleteUser(DeleteUserRequest deleteUserRequest) {
ExecutionContext executionContext = createExecutionContext(deleteUserRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteUserRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUser");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUserResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified workflow.
*
*
* @param deleteWorkflowRequest
* @return Result of the DeleteWorkflow operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AWSTransfer.DeleteWorkflow
* @see AWS API
* Documentation
*/
@Override
public DeleteWorkflowResult deleteWorkflow(DeleteWorkflowRequest request) {
request = beforeClientExecution(request);
return executeDeleteWorkflow(request);
}
@SdkInternalApi
final DeleteWorkflowResult executeDeleteWorkflow(DeleteWorkflowRequest deleteWorkflowRequest) {
ExecutionContext executionContext = createExecutionContext(deleteWorkflowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteWorkflowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteWorkflowRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteWorkflow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteWorkflowResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the access that is assigned to the specific file transfer protocol-enabled server, as identified by its
* ServerId
property and its ExternalId
.
*
*
* The response from this call returns the properties of the access that is associated with the
* ServerId
value that was specified.
*
*
* @param describeAccessRequest
* @return Result of the DescribeAccess operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeAccess
* @see AWS API
* Documentation
*/
@Override
public DescribeAccessResult describeAccess(DescribeAccessRequest request) {
request = beforeClientExecution(request);
return executeDescribeAccess(request);
}
@SdkInternalApi
final DescribeAccessResult executeDescribeAccess(DescribeAccessRequest describeAccessRequest) {
ExecutionContext executionContext = createExecutionContext(describeAccessRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAccessRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAccessRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAccess");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAccessResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the agreement that's identified by the AgreementId
.
*
*
* @param describeAgreementRequest
* @return Result of the DescribeAgreement operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeAgreement
* @see AWS API
* Documentation
*/
@Override
public DescribeAgreementResult describeAgreement(DescribeAgreementRequest request) {
request = beforeClientExecution(request);
return executeDescribeAgreement(request);
}
@SdkInternalApi
final DescribeAgreementResult executeDescribeAgreement(DescribeAgreementRequest describeAgreementRequest) {
ExecutionContext executionContext = createExecutionContext(describeAgreementRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAgreementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAgreementRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAgreement");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAgreementResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the certificate that's identified by the CertificateId
.
*
*
* @param describeCertificateRequest
* @return Result of the DescribeCertificate operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeCertificate
* @see AWS
* API Documentation
*/
@Override
public DescribeCertificateResult describeCertificate(DescribeCertificateRequest request) {
request = beforeClientExecution(request);
return executeDescribeCertificate(request);
}
@SdkInternalApi
final DescribeCertificateResult executeDescribeCertificate(DescribeCertificateRequest describeCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(describeCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeCertificateRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the connector that's identified by the ConnectorId.
*
*
* @param describeConnectorRequest
* @return Result of the DescribeConnector operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeConnector
* @see AWS API
* Documentation
*/
@Override
public DescribeConnectorResult describeConnector(DescribeConnectorRequest request) {
request = beforeClientExecution(request);
return executeDescribeConnector(request);
}
@SdkInternalApi
final DescribeConnectorResult executeDescribeConnector(DescribeConnectorRequest describeConnectorRequest) {
ExecutionContext executionContext = createExecutionContext(describeConnectorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeConnectorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeConnectorRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConnector");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeConnectorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* You can use DescribeExecution
to check the details of the execution of the specified workflow.
*
*
*
* This API call only returns details for in-progress workflows.
*
*
* If you provide an ID for an execution that is not in progress, or if the execution doesn't match the specified
* workflow ID, you receive a ResourceNotFound
exception.
*
*
*
* @param describeExecutionRequest
* @return Result of the DescribeExecution operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeExecution
* @see AWS API
* Documentation
*/
@Override
public DescribeExecutionResult describeExecution(DescribeExecutionRequest request) {
request = beforeClientExecution(request);
return executeDescribeExecution(request);
}
@SdkInternalApi
final DescribeExecutionResult executeDescribeExecution(DescribeExecutionRequest describeExecutionRequest) {
ExecutionContext executionContext = createExecutionContext(describeExecutionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeExecutionRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeExecution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeExecutionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the details of the host key that's specified by the HostKeyId
and ServerId
.
*
*
* @param describeHostKeyRequest
* @return Result of the DescribeHostKey operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeHostKey
* @see AWS API
* Documentation
*/
@Override
public DescribeHostKeyResult describeHostKey(DescribeHostKeyRequest request) {
request = beforeClientExecution(request);
return executeDescribeHostKey(request);
}
@SdkInternalApi
final DescribeHostKeyResult executeDescribeHostKey(DescribeHostKeyRequest describeHostKeyRequest) {
ExecutionContext executionContext = createExecutionContext(describeHostKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeHostKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeHostKeyRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeHostKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeHostKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns the details of the profile that's specified by the ProfileId
.
*
*
* @param describeProfileRequest
* @return Result of the DescribeProfile operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeProfile
* @see AWS API
* Documentation
*/
@Override
public DescribeProfileResult describeProfile(DescribeProfileRequest request) {
request = beforeClientExecution(request);
return executeDescribeProfile(request);
}
@SdkInternalApi
final DescribeProfileResult executeDescribeProfile(DescribeProfileRequest describeProfileRequest) {
ExecutionContext executionContext = createExecutionContext(describeProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeProfileRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the security policy that is attached to your server or SFTP connector. The response contains a
* description of the security policy's properties. For more information about security policies, see Working with security
* policies for servers or Working with
* security policies for SFTP connectors.
*
*
* @param describeSecurityPolicyRequest
* @return Result of the DescribeSecurityPolicy operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeSecurityPolicy
* @see AWS API Documentation
*/
@Override
public DescribeSecurityPolicyResult describeSecurityPolicy(DescribeSecurityPolicyRequest request) {
request = beforeClientExecution(request);
return executeDescribeSecurityPolicy(request);
}
@SdkInternalApi
final DescribeSecurityPolicyResult executeDescribeSecurityPolicy(DescribeSecurityPolicyRequest describeSecurityPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(describeSecurityPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeSecurityPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeSecurityPolicyRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeSecurityPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeSecurityPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes a file transfer protocol-enabled server that you specify by passing the ServerId
* parameter.
*
*
* The response contains a description of a server's properties. When you set EndpointType
to VPC, the
* response will contain the EndpointDetails
.
*
*
* @param describeServerRequest
* @return Result of the DescribeServer operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeServer
* @see AWS API
* Documentation
*/
@Override
public DescribeServerResult describeServer(DescribeServerRequest request) {
request = beforeClientExecution(request);
return executeDescribeServer(request);
}
@SdkInternalApi
final DescribeServerResult executeDescribeServer(DescribeServerRequest describeServerRequest) {
ExecutionContext executionContext = createExecutionContext(describeServerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeServerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeServerRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeServer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeServerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the user assigned to the specific file transfer protocol-enabled server, as identified by its
* ServerId
property.
*
*
* The response from this call returns the properties of the user associated with the ServerId
value
* that was specified.
*
*
* @param describeUserRequest
* @return Result of the DescribeUser operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeUser
* @see AWS API
* Documentation
*/
@Override
public DescribeUserResult describeUser(DescribeUserRequest request) {
request = beforeClientExecution(request);
return executeDescribeUser(request);
}
@SdkInternalApi
final DescribeUserResult executeDescribeUser(DescribeUserRequest describeUserRequest) {
ExecutionContext executionContext = createExecutionContext(describeUserRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeUserRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeUser");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeUserResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the specified workflow.
*
*
* @param describeWorkflowRequest
* @return Result of the DescribeWorkflow operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.DescribeWorkflow
* @see AWS API
* Documentation
*/
@Override
public DescribeWorkflowResult describeWorkflow(DescribeWorkflowRequest request) {
request = beforeClientExecution(request);
return executeDescribeWorkflow(request);
}
@SdkInternalApi
final DescribeWorkflowResult executeDescribeWorkflow(DescribeWorkflowRequest describeWorkflowRequest) {
ExecutionContext executionContext = createExecutionContext(describeWorkflowRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeWorkflowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeWorkflowRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeWorkflow");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeWorkflowResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Imports the signing and encryption certificates that you need to create local (AS2) profiles and partner
* profiles.
*
*
* @param importCertificateRequest
* @return Result of the ImportCertificate operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.ImportCertificate
* @see AWS API
* Documentation
*/
@Override
public ImportCertificateResult importCertificate(ImportCertificateRequest request) {
request = beforeClientExecution(request);
return executeImportCertificate(request);
}
@SdkInternalApi
final ImportCertificateResult executeImportCertificate(ImportCertificateRequest importCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(importCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ImportCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importCertificateRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a host key to the server that's specified by the ServerId
parameter.
*
*
* @param importHostKeyRequest
* @return Result of the ImportHostKey operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.ImportHostKey
* @see AWS API
* Documentation
*/
@Override
public ImportHostKeyResult importHostKey(ImportHostKeyRequest request) {
request = beforeClientExecution(request);
return executeImportHostKey(request);
}
@SdkInternalApi
final ImportHostKeyResult executeImportHostKey(ImportHostKeyRequest importHostKeyRequest) {
ExecutionContext executionContext = createExecutionContext(importHostKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ImportHostKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importHostKeyRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportHostKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportHostKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a Secure Shell (SSH) public key to a Transfer Family user identified by a UserName
value
* assigned to the specific file transfer protocol-enabled server, identified by ServerId
.
*
*
* The response returns the UserName
value, the ServerId
value, and the name of the
* SshPublicKeyId
.
*
*
* @param importSshPublicKeyRequest
* @return Result of the ImportSshPublicKey operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.ImportSshPublicKey
* @see AWS
* API Documentation
*/
@Override
public ImportSshPublicKeyResult importSshPublicKey(ImportSshPublicKeyRequest request) {
request = beforeClientExecution(request);
return executeImportSshPublicKey(request);
}
@SdkInternalApi
final ImportSshPublicKeyResult executeImportSshPublicKey(ImportSshPublicKeyRequest importSshPublicKeyRequest) {
ExecutionContext executionContext = createExecutionContext(importSshPublicKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ImportSshPublicKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importSshPublicKeyRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportSshPublicKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportSshPublicKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the details for all the accesses you have on your server.
*
*
* @param listAccessesRequest
* @return Result of the ListAccesses operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListAccesses
* @see AWS API
* Documentation
*/
@Override
public ListAccessesResult listAccesses(ListAccessesRequest request) {
request = beforeClientExecution(request);
return executeListAccesses(request);
}
@SdkInternalApi
final ListAccessesResult executeListAccesses(ListAccessesRequest listAccessesRequest) {
ExecutionContext executionContext = createExecutionContext(listAccessesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAccessesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAccessesRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAccesses");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAccessesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of the agreements for the server that's identified by the ServerId
that you supply.
* If you want to limit the results to a certain number, supply a value for the MaxResults
parameter.
* If you ran the command previously and received a value for NextToken
, you can supply that value to
* continue listing agreements from where you left off.
*
*
* @param listAgreementsRequest
* @return Result of the ListAgreements operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListAgreements
* @see AWS API
* Documentation
*/
@Override
public ListAgreementsResult listAgreements(ListAgreementsRequest request) {
request = beforeClientExecution(request);
return executeListAgreements(request);
}
@SdkInternalApi
final ListAgreementsResult executeListAgreements(ListAgreementsRequest listAgreementsRequest) {
ExecutionContext executionContext = createExecutionContext(listAgreementsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAgreementsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAgreementsRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAgreements");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAgreementsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of the current certificates that have been imported into Transfer Family. If you want to limit the
* results to a certain number, supply a value for the MaxResults
parameter. If you ran the command
* previously and received a value for the NextToken
parameter, you can supply that value to continue
* listing certificates from where you left off.
*
*
* @param listCertificatesRequest
* @return Result of the ListCertificates operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListCertificates
* @see AWS API
* Documentation
*/
@Override
public ListCertificatesResult listCertificates(ListCertificatesRequest request) {
request = beforeClientExecution(request);
return executeListCertificates(request);
}
@SdkInternalApi
final ListCertificatesResult executeListCertificates(ListCertificatesRequest listCertificatesRequest) {
ExecutionContext executionContext = createExecutionContext(listCertificatesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListCertificatesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listCertificatesRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListCertificates");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListCertificatesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the connectors for the specified Region.
*
*
* @param listConnectorsRequest
* @return Result of the ListConnectors operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListConnectors
* @see AWS API
* Documentation
*/
@Override
public ListConnectorsResult listConnectors(ListConnectorsRequest request) {
request = beforeClientExecution(request);
return executeListConnectors(request);
}
@SdkInternalApi
final ListConnectorsResult executeListConnectors(ListConnectorsRequest listConnectorsRequest) {
ExecutionContext executionContext = createExecutionContext(listConnectorsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListConnectorsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConnectorsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConnectors");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListConnectorsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all in-progress executions for the specified workflow.
*
*
*
* If the specified workflow ID cannot be found, ListExecutions
returns a ResourceNotFound
* exception.
*
*
*
* @param listExecutionsRequest
* @return Result of the ListExecutions operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListExecutions
* @see AWS API
* Documentation
*/
@Override
public ListExecutionsResult listExecutions(ListExecutionsRequest request) {
request = beforeClientExecution(request);
return executeListExecutions(request);
}
@SdkInternalApi
final ListExecutionsResult executeListExecutions(ListExecutionsRequest listExecutionsRequest) {
ExecutionContext executionContext = createExecutionContext(listExecutionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListExecutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listExecutionsRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListExecutions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListExecutionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of host keys for the server that's specified by the ServerId
parameter.
*
*
* @param listHostKeysRequest
* @return Result of the ListHostKeys operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListHostKeys
* @see AWS API
* Documentation
*/
@Override
public ListHostKeysResult listHostKeys(ListHostKeysRequest request) {
request = beforeClientExecution(request);
return executeListHostKeys(request);
}
@SdkInternalApi
final ListHostKeysResult executeListHostKeys(ListHostKeysRequest listHostKeysRequest) {
ExecutionContext executionContext = createExecutionContext(listHostKeysRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListHostKeysRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listHostKeysRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListHostKeys");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListHostKeysResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a list of the profiles for your system. If you want to limit the results to a certain number, supply a
* value for the MaxResults
parameter. If you ran the command previously and received a value for
* NextToken
, you can supply that value to continue listing profiles from where you left off.
*
*
* @param listProfilesRequest
* @return Result of the ListProfiles operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListProfiles
* @see AWS API
* Documentation
*/
@Override
public ListProfilesResult listProfiles(ListProfilesRequest request) {
request = beforeClientExecution(request);
return executeListProfiles(request);
}
@SdkInternalApi
final ListProfilesResult executeListProfiles(ListProfilesRequest listProfilesRequest) {
ExecutionContext executionContext = createExecutionContext(listProfilesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListProfilesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listProfilesRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListProfiles");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListProfilesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the security policies that are attached to your servers and SFTP connectors. For more information about
* security policies, see Working with security
* policies for servers or Working with
* security policies for SFTP connectors.
*
*
* @param listSecurityPoliciesRequest
* @return Result of the ListSecurityPolicies operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListSecurityPolicies
* @see AWS
* API Documentation
*/
@Override
public ListSecurityPoliciesResult listSecurityPolicies(ListSecurityPoliciesRequest request) {
request = beforeClientExecution(request);
return executeListSecurityPolicies(request);
}
@SdkInternalApi
final ListSecurityPoliciesResult executeListSecurityPolicies(ListSecurityPoliciesRequest listSecurityPoliciesRequest) {
ExecutionContext executionContext = createExecutionContext(listSecurityPoliciesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListSecurityPoliciesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listSecurityPoliciesRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSecurityPolicies");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSecurityPoliciesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists the file transfer protocol-enabled servers that are associated with your Amazon Web Services account.
*
*
* @param listServersRequest
* @return Result of the ListServers operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListServers
* @see AWS API
* Documentation
*/
@Override
public ListServersResult listServers(ListServersRequest request) {
request = beforeClientExecution(request);
return executeListServers(request);
}
@SdkInternalApi
final ListServersResult executeListServers(ListServersRequest listServersRequest) {
ExecutionContext executionContext = createExecutionContext(listServersRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListServersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listServersRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListServers");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListServersResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a
* user, server, or role.
*
*
* @param 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 InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.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, "Transfer");
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);
}
}
/**
*
* Lists the users for a file transfer protocol-enabled server that you specify by passing the ServerId
* parameter.
*
*
* @param listUsersRequest
* @return Result of the ListUsers operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListUsers
* @see AWS API
* Documentation
*/
@Override
public ListUsersResult listUsers(ListUsersRequest request) {
request = beforeClientExecution(request);
return executeListUsers(request);
}
@SdkInternalApi
final ListUsersResult executeListUsers(ListUsersRequest listUsersRequest) {
ExecutionContext executionContext = createExecutionContext(listUsersRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListUsersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listUsersRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListUsers");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListUsersResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Lists all workflows associated with your Amazon Web Services account for your current region.
*
*
* @param listWorkflowsRequest
* @return Result of the ListWorkflows operation returned by the service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws InvalidNextTokenException
* The NextToken
parameter that was passed is invalid.
* @sample AWSTransfer.ListWorkflows
* @see AWS API
* Documentation
*/
@Override
public ListWorkflowsResult listWorkflows(ListWorkflowsRequest request) {
request = beforeClientExecution(request);
return executeListWorkflows(request);
}
@SdkInternalApi
final ListWorkflowsResult executeListWorkflows(ListWorkflowsRequest listWorkflowsRequest) {
ExecutionContext executionContext = createExecutionContext(listWorkflowsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListWorkflowsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listWorkflowsRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListWorkflows");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListWorkflowsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Sends a callback for asynchronous custom steps.
*
*
* The ExecutionId
, WorkflowId
, and Token
are passed to the target resource
* during execution of a custom step of a workflow. You must include those with their callback as well as providing
* a status.
*
*
* @param sendWorkflowStepStateRequest
* @return Result of the SendWorkflowStepState operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AWSTransfer.SendWorkflowStepState
* @see AWS
* API Documentation
*/
@Override
public SendWorkflowStepStateResult sendWorkflowStepState(SendWorkflowStepStateRequest request) {
request = beforeClientExecution(request);
return executeSendWorkflowStepState(request);
}
@SdkInternalApi
final SendWorkflowStepStateResult executeSendWorkflowStepState(SendWorkflowStepStateRequest sendWorkflowStepStateRequest) {
ExecutionContext executionContext = createExecutionContext(sendWorkflowStepStateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new SendWorkflowStepStateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(sendWorkflowStepStateRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendWorkflowStepState");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new SendWorkflowStepStateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a list of the contents of a directory from a remote SFTP server. You specify the connector ID, the
* output path, and the remote directory path. You can also specify the optional MaxItems
value to
* control the maximum number of items that are listed from the remote directory. This API returns a list of all
* files and directories in the remote directory (up to the maximum value), but does not return files or folders in
* sub-directories. That is, it only returns a list of files and directories one-level deep.
*
*
* After you receive the listing file, you can provide the files that you want to transfer to the
* RetrieveFilePaths
parameter of the StartFileTransfer
API call.
*
*
* The naming convention for the output file is connector-ID-listing-ID.json
. The output
* file contains the following information:
*
*
* -
*
* filePath
: the complete path of a remote file, relative to the directory of the listing request for
* your SFTP connector on the remote server.
*
*
* -
*
* modifiedTimestamp
: the last time the file was modified, in UTC time format. This field is optional.
* If the remote file attributes don't contain a timestamp, it is omitted from the file listing.
*
*
* -
*
* size
: the size of the file, in bytes. This field is optional. If the remote file attributes don't
* contain a file size, it is omitted from the file listing.
*
*
* -
*
* path
: the complete path of a remote directory, relative to the directory of the listing request for
* your SFTP connector on the remote server.
*
*
* -
*
* truncated
: a flag indicating whether the list output contains all of the items contained in the
* remote directory or not. If your Truncated
output value is true, you can increase the value provided
* in the optional max-items
input attribute to be able to list more items (up to the maximum allowed
* list size of 10,000 items).
*
*
*
*
* @param startDirectoryListingRequest
* @return Result of the StartDirectoryListing operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.StartDirectoryListing
* @see AWS
* API Documentation
*/
@Override
public StartDirectoryListingResult startDirectoryListing(StartDirectoryListingRequest request) {
request = beforeClientExecution(request);
return executeStartDirectoryListing(request);
}
@SdkInternalApi
final StartDirectoryListingResult executeStartDirectoryListing(StartDirectoryListingRequest startDirectoryListingRequest) {
ExecutionContext executionContext = createExecutionContext(startDirectoryListingRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartDirectoryListingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startDirectoryListingRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartDirectoryListing");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new StartDirectoryListingResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Begins a file transfer between local Amazon Web Services storage and a remote AS2 or SFTP server.
*
*
* -
*
* For an AS2 connector, you specify the ConnectorId
and one or more SendFilePaths
to
* identify the files you want to transfer.
*
*
* -
*
* For an SFTP connector, the file transfer can be either outbound or inbound. In both cases, you specify the
* ConnectorId
. Depending on the direction of the transfer, you also specify the following items:
*
*
* -
*
* If you are transferring file from a partner's SFTP server to Amazon Web Services storage, you specify one or more
* RetrieveFilePaths
to identify the files you want to transfer, and a LocalDirectoryPath
* to specify the destination folder.
*
*
* -
*
* If you are transferring file to a partner's SFTP server from Amazon Web Services storage, you specify one or more
* SendFilePaths
to identify the files you want to transfer, and a RemoteDirectoryPath
to
* specify the destination folder.
*
*
*
*
*
*
* @param startFileTransferRequest
* @return Result of the StartFileTransfer operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.StartFileTransfer
* @see AWS API
* Documentation
*/
@Override
public StartFileTransferResult startFileTransfer(StartFileTransferRequest request) {
request = beforeClientExecution(request);
return executeStartFileTransfer(request);
}
@SdkInternalApi
final StartFileTransferResult executeStartFileTransfer(StartFileTransferRequest startFileTransferRequest) {
ExecutionContext executionContext = createExecutionContext(startFileTransferRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartFileTransferRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startFileTransferRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartFileTransfer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartFileTransferResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Changes the state of a file transfer protocol-enabled server from OFFLINE
to ONLINE
. It
* has no impact on a server that is already ONLINE
. An ONLINE
server can accept and
* process file transfer jobs.
*
*
* The state of STARTING
indicates that the server is in an intermediate state, either not fully able
* to respond, or not fully online. The values of START_FAILED
can indicate an error condition.
*
*
* No response is returned from this call.
*
*
* @param startServerRequest
* @return Result of the StartServer operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.StartServer
* @see AWS API
* Documentation
*/
@Override
public StartServerResult startServer(StartServerRequest request) {
request = beforeClientExecution(request);
return executeStartServer(request);
}
@SdkInternalApi
final StartServerResult executeStartServer(StartServerRequest startServerRequest) {
ExecutionContext executionContext = createExecutionContext(startServerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StartServerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startServerRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartServer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartServerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Changes the state of a file transfer protocol-enabled server from ONLINE
to OFFLINE
. An
* OFFLINE
server cannot accept and process file transfer jobs. Information tied to your server, such
* as server and user properties, are not affected by stopping your server.
*
*
*
* Stopping the server does not reduce or impact your file transfer protocol endpoint billing; you must delete the
* server to stop being billed.
*
*
*
* The state of STOPPING
indicates that the server is in an intermediate state, either not fully able
* to respond, or not fully offline. The values of STOP_FAILED
can indicate an error condition.
*
*
* No response is returned from this call.
*
*
* @param stopServerRequest
* @return Result of the StopServer operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.StopServer
* @see AWS API
* Documentation
*/
@Override
public StopServerResult stopServer(StopServerRequest request) {
request = beforeClientExecution(request);
return executeStopServer(request);
}
@SdkInternalApi
final StopServerResult executeStopServer(StopServerRequest stopServerRequest) {
ExecutionContext executionContext = createExecutionContext(stopServerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new StopServerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopServerRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopServer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopServerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are users,
* servers, roles, and other entities.
*
*
* There is no response returned from this call.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.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, "Transfer");
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);
}
}
/**
*
* Tests whether your SFTP connector is set up successfully. We highly recommend that you call this operation to
* test your ability to transfer files between local Amazon Web Services storage and a trading partner's SFTP
* server.
*
*
* @param testConnectionRequest
* @return Result of the TestConnection operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.TestConnection
* @see AWS API
* Documentation
*/
@Override
public TestConnectionResult testConnection(TestConnectionRequest request) {
request = beforeClientExecution(request);
return executeTestConnection(request);
}
@SdkInternalApi
final TestConnectionResult executeTestConnection(TestConnectionRequest testConnectionRequest) {
ExecutionContext executionContext = createExecutionContext(testConnectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new TestConnectionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(testConnectionRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TestConnection");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TestConnectionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* If the IdentityProviderType
of a file transfer protocol-enabled server is
* AWS_DIRECTORY_SERVICE
or API_Gateway
, tests whether your identity provider is set up
* successfully. We highly recommend that you call this operation to test your authentication method as soon as you
* create your server. By doing so, you can troubleshoot issues with the identity provider integration to ensure
* that your users can successfully use the service.
*
*
* The ServerId
and UserName
parameters are required. The ServerProtocol
,
* SourceIp
, and UserPassword
are all optional.
*
*
* Note the following:
*
*
* -
*
* You cannot use TestIdentityProvider
if the IdentityProviderType
of your server is
* SERVICE_MANAGED
.
*
*
* -
*
* TestIdentityProvider
does not work with keys: it only accepts passwords.
*
*
* -
*
* TestIdentityProvider
can test the password operation for a custom Identity Provider that handles
* keys and passwords.
*
*
* -
*
* If you provide any incorrect values for any parameters, the Response
field is empty.
*
*
* -
*
* If you provide a server ID for a server that uses service-managed users, you get an error:
*
*
* An error occurred (InvalidRequestException) when calling the TestIdentityProvider operation: s-server-ID not configured for external auth
*
*
* -
*
* If you enter a Server ID for the --server-id
parameter that does not identify an actual Transfer
* server, you receive the following error:
*
*
* An error occurred (ResourceNotFoundException) when calling the TestIdentityProvider operation: Unknown server
* .
*
*
* It is possible your sever is in a different region. You can specify a region by adding the following:
* --region region-code
, such as --region us-east-2
to specify a server in US East
* (Ohio).
*
*
*
*
* @param testIdentityProviderRequest
* @return Result of the TestIdentityProvider operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.TestIdentityProvider
* @see AWS
* API Documentation
*/
@Override
public TestIdentityProviderResult testIdentityProvider(TestIdentityProviderRequest request) {
request = beforeClientExecution(request);
return executeTestIdentityProvider(request);
}
@SdkInternalApi
final TestIdentityProviderResult executeTestIdentityProvider(TestIdentityProviderRequest testIdentityProviderRequest) {
ExecutionContext executionContext = createExecutionContext(testIdentityProviderRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new TestIdentityProviderRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(testIdentityProviderRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TestIdentityProvider");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TestIdentityProviderResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Resources are users,
* servers, roles, and other entities.
*
*
* No response is returned from this call.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.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, "Transfer");
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);
}
}
/**
*
* Allows you to update parameters for the access specified in the ServerID
and ExternalID
* parameters.
*
*
* @param updateAccessRequest
* @return Result of the UpdateAccess operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.UpdateAccess
* @see AWS API
* Documentation
*/
@Override
public UpdateAccessResult updateAccess(UpdateAccessRequest request) {
request = beforeClientExecution(request);
return executeUpdateAccess(request);
}
@SdkInternalApi
final UpdateAccessResult executeUpdateAccess(UpdateAccessRequest updateAccessRequest) {
ExecutionContext executionContext = createExecutionContext(updateAccessRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateAccessRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAccessRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAccess");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAccessResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates some of the parameters for an existing agreement. Provide the AgreementId
and the
* ServerId
for the agreement that you want to update, along with the new values for the parameters to
* update.
*
*
* @param updateAgreementRequest
* @return Result of the UpdateAgreement operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.UpdateAgreement
* @see AWS API
* Documentation
*/
@Override
public UpdateAgreementResult updateAgreement(UpdateAgreementRequest request) {
request = beforeClientExecution(request);
return executeUpdateAgreement(request);
}
@SdkInternalApi
final UpdateAgreementResult executeUpdateAgreement(UpdateAgreementRequest updateAgreementRequest) {
ExecutionContext executionContext = createExecutionContext(updateAgreementRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateAgreementRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAgreementRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAgreement");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAgreementResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the active and inactive dates for a certificate.
*
*
* @param updateCertificateRequest
* @return Result of the UpdateCertificate operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.UpdateCertificate
* @see AWS API
* Documentation
*/
@Override
public UpdateCertificateResult updateCertificate(UpdateCertificateRequest request) {
request = beforeClientExecution(request);
return executeUpdateCertificate(request);
}
@SdkInternalApi
final UpdateCertificateResult executeUpdateCertificate(UpdateCertificateRequest updateCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(updateCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateCertificateRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates some of the parameters for an existing connector. Provide the ConnectorId
for the connector
* that you want to update, along with the new values for the parameters to update.
*
*
* @param updateConnectorRequest
* @return Result of the UpdateConnector operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @sample AWSTransfer.UpdateConnector
* @see AWS API
* Documentation
*/
@Override
public UpdateConnectorResult updateConnector(UpdateConnectorRequest request) {
request = beforeClientExecution(request);
return executeUpdateConnector(request);
}
@SdkInternalApi
final UpdateConnectorResult executeUpdateConnector(UpdateConnectorRequest updateConnectorRequest) {
ExecutionContext executionContext = createExecutionContext(updateConnectorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateConnectorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateConnectorRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConnector");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateConnectorResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the description for the host key that's specified by the ServerId
and HostKeyId
* parameters.
*
*
* @param updateHostKeyRequest
* @return Result of the UpdateHostKey operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.UpdateHostKey
* @see AWS API
* Documentation
*/
@Override
public UpdateHostKeyResult updateHostKey(UpdateHostKeyRequest request) {
request = beforeClientExecution(request);
return executeUpdateHostKey(request);
}
@SdkInternalApi
final UpdateHostKeyResult executeUpdateHostKey(UpdateHostKeyRequest updateHostKeyRequest) {
ExecutionContext executionContext = createExecutionContext(updateHostKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateHostKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateHostKeyRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateHostKey");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateHostKeyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates some of the parameters for an existing profile. Provide the ProfileId
for the profile that
* you want to update, along with the new values for the parameters to update.
*
*
* @param updateProfileRequest
* @return Result of the UpdateProfile operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.UpdateProfile
* @see AWS API
* Documentation
*/
@Override
public UpdateProfileResult updateProfile(UpdateProfileRequest request) {
request = beforeClientExecution(request);
return executeUpdateProfile(request);
}
@SdkInternalApi
final UpdateProfileResult executeUpdateProfile(UpdateProfileRequest updateProfileRequest) {
ExecutionContext executionContext = createExecutionContext(updateProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateProfileRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates the file transfer protocol-enabled server's properties after that server has been created.
*
*
* The UpdateServer
call returns the ServerId
of the server you updated.
*
*
* @param updateServerRequest
* @return Result of the UpdateServer operation returned by the service.
* @throws ConflictException
* This exception is thrown when the UpdateServer
is called for a file transfer
* protocol-enabled server that has VPC as the endpoint type and the server's VpcEndpointID
is
* not in the available state.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @throws ResourceExistsException
* The requested resource does not exist, or exists in a region other than the one specified for the
* command.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AWSTransfer.UpdateServer
* @see AWS API
* Documentation
*/
@Override
public UpdateServerResult updateServer(UpdateServerRequest request) {
request = beforeClientExecution(request);
return executeUpdateServer(request);
}
@SdkInternalApi
final UpdateServerResult executeUpdateServer(UpdateServerRequest updateServerRequest) {
ExecutionContext executionContext = createExecutionContext(updateServerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateServerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateServerRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateServer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateServerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Assigns new properties to a user. Parameters you pass modify any or all of the following: the home directory,
* role, and policy for the UserName
and ServerId
you specify.
*
*
* The response returns the ServerId
and the UserName
for the updated user.
*
*
* In the console, you can select Restricted when you create or update a user. This ensures that the user
* can't access anything outside of their home directory. The programmatic way to configure this behavior is to
* update the user. Set their HomeDirectoryType
to LOGICAL
, and specify
* HomeDirectoryMappings
with Entry
as root (/
) and Target
as
* their home directory.
*
*
* For example, if the user's home directory is /test/admin-user
, the following command updates the
* user so that their configuration in the console shows the Restricted flag as selected.
*
*
* aws transfer update-user --server-id <server-id> --user-name admin-user --home-directory-type LOGICAL --home-directory-mappings "[{\"Entry\":\"/\", \"Target\":\"/test/admin-user\"}]"
*
*
* @param updateUserRequest
* @return Result of the UpdateUser operation returned by the service.
* @throws ResourceNotFoundException
* This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
* @throws InvalidRequestException
* This exception is thrown when the client submits a malformed request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServiceErrorException
* This exception is thrown when an error occurs in the Transfer Family service.
* @throws ServiceUnavailableException
* The request has failed because the Amazon Web ServicesTransfer Family service is not available.
* @sample AWSTransfer.UpdateUser
* @see AWS API
* Documentation
*/
@Override
public UpdateUserResult updateUser(UpdateUserRequest request) {
request = beforeClientExecution(request);
return executeUpdateUser(request);
}
@SdkInternalApi
final UpdateUserResult executeUpdateUser(UpdateUserRequest updateUserRequest) {
ExecutionContext executionContext = createExecutionContext(updateUserRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateUserRequest));
// 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, "Transfer");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateUser");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateUserResultJsonUnmarshaller());
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 AWSTransferWaiters waiters() {
if (waiters == null) {
synchronized (this) {
if (waiters == null) {
waiters = new AWSTransferWaiters(this);
}
}
}
return waiters;
}
@Override
public void shutdown() {
super.shutdown();
if (waiters != null) {
waiters.shutdown();
}
}
}