All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.amplifybackend.AWSAmplifyBackendClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AmplifyBackend module holds the client classes that are used for communicating with AmplifyBackend Service

There is a newer version: 1.12.778
Show newest version
/*
 * 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.amplifybackend;

import org.w3c.dom.*;

import java.net.*;
import java.util.*;

import javax.annotation.Generated;

import org.apache.commons.logging.*;

import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;

import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;

import com.amazonaws.services.amplifybackend.AWSAmplifyBackendClientBuilder;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.amplifybackend.model.*;

import com.amazonaws.services.amplifybackend.model.transform.*;

/**
 * Client for accessing AmplifyBackend. All service calls made using this client are blocking, and will not return until
 * the service call completes.
 * 

*

* AWS Amplify Admin API *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSAmplifyBackendClient extends AmazonWebServiceClient implements AWSAmplifyBackend { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSAmplifyBackend.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "amplifybackend"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .withContentTypeOverride("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("NotFoundException").withExceptionUnmarshaller( com.amazonaws.services.amplifybackend.model.transform.NotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("GatewayTimeoutException").withExceptionUnmarshaller( com.amazonaws.services.amplifybackend.model.transform.GatewayTimeoutExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("TooManyRequestsException").withExceptionUnmarshaller( com.amazonaws.services.amplifybackend.model.transform.TooManyRequestsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("BadRequestException").withExceptionUnmarshaller( com.amazonaws.services.amplifybackend.model.transform.BadRequestExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.amplifybackend.model.AWSAmplifyBackendException.class)); public static AWSAmplifyBackendClientBuilder builder() { return AWSAmplifyBackendClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on AmplifyBackend 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. */ AWSAmplifyBackendClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on AmplifyBackend 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. */ AWSAmplifyBackendClient(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("amplifybackend.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/amplifybackend/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/amplifybackend/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* This operation clones an existing backend. *

* * @param cloneBackendRequest * The request body for CloneBackend. * @return Result of the CloneBackend operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.CloneBackend * @see AWS * API Documentation */ @Override public CloneBackendResult cloneBackend(CloneBackendRequest request) { request = beforeClientExecution(request); return executeCloneBackend(request); } @SdkInternalApi final CloneBackendResult executeCloneBackend(CloneBackendRequest cloneBackendRequest) { ExecutionContext executionContext = createExecutionContext(cloneBackendRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CloneBackendRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(cloneBackendRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CloneBackend"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CloneBackendResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* This operation creates a backend for an Amplify app. Backends are automatically created at the time of app * creation. *

* * @param createBackendRequest * The request body for CreateBackend. * @return Result of the CreateBackend operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.CreateBackend * @see AWS * API Documentation */ @Override public CreateBackendResult createBackend(CreateBackendRequest request) { request = beforeClientExecution(request); return executeCreateBackend(request); } @SdkInternalApi final CreateBackendResult executeCreateBackend(CreateBackendRequest createBackendRequest) { ExecutionContext executionContext = createExecutionContext(createBackendRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBackendRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBackendRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBackend"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBackendResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new backend API resource. *

* * @param createBackendAPIRequest * The request body for CreateBackendAPI. * @return Result of the CreateBackendAPI operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.CreateBackendAPI * @see AWS API Documentation */ @Override public CreateBackendAPIResult createBackendAPI(CreateBackendAPIRequest request) { request = beforeClientExecution(request); return executeCreateBackendAPI(request); } @SdkInternalApi final CreateBackendAPIResult executeCreateBackendAPI(CreateBackendAPIRequest createBackendAPIRequest) { ExecutionContext executionContext = createExecutionContext(createBackendAPIRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBackendAPIRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBackendAPIRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBackendAPI"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBackendAPIResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new backend authentication resource. *

* * @param createBackendAuthRequest * The request body for CreateBackendAuth. * @return Result of the CreateBackendAuth operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.CreateBackendAuth * @see AWS API Documentation */ @Override public CreateBackendAuthResult createBackendAuth(CreateBackendAuthRequest request) { request = beforeClientExecution(request); return executeCreateBackendAuth(request); } @SdkInternalApi final CreateBackendAuthResult executeCreateBackendAuth(CreateBackendAuthRequest createBackendAuthRequest) { ExecutionContext executionContext = createExecutionContext(createBackendAuthRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBackendAuthRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBackendAuthRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBackendAuth"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBackendAuthResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a config object for a backend. *

* * @param createBackendConfigRequest * The request body for CreateBackendConfig. * @return Result of the CreateBackendConfig operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.CreateBackendConfig * @see AWS API Documentation */ @Override public CreateBackendConfigResult createBackendConfig(CreateBackendConfigRequest request) { request = beforeClientExecution(request); return executeCreateBackendConfig(request); } @SdkInternalApi final CreateBackendConfigResult executeCreateBackendConfig(CreateBackendConfigRequest createBackendConfigRequest) { ExecutionContext executionContext = createExecutionContext(createBackendConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBackendConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBackendConfigRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBackendConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBackendConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a backend storage resource. *

* * @param createBackendStorageRequest * The request body for CreateBackendStorage. * @return Result of the CreateBackendStorage operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.CreateBackendStorage * @see AWS API Documentation */ @Override public CreateBackendStorageResult createBackendStorage(CreateBackendStorageRequest request) { request = beforeClientExecution(request); return executeCreateBackendStorage(request); } @SdkInternalApi final CreateBackendStorageResult executeCreateBackendStorage(CreateBackendStorageRequest createBackendStorageRequest) { ExecutionContext executionContext = createExecutionContext(createBackendStorageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateBackendStorageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBackendStorageRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBackendStorage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBackendStorageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Generates a one-time challenge code to authenticate a user into your Amplify Admin UI. *

* * @param createTokenRequest * @return Result of the CreateToken operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.CreateToken * @see AWS API * Documentation */ @Override public CreateTokenResult createToken(CreateTokenRequest request) { request = beforeClientExecution(request); return executeCreateToken(request); } @SdkInternalApi final CreateTokenResult executeCreateToken(CreateTokenRequest createTokenRequest) { ExecutionContext executionContext = createExecutionContext(createTokenRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateTokenRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createTokenRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateToken"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateTokenResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes an existing environment from your Amplify project. *

* * @param deleteBackendRequest * @return Result of the DeleteBackend operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.DeleteBackend * @see AWS * API Documentation */ @Override public DeleteBackendResult deleteBackend(DeleteBackendRequest request) { request = beforeClientExecution(request); return executeDeleteBackend(request); } @SdkInternalApi final DeleteBackendResult executeDeleteBackend(DeleteBackendRequest deleteBackendRequest) { ExecutionContext executionContext = createExecutionContext(deleteBackendRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBackendRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBackendRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBackend"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBackendResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an existing backend API resource. *

* * @param deleteBackendAPIRequest * The request body for DeleteBackendAPI. * @return Result of the DeleteBackendAPI operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.DeleteBackendAPI * @see AWS API Documentation */ @Override public DeleteBackendAPIResult deleteBackendAPI(DeleteBackendAPIRequest request) { request = beforeClientExecution(request); return executeDeleteBackendAPI(request); } @SdkInternalApi final DeleteBackendAPIResult executeDeleteBackendAPI(DeleteBackendAPIRequest deleteBackendAPIRequest) { ExecutionContext executionContext = createExecutionContext(deleteBackendAPIRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBackendAPIRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBackendAPIRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBackendAPI"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBackendAPIResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an existing backend authentication resource. *

* * @param deleteBackendAuthRequest * The request body for DeleteBackendAuth. * @return Result of the DeleteBackendAuth operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.DeleteBackendAuth * @see AWS API Documentation */ @Override public DeleteBackendAuthResult deleteBackendAuth(DeleteBackendAuthRequest request) { request = beforeClientExecution(request); return executeDeleteBackendAuth(request); } @SdkInternalApi final DeleteBackendAuthResult executeDeleteBackendAuth(DeleteBackendAuthRequest deleteBackendAuthRequest) { ExecutionContext executionContext = createExecutionContext(deleteBackendAuthRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBackendAuthRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBackendAuthRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBackendAuth"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBackendAuthResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes the specified backend storage resource. *

* * @param deleteBackendStorageRequest * The request body for DeleteBackendStorage. * @return Result of the DeleteBackendStorage operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.DeleteBackendStorage * @see AWS API Documentation */ @Override public DeleteBackendStorageResult deleteBackendStorage(DeleteBackendStorageRequest request) { request = beforeClientExecution(request); return executeDeleteBackendStorage(request); } @SdkInternalApi final DeleteBackendStorageResult executeDeleteBackendStorage(DeleteBackendStorageRequest deleteBackendStorageRequest) { ExecutionContext executionContext = createExecutionContext(deleteBackendStorageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteBackendStorageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBackendStorageRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBackendStorage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBackendStorageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the challenge token based on the given appId and sessionId. *

* * @param deleteTokenRequest * @return Result of the DeleteToken operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.DeleteToken * @see AWS API * Documentation */ @Override public DeleteTokenResult deleteToken(DeleteTokenRequest request) { request = beforeClientExecution(request); return executeDeleteToken(request); } @SdkInternalApi final DeleteTokenResult executeDeleteToken(DeleteTokenRequest deleteTokenRequest) { ExecutionContext executionContext = createExecutionContext(deleteTokenRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteTokenRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteTokenRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteToken"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteTokenResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Generates a model schema for an existing backend API resource. *

* * @param generateBackendAPIModelsRequest * The request body for GenerateBackendAPIModels. * @return Result of the GenerateBackendAPIModels operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.GenerateBackendAPIModels * @see AWS API Documentation */ @Override public GenerateBackendAPIModelsResult generateBackendAPIModels(GenerateBackendAPIModelsRequest request) { request = beforeClientExecution(request); return executeGenerateBackendAPIModels(request); } @SdkInternalApi final GenerateBackendAPIModelsResult executeGenerateBackendAPIModels(GenerateBackendAPIModelsRequest generateBackendAPIModelsRequest) { ExecutionContext executionContext = createExecutionContext(generateBackendAPIModelsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GenerateBackendAPIModelsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(generateBackendAPIModelsRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GenerateBackendAPIModels"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GenerateBackendAPIModelsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Provides project-level details for your Amplify UI project. *

* * @param getBackendRequest * The request body for GetBackend. * @return Result of the GetBackend operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.GetBackend * @see AWS API * Documentation */ @Override public GetBackendResult getBackend(GetBackendRequest request) { request = beforeClientExecution(request); return executeGetBackend(request); } @SdkInternalApi final GetBackendResult executeGetBackend(GetBackendRequest getBackendRequest) { ExecutionContext executionContext = createExecutionContext(getBackendRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetBackendRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBackendRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBackend"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBackendResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets the details for a backend API. *

* * @param getBackendAPIRequest * The request body for GetBackendAPI. * @return Result of the GetBackendAPI operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.GetBackendAPI * @see AWS * API Documentation */ @Override public GetBackendAPIResult getBackendAPI(GetBackendAPIRequest request) { request = beforeClientExecution(request); return executeGetBackendAPI(request); } @SdkInternalApi final GetBackendAPIResult executeGetBackendAPI(GetBackendAPIRequest getBackendAPIRequest) { ExecutionContext executionContext = createExecutionContext(getBackendAPIRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetBackendAPIRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBackendAPIRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBackendAPI"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBackendAPIResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a model introspection schema for an existing backend API resource. *

* * @param getBackendAPIModelsRequest * The request body for GetBackendAPIModels. * @return Result of the GetBackendAPIModels operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.GetBackendAPIModels * @see AWS API Documentation */ @Override public GetBackendAPIModelsResult getBackendAPIModels(GetBackendAPIModelsRequest request) { request = beforeClientExecution(request); return executeGetBackendAPIModels(request); } @SdkInternalApi final GetBackendAPIModelsResult executeGetBackendAPIModels(GetBackendAPIModelsRequest getBackendAPIModelsRequest) { ExecutionContext executionContext = createExecutionContext(getBackendAPIModelsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetBackendAPIModelsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBackendAPIModelsRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBackendAPIModels"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBackendAPIModelsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a backend auth details. *

* * @param getBackendAuthRequest * The request body for GetBackendAuth. * @return Result of the GetBackendAuth operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.GetBackendAuth * @see AWS * API Documentation */ @Override public GetBackendAuthResult getBackendAuth(GetBackendAuthRequest request) { request = beforeClientExecution(request); return executeGetBackendAuth(request); } @SdkInternalApi final GetBackendAuthResult executeGetBackendAuth(GetBackendAuthRequest getBackendAuthRequest) { ExecutionContext executionContext = createExecutionContext(getBackendAuthRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetBackendAuthRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBackendAuthRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBackendAuth"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBackendAuthResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about a specific job. *

* * @param getBackendJobRequest * @return Result of the GetBackendJob operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.GetBackendJob * @see AWS * API Documentation */ @Override public GetBackendJobResult getBackendJob(GetBackendJobRequest request) { request = beforeClientExecution(request); return executeGetBackendJob(request); } @SdkInternalApi final GetBackendJobResult executeGetBackendJob(GetBackendJobRequest getBackendJobRequest) { ExecutionContext executionContext = createExecutionContext(getBackendJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetBackendJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBackendJobRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBackendJob"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBackendJobResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets details for a backend storage resource. *

* * @param getBackendStorageRequest * The request body for GetBackendStorage. * @return Result of the GetBackendStorage operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.GetBackendStorage * @see AWS API Documentation */ @Override public GetBackendStorageResult getBackendStorage(GetBackendStorageRequest request) { request = beforeClientExecution(request); return executeGetBackendStorage(request); } @SdkInternalApi final GetBackendStorageResult executeGetBackendStorage(GetBackendStorageRequest getBackendStorageRequest) { ExecutionContext executionContext = createExecutionContext(getBackendStorageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetBackendStorageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBackendStorageRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBackendStorage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBackendStorageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets the challenge token based on the given appId and sessionId. *

* * @param getTokenRequest * @return Result of the GetToken operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.GetToken * @see AWS API * Documentation */ @Override public GetTokenResult getToken(GetTokenRequest request) { request = beforeClientExecution(request); return executeGetToken(request); } @SdkInternalApi final GetTokenResult executeGetToken(GetTokenRequest getTokenRequest) { ExecutionContext executionContext = createExecutionContext(getTokenRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetTokenRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getTokenRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetToken"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTokenResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Imports an existing backend authentication resource. *

* * @param importBackendAuthRequest * The request body for ImportBackendAuth. * @return Result of the ImportBackendAuth operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.ImportBackendAuth * @see AWS API Documentation */ @Override public ImportBackendAuthResult importBackendAuth(ImportBackendAuthRequest request) { request = beforeClientExecution(request); return executeImportBackendAuth(request); } @SdkInternalApi final ImportBackendAuthResult executeImportBackendAuth(ImportBackendAuthRequest importBackendAuthRequest) { ExecutionContext executionContext = createExecutionContext(importBackendAuthRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ImportBackendAuthRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importBackendAuthRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportBackendAuth"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportBackendAuthResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Imports an existing backend storage resource. *

* * @param importBackendStorageRequest * The request body for ImportBackendStorage. * @return Result of the ImportBackendStorage operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.ImportBackendStorage * @see AWS API Documentation */ @Override public ImportBackendStorageResult importBackendStorage(ImportBackendStorageRequest request) { request = beforeClientExecution(request); return executeImportBackendStorage(request); } @SdkInternalApi final ImportBackendStorageResult executeImportBackendStorage(ImportBackendStorageRequest importBackendStorageRequest) { ExecutionContext executionContext = createExecutionContext(importBackendStorageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ImportBackendStorageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importBackendStorageRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportBackendStorage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportBackendStorageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the jobs for the backend of an Amplify app. *

* * @param listBackendJobsRequest * The request body for ListBackendJobs. * @return Result of the ListBackendJobs operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.ListBackendJobs * @see AWS * API Documentation */ @Override public ListBackendJobsResult listBackendJobs(ListBackendJobsRequest request) { request = beforeClientExecution(request); return executeListBackendJobs(request); } @SdkInternalApi final ListBackendJobsResult executeListBackendJobs(ListBackendJobsRequest listBackendJobsRequest) { ExecutionContext executionContext = createExecutionContext(listBackendJobsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBackendJobsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBackendJobsRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBackendJobs"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBackendJobsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* The list of S3 buckets in your account. *

* * @param listS3BucketsRequest * The request body for S3Buckets. * @return Result of the ListS3Buckets operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.ListS3Buckets * @see AWS * API Documentation */ @Override public ListS3BucketsResult listS3Buckets(ListS3BucketsRequest request) { request = beforeClientExecution(request); return executeListS3Buckets(request); } @SdkInternalApi final ListS3BucketsResult executeListS3Buckets(ListS3BucketsRequest listS3BucketsRequest) { ExecutionContext executionContext = createExecutionContext(listS3BucketsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListS3BucketsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listS3BucketsRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListS3Buckets"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListS3BucketsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes all backend environments from your Amplify project. *

* * @param removeAllBackendsRequest * The request body for RemoveAllBackends. * @return Result of the RemoveAllBackends operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.RemoveAllBackends * @see AWS API Documentation */ @Override public RemoveAllBackendsResult removeAllBackends(RemoveAllBackendsRequest request) { request = beforeClientExecution(request); return executeRemoveAllBackends(request); } @SdkInternalApi final RemoveAllBackendsResult executeRemoveAllBackends(RemoveAllBackendsRequest removeAllBackendsRequest) { ExecutionContext executionContext = createExecutionContext(removeAllBackendsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemoveAllBackendsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(removeAllBackendsRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveAllBackends"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemoveAllBackendsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes the AWS resources required to access the Amplify Admin UI. *

* * @param removeBackendConfigRequest * @return Result of the RemoveBackendConfig operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.RemoveBackendConfig * @see AWS API Documentation */ @Override public RemoveBackendConfigResult removeBackendConfig(RemoveBackendConfigRequest request) { request = beforeClientExecution(request); return executeRemoveBackendConfig(request); } @SdkInternalApi final RemoveBackendConfigResult executeRemoveBackendConfig(RemoveBackendConfigRequest removeBackendConfigRequest) { ExecutionContext executionContext = createExecutionContext(removeBackendConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemoveBackendConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(removeBackendConfigRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveBackendConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemoveBackendConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates an existing backend API resource. *

* * @param updateBackendAPIRequest * The request body for UpdateBackendAPI. * @return Result of the UpdateBackendAPI operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.UpdateBackendAPI * @see AWS API Documentation */ @Override public UpdateBackendAPIResult updateBackendAPI(UpdateBackendAPIRequest request) { request = beforeClientExecution(request); return executeUpdateBackendAPI(request); } @SdkInternalApi final UpdateBackendAPIResult executeUpdateBackendAPI(UpdateBackendAPIRequest updateBackendAPIRequest) { ExecutionContext executionContext = createExecutionContext(updateBackendAPIRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBackendAPIRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBackendAPIRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBackendAPI"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBackendAPIResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates an existing backend authentication resource. *

* * @param updateBackendAuthRequest * The request body for UpdateBackendAuth. * @return Result of the UpdateBackendAuth operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.UpdateBackendAuth * @see AWS API Documentation */ @Override public UpdateBackendAuthResult updateBackendAuth(UpdateBackendAuthRequest request) { request = beforeClientExecution(request); return executeUpdateBackendAuth(request); } @SdkInternalApi final UpdateBackendAuthResult executeUpdateBackendAuth(UpdateBackendAuthRequest updateBackendAuthRequest) { ExecutionContext executionContext = createExecutionContext(updateBackendAuthRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBackendAuthRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBackendAuthRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBackendAuth"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBackendAuthResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the AWS resources required to access the Amplify Admin UI. *

* * @param updateBackendConfigRequest * The request body for UpdateBackendConfig. * @return Result of the UpdateBackendConfig operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.UpdateBackendConfig * @see AWS API Documentation */ @Override public UpdateBackendConfigResult updateBackendConfig(UpdateBackendConfigRequest request) { request = beforeClientExecution(request); return executeUpdateBackendConfig(request); } @SdkInternalApi final UpdateBackendConfigResult executeUpdateBackendConfig(UpdateBackendConfigRequest updateBackendConfigRequest) { ExecutionContext executionContext = createExecutionContext(updateBackendConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBackendConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBackendConfigRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBackendConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBackendConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a specific job. *

* * @param updateBackendJobRequest * The request body for GetBackendJob. * @return Result of the UpdateBackendJob operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.UpdateBackendJob * @see AWS API Documentation */ @Override public UpdateBackendJobResult updateBackendJob(UpdateBackendJobRequest request) { request = beforeClientExecution(request); return executeUpdateBackendJob(request); } @SdkInternalApi final UpdateBackendJobResult executeUpdateBackendJob(UpdateBackendJobRequest updateBackendJobRequest) { ExecutionContext executionContext = createExecutionContext(updateBackendJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBackendJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBackendJobRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBackendJob"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBackendJobResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates an existing backend storage resource. *

* * @param updateBackendStorageRequest * The request body for UpdateBackendStorage. * @return Result of the UpdateBackendStorage operation returned by the service. * @throws NotFoundException * 404 response * @throws GatewayTimeoutException * 504 response * @throws TooManyRequestsException * 429 response * @throws BadRequestException * 400 response * @sample AWSAmplifyBackend.UpdateBackendStorage * @see AWS API Documentation */ @Override public UpdateBackendStorageResult updateBackendStorage(UpdateBackendStorageRequest request) { request = beforeClientExecution(request); return executeUpdateBackendStorage(request); } @SdkInternalApi final UpdateBackendStorageResult executeUpdateBackendStorage(UpdateBackendStorageRequest updateBackendStorageRequest) { ExecutionContext executionContext = createExecutionContext(updateBackendStorageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateBackendStorageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateBackendStorageRequest)); // 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, "AmplifyBackend"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateBackendStorage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateBackendStorageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing the request. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none is available. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return invoke(request, responseHandler, executionContext, null, null); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private Response anonymousInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private Response doInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) { if (discoveredEndpoint != null) { request.setEndpoint(discoveredEndpoint); request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery"); } else if (uriFromEndpointTrait != null) { request.setEndpoint(uriFromEndpointTrait); } else { request.setEndpoint(endpoint); } request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } @Override public void shutdown() { super.shutdown(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy