github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/appsync/resolver.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package appsync
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an AppSync Resolver.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			test, err := appsync.NewGraphQLApi(ctx, "test", &appsync.GraphQLApiArgs{
    33  //				AuthenticationType: pulumi.String("API_KEY"),
    34  //				Name:               pulumi.String("tf-example"),
    35  //				Schema: pulumi.String(`type Mutation {
    36  //		putPost(id: ID!, title: String!): Post
    37  //	}
    38  //
    39  //	type Post {
    40  //		id: ID!
    41  //		title: String!
    42  //	}
    43  //
    44  //	type Query {
    45  //		singlePost(id: ID!): Post
    46  //	}
    47  //
    48  //	schema {
    49  //		query: Query
    50  //		mutation: Mutation
    51  //	}
    52  //
    53  // `),
    54  //
    55  //			})
    56  //			if err != nil {
    57  //				return err
    58  //			}
    59  //			testDataSource, err := appsync.NewDataSource(ctx, "test", &appsync.DataSourceArgs{
    60  //				ApiId: test.ID(),
    61  //				Name:  pulumi.String("my_example"),
    62  //				Type:  pulumi.String("HTTP"),
    63  //				HttpConfig: &appsync.DataSourceHttpConfigArgs{
    64  //					Endpoint: pulumi.String("http://example.com"),
    65  //				},
    66  //			})
    67  //			if err != nil {
    68  //				return err
    69  //			}
    70  //			// UNIT type resolver (default)
    71  //			_, err = appsync.NewResolver(ctx, "test", &appsync.ResolverArgs{
    72  //				ApiId:      test.ID(),
    73  //				Field:      pulumi.String("singlePost"),
    74  //				Type:       pulumi.String("Query"),
    75  //				DataSource: testDataSource.Name,
    76  //				RequestTemplate: pulumi.String(`{
    77  //	    "version": "2018-05-29",
    78  //	    "method": "GET",
    79  //	    "resourcePath": "/",
    80  //	    "params":{
    81  //	        "headers": $utils.http.copyheaders($ctx.request.headers)
    82  //	    }
    83  //	}
    84  //
    85  // `),
    86  //
    87  //				ResponseTemplate: pulumi.String(`#if($ctx.result.statusCode == 200)
    88  //	    $ctx.result.body
    89  //
    90  // #else
    91  //
    92  //	$utils.appendError($ctx.result.body, $ctx.result.statusCode)
    93  //
    94  // #end
    95  // `),
    96  //
    97  //				CachingConfig: &appsync.ResolverCachingConfigArgs{
    98  //					CachingKeys: pulumi.StringArray{
    99  //						pulumi.String("$context.identity.sub"),
   100  //						pulumi.String("$context.arguments.id"),
   101  //					},
   102  //					Ttl: pulumi.Int(60),
   103  //				},
   104  //			})
   105  //			if err != nil {
   106  //				return err
   107  //			}
   108  //			// PIPELINE type resolver
   109  //			_, err = appsync.NewResolver(ctx, "Mutation_pipelineTest", &appsync.ResolverArgs{
   110  //				Type:             pulumi.String("Mutation"),
   111  //				ApiId:            test.ID(),
   112  //				Field:            pulumi.String("pipelineTest"),
   113  //				RequestTemplate:  pulumi.String("{}"),
   114  //				ResponseTemplate: pulumi.String("$util.toJson($ctx.result)"),
   115  //				Kind:             pulumi.String("PIPELINE"),
   116  //				PipelineConfig: &appsync.ResolverPipelineConfigArgs{
   117  //					Functions: pulumi.StringArray{
   118  //						test1.FunctionId,
   119  //						test2.FunctionId,
   120  //						test3.FunctionId,
   121  //					},
   122  //				},
   123  //			})
   124  //			if err != nil {
   125  //				return err
   126  //			}
   127  //			return nil
   128  //		})
   129  //	}
   130  //
   131  // ```
   132  // <!--End PulumiCodeChooser -->
   133  //
   134  // ### JS
   135  //
   136  // <!--Start PulumiCodeChooser -->
   137  // ```go
   138  // package main
   139  //
   140  // import (
   141  //
   142  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync"
   143  //	"github.com/pulumi/pulumi-std/sdk/go/std"
   144  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   145  //
   146  // )
   147  //
   148  //	func main() {
   149  //		pulumi.Run(func(ctx *pulumi.Context) error {
   150  //			invokeFile, err := std.File(ctx, &std.FileArgs{
   151  //				Input: "some-code-dir",
   152  //			}, nil)
   153  //			if err != nil {
   154  //				return err
   155  //			}
   156  //			_, err = appsync.NewResolver(ctx, "example", &appsync.ResolverArgs{
   157  //				Type:  pulumi.String("Query"),
   158  //				ApiId: pulumi.Any(testAwsAppsyncGraphqlApi.Id),
   159  //				Field: pulumi.String("pipelineTest"),
   160  //				Kind:  pulumi.String("PIPELINE"),
   161  //				Code:  invokeFile.Result,
   162  //				Runtime: &appsync.ResolverRuntimeArgs{
   163  //					Name:           pulumi.String("APPSYNC_JS"),
   164  //					RuntimeVersion: pulumi.String("1.0.0"),
   165  //				},
   166  //				PipelineConfig: &appsync.ResolverPipelineConfigArgs{
   167  //					Functions: pulumi.StringArray{
   168  //						test.FunctionId,
   169  //					},
   170  //				},
   171  //			})
   172  //			if err != nil {
   173  //				return err
   174  //			}
   175  //			return nil
   176  //		})
   177  //	}
   178  //
   179  // ```
   180  // <!--End PulumiCodeChooser -->
   181  //
   182  // ## Import
   183  //
   184  // Using `pulumi import`, import `aws_appsync_resolver` using the `api_id`, a hyphen, `type`, a hypen and `field`. For example:
   185  //
   186  // ```sh
   187  // $ pulumi import aws:appsync/resolver:Resolver example abcdef123456-exampleType-exampleField
   188  // ```
   189  type Resolver struct {
   190  	pulumi.CustomResourceState
   191  
   192  	// API ID for the GraphQL API.
   193  	ApiId pulumi.StringOutput `pulumi:"apiId"`
   194  	// ARN
   195  	Arn pulumi.StringOutput `pulumi:"arn"`
   196  	// The Caching Config. See Caching Config.
   197  	CachingConfig ResolverCachingConfigPtrOutput `pulumi:"cachingConfig"`
   198  	// The function code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS.
   199  	Code pulumi.StringPtrOutput `pulumi:"code"`
   200  	// Data source name.
   201  	DataSource pulumi.StringPtrOutput `pulumi:"dataSource"`
   202  	// Field name from the schema defined in the GraphQL API.
   203  	Field pulumi.StringOutput `pulumi:"field"`
   204  	// Resolver type. Valid values are `UNIT` and `PIPELINE`.
   205  	Kind pulumi.StringPtrOutput `pulumi:"kind"`
   206  	// Maximum batching size for a resolver. Valid values are between `0` and `2000`.
   207  	MaxBatchSize pulumi.IntPtrOutput `pulumi:"maxBatchSize"`
   208  	// The caching configuration for the resolver. See Pipeline Config.
   209  	PipelineConfig ResolverPipelineConfigPtrOutput `pulumi:"pipelineConfig"`
   210  	// Request mapping template for UNIT resolver or 'before mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   211  	RequestTemplate pulumi.StringPtrOutput `pulumi:"requestTemplate"`
   212  	// Response mapping template for UNIT resolver or 'after mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   213  	ResponseTemplate pulumi.StringPtrOutput `pulumi:"responseTemplate"`
   214  	// 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. See Runtime.
   215  	Runtime ResolverRuntimePtrOutput `pulumi:"runtime"`
   216  	// Describes a Sync configuration for a resolver. See Sync Config.
   217  	SyncConfig ResolverSyncConfigPtrOutput `pulumi:"syncConfig"`
   218  	// Type name from the schema defined in the GraphQL API.
   219  	Type pulumi.StringOutput `pulumi:"type"`
   220  }
   221  
   222  // NewResolver registers a new resource with the given unique name, arguments, and options.
   223  func NewResolver(ctx *pulumi.Context,
   224  	name string, args *ResolverArgs, opts ...pulumi.ResourceOption) (*Resolver, error) {
   225  	if args == nil {
   226  		return nil, errors.New("missing one or more required arguments")
   227  	}
   228  
   229  	if args.ApiId == nil {
   230  		return nil, errors.New("invalid value for required argument 'ApiId'")
   231  	}
   232  	if args.Field == nil {
   233  		return nil, errors.New("invalid value for required argument 'Field'")
   234  	}
   235  	if args.Type == nil {
   236  		return nil, errors.New("invalid value for required argument 'Type'")
   237  	}
   238  	opts = internal.PkgResourceDefaultOpts(opts)
   239  	var resource Resolver
   240  	err := ctx.RegisterResource("aws:appsync/resolver:Resolver", name, args, &resource, opts...)
   241  	if err != nil {
   242  		return nil, err
   243  	}
   244  	return &resource, nil
   245  }
   246  
   247  // GetResolver gets an existing Resolver resource's state with the given name, ID, and optional
   248  // state properties that are used to uniquely qualify the lookup (nil if not required).
   249  func GetResolver(ctx *pulumi.Context,
   250  	name string, id pulumi.IDInput, state *ResolverState, opts ...pulumi.ResourceOption) (*Resolver, error) {
   251  	var resource Resolver
   252  	err := ctx.ReadResource("aws:appsync/resolver:Resolver", name, id, state, &resource, opts...)
   253  	if err != nil {
   254  		return nil, err
   255  	}
   256  	return &resource, nil
   257  }
   258  
   259  // Input properties used for looking up and filtering Resolver resources.
   260  type resolverState struct {
   261  	// API ID for the GraphQL API.
   262  	ApiId *string `pulumi:"apiId"`
   263  	// ARN
   264  	Arn *string `pulumi:"arn"`
   265  	// The Caching Config. See Caching Config.
   266  	CachingConfig *ResolverCachingConfig `pulumi:"cachingConfig"`
   267  	// The function code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS.
   268  	Code *string `pulumi:"code"`
   269  	// Data source name.
   270  	DataSource *string `pulumi:"dataSource"`
   271  	// Field name from the schema defined in the GraphQL API.
   272  	Field *string `pulumi:"field"`
   273  	// Resolver type. Valid values are `UNIT` and `PIPELINE`.
   274  	Kind *string `pulumi:"kind"`
   275  	// Maximum batching size for a resolver. Valid values are between `0` and `2000`.
   276  	MaxBatchSize *int `pulumi:"maxBatchSize"`
   277  	// The caching configuration for the resolver. See Pipeline Config.
   278  	PipelineConfig *ResolverPipelineConfig `pulumi:"pipelineConfig"`
   279  	// Request mapping template for UNIT resolver or 'before mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   280  	RequestTemplate *string `pulumi:"requestTemplate"`
   281  	// Response mapping template for UNIT resolver or 'after mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   282  	ResponseTemplate *string `pulumi:"responseTemplate"`
   283  	// 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. See Runtime.
   284  	Runtime *ResolverRuntime `pulumi:"runtime"`
   285  	// Describes a Sync configuration for a resolver. See Sync Config.
   286  	SyncConfig *ResolverSyncConfig `pulumi:"syncConfig"`
   287  	// Type name from the schema defined in the GraphQL API.
   288  	Type *string `pulumi:"type"`
   289  }
   290  
   291  type ResolverState struct {
   292  	// API ID for the GraphQL API.
   293  	ApiId pulumi.StringPtrInput
   294  	// ARN
   295  	Arn pulumi.StringPtrInput
   296  	// The Caching Config. See Caching Config.
   297  	CachingConfig ResolverCachingConfigPtrInput
   298  	// The function code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS.
   299  	Code pulumi.StringPtrInput
   300  	// Data source name.
   301  	DataSource pulumi.StringPtrInput
   302  	// Field name from the schema defined in the GraphQL API.
   303  	Field pulumi.StringPtrInput
   304  	// Resolver type. Valid values are `UNIT` and `PIPELINE`.
   305  	Kind pulumi.StringPtrInput
   306  	// Maximum batching size for a resolver. Valid values are between `0` and `2000`.
   307  	MaxBatchSize pulumi.IntPtrInput
   308  	// The caching configuration for the resolver. See Pipeline Config.
   309  	PipelineConfig ResolverPipelineConfigPtrInput
   310  	// Request mapping template for UNIT resolver or 'before mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   311  	RequestTemplate pulumi.StringPtrInput
   312  	// Response mapping template for UNIT resolver or 'after mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   313  	ResponseTemplate pulumi.StringPtrInput
   314  	// 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. See Runtime.
   315  	Runtime ResolverRuntimePtrInput
   316  	// Describes a Sync configuration for a resolver. See Sync Config.
   317  	SyncConfig ResolverSyncConfigPtrInput
   318  	// Type name from the schema defined in the GraphQL API.
   319  	Type pulumi.StringPtrInput
   320  }
   321  
   322  func (ResolverState) ElementType() reflect.Type {
   323  	return reflect.TypeOf((*resolverState)(nil)).Elem()
   324  }
   325  
   326  type resolverArgs struct {
   327  	// API ID for the GraphQL API.
   328  	ApiId string `pulumi:"apiId"`
   329  	// The Caching Config. See Caching Config.
   330  	CachingConfig *ResolverCachingConfig `pulumi:"cachingConfig"`
   331  	// The function code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS.
   332  	Code *string `pulumi:"code"`
   333  	// Data source name.
   334  	DataSource *string `pulumi:"dataSource"`
   335  	// Field name from the schema defined in the GraphQL API.
   336  	Field string `pulumi:"field"`
   337  	// Resolver type. Valid values are `UNIT` and `PIPELINE`.
   338  	Kind *string `pulumi:"kind"`
   339  	// Maximum batching size for a resolver. Valid values are between `0` and `2000`.
   340  	MaxBatchSize *int `pulumi:"maxBatchSize"`
   341  	// The caching configuration for the resolver. See Pipeline Config.
   342  	PipelineConfig *ResolverPipelineConfig `pulumi:"pipelineConfig"`
   343  	// Request mapping template for UNIT resolver or 'before mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   344  	RequestTemplate *string `pulumi:"requestTemplate"`
   345  	// Response mapping template for UNIT resolver or 'after mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   346  	ResponseTemplate *string `pulumi:"responseTemplate"`
   347  	// 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. See Runtime.
   348  	Runtime *ResolverRuntime `pulumi:"runtime"`
   349  	// Describes a Sync configuration for a resolver. See Sync Config.
   350  	SyncConfig *ResolverSyncConfig `pulumi:"syncConfig"`
   351  	// Type name from the schema defined in the GraphQL API.
   352  	Type string `pulumi:"type"`
   353  }
   354  
   355  // The set of arguments for constructing a Resolver resource.
   356  type ResolverArgs struct {
   357  	// API ID for the GraphQL API.
   358  	ApiId pulumi.StringInput
   359  	// The Caching Config. See Caching Config.
   360  	CachingConfig ResolverCachingConfigPtrInput
   361  	// The function code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS.
   362  	Code pulumi.StringPtrInput
   363  	// Data source name.
   364  	DataSource pulumi.StringPtrInput
   365  	// Field name from the schema defined in the GraphQL API.
   366  	Field pulumi.StringInput
   367  	// Resolver type. Valid values are `UNIT` and `PIPELINE`.
   368  	Kind pulumi.StringPtrInput
   369  	// Maximum batching size for a resolver. Valid values are between `0` and `2000`.
   370  	MaxBatchSize pulumi.IntPtrInput
   371  	// The caching configuration for the resolver. See Pipeline Config.
   372  	PipelineConfig ResolverPipelineConfigPtrInput
   373  	// Request mapping template for UNIT resolver or 'before mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   374  	RequestTemplate pulumi.StringPtrInput
   375  	// Response mapping template for UNIT resolver or 'after mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   376  	ResponseTemplate pulumi.StringPtrInput
   377  	// 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. See Runtime.
   378  	Runtime ResolverRuntimePtrInput
   379  	// Describes a Sync configuration for a resolver. See Sync Config.
   380  	SyncConfig ResolverSyncConfigPtrInput
   381  	// Type name from the schema defined in the GraphQL API.
   382  	Type pulumi.StringInput
   383  }
   384  
   385  func (ResolverArgs) ElementType() reflect.Type {
   386  	return reflect.TypeOf((*resolverArgs)(nil)).Elem()
   387  }
   388  
   389  type ResolverInput interface {
   390  	pulumi.Input
   391  
   392  	ToResolverOutput() ResolverOutput
   393  	ToResolverOutputWithContext(ctx context.Context) ResolverOutput
   394  }
   395  
   396  func (*Resolver) ElementType() reflect.Type {
   397  	return reflect.TypeOf((**Resolver)(nil)).Elem()
   398  }
   399  
   400  func (i *Resolver) ToResolverOutput() ResolverOutput {
   401  	return i.ToResolverOutputWithContext(context.Background())
   402  }
   403  
   404  func (i *Resolver) ToResolverOutputWithContext(ctx context.Context) ResolverOutput {
   405  	return pulumi.ToOutputWithContext(ctx, i).(ResolverOutput)
   406  }
   407  
   408  // ResolverArrayInput is an input type that accepts ResolverArray and ResolverArrayOutput values.
   409  // You can construct a concrete instance of `ResolverArrayInput` via:
   410  //
   411  //	ResolverArray{ ResolverArgs{...} }
   412  type ResolverArrayInput interface {
   413  	pulumi.Input
   414  
   415  	ToResolverArrayOutput() ResolverArrayOutput
   416  	ToResolverArrayOutputWithContext(context.Context) ResolverArrayOutput
   417  }
   418  
   419  type ResolverArray []ResolverInput
   420  
   421  func (ResolverArray) ElementType() reflect.Type {
   422  	return reflect.TypeOf((*[]*Resolver)(nil)).Elem()
   423  }
   424  
   425  func (i ResolverArray) ToResolverArrayOutput() ResolverArrayOutput {
   426  	return i.ToResolverArrayOutputWithContext(context.Background())
   427  }
   428  
   429  func (i ResolverArray) ToResolverArrayOutputWithContext(ctx context.Context) ResolverArrayOutput {
   430  	return pulumi.ToOutputWithContext(ctx, i).(ResolverArrayOutput)
   431  }
   432  
   433  // ResolverMapInput is an input type that accepts ResolverMap and ResolverMapOutput values.
   434  // You can construct a concrete instance of `ResolverMapInput` via:
   435  //
   436  //	ResolverMap{ "key": ResolverArgs{...} }
   437  type ResolverMapInput interface {
   438  	pulumi.Input
   439  
   440  	ToResolverMapOutput() ResolverMapOutput
   441  	ToResolverMapOutputWithContext(context.Context) ResolverMapOutput
   442  }
   443  
   444  type ResolverMap map[string]ResolverInput
   445  
   446  func (ResolverMap) ElementType() reflect.Type {
   447  	return reflect.TypeOf((*map[string]*Resolver)(nil)).Elem()
   448  }
   449  
   450  func (i ResolverMap) ToResolverMapOutput() ResolverMapOutput {
   451  	return i.ToResolverMapOutputWithContext(context.Background())
   452  }
   453  
   454  func (i ResolverMap) ToResolverMapOutputWithContext(ctx context.Context) ResolverMapOutput {
   455  	return pulumi.ToOutputWithContext(ctx, i).(ResolverMapOutput)
   456  }
   457  
   458  type ResolverOutput struct{ *pulumi.OutputState }
   459  
   460  func (ResolverOutput) ElementType() reflect.Type {
   461  	return reflect.TypeOf((**Resolver)(nil)).Elem()
   462  }
   463  
   464  func (o ResolverOutput) ToResolverOutput() ResolverOutput {
   465  	return o
   466  }
   467  
   468  func (o ResolverOutput) ToResolverOutputWithContext(ctx context.Context) ResolverOutput {
   469  	return o
   470  }
   471  
   472  // API ID for the GraphQL API.
   473  func (o ResolverOutput) ApiId() pulumi.StringOutput {
   474  	return o.ApplyT(func(v *Resolver) pulumi.StringOutput { return v.ApiId }).(pulumi.StringOutput)
   475  }
   476  
   477  // ARN
   478  func (o ResolverOutput) Arn() pulumi.StringOutput {
   479  	return o.ApplyT(func(v *Resolver) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   480  }
   481  
   482  // The Caching Config. See Caching Config.
   483  func (o ResolverOutput) CachingConfig() ResolverCachingConfigPtrOutput {
   484  	return o.ApplyT(func(v *Resolver) ResolverCachingConfigPtrOutput { return v.CachingConfig }).(ResolverCachingConfigPtrOutput)
   485  }
   486  
   487  // The function code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS.
   488  func (o ResolverOutput) Code() pulumi.StringPtrOutput {
   489  	return o.ApplyT(func(v *Resolver) pulumi.StringPtrOutput { return v.Code }).(pulumi.StringPtrOutput)
   490  }
   491  
   492  // Data source name.
   493  func (o ResolverOutput) DataSource() pulumi.StringPtrOutput {
   494  	return o.ApplyT(func(v *Resolver) pulumi.StringPtrOutput { return v.DataSource }).(pulumi.StringPtrOutput)
   495  }
   496  
   497  // Field name from the schema defined in the GraphQL API.
   498  func (o ResolverOutput) Field() pulumi.StringOutput {
   499  	return o.ApplyT(func(v *Resolver) pulumi.StringOutput { return v.Field }).(pulumi.StringOutput)
   500  }
   501  
   502  // Resolver type. Valid values are `UNIT` and `PIPELINE`.
   503  func (o ResolverOutput) Kind() pulumi.StringPtrOutput {
   504  	return o.ApplyT(func(v *Resolver) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   505  }
   506  
   507  // Maximum batching size for a resolver. Valid values are between `0` and `2000`.
   508  func (o ResolverOutput) MaxBatchSize() pulumi.IntPtrOutput {
   509  	return o.ApplyT(func(v *Resolver) pulumi.IntPtrOutput { return v.MaxBatchSize }).(pulumi.IntPtrOutput)
   510  }
   511  
   512  // The caching configuration for the resolver. See Pipeline Config.
   513  func (o ResolverOutput) PipelineConfig() ResolverPipelineConfigPtrOutput {
   514  	return o.ApplyT(func(v *Resolver) ResolverPipelineConfigPtrOutput { return v.PipelineConfig }).(ResolverPipelineConfigPtrOutput)
   515  }
   516  
   517  // Request mapping template for UNIT resolver or 'before mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   518  func (o ResolverOutput) RequestTemplate() pulumi.StringPtrOutput {
   519  	return o.ApplyT(func(v *Resolver) pulumi.StringPtrOutput { return v.RequestTemplate }).(pulumi.StringPtrOutput)
   520  }
   521  
   522  // Response mapping template for UNIT resolver or 'after mapping template' for PIPELINE resolver. Required for non-Lambda resolvers.
   523  func (o ResolverOutput) ResponseTemplate() pulumi.StringPtrOutput {
   524  	return o.ApplyT(func(v *Resolver) pulumi.StringPtrOutput { return v.ResponseTemplate }).(pulumi.StringPtrOutput)
   525  }
   526  
   527  // 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. See Runtime.
   528  func (o ResolverOutput) Runtime() ResolverRuntimePtrOutput {
   529  	return o.ApplyT(func(v *Resolver) ResolverRuntimePtrOutput { return v.Runtime }).(ResolverRuntimePtrOutput)
   530  }
   531  
   532  // Describes a Sync configuration for a resolver. See Sync Config.
   533  func (o ResolverOutput) SyncConfig() ResolverSyncConfigPtrOutput {
   534  	return o.ApplyT(func(v *Resolver) ResolverSyncConfigPtrOutput { return v.SyncConfig }).(ResolverSyncConfigPtrOutput)
   535  }
   536  
   537  // Type name from the schema defined in the GraphQL API.
   538  func (o ResolverOutput) Type() pulumi.StringOutput {
   539  	return o.ApplyT(func(v *Resolver) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
   540  }
   541  
   542  type ResolverArrayOutput struct{ *pulumi.OutputState }
   543  
   544  func (ResolverArrayOutput) ElementType() reflect.Type {
   545  	return reflect.TypeOf((*[]*Resolver)(nil)).Elem()
   546  }
   547  
   548  func (o ResolverArrayOutput) ToResolverArrayOutput() ResolverArrayOutput {
   549  	return o
   550  }
   551  
   552  func (o ResolverArrayOutput) ToResolverArrayOutputWithContext(ctx context.Context) ResolverArrayOutput {
   553  	return o
   554  }
   555  
   556  func (o ResolverArrayOutput) Index(i pulumi.IntInput) ResolverOutput {
   557  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Resolver {
   558  		return vs[0].([]*Resolver)[vs[1].(int)]
   559  	}).(ResolverOutput)
   560  }
   561  
   562  type ResolverMapOutput struct{ *pulumi.OutputState }
   563  
   564  func (ResolverMapOutput) ElementType() reflect.Type {
   565  	return reflect.TypeOf((*map[string]*Resolver)(nil)).Elem()
   566  }
   567  
   568  func (o ResolverMapOutput) ToResolverMapOutput() ResolverMapOutput {
   569  	return o
   570  }
   571  
   572  func (o ResolverMapOutput) ToResolverMapOutputWithContext(ctx context.Context) ResolverMapOutput {
   573  	return o
   574  }
   575  
   576  func (o ResolverMapOutput) MapIndex(k pulumi.StringInput) ResolverOutput {
   577  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Resolver {
   578  		return vs[0].(map[string]*Resolver)[vs[1].(string)]
   579  	}).(ResolverOutput)
   580  }
   581  
   582  func init() {
   583  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverInput)(nil)).Elem(), &Resolver{})
   584  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverArrayInput)(nil)).Elem(), ResolverArray{})
   585  	pulumi.RegisterInputType(reflect.TypeOf((*ResolverMapInput)(nil)).Elem(), ResolverMap{})
   586  	pulumi.RegisterOutputType(ResolverOutput{})
   587  	pulumi.RegisterOutputType(ResolverArrayOutput{})
   588  	pulumi.RegisterOutputType(ResolverMapOutput{})
   589  }