Class: Aws::AppSync::Types::CreateResolverRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb

Overview

Note:

When making an API call, you may pass CreateResolverRequest data as a hash:

{
  api_id: "String", # required
  type_name: "ResourceName", # required
  field_name: "ResourceName", # required
  data_source_name: "ResourceName",
  request_mapping_template: "MappingTemplate",
  response_mapping_template: "MappingTemplate",
  kind: "UNIT", # accepts UNIT, PIPELINE
  pipeline_config: {
    functions: ["String"],
  },
  sync_config: {
    conflict_handler: "OPTIMISTIC_CONCURRENCY", # accepts OPTIMISTIC_CONCURRENCY, LAMBDA, AUTOMERGE, NONE
    conflict_detection: "VERSION", # accepts VERSION, NONE
    lambda_conflict_handler_config: {
      lambda_conflict_handler_arn: "String",
    },
  },
  caching_config: {
    ttl: 1, # required
    caching_keys: ["String"],
  },
  max_batch_size: 1,
  runtime: {
    name: "APPSYNC_JS", # required, accepts APPSYNC_JS
    runtime_version: "String", # required
  },
  code: "Code",
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#api_idString

The ID for the GraphQL API for which the resolver is being created.

Returns:

  • (String)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#caching_configTypes::CachingConfig

The caching configuration for the resolver.



1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#codeString

The resolver code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS.

Returns:

  • (String)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#data_source_nameString

The name of the data source for which the resolver is being created.

Returns:

  • (String)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#field_nameString

The name of the field to attach the resolver to.

Returns:

  • (String)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#kindString

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:

  • (String)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#max_batch_sizeInteger

The maximum batching size for a resolver.

Returns:

  • (Integer)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#pipeline_configTypes::PipelineConfig

The PipelineConfig.



1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#request_mapping_templateString

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:

  • (String)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#response_mapping_templateString

The mapping template to use for responses from the data source.

Returns:

  • (String)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#runtimeTypes::AppSyncRuntime

Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.



1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#sync_configTypes::SyncConfig

The SyncConfig for a resolver attached to a versioned data source.

Returns:



1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end

#type_nameString

The name of the Type.

Returns:

  • (String)


1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/types.rb', line 1315

class CreateResolverRequest < Struct.new(
  :api_id,
  :type_name,
  :field_name,
  :data_source_name,
  :request_mapping_template,
  :response_mapping_template,
  :kind,
  :pipeline_config,
  :sync_config,
  :caching_config,
  :max_batch_size,
  :runtime,
  :code)
  SENSITIVE = []
  include Aws::Structure
end