AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Implementation for accessing AppSync

AppSync provides API actions for creating and interacting with data sources using GraphQL from your application.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonServiceClient
    Amazon.AppSync.AmazonAppSyncClient

Namespace: Amazon.AppSync
Assembly: AWSSDK.AppSync.dll
Version: 3.x.y.z

Syntax

C#
public class AmazonAppSyncClient : AmazonServiceClient
         IAmazonAppSync, IAmazonService, IDisposable

The AmazonAppSyncClient type exposes the following members

Constructors

NameDescription
Public Method AmazonAppSyncClient()

Constructs AmazonAppSyncClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonAppSyncClient(RegionEndpoint)

Constructs AmazonAppSyncClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonAppSyncClient(AmazonAppSyncConfig)

Constructs AmazonAppSyncClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             

Public Method AmazonAppSyncClient(AWSCredentials)

Constructs AmazonAppSyncClient with AWS Credentials

Public Method AmazonAppSyncClient(AWSCredentials, RegionEndpoint)

Constructs AmazonAppSyncClient with AWS Credentials

Public Method AmazonAppSyncClient(AWSCredentials, AmazonAppSyncConfig)

Constructs AmazonAppSyncClient with AWS Credentials and an AmazonAppSyncClient Configuration object.

Public Method AmazonAppSyncClient(string, string)

Constructs AmazonAppSyncClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonAppSyncClient(string, string, RegionEndpoint)

Constructs AmazonAppSyncClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonAppSyncClient(string, string, AmazonAppSyncConfig)

Constructs AmazonAppSyncClient with AWS Access Key ID, AWS Secret Key and an AmazonAppSyncClient Configuration object.

Public Method AmazonAppSyncClient(string, string, string)

Constructs AmazonAppSyncClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonAppSyncClient(string, string, string, RegionEndpoint)

Constructs AmazonAppSyncClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonAppSyncClient(string, string, string, AmazonAppSyncConfig)

Constructs AmazonAppSyncClient with AWS Access Key ID, AWS Secret Key and an AmazonAppSyncClient Configuration object.

Properties

NameTypeDescription
Public Property Config Amazon.Runtime.IClientConfig Inherited from Amazon.Runtime.AmazonServiceClient.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method AssociateApi(AssociateApiRequest)

Maps an endpoint to your custom domain.

Public Method AssociateApiAsync(AssociateApiRequest, CancellationToken)

Maps an endpoint to your custom domain.

Public Method AssociateMergedGraphqlApi(AssociateMergedGraphqlApiRequest)

Creates an association between a Merged API and source API using the source API's identifier.

Public Method AssociateMergedGraphqlApiAsync(AssociateMergedGraphqlApiRequest, CancellationToken)

Creates an association between a Merged API and source API using the source API's identifier.

Public Method AssociateSourceGraphqlApi(AssociateSourceGraphqlApiRequest)

Creates an association between a Merged API and source API using the Merged API's identifier.

Public Method AssociateSourceGraphqlApiAsync(AssociateSourceGraphqlApiRequest, CancellationToken)

Creates an association between a Merged API and source API using the Merged API's identifier.

Public Method CreateApiCache(CreateApiCacheRequest)

Creates a cache for the GraphQL API.

Public Method CreateApiCacheAsync(CreateApiCacheRequest, CancellationToken)

Creates a cache for the GraphQL API.

Public Method CreateApiKey(CreateApiKeyRequest)

Creates a unique key that you can distribute to clients who invoke your API.

Public Method CreateApiKeyAsync(CreateApiKeyRequest, CancellationToken)

Creates a unique key that you can distribute to clients who invoke your API.

Public Method CreateDataSource(CreateDataSourceRequest)

Creates a DataSource object.

Public Method CreateDataSourceAsync(CreateDataSourceRequest, CancellationToken)

Creates a DataSource object.

Public Method CreateDomainName(CreateDomainNameRequest)

Creates a custom DomainName object.

Public Method CreateDomainNameAsync(CreateDomainNameRequest, CancellationToken)

Creates a custom DomainName object.

Public Method CreateFunction(CreateFunctionRequest)

Creates a Function object.

A function is a reusable entity. You can use multiple functions to compose the resolver logic.

Public Method CreateFunctionAsync(CreateFunctionRequest, CancellationToken)

Creates a Function object.

A function is a reusable entity. You can use multiple functions to compose the resolver logic.

Public Method CreateGraphqlApi(CreateGraphqlApiRequest)

Creates a GraphqlApi object.

Public Method CreateGraphqlApiAsync(CreateGraphqlApiRequest, CancellationToken)

Creates a GraphqlApi object.

Public Method CreateResolver(CreateResolverRequest)

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.

Public Method CreateResolverAsync(CreateResolverRequest, CancellationToken)

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.

Public Method CreateType(CreateTypeRequest)

Creates a Type object.

Public Method CreateTypeAsync(CreateTypeRequest, CancellationToken)

Creates a Type object.

Public Method DeleteApiCache(DeleteApiCacheRequest)

Deletes an ApiCache object.

Public Method DeleteApiCacheAsync(DeleteApiCacheRequest, CancellationToken)

Deletes an ApiCache object.

Public Method DeleteApiKey(DeleteApiKeyRequest)

Deletes an API key.

Public Method DeleteApiKeyAsync(DeleteApiKeyRequest, CancellationToken)

Deletes an API key.

Public Method DeleteDataSource(DeleteDataSourceRequest)

Deletes a DataSource object.

Public Method DeleteDataSourceAsync(DeleteDataSourceRequest, CancellationToken)

Deletes a DataSource object.

Public Method DeleteDomainName(DeleteDomainNameRequest)

Deletes a custom DomainName object.

Public Method DeleteDomainNameAsync(DeleteDomainNameRequest, CancellationToken)

Deletes a custom DomainName object.

Public Method DeleteFunction(DeleteFunctionRequest)

Deletes a Function.

Public Method DeleteFunctionAsync(DeleteFunctionRequest, CancellationToken)

Deletes a Function.

Public Method DeleteGraphqlApi(DeleteGraphqlApiRequest)

Deletes a GraphqlApi object.

Public Method DeleteGraphqlApiAsync(DeleteGraphqlApiRequest, CancellationToken)

Deletes a GraphqlApi object.

Public Method DeleteResolver(DeleteResolverRequest)

Deletes a Resolver object.

Public Method DeleteResolverAsync(DeleteResolverRequest, CancellationToken)

Deletes a Resolver object.

Public Method DeleteType(DeleteTypeRequest)

Deletes a Type object.

Public Method DeleteTypeAsync(DeleteTypeRequest, CancellationToken)

Deletes a Type object.

Public Method DetermineServiceOperationEndpoint(AmazonWebServiceRequest)

Returns the endpoint that will be used for a particular request.

Public Method DisassociateApi(DisassociateApiRequest)

Removes an ApiAssociation object from a custom domain.

Public Method DisassociateApiAsync(DisassociateApiRequest, CancellationToken)

Removes an ApiAssociation object from a custom domain.

Public Method DisassociateMergedGraphqlApi(DisassociateMergedGraphqlApiRequest)

Deletes an association between a Merged API and source API using the source API's identifier and the association ID.

Public Method DisassociateMergedGraphqlApiAsync(DisassociateMergedGraphqlApiRequest, CancellationToken)

Deletes an association between a Merged API and source API using the source API's identifier and the association ID.

Public Method DisassociateSourceGraphqlApi(DisassociateSourceGraphqlApiRequest)

Deletes an association between a Merged API and source API using the Merged API's identifier and the association ID.

Public Method DisassociateSourceGraphqlApiAsync(DisassociateSourceGraphqlApiRequest, CancellationToken)

Deletes an association between a Merged API and source API using the Merged API's identifier and the association ID.

Public Method Dispose() Inherited from Amazon.Runtime.AmazonServiceClient.
Public Method EvaluateCode(EvaluateCodeRequest)

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.

Public Method EvaluateCodeAsync(EvaluateCodeRequest, CancellationToken)

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.

Public Method EvaluateMappingTemplate(EvaluateMappingTemplateRequest)

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).

Public Method EvaluateMappingTemplateAsync(EvaluateMappingTemplateRequest, CancellationToken)

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).

Public Method FlushApiCache(FlushApiCacheRequest)

Flushes an ApiCache object.

Public Method FlushApiCacheAsync(FlushApiCacheRequest, CancellationToken)

Flushes an ApiCache object.

Public Method GetApiAssociation(GetApiAssociationRequest)

Retrieves an ApiAssociation object.

Public Method GetApiAssociationAsync(GetApiAssociationRequest, CancellationToken)

Retrieves an ApiAssociation object.

Public Method GetApiCache(GetApiCacheRequest)

Retrieves an ApiCache object.

Public Method GetApiCacheAsync(GetApiCacheRequest, CancellationToken)

Retrieves an ApiCache object.

Public Method GetDataSource(GetDataSourceRequest)

Retrieves a DataSource object.

Public Method GetDataSourceAsync(GetDataSourceRequest, CancellationToken)

Retrieves a DataSource object.

Public Method GetDataSourceIntrospection(GetDataSourceIntrospectionRequest)

Retrieves the record of an existing introspection. If the retrieval is successful, the result of the instrospection will also be returned. If the retrieval fails the operation, an error message will be returned instead.

Public Method GetDataSourceIntrospectionAsync(GetDataSourceIntrospectionRequest, CancellationToken)

Retrieves the record of an existing introspection. If the retrieval is successful, the result of the instrospection will also be returned. If the retrieval fails the operation, an error message will be returned instead.

Public Method GetDomainName(GetDomainNameRequest)

Retrieves a custom DomainName object.

Public Method GetDomainNameAsync(GetDomainNameRequest, CancellationToken)

Retrieves a custom DomainName object.

Public Method GetFunction(GetFunctionRequest)

Get a Function.

Public Method GetFunctionAsync(GetFunctionRequest, CancellationToken)

Get a Function.

Public Method GetGraphqlApi(GetGraphqlApiRequest)

Retrieves a GraphqlApi object.

Public Method GetGraphqlApiAsync(GetGraphqlApiRequest, CancellationToken)

Retrieves a GraphqlApi object.

Public Method GetGraphqlApiEnvironmentVariables(GetGraphqlApiEnvironmentVariablesRequest)

Retrieves the list of environmental variable key-value pairs associated with an API by its ID value.

Public Method GetGraphqlApiEnvironmentVariablesAsync(GetGraphqlApiEnvironmentVariablesRequest, CancellationToken)

Retrieves the list of environmental variable key-value pairs associated with an API by its ID value.

Public Method GetIntrospectionSchema(GetIntrospectionSchemaRequest)

Retrieves the introspection schema for a GraphQL API.

Public Method GetIntrospectionSchemaAsync(GetIntrospectionSchemaRequest, CancellationToken)

Retrieves the introspection schema for a GraphQL API.

Public Method GetResolver(GetResolverRequest)

Retrieves a Resolver object.

Public Method GetResolverAsync(GetResolverRequest, CancellationToken)

Retrieves a Resolver object.

Public Method GetSchemaCreationStatus(GetSchemaCreationStatusRequest)

Retrieves the current status of a schema creation operation.

Public Method GetSchemaCreationStatusAsync(GetSchemaCreationStatusRequest, CancellationToken)

Retrieves the current status of a schema creation operation.

Public Method GetSourceApiAssociation(GetSourceApiAssociationRequest)

Retrieves a SourceApiAssociation object.

Public Method GetSourceApiAssociationAsync(GetSourceApiAssociationRequest, CancellationToken)

Retrieves a SourceApiAssociation object.

Public Method GetType(GetTypeRequest)

Retrieves a Type object.

Public Method GetTypeAsync(GetTypeRequest, CancellationToken)

Retrieves a Type object.

Public Method ListApiKeys(ListApiKeysRequest)

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.

Public Method ListApiKeysAsync(ListApiKeysRequest, CancellationToken)

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.

Public Method ListDataSources(ListDataSourcesRequest)

Lists the data sources for a given API.

Public Method ListDataSourcesAsync(ListDataSourcesRequest, CancellationToken)

Lists the data sources for a given API.

Public Method ListDomainNames(ListDomainNamesRequest)

Lists multiple custom domain names.

Public Method ListDomainNamesAsync(ListDomainNamesRequest, CancellationToken)

Lists multiple custom domain names.

Public Method ListFunctions(ListFunctionsRequest)

List multiple functions.

Public Method ListFunctionsAsync(ListFunctionsRequest, CancellationToken)

List multiple functions.

Public Method ListGraphqlApis(ListGraphqlApisRequest)

Lists your GraphQL APIs.

Public Method ListGraphqlApisAsync(ListGraphqlApisRequest, CancellationToken)

Lists your GraphQL APIs.

Public Method ListResolvers(ListResolversRequest)

Lists the resolvers for a given API and type.

Public Method ListResolversAsync(ListResolversRequest, CancellationToken)

Lists the resolvers for a given API and type.

Public Method ListResolversByFunction(ListResolversByFunctionRequest)

List the resolvers that are associated with a specific function.

Public Method ListResolversByFunctionAsync(ListResolversByFunctionRequest, CancellationToken)

List the resolvers that are associated with a specific function.

Public Method ListSourceApiAssociations(ListSourceApiAssociationsRequest)

Lists the SourceApiAssociationSummary data.

Public Method ListSourceApiAssociationsAsync(ListSourceApiAssociationsRequest, CancellationToken)

Lists the SourceApiAssociationSummary data.

Public Method ListTagsForResource(ListTagsForResourceRequest)

Lists the tags for a resource.

Public Method ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken)

Lists the tags for a resource.

Public Method ListTypes(ListTypesRequest)

Lists the types for a given API.

Public Method ListTypesAsync(ListTypesRequest, CancellationToken)

Lists the types for a given API.

Public Method ListTypesByAssociation(ListTypesByAssociationRequest)

Lists Type objects by the source API association ID.

Public Method ListTypesByAssociationAsync(ListTypesByAssociationRequest, CancellationToken)

Lists Type objects by the source API association ID.

Public Method PutGraphqlApiEnvironmentVariables(PutGraphqlApiEnvironmentVariablesRequest)

Creates a list of environmental variables in an API by its ID value.

When creating an environmental variable, it must follow the constraints below:

  • Both JavaScript and VTL templates support environmental variables.

  • Environmental variables are not evaluated before function invocation.

  • Environmental variables only support string values.

  • Any defined value in an environmental variable is considered a string literal and not expanded.

  • Variable evaluations should ideally be performed in the function code.

When creating an environmental variable key-value pair, it must follow the additional constraints below:

  • Keys must begin with a letter.

  • Keys must be at least two characters long.

  • Keys can only contain letters, numbers, and the underscore character (_).

  • Values can be up to 512 characters long.

  • You can configure up to 50 key-value pairs in a GraphQL API.

You can create a list of environmental variables by adding it to the environmentVariables payload as a list in the format {"key1":"value1","key2":"value2", …}. Note that each call of the PutGraphqlApiEnvironmentVariables action will result in the overwriting of the existing environmental variable list of that API. This means the existing environmental variables will be lost. To avoid this, you must include all existing and new environmental variables in the list each time you call this action.

Public Method PutGraphqlApiEnvironmentVariablesAsync(PutGraphqlApiEnvironmentVariablesRequest, CancellationToken)

Creates a list of environmental variables in an API by its ID value.

When creating an environmental variable, it must follow the constraints below:

  • Both JavaScript and VTL templates support environmental variables.

  • Environmental variables are not evaluated before function invocation.

  • Environmental variables only support string values.

  • Any defined value in an environmental variable is considered a string literal and not expanded.

  • Variable evaluations should ideally be performed in the function code.

When creating an environmental variable key-value pair, it must follow the additional constraints below:

  • Keys must begin with a letter.

  • Keys must be at least two characters long.

  • Keys can only contain letters, numbers, and the underscore character (_).

  • Values can be up to 512 characters long.

  • You can configure up to 50 key-value pairs in a GraphQL API.

You can create a list of environmental variables by adding it to the environmentVariables payload as a list in the format {"key1":"value1","key2":"value2", …}. Note that each call of the PutGraphqlApiEnvironmentVariables action will result in the overwriting of the existing environmental variable list of that API. This means the existing environmental variables will be lost. To avoid this, you must include all existing and new environmental variables in the list each time you call this action.

Public Method StartDataSourceIntrospection(StartDataSourceIntrospectionRequest)

Creates a new introspection. Returns the introspectionId of the new introspection after its creation.

Public Method StartDataSourceIntrospectionAsync(StartDataSourceIntrospectionRequest, CancellationToken)

Creates a new introspection. Returns the introspectionId of the new introspection after its creation.

Public Method StartSchemaCreation(StartSchemaCreationRequest)

Adds a new schema to your GraphQL API.

This operation is asynchronous. Use to determine when it has completed.

Public Method StartSchemaCreationAsync(StartSchemaCreationRequest, CancellationToken)

Adds a new schema to your GraphQL API.

This operation is asynchronous. Use to determine when it has completed.

Public Method StartSchemaMerge(StartSchemaMergeRequest)

Initiates a merge operation. Returns a status that shows the result of the merge operation.

Public Method StartSchemaMergeAsync(StartSchemaMergeRequest, CancellationToken)

Initiates a merge operation. Returns a status that shows the result of the merge operation.

Public Method TagResource(TagResourceRequest)

Tags a resource with user-supplied tags.

Public Method TagResourceAsync(TagResourceRequest, CancellationToken)

Tags a resource with user-supplied tags.

Public Method UntagResource(UntagResourceRequest)

Untags a resource.

Public Method UntagResourceAsync(UntagResourceRequest, CancellationToken)

Untags a resource.

Public Method UpdateApiCache(UpdateApiCacheRequest)

Updates the cache for the GraphQL API.

Public Method UpdateApiCacheAsync(UpdateApiCacheRequest, CancellationToken)

Updates the cache for the GraphQL API.

Public Method UpdateApiKey(UpdateApiKeyRequest)

Updates an API key. You can update the key as long as it's not deleted.

Public Method UpdateApiKeyAsync(UpdateApiKeyRequest, CancellationToken)

Updates an API key. You can update the key as long as it's not deleted.

Public Method UpdateDataSource(UpdateDataSourceRequest)

Updates a DataSource object.

Public Method UpdateDataSourceAsync(UpdateDataSourceRequest, CancellationToken)

Updates a DataSource object.

Public Method UpdateDomainName(UpdateDomainNameRequest)

Updates a custom DomainName object.

Public Method UpdateDomainNameAsync(UpdateDomainNameRequest, CancellationToken)

Updates a custom DomainName object.

Public Method UpdateFunction(UpdateFunctionRequest)

Updates a Function object.

Public Method UpdateFunctionAsync(UpdateFunctionRequest, CancellationToken)

Updates a Function object.

Public Method UpdateGraphqlApi(UpdateGraphqlApiRequest)

Updates a GraphqlApi object.

Public Method UpdateGraphqlApiAsync(UpdateGraphqlApiRequest, CancellationToken)

Updates a GraphqlApi object.

Public Method UpdateResolver(UpdateResolverRequest)

Updates a Resolver object.

Public Method UpdateResolverAsync(UpdateResolverRequest, CancellationToken)

Updates a Resolver object.

Public Method UpdateSourceApiAssociation(UpdateSourceApiAssociationRequest)

Updates some of the configuration choices of a particular source API association.

Public Method UpdateSourceApiAssociationAsync(UpdateSourceApiAssociationRequest, CancellationToken)

Updates some of the configuration choices of a particular source API association.

Public Method UpdateType(UpdateTypeRequest)

Updates a Type object.

Public Method UpdateTypeAsync(UpdateTypeRequest, CancellationToken)

Updates a Type object.

Events

NameDescription
Event AfterResponseEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event BeforeRequestEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event ExceptionEvent Inherited from Amazon.Runtime.AmazonServiceClient.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5