update_resolver
¶
update_resolver(
api_id: String,
type_name: ResourceName,
field_name: ResourceName,
*,
config_overrides: Optional[AppSyncClientConfig] = None,
data_source_name: Optional[ResourceName] = None,
request_mapping_template: Optional[MappingTemplate] = None,
response_mapping_template: Optional[MappingTemplate] = None,
kind: Optional[ResolverKind] = None,
pipeline_config: Optional[PipelineConfig] = None,
sync_config: Optional[SyncConfig] = None,
caching_config: Optional[CachingConfig] = None,
max_batch_size: Optional[MaxBatchSize] = None,
runtime: Optional[AppSyncRuntime] = None,
code: Optional[Code] = None,
metrics_config: Optional[ResolverLevelMetricsConfig] = None,
) -> UpdateResolverResponse
Updates a Resolver object.
Parameters:
-
api_id(String) –The API ID.
-
type_name(ResourceName) –The new type name.
-
field_name(ResourceName) –The new field name.
-
data_source_name(Optional[ResourceName], default:None) –The new data source name.
-
request_mapping_template(Optional[MappingTemplate], default:None) –The new request mapping template.
A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).
VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.
-
response_mapping_template(Optional[MappingTemplate], default:None) –The new response mapping template.
-
kind(Optional[ResolverKind], default:None) –The resolver type.
-
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
-
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of
Functionobjects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
-
-
pipeline_config(Optional[PipelineConfig], default:None) –The
PipelineConfig. -
sync_config(Optional[SyncConfig], default:None) –The
SyncConfigfor a resolver attached to a versioned data source. -
caching_config(Optional[CachingConfig], default:None) –The caching configuration for the resolver.
-
max_batch_size(Optional[MaxBatchSize], default:None) –The maximum batching size for a resolver.
-
code(Optional[Code], default:None) –The
resolvercode that contains the request and response functions. When code is used, theruntimeis required. Theruntimevalue must beAPPSYNC_JS. -
metrics_config(Optional[ResolverLevelMetricsConfig], default:None) –Enables or disables enhanced resolver metrics for specified resolvers. Note that
metricsConfigwon't be used unless theresolverLevelMetricsBehaviorvalue is set toPER_RESOLVER_METRICS. If theresolverLevelMetricsBehavioris set toFULL_REQUEST_RESOLVER_METRICSinstead,metricsConfigwill be ignored. However, you can still set its value.metricsConfigcan beENABLEDorDISABLED.
Raises:
-
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.
-
ConcurrentModificationException–Another modification is in progress at this time and it must complete before you can make your change.
-
InternalFailureException–An internal AppSync error occurred. Try your request again.
-
NotFoundException–The resource specified in the request was not found. Check the resource, and then try again.
-
UnauthorizedException–You aren't authorized to perform this operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_appsync/_services/app_sync.py
4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 | |