/* * Copyright 2018-2023 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.appsync; 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.appsync.AWSAppSyncClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.appsync.model.*; import com.amazonaws.services.appsync.model.transform.*; /** * Client for accessing AWSAppSync. All service calls made using this client are blocking, and will not return until the * service call completes. *
*
* AppSync provides API actions for creating and interacting with data sources using GraphQL from your application. *
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSAppSyncClient extends AmazonWebServiceClient implements AWSAppSync { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSAppSync.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "appsync"; /** 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("ConcurrentModificationException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.ConcurrentModificationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalFailureException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.InternalFailureExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("GraphQLSchemaException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.GraphQLSchemaExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ApiKeyLimitExceededException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.ApiKeyLimitExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("LimitExceededException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.LimitExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ApiLimitExceededException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.ApiLimitExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("NotFoundException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.NotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("UnauthorizedException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.UnauthorizedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ApiKeyValidityOutOfBoundsException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.ApiKeyValidityOutOfBoundsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("BadRequestException").withExceptionUnmarshaller( com.amazonaws.services.appsync.model.transform.BadRequestExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.appsync.model.AWSAppSyncException.class)); public static AWSAppSyncClientBuilder builder() { return AWSAppSyncClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on AWSAppSync 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. */ AWSAppSyncClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on AWSAppSync 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. */ AWSAppSyncClient(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("appsync.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/appsync/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/appsync/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *
* Maps an endpoint to your custom domain. *
* * @param associateApiRequest * @return Result of the AssociateApi operation returned by the service. * @throws AccessDeniedException * You don't have access to perform this operation on this resource. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @sample AWSAppSync.AssociateApi * @see AWS API * Documentation */ @Override public AssociateApiResult associateApi(AssociateApiRequest request) { request = beforeClientExecution(request); return executeAssociateApi(request); } @SdkInternalApi final AssociateApiResult executeAssociateApi(AssociateApiRequest associateApiRequest) { ExecutionContext executionContext = createExecutionContext(associateApiRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates an association between a Merged API and source API using the source API's identifier. *
* * @param associateMergedGraphqlApiRequest * @return Result of the AssociateMergedGraphqlApi operation returned by the service. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws LimitExceededException * The request exceeded a limit. Try your request again. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @sample AWSAppSync.AssociateMergedGraphqlApi * @see AWS API Documentation */ @Override public AssociateMergedGraphqlApiResult associateMergedGraphqlApi(AssociateMergedGraphqlApiRequest request) { request = beforeClientExecution(request); return executeAssociateMergedGraphqlApi(request); } @SdkInternalApi final AssociateMergedGraphqlApiResult executeAssociateMergedGraphqlApi(AssociateMergedGraphqlApiRequest associateMergedGraphqlApiRequest) { ExecutionContext executionContext = createExecutionContext(associateMergedGraphqlApiRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates an association between a Merged API and source API using the Merged API's identifier. *
* * @param associateSourceGraphqlApiRequest * @return Result of the AssociateSourceGraphqlApi operation returned by the service. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws LimitExceededException * The request exceeded a limit. Try your request again. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @sample AWSAppSync.AssociateSourceGraphqlApi * @see AWS API Documentation */ @Override public AssociateSourceGraphqlApiResult associateSourceGraphqlApi(AssociateSourceGraphqlApiRequest request) { request = beforeClientExecution(request); return executeAssociateSourceGraphqlApi(request); } @SdkInternalApi final AssociateSourceGraphqlApiResult executeAssociateSourceGraphqlApi(AssociateSourceGraphqlApiRequest associateSourceGraphqlApiRequest) { ExecutionContext executionContext = createExecutionContext(associateSourceGraphqlApiRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates a cache for the GraphQL API. *
* * @param createApiCacheRequest * Represents the input of aCreateApiCache
operation.
* @return Result of the CreateApiCache operation returned by the service.
* @throws BadRequestException
* The request is not well formed. For example, a value is invalid or a required field is missing. Check the
* field values, and then try again.
* @throws ConcurrentModificationException
* Another modification is in progress at this time and it must complete before you can make your change.
* @throws NotFoundException
* The resource specified in the request was not found. Check the resource, and then try again.
* @throws UnauthorizedException
* You aren't authorized to perform this operation.
* @throws InternalFailureException
* An internal AppSync error occurred. Try your request again.
* @sample AWSAppSync.CreateApiCache
* @see AWS API
* Documentation
*/
@Override
public CreateApiCacheResult createApiCache(CreateApiCacheRequest request) {
request = beforeClientExecution(request);
return executeCreateApiCache(request);
}
@SdkInternalApi
final CreateApiCacheResult executeCreateApiCache(CreateApiCacheRequest createApiCacheRequest) {
ExecutionContext executionContext = createExecutionContext(createApiCacheRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request* Creates a unique key that you can distribute to clients who invoke your API. *
* * @param createApiKeyRequest * @return Result of the CreateApiKey operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws LimitExceededException * The request exceeded a limit. Try your request again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws LimitExceededException * The request exceeded a limit. Try your request again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws ApiKeyLimitExceededException * The API key exceeded a limit. Try your request again. * @throws ApiKeyValidityOutOfBoundsException * The API key expiration must be set to a value between 1 and 365 days from creation (for *CreateApiKey
) or from update (for UpdateApiKey
).
* @sample AWSAppSync.CreateApiKey
* @see AWS API
* Documentation
*/
@Override
public CreateApiKeyResult createApiKey(CreateApiKeyRequest request) {
request = beforeClientExecution(request);
return executeCreateApiKey(request);
}
@SdkInternalApi
final CreateApiKeyResult executeCreateApiKey(CreateApiKeyRequest createApiKeyRequest) {
ExecutionContext executionContext = createExecutionContext(createApiKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request
* Creates a DataSource
object.
*
* Creates a custom DomainName
object.
*
* Creates a Function
object.
*
* A function is a reusable entity. You can use multiple functions to compose the resolver logic. *
* * @param createFunctionRequest * @return Result of the CreateFunction operation returned by the service. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.CreateFunction * @see AWS API * Documentation */ @Override public CreateFunctionResult createFunction(CreateFunctionRequest request) { request = beforeClientExecution(request); return executeCreateFunction(request); } @SdkInternalApi final CreateFunctionResult executeCreateFunction(CreateFunctionRequest createFunctionRequest) { ExecutionContext executionContext = createExecutionContext(createFunctionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Creates a GraphqlApi
object.
*
* Creates a Resolver
object.
*
* A resolver converts incoming requests into a format that a data source can understand, and converts the data * source's responses into GraphQL. *
* * @param createResolverRequest * @return Result of the CreateResolver operation returned by the service. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @sample AWSAppSync.CreateResolver * @see AWS API * Documentation */ @Override public CreateResolverResult createResolver(CreateResolverRequest request) { request = beforeClientExecution(request); return executeCreateResolver(request); } @SdkInternalApi final CreateResolverResult executeCreateResolver(CreateResolverRequest createResolverRequest) { ExecutionContext executionContext = createExecutionContext(createResolverRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Creates a Type
object.
*
* Deletes an ApiCache
object.
*
DeleteApiCache
operation.
* @return Result of the DeleteApiCache operation returned by the service.
* @throws BadRequestException
* The request is not well formed. For example, a value is invalid or a required field is missing. Check the
* field values, and then try again.
* @throws ConcurrentModificationException
* Another modification is in progress at this time and it must complete before you can make your change.
* @throws NotFoundException
* The resource specified in the request was not found. Check the resource, and then try again.
* @throws UnauthorizedException
* You aren't authorized to perform this operation.
* @throws InternalFailureException
* An internal AppSync error occurred. Try your request again.
* @sample AWSAppSync.DeleteApiCache
* @see AWS API
* Documentation
*/
@Override
public DeleteApiCacheResult deleteApiCache(DeleteApiCacheRequest request) {
request = beforeClientExecution(request);
return executeDeleteApiCache(request);
}
@SdkInternalApi
final DeleteApiCacheResult executeDeleteApiCache(DeleteApiCacheRequest deleteApiCacheRequest) {
ExecutionContext executionContext = createExecutionContext(deleteApiCacheRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request* Deletes an API key. *
* * @param deleteApiKeyRequest * @return Result of the DeleteApiKey operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.DeleteApiKey * @see AWS API * Documentation */ @Override public DeleteApiKeyResult deleteApiKey(DeleteApiKeyRequest request) { request = beforeClientExecution(request); return executeDeleteApiKey(request); } @SdkInternalApi final DeleteApiKeyResult executeDeleteApiKey(DeleteApiKeyRequest deleteApiKeyRequest) { ExecutionContext executionContext = createExecutionContext(deleteApiKeyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Deletes a DataSource
object.
*
* Deletes a custom DomainName
object.
*
* Deletes a Function
.
*
* Deletes a GraphqlApi
object.
*
* Deletes a Resolver
object.
*
* Deletes a Type
object.
*
* Removes an ApiAssociation
object from a custom domain.
*
* Deletes an association between a Merged API and source API using the source API's identifier and the association * ID. *
* * @param disassociateMergedGraphqlApiRequest * @return Result of the DisassociateMergedGraphqlApi operation returned by the service. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @sample AWSAppSync.DisassociateMergedGraphqlApi * @see AWS API Documentation */ @Override public DisassociateMergedGraphqlApiResult disassociateMergedGraphqlApi(DisassociateMergedGraphqlApiRequest request) { request = beforeClientExecution(request); return executeDisassociateMergedGraphqlApi(request); } @SdkInternalApi final DisassociateMergedGraphqlApiResult executeDisassociateMergedGraphqlApi(DisassociateMergedGraphqlApiRequest disassociateMergedGraphqlApiRequest) { ExecutionContext executionContext = createExecutionContext(disassociateMergedGraphqlApiRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Deletes an association between a Merged API and source API using the Merged API's identifier and the association * ID. *
* * @param disassociateSourceGraphqlApiRequest * @return Result of the DisassociateSourceGraphqlApi operation returned by the service. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @sample AWSAppSync.DisassociateSourceGraphqlApi * @see AWS API Documentation */ @Override public DisassociateSourceGraphqlApiResult disassociateSourceGraphqlApi(DisassociateSourceGraphqlApiRequest request) { request = beforeClientExecution(request); return executeDisassociateSourceGraphqlApi(request); } @SdkInternalApi final DisassociateSourceGraphqlApiResult executeDisassociateSourceGraphqlApi(DisassociateSourceGraphqlApiRequest disassociateSourceGraphqlApiRequest) { ExecutionContext executionContext = createExecutionContext(disassociateSourceGraphqlApiRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Evaluates the given code and returns the response. The code definition requirements depend on the specified
* runtime. For APPSYNC_JS
runtimes, the code defines the request and response functions. The request
* function takes the incoming request after a GraphQL operation is parsed and converts it into a request
* configuration for the selected data source operation. The response function interprets responses from the data
* source and maps it to the shape of the GraphQL field output type.
*
* Evaluates a given template and returns the response. The mapping template can be a request or response template. *
** Request templates take the incoming request after a GraphQL operation is parsed and convert it into a request * configuration for the selected data source operation. Response templates interpret responses from the data source * and map it to the shape of the GraphQL field output type. *
** Mapping templates are written in the Apache Velocity Template Language (VTL). *
* * @param evaluateMappingTemplateRequest * @return Result of the EvaluateMappingTemplate operation returned by the service. * @throws AccessDeniedException * You don't have access to perform this operation on this resource. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @sample AWSAppSync.EvaluateMappingTemplate * @see AWS API Documentation */ @Override public EvaluateMappingTemplateResult evaluateMappingTemplate(EvaluateMappingTemplateRequest request) { request = beforeClientExecution(request); return executeEvaluateMappingTemplate(request); } @SdkInternalApi final EvaluateMappingTemplateResult executeEvaluateMappingTemplate(EvaluateMappingTemplateRequest evaluateMappingTemplateRequest) { ExecutionContext executionContext = createExecutionContext(evaluateMappingTemplateRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Flushes an ApiCache
object.
*
FlushApiCache
operation.
* @return Result of the FlushApiCache operation returned by the service.
* @throws BadRequestException
* The request is not well formed. For example, a value is invalid or a required field is missing. Check the
* field values, and then try again.
* @throws ConcurrentModificationException
* Another modification is in progress at this time and it must complete before you can make your change.
* @throws NotFoundException
* The resource specified in the request was not found. Check the resource, and then try again.
* @throws UnauthorizedException
* You aren't authorized to perform this operation.
* @throws InternalFailureException
* An internal AppSync error occurred. Try your request again.
* @sample AWSAppSync.FlushApiCache
* @see AWS API
* Documentation
*/
@Override
public FlushApiCacheResult flushApiCache(FlushApiCacheRequest request) {
request = beforeClientExecution(request);
return executeFlushApiCache(request);
}
@SdkInternalApi
final FlushApiCacheResult executeFlushApiCache(FlushApiCacheRequest flushApiCacheRequest) {
ExecutionContext executionContext = createExecutionContext(flushApiCacheRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request
* Retrieves an ApiAssociation
object.
*
* Retrieves an ApiCache
object.
*
GetApiCache
operation.
* @return Result of the GetApiCache operation returned by the service.
* @throws BadRequestException
* The request is not well formed. For example, a value is invalid or a required field is missing. Check the
* field values, and then try again.
* @throws ConcurrentModificationException
* Another modification is in progress at this time and it must complete before you can make your change.
* @throws NotFoundException
* The resource specified in the request was not found. Check the resource, and then try again.
* @throws UnauthorizedException
* You aren't authorized to perform this operation.
* @throws InternalFailureException
* An internal AppSync error occurred. Try your request again.
* @sample AWSAppSync.GetApiCache
* @see AWS API
* Documentation
*/
@Override
public GetApiCacheResult getApiCache(GetApiCacheRequest request) {
request = beforeClientExecution(request);
return executeGetApiCache(request);
}
@SdkInternalApi
final GetApiCacheResult executeGetApiCache(GetApiCacheRequest getApiCacheRequest) {
ExecutionContext executionContext = createExecutionContext(getApiCacheRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request
* Retrieves a DataSource
object.
*
* Retrieves a custom DomainName
object.
*
* Get a Function
.
*
* Retrieves a GraphqlApi
object.
*
* Retrieves the introspection schema for a GraphQL API. *
* * @param getIntrospectionSchemaRequest * @return Result of the GetIntrospectionSchema operation returned by the service. * @throws GraphQLSchemaException * The GraphQL schema is not valid. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.GetIntrospectionSchema * @see AWS * API Documentation */ @Override public GetIntrospectionSchemaResult getIntrospectionSchema(GetIntrospectionSchemaRequest request) { request = beforeClientExecution(request); return executeGetIntrospectionSchema(request); } @SdkInternalApi final GetIntrospectionSchemaResult executeGetIntrospectionSchema(GetIntrospectionSchemaRequest getIntrospectionSchemaRequest) { ExecutionContext executionContext = createExecutionContext(getIntrospectionSchemaRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Retrieves a Resolver
object.
*
* Retrieves the current status of a schema creation operation. *
* * @param getSchemaCreationStatusRequest * @return Result of the GetSchemaCreationStatus operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.GetSchemaCreationStatus * @see AWS API Documentation */ @Override public GetSchemaCreationStatusResult getSchemaCreationStatus(GetSchemaCreationStatusRequest request) { request = beforeClientExecution(request); return executeGetSchemaCreationStatus(request); } @SdkInternalApi final GetSchemaCreationStatusResult executeGetSchemaCreationStatus(GetSchemaCreationStatusRequest getSchemaCreationStatusRequest) { ExecutionContext executionContext = createExecutionContext(getSchemaCreationStatusRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Retrieves a SourceApiAssociation
object.
*
* Retrieves a Type
object.
*
* Lists the API keys for a given API. *
*
* API keys are deleted automatically 60 days after they expire. However, they may still be included in the response
* until they have actually been deleted. You can safely call DeleteApiKey
to manually delete a key
* before it's automatically deleted.
*
* Lists the data sources for a given API. *
* * @param listDataSourcesRequest * @return Result of the ListDataSources operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.ListDataSources * @see AWS API * Documentation */ @Override public ListDataSourcesResult listDataSources(ListDataSourcesRequest request) { request = beforeClientExecution(request); return executeListDataSources(request); } @SdkInternalApi final ListDataSourcesResult executeListDataSources(ListDataSourcesRequest listDataSourcesRequest) { ExecutionContext executionContext = createExecutionContext(listDataSourcesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists multiple custom domain names. *
* * @param listDomainNamesRequest * @return Result of the ListDomainNames operation returned by the service. * @throws AccessDeniedException * You don't have access to perform this operation on this resource. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.ListDomainNames * @see AWS API * Documentation */ @Override public ListDomainNamesResult listDomainNames(ListDomainNamesRequest request) { request = beforeClientExecution(request); return executeListDomainNames(request); } @SdkInternalApi final ListDomainNamesResult executeListDomainNames(ListDomainNamesRequest listDomainNamesRequest) { ExecutionContext executionContext = createExecutionContext(listDomainNamesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* List multiple functions. *
* * @param listFunctionsRequest * @return Result of the ListFunctions operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.ListFunctions * @see AWS API * Documentation */ @Override public ListFunctionsResult listFunctions(ListFunctionsRequest request) { request = beforeClientExecution(request); return executeListFunctions(request); } @SdkInternalApi final ListFunctionsResult executeListFunctions(ListFunctionsRequest listFunctionsRequest) { ExecutionContext executionContext = createExecutionContext(listFunctionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists your GraphQL APIs. *
* * @param listGraphqlApisRequest * @return Result of the ListGraphqlApis operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.ListGraphqlApis * @see AWS API * Documentation */ @Override public ListGraphqlApisResult listGraphqlApis(ListGraphqlApisRequest request) { request = beforeClientExecution(request); return executeListGraphqlApis(request); } @SdkInternalApi final ListGraphqlApisResult executeListGraphqlApis(ListGraphqlApisRequest listGraphqlApisRequest) { ExecutionContext executionContext = createExecutionContext(listGraphqlApisRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists the resolvers for a given API and type. *
* * @param listResolversRequest * @return Result of the ListResolvers operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.ListResolvers * @see AWS API * Documentation */ @Override public ListResolversResult listResolvers(ListResolversRequest request) { request = beforeClientExecution(request); return executeListResolvers(request); } @SdkInternalApi final ListResolversResult executeListResolvers(ListResolversRequest listResolversRequest) { ExecutionContext executionContext = createExecutionContext(listResolversRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* List the resolvers that are associated with a specific function. *
* * @param listResolversByFunctionRequest * @return Result of the ListResolversByFunction operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.ListResolversByFunction * @see AWS API Documentation */ @Override public ListResolversByFunctionResult listResolversByFunction(ListResolversByFunctionRequest request) { request = beforeClientExecution(request); return executeListResolversByFunction(request); } @SdkInternalApi final ListResolversByFunctionResult executeListResolversByFunction(ListResolversByFunctionRequest listResolversByFunctionRequest) { ExecutionContext executionContext = createExecutionContext(listResolversByFunctionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Lists the SourceApiAssociationSummary
data.
*
* Lists the tags for a resource. *
* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws LimitExceededException * The request exceeded a limit. Try your request again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws AccessDeniedException * You don't have access to perform this operation on this resource. * @sample AWSAppSync.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* Lists the types for a given API. *
* * @param listTypesRequest * @return Result of the ListTypes operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.ListTypes * @see AWS API * Documentation */ @Override public ListTypesResult listTypes(ListTypesRequest request) { request = beforeClientExecution(request); return executeListTypes(request); } @SdkInternalApi final ListTypesResult executeListTypes(ListTypesRequest listTypesRequest) { ExecutionContext executionContext = createExecutionContext(listTypesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Lists Type
objects by the source API association ID.
*
* Adds a new schema to your GraphQL API. *
** This operation is asynchronous. Use to determine when it has completed. *
* * @param startSchemaCreationRequest * @return Result of the StartSchemaCreation operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @sample AWSAppSync.StartSchemaCreation * @see AWS * API Documentation */ @Override public StartSchemaCreationResult startSchemaCreation(StartSchemaCreationRequest request) { request = beforeClientExecution(request); return executeStartSchemaCreation(request); } @SdkInternalApi final StartSchemaCreationResult executeStartSchemaCreation(StartSchemaCreationRequest startSchemaCreationRequest) { ExecutionContext executionContext = createExecutionContext(startSchemaCreationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Initiates a merge operation. Returns a status that shows the result of the merge operation. *
* * @param startSchemaMergeRequest * @return Result of the StartSchemaMerge operation returned by the service. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @sample AWSAppSync.StartSchemaMerge * @see AWS API * Documentation */ @Override public StartSchemaMergeResult startSchemaMerge(StartSchemaMergeRequest request) { request = beforeClientExecution(request); return executeStartSchemaMerge(request); } @SdkInternalApi final StartSchemaMergeResult executeStartSchemaMerge(StartSchemaMergeRequest startSchemaMergeRequest) { ExecutionContext executionContext = createExecutionContext(startSchemaMergeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Tags a resource with user-supplied tags. *
* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws LimitExceededException * The request exceeded a limit. Try your request again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws AccessDeniedException * You don't have access to perform this operation on this resource. * @sample AWSAppSync.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* Untags a resource. *
* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws LimitExceededException * The request exceeded a limit. Try your request again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws AccessDeniedException * You don't have access to perform this operation on this resource. * @sample AWSAppSync.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* Updates the cache for the GraphQL API. *
* * @param updateApiCacheRequest * Represents the input of aUpdateApiCache
operation.
* @return Result of the UpdateApiCache operation returned by the service.
* @throws BadRequestException
* The request is not well formed. For example, a value is invalid or a required field is missing. Check the
* field values, and then try again.
* @throws ConcurrentModificationException
* Another modification is in progress at this time and it must complete before you can make your change.
* @throws NotFoundException
* The resource specified in the request was not found. Check the resource, and then try again.
* @throws UnauthorizedException
* You aren't authorized to perform this operation.
* @throws InternalFailureException
* An internal AppSync error occurred. Try your request again.
* @sample AWSAppSync.UpdateApiCache
* @see AWS API
* Documentation
*/
@Override
public UpdateApiCacheResult updateApiCache(UpdateApiCacheRequest request) {
request = beforeClientExecution(request);
return executeUpdateApiCache(request);
}
@SdkInternalApi
final UpdateApiCacheResult executeUpdateApiCache(UpdateApiCacheRequest updateApiCacheRequest) {
ExecutionContext executionContext = createExecutionContext(updateApiCacheRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request* Updates an API key. You can update the key as long as it's not deleted. *
* * @param updateApiKeyRequest * @return Result of the UpdateApiKey operation returned by the service. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws LimitExceededException * The request exceeded a limit. Try your request again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws ApiKeyValidityOutOfBoundsException * The API key expiration must be set to a value between 1 and 365 days from creation (for *CreateApiKey
) or from update (for UpdateApiKey
).
* @sample AWSAppSync.UpdateApiKey
* @see AWS API
* Documentation
*/
@Override
public UpdateApiKeyResult updateApiKey(UpdateApiKeyRequest request) {
request = beforeClientExecution(request);
return executeUpdateApiKey(request);
}
@SdkInternalApi
final UpdateApiKeyResult executeUpdateApiKey(UpdateApiKeyRequest updateApiKeyRequest) {
ExecutionContext executionContext = createExecutionContext(updateApiKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request
* Updates a DataSource
object.
*
* Updates a custom DomainName
object.
*
* Updates a Function
object.
*
* Updates a GraphqlApi
object.
*
* Updates a Resolver
object.
*
* Updates some of the configuration choices of a particular source API association. *
* * @param updateSourceApiAssociationRequest * @return Result of the UpdateSourceApiAssociation operation returned by the service. * @throws UnauthorizedException * You aren't authorized to perform this operation. * @throws BadRequestException * The request is not well formed. For example, a value is invalid or a required field is missing. Check the * field values, and then try again. * @throws InternalFailureException * An internal AppSync error occurred. Try your request again. * @throws NotFoundException * The resource specified in the request was not found. Check the resource, and then try again. * @throws ConcurrentModificationException * Another modification is in progress at this time and it must complete before you can make your change. * @sample AWSAppSync.UpdateSourceApiAssociation * @see AWS API Documentation */ @Override public UpdateSourceApiAssociationResult updateSourceApiAssociation(UpdateSourceApiAssociationRequest request) { request = beforeClientExecution(request); return executeUpdateSourceApiAssociation(request); } @SdkInternalApi final UpdateSourceApiAssociationResult executeUpdateSourceApiAssociation(UpdateSourceApiAssociationRequest updateSourceApiAssociationRequest) { ExecutionContext executionContext = createExecutionContext(updateSourceApiAssociationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Updates a Type
object.
*
* 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