update_resolver
async
¶
update_resolver(
api_id: String,
type_name: ResourceName,
field_name: ResourceName,
*,
config_overrides: Optional[AsyncAppSyncClientConfig] = 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/async_app_sync.py
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 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 | |