AppSync class

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

Constructors

AppSync({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

associateApi({required String apiId, required String domainName}) Future<AssociateApiResponse>
Maps an endpoint to your custom domain.
associateMergedGraphqlApi({required String mergedApiIdentifier, required String sourceApiIdentifier, String? description, SourceApiAssociationConfig? sourceApiAssociationConfig}) Future<AssociateMergedGraphqlApiResponse>
Creates an association between a Merged API and source API using the source API's identifier.
associateSourceGraphqlApi({required String mergedApiIdentifier, required String sourceApiIdentifier, String? description, SourceApiAssociationConfig? sourceApiAssociationConfig}) Future<AssociateSourceGraphqlApiResponse>
Creates an association between a Merged API and source API using the Merged API's identifier.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createApi({required EventConfig eventConfig, required String name, String? ownerContact, Map<String, String>? tags}) Future<CreateApiResponse>
Creates an Api object. Use this operation to create an AppSync API with your preferred configuration, such as an Event API that provides real-time message publishing and message subscriptions over WebSockets.
createApiCache({required ApiCachingBehavior apiCachingBehavior, required String apiId, required int ttl, required ApiCacheType type, bool? atRestEncryptionEnabled, CacheHealthMetricsConfig? healthMetricsConfig, bool? transitEncryptionEnabled}) Future<CreateApiCacheResponse>
Creates a cache for the GraphQL API.
createApiKey({required String apiId, String? description, int? expires}) Future<CreateApiKeyResponse>
Creates a unique key that you can distribute to clients who invoke your API.
createChannelNamespace({required String apiId, required String name, String? codeHandlers, HandlerConfigs? handlerConfigs, List<AuthMode>? publishAuthModes, List<AuthMode>? subscribeAuthModes, Map<String, String>? tags}) Future<CreateChannelNamespaceResponse>
Creates a ChannelNamespace for an Api.
createDataSource({required String apiId, required String name, required DataSourceType type, String? description, DynamodbDataSourceConfig? dynamodbConfig, ElasticsearchDataSourceConfig? elasticsearchConfig, EventBridgeDataSourceConfig? eventBridgeConfig, HttpDataSourceConfig? httpConfig, LambdaDataSourceConfig? lambdaConfig, DataSourceLevelMetricsConfig? metricsConfig, OpenSearchServiceDataSourceConfig? openSearchServiceConfig, RelationalDatabaseDataSourceConfig? relationalDatabaseConfig, String? serviceRoleArn}) Future<CreateDataSourceResponse>
Creates a DataSource object.
createDomainName({required String certificateArn, required String domainName, String? description, Map<String, String>? tags}) Future<CreateDomainNameResponse>
Creates a custom DomainName object.
createFunction({required String apiId, required String dataSourceName, required String name, String? code, String? description, String? functionVersion, int? maxBatchSize, String? requestMappingTemplate, String? responseMappingTemplate, AppSyncRuntime? runtime, SyncConfig? syncConfig}) Future<CreateFunctionResponse>
Creates a Function object.
createGraphqlApi({required AuthenticationType authenticationType, required String name, List<AdditionalAuthenticationProvider>? additionalAuthenticationProviders, GraphQLApiType? apiType, EnhancedMetricsConfig? enhancedMetricsConfig, GraphQLApiIntrospectionConfig? introspectionConfig, LambdaAuthorizerConfig? lambdaAuthorizerConfig, LogConfig? logConfig, String? mergedApiExecutionRoleArn, OpenIDConnectConfig? openIDConnectConfig, String? ownerContact, int? queryDepthLimit, int? resolverCountLimit, Map<String, String>? tags, UserPoolConfig? userPoolConfig, GraphQLApiVisibility? visibility, bool? xrayEnabled}) Future<CreateGraphqlApiResponse>
Creates a GraphqlApi object.
createResolver({required String apiId, required String fieldName, required String typeName, CachingConfig? cachingConfig, String? code, String? dataSourceName, ResolverKind? kind, int? maxBatchSize, ResolverLevelMetricsConfig? metricsConfig, PipelineConfig? pipelineConfig, String? requestMappingTemplate, String? responseMappingTemplate, AppSyncRuntime? runtime, SyncConfig? syncConfig}) Future<CreateResolverResponse>
Creates a Resolver object.
createType({required String apiId, required String definition, required TypeDefinitionFormat format}) Future<CreateTypeResponse>
Creates a Type object.
deleteApi({required String apiId}) Future<void>
Deletes an Api object
deleteApiCache({required String apiId}) Future<void>
Deletes an ApiCache object.
deleteApiKey({required String apiId, required String id}) Future<void>
Deletes an API key.
deleteChannelNamespace({required String apiId, required String name}) Future<void>
Deletes a ChannelNamespace.
deleteDataSource({required String apiId, required String name}) Future<void>
Deletes a DataSource object.
deleteDomainName({required String domainName}) Future<void>
Deletes a custom DomainName object.
deleteFunction({required String apiId, required String functionId}) Future<void>
Deletes a Function.
deleteGraphqlApi({required String apiId}) Future<void>
Deletes a GraphqlApi object.
deleteResolver({required String apiId, required String fieldName, required String typeName}) Future<void>
Deletes a Resolver object.
deleteType({required String apiId, required String typeName}) Future<void>
Deletes a Type object.
disassociateApi({required String domainName}) Future<void>
Removes an ApiAssociation object from a custom domain.
disassociateMergedGraphqlApi({required String associationId, required String sourceApiIdentifier}) Future<DisassociateMergedGraphqlApiResponse>
Deletes an association between a Merged API and source API using the source API's identifier and the association ID.
disassociateSourceGraphqlApi({required String associationId, required String mergedApiIdentifier}) Future<DisassociateSourceGraphqlApiResponse>
Deletes an association between a Merged API and source API using the Merged API's identifier and the association ID.
evaluateCode({required String code, required String context, required AppSyncRuntime runtime, String? function}) Future<EvaluateCodeResponse>
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.
evaluateMappingTemplate({required String context, required String template}) Future<EvaluateMappingTemplateResponse>
Evaluates a given template and returns the response. The mapping template can be a request or response template.
flushApiCache({required String apiId}) Future<void>
Flushes an ApiCache object.
getApi({required String apiId}) Future<GetApiResponse>
Retrieves an Api object.
getApiAssociation({required String domainName}) Future<GetApiAssociationResponse>
Retrieves an ApiAssociation object.
getApiCache({required String apiId}) Future<GetApiCacheResponse>
Retrieves an ApiCache object.
getChannelNamespace({required String apiId, required String name}) Future<GetChannelNamespaceResponse>
Retrieves the channel namespace for a specified Api.
getDataSource({required String apiId, required String name}) Future<GetDataSourceResponse>
Retrieves a DataSource object.
getDataSourceIntrospection({required String introspectionId, bool? includeModelsSDL, int? maxResults, String? nextToken}) Future<GetDataSourceIntrospectionResponse>
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.
getDomainName({required String domainName}) Future<GetDomainNameResponse>
Retrieves a custom DomainName object.
getFunction({required String apiId, required String functionId}) Future<GetFunctionResponse>
Get a Function.
getGraphqlApi({required String apiId}) Future<GetGraphqlApiResponse>
Retrieves a GraphqlApi object.
getGraphqlApiEnvironmentVariables({required String apiId}) Future<GetGraphqlApiEnvironmentVariablesResponse>
Retrieves the list of environmental variable key-value pairs associated with an API by its ID value.
getIntrospectionSchema({required String apiId, required OutputType format, bool? includeDirectives}) Future<GetIntrospectionSchemaResponse>
Retrieves the introspection schema for a GraphQL API.
getResolver({required String apiId, required String fieldName, required String typeName}) Future<GetResolverResponse>
Retrieves a Resolver object.
getSchemaCreationStatus({required String apiId}) Future<GetSchemaCreationStatusResponse>
Retrieves the current status of a schema creation operation.
getSourceApiAssociation({required String associationId, required String mergedApiIdentifier}) Future<GetSourceApiAssociationResponse>
Retrieves a SourceApiAssociation object.
getType({required String apiId, required TypeDefinitionFormat format, required String typeName}) Future<GetTypeResponse>
Retrieves a Type object.
listApiKeys({required String apiId, int? maxResults, String? nextToken}) Future<ListApiKeysResponse>
Lists the API keys for a given API.
listApis({int? maxResults, String? nextToken}) Future<ListApisResponse>
Lists the APIs in your AppSync account.
listChannelNamespaces({required String apiId, int? maxResults, String? nextToken}) Future<ListChannelNamespacesResponse>
Lists the channel namespaces for a specified Api.
listDataSources({required String apiId, int? maxResults, String? nextToken}) Future<ListDataSourcesResponse>
Lists the data sources for a given API.
listDomainNames({int? maxResults, String? nextToken}) Future<ListDomainNamesResponse>
Lists multiple custom domain names.
listFunctions({required String apiId, int? maxResults, String? nextToken}) Future<ListFunctionsResponse>
List multiple functions.
listGraphqlApis({GraphQLApiType? apiType, int? maxResults, String? nextToken, Ownership? owner}) Future<ListGraphqlApisResponse>
Lists your GraphQL APIs.
listResolvers({required String apiId, required String typeName, int? maxResults, String? nextToken}) Future<ListResolversResponse>
Lists the resolvers for a given API and type.
listResolversByFunction({required String apiId, required String functionId, int? maxResults, String? nextToken}) Future<ListResolversByFunctionResponse>
List the resolvers that are associated with a specific function.
listSourceApiAssociations({required String apiId, int? maxResults, String? nextToken}) Future<ListSourceApiAssociationsResponse>
Lists the SourceApiAssociationSummary data.
listTagsForResource({required String resourceArn}) Future<ListTagsForResourceResponse>
Lists the tags for a resource.
listTypes({required String apiId, required TypeDefinitionFormat format, int? maxResults, String? nextToken}) Future<ListTypesResponse>
Lists the types for a given API.
listTypesByAssociation({required String associationId, required TypeDefinitionFormat format, required String mergedApiIdentifier, int? maxResults, String? nextToken}) Future<ListTypesByAssociationResponse>
Lists Type objects by the source API association ID.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putGraphqlApiEnvironmentVariables({required String apiId, required Map<String, String> environmentVariables}) Future<PutGraphqlApiEnvironmentVariablesResponse>
Creates a list of environmental variables in an API by its ID value.
startDataSourceIntrospection({RdsDataApiConfig? rdsDataApiConfig}) Future<StartDataSourceIntrospectionResponse>
Creates a new introspection. Returns the introspectionId of the new introspection after its creation.
startSchemaCreation({required String apiId, required Uint8List definition}) Future<StartSchemaCreationResponse>
Adds a new schema to your GraphQL API.
startSchemaMerge({required String associationId, required String mergedApiIdentifier}) Future<StartSchemaMergeResponse>
Initiates a merge operation. Returns a status that shows the result of the merge operation.
tagResource({required String resourceArn, required Map<String, String> tags}) Future<void>
Tags a resource with user-supplied tags.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Untags a resource.
updateApi({required String apiId, required EventConfig eventConfig, required String name, String? ownerContact}) Future<UpdateApiResponse>
Updates an Api.
updateApiCache({required ApiCachingBehavior apiCachingBehavior, required String apiId, required int ttl, required ApiCacheType type, CacheHealthMetricsConfig? healthMetricsConfig}) Future<UpdateApiCacheResponse>
Updates the cache for the GraphQL API.
updateApiKey({required String apiId, required String id, String? description, int? expires}) Future<UpdateApiKeyResponse>
Updates an API key. You can update the key as long as it's not deleted.
updateChannelNamespace({required String apiId, required String name, String? codeHandlers, HandlerConfigs? handlerConfigs, List<AuthMode>? publishAuthModes, List<AuthMode>? subscribeAuthModes}) Future<UpdateChannelNamespaceResponse>
Updates a ChannelNamespace associated with an Api.
updateDataSource({required String apiId, required String name, required DataSourceType type, String? description, DynamodbDataSourceConfig? dynamodbConfig, ElasticsearchDataSourceConfig? elasticsearchConfig, EventBridgeDataSourceConfig? eventBridgeConfig, HttpDataSourceConfig? httpConfig, LambdaDataSourceConfig? lambdaConfig, DataSourceLevelMetricsConfig? metricsConfig, OpenSearchServiceDataSourceConfig? openSearchServiceConfig, RelationalDatabaseDataSourceConfig? relationalDatabaseConfig, String? serviceRoleArn}) Future<UpdateDataSourceResponse>
Updates a DataSource object.
updateDomainName({required String domainName, String? description}) Future<UpdateDomainNameResponse>
Updates a custom DomainName object.
updateFunction({required String apiId, required String dataSourceName, required String functionId, required String name, String? code, String? description, String? functionVersion, int? maxBatchSize, String? requestMappingTemplate, String? responseMappingTemplate, AppSyncRuntime? runtime, SyncConfig? syncConfig}) Future<UpdateFunctionResponse>
Updates a Function object.
updateGraphqlApi({required String apiId, required AuthenticationType authenticationType, required String name, List<AdditionalAuthenticationProvider>? additionalAuthenticationProviders, EnhancedMetricsConfig? enhancedMetricsConfig, GraphQLApiIntrospectionConfig? introspectionConfig, LambdaAuthorizerConfig? lambdaAuthorizerConfig, LogConfig? logConfig, String? mergedApiExecutionRoleArn, OpenIDConnectConfig? openIDConnectConfig, String? ownerContact, int? queryDepthLimit, int? resolverCountLimit, UserPoolConfig? userPoolConfig, bool? xrayEnabled}) Future<UpdateGraphqlApiResponse>
Updates a GraphqlApi object.
updateResolver({required String apiId, required String fieldName, required String typeName, CachingConfig? cachingConfig, String? code, String? dataSourceName, ResolverKind? kind, int? maxBatchSize, ResolverLevelMetricsConfig? metricsConfig, PipelineConfig? pipelineConfig, String? requestMappingTemplate, String? responseMappingTemplate, AppSyncRuntime? runtime, SyncConfig? syncConfig}) Future<UpdateResolverResponse>
Updates a Resolver object.
updateSourceApiAssociation({required String associationId, required String mergedApiIdentifier, String? description, SourceApiAssociationConfig? sourceApiAssociationConfig}) Future<UpdateSourceApiAssociationResponse>
Updates some of the configuration choices of a particular source API association.
updateType({required String apiId, required TypeDefinitionFormat format, required String typeName, String? definition}) Future<UpdateTypeResponse>
Updates a Type object.

Operators

operator ==(Object other) bool
The equality operator.
inherited