Interface CreateResolverRequest.Builder
- All Superinterfaces:
AppSyncRequest.Builder
,AwsRequest.Builder
,Buildable
,CopyableBuilder<CreateResolverRequest.Builder,
,CreateResolverRequest> SdkBuilder<CreateResolverRequest.Builder,
,CreateResolverRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
CreateResolverRequest
-
Method Summary
Modifier and TypeMethodDescriptionThe ID for the GraphQL API for which the resolver is being created.default CreateResolverRequest.Builder
cachingConfig
(Consumer<CachingConfig.Builder> cachingConfig) The caching configuration for the resolver.cachingConfig
(CachingConfig cachingConfig) The caching configuration for the resolver.Theresolver
code that contains the request and response functions.dataSourceName
(String dataSourceName) The name of the data source for which the resolver is being created.The name of the field to attach the resolver to.The resolver type.kind
(ResolverKind kind) The resolver type.maxBatchSize
(Integer maxBatchSize) The maximum batching size for a resolver.metricsConfig
(String metricsConfig) Enables or disables enhanced resolver metrics for specified resolvers.metricsConfig
(ResolverLevelMetricsConfig metricsConfig) Enables or disables enhanced resolver metrics for specified resolvers.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.default CreateResolverRequest.Builder
pipelineConfig
(Consumer<PipelineConfig.Builder> pipelineConfig) ThePipelineConfig
.pipelineConfig
(PipelineConfig pipelineConfig) ThePipelineConfig
.requestMappingTemplate
(String requestMappingTemplate) The mapping template to use for requests.responseMappingTemplate
(String responseMappingTemplate) The mapping template to use for responses from the data source.default CreateResolverRequest.Builder
runtime
(Consumer<AppSyncRuntime.Builder> runtime) Sets the value of the Runtime property for this object.runtime
(AppSyncRuntime runtime) Sets the value of the Runtime property for this object.default CreateResolverRequest.Builder
syncConfig
(Consumer<SyncConfig.Builder> syncConfig) TheSyncConfig
for a resolver attached to a versioned data source.syncConfig
(SyncConfig syncConfig) TheSyncConfig
for a resolver attached to a versioned data source.The name of theType
.Methods inherited from interface software.amazon.awssdk.services.appsync.model.AppSyncRequest.Builder
build
Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
apiId
The ID for the GraphQL API for which the resolver is being created.
- Parameters:
apiId
- The ID for the GraphQL API for which the resolver is being created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
typeName
The name of the
Type
.- Parameters:
typeName
- The name of theType
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fieldName
The name of the field to attach the resolver to.
- Parameters:
fieldName
- The name of the field to attach the resolver to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dataSourceName
The name of the data source for which the resolver is being created.
- Parameters:
dataSourceName
- The name of the data source for which the resolver is being created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
requestMappingTemplate
The mapping template to use for requests.
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.
- Parameters:
requestMappingTemplate
- The mapping template to use for requests.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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseMappingTemplate
The mapping template to use for responses from the data source.
- Parameters:
responseMappingTemplate
- The mapping template to use for responses from the data source.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
kind
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
Function
objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
- Parameters:
kind
- 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
Function
objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
kind
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
Function
objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
- Parameters:
kind
- 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
Function
objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
pipelineConfig
The
PipelineConfig
.- Parameters:
pipelineConfig
- ThePipelineConfig
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
pipelineConfig
default CreateResolverRequest.Builder pipelineConfig(Consumer<PipelineConfig.Builder> pipelineConfig) The
This is a convenience method that creates an instance of thePipelineConfig
.PipelineConfig.Builder
avoiding the need to create one manually viaPipelineConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed topipelineConfig(PipelineConfig)
.- Parameters:
pipelineConfig
- a consumer that will call methods onPipelineConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
syncConfig
The
SyncConfig
for a resolver attached to a versioned data source.- Parameters:
syncConfig
- TheSyncConfig
for a resolver attached to a versioned data source.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
syncConfig
The
This is a convenience method that creates an instance of theSyncConfig
for a resolver attached to a versioned data source.SyncConfig.Builder
avoiding the need to create one manually viaSyncConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tosyncConfig(SyncConfig)
.- Parameters:
syncConfig
- a consumer that will call methods onSyncConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
cachingConfig
The caching configuration for the resolver.
- Parameters:
cachingConfig
- The caching configuration for the resolver.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
cachingConfig
The caching configuration for the resolver.
This is a convenience method that creates an instance of theCachingConfig.Builder
avoiding the need to create one manually viaCachingConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocachingConfig(CachingConfig)
.- Parameters:
cachingConfig
- a consumer that will call methods onCachingConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
maxBatchSize
The maximum batching size for a resolver.
- Parameters:
maxBatchSize
- The maximum batching size for a resolver.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
runtime
Sets the value of the Runtime property for this object.- Parameters:
runtime
- The new value for the Runtime property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
runtime
Sets the value of the Runtime property for this object. This is a convenience method that creates an instance of theAppSyncRuntime.Builder
avoiding the need to create one manually viaAppSyncRuntime.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toruntime(AppSyncRuntime)
.- Parameters:
runtime
- a consumer that will call methods onAppSyncRuntime.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
code
The
resolver
code that contains the request and response functions. When code is used, theruntime
is required. Theruntime
value must beAPPSYNC_JS
.- Parameters:
code
- Theresolver
code that contains the request and response functions. When code is used, theruntime
is required. Theruntime
value must beAPPSYNC_JS
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricsConfig
Enables or disables enhanced resolver metrics for specified resolvers. Note that
metricsConfig
won't be used unless theresolverLevelMetricsBehavior
value is set toPER_RESOLVER_METRICS
. If theresolverLevelMetricsBehavior
is set toFULL_REQUEST_RESOLVER_METRICS
instead,metricsConfig
will be ignored. However, you can still set its value.metricsConfig
can beENABLED
orDISABLED
.- Parameters:
metricsConfig
- Enables or disables enhanced resolver metrics for specified resolvers. Note thatmetricsConfig
won't be used unless theresolverLevelMetricsBehavior
value is set toPER_RESOLVER_METRICS
. If theresolverLevelMetricsBehavior
is set toFULL_REQUEST_RESOLVER_METRICS
instead,metricsConfig
will be ignored. However, you can still set its value.metricsConfig
can beENABLED
orDISABLED
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
metricsConfig
Enables or disables enhanced resolver metrics for specified resolvers. Note that
metricsConfig
won't be used unless theresolverLevelMetricsBehavior
value is set toPER_RESOLVER_METRICS
. If theresolverLevelMetricsBehavior
is set toFULL_REQUEST_RESOLVER_METRICS
instead,metricsConfig
will be ignored. However, you can still set its value.metricsConfig
can beENABLED
orDISABLED
.- Parameters:
metricsConfig
- Enables or disables enhanced resolver metrics for specified resolvers. Note thatmetricsConfig
won't be used unless theresolverLevelMetricsBehavior
value is set toPER_RESOLVER_METRICS
. If theresolverLevelMetricsBehavior
is set toFULL_REQUEST_RESOLVER_METRICS
instead,metricsConfig
will be ignored. However, you can still set its value.metricsConfig
can beENABLED
orDISABLED
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
CreateResolverRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateResolverRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-