1. Packages
  2. AWS Native
  3. API Docs
  4. appsync
  5. FunctionConfiguration

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi

aws-native.appsync.FunctionConfiguration

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi

    An example resource schema demonstrating some basic constructs and validation rules.

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var graphQlApiId = config.Require("graphQlApiId");
        var name = config.Require("name");
        var description = config.Require("description");
        var dataSourceName = config.Require("dataSourceName");
        var functionVersion = config.Require("functionVersion");
        var requestMappingTemplateS3LocationInput = config.Require("requestMappingTemplateS3LocationInput");
        var responseMappingTemplateS3LocationInput = config.Require("responseMappingTemplateS3LocationInput");
        var functionConfiguration = new AwsNative.AppSync.FunctionConfiguration("functionConfiguration", new()
        {
            ApiId = graphQlApiId,
            Name = name,
            Description = description,
            FunctionVersion = functionVersion,
            DataSourceName = dataSourceName,
            RequestMappingTemplateS3Location = requestMappingTemplateS3LocationInput,
            ResponseMappingTemplateS3Location = responseMappingTemplateS3LocationInput,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/appsync"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		graphQlApiId := cfg.Require("graphQlApiId")
    		name := cfg.Require("name")
    		description := cfg.Require("description")
    		dataSourceName := cfg.Require("dataSourceName")
    		functionVersion := cfg.Require("functionVersion")
    		requestMappingTemplateS3LocationInput := cfg.Require("requestMappingTemplateS3LocationInput")
    		responseMappingTemplateS3LocationInput := cfg.Require("responseMappingTemplateS3LocationInput")
    		_, err := appsync.NewFunctionConfiguration(ctx, "functionConfiguration", &appsync.FunctionConfigurationArgs{
    			ApiId:                             pulumi.String(graphQlApiId),
    			Name:                              pulumi.String(name),
    			Description:                       pulumi.String(description),
    			FunctionVersion:                   pulumi.String(functionVersion),
    			DataSourceName:                    pulumi.String(dataSourceName),
    			RequestMappingTemplateS3Location:  pulumi.String(requestMappingTemplateS3LocationInput),
    			ResponseMappingTemplateS3Location: pulumi.String(responseMappingTemplateS3LocationInput),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    config = pulumi.Config()
    graph_ql_api_id = config.require("graphQlApiId")
    name = config.require("name")
    description = config.require("description")
    data_source_name = config.require("dataSourceName")
    function_version = config.require("functionVersion")
    request_mapping_template_s3_location_input = config.require("requestMappingTemplateS3LocationInput")
    response_mapping_template_s3_location_input = config.require("responseMappingTemplateS3LocationInput")
    function_configuration = aws_native.appsync.FunctionConfiguration("functionConfiguration",
        api_id=graph_ql_api_id,
        name=name,
        description=description,
        function_version=function_version,
        data_source_name=data_source_name,
        request_mapping_template_s3_location=request_mapping_template_s3_location_input,
        response_mapping_template_s3_location=response_mapping_template_s3_location_input)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const config = new pulumi.Config();
    const graphQlApiId = config.require("graphQlApiId");
    const name = config.require("name");
    const description = config.require("description");
    const dataSourceName = config.require("dataSourceName");
    const functionVersion = config.require("functionVersion");
    const requestMappingTemplateS3LocationInput = config.require("requestMappingTemplateS3LocationInput");
    const responseMappingTemplateS3LocationInput = config.require("responseMappingTemplateS3LocationInput");
    const functionConfiguration = new aws_native.appsync.FunctionConfiguration("functionConfiguration", {
        apiId: graphQlApiId,
        name: name,
        description: description,
        functionVersion: functionVersion,
        dataSourceName: dataSourceName,
        requestMappingTemplateS3Location: requestMappingTemplateS3LocationInput,
        responseMappingTemplateS3Location: responseMappingTemplateS3LocationInput,
    });
    

    Coming soon!

    Create FunctionConfiguration Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FunctionConfiguration(name: string, args: FunctionConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def FunctionConfiguration(resource_name: str,
                              args: FunctionConfigurationArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def FunctionConfiguration(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              data_source_name: Optional[str] = None,
                              api_id: Optional[str] = None,
                              max_batch_size: Optional[int] = None,
                              code_s3_location: Optional[str] = None,
                              description: Optional[str] = None,
                              function_version: Optional[str] = None,
                              code: Optional[str] = None,
                              name: Optional[str] = None,
                              request_mapping_template: Optional[str] = None,
                              request_mapping_template_s3_location: Optional[str] = None,
                              response_mapping_template: Optional[str] = None,
                              response_mapping_template_s3_location: Optional[str] = None,
                              runtime: Optional[FunctionConfigurationAppSyncRuntimeArgs] = None,
                              sync_config: Optional[FunctionConfigurationSyncConfigArgs] = None)
    func NewFunctionConfiguration(ctx *Context, name string, args FunctionConfigurationArgs, opts ...ResourceOption) (*FunctionConfiguration, error)
    public FunctionConfiguration(string name, FunctionConfigurationArgs args, CustomResourceOptions? opts = null)
    public FunctionConfiguration(String name, FunctionConfigurationArgs args)
    public FunctionConfiguration(String name, FunctionConfigurationArgs args, CustomResourceOptions options)
    
    type: aws-native:appsync:FunctionConfiguration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FunctionConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FunctionConfigurationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FunctionConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionConfigurationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const functionConfigurationResource = new aws_native.appsync.FunctionConfiguration("functionConfigurationResource", {
        dataSourceName: "string",
        apiId: "string",
        maxBatchSize: 0,
        codeS3Location: "string",
        description: "string",
        functionVersion: "string",
        code: "string",
        name: "string",
        requestMappingTemplate: "string",
        requestMappingTemplateS3Location: "string",
        responseMappingTemplate: "string",
        responseMappingTemplateS3Location: "string",
        runtime: {
            name: "string",
            runtimeVersion: "string",
        },
        syncConfig: {
            conflictDetection: "string",
            conflictHandler: "string",
            lambdaConflictHandlerConfig: {
                lambdaConflictHandlerArn: "string",
            },
        },
    });
    
    Coming soon!
    

    FunctionConfiguration Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The FunctionConfiguration resource accepts the following input properties:

    ApiId string
    The AWS AppSync GraphQL API that you want to attach using this function.
    DataSourceName string
    The name of data source this function will attach.
    Code string
    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.
    CodeS3Location string
    The Amazon S3 endpoint (where the code is located??).
    Description string
    The function description.
    FunctionVersion string
    The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
    MaxBatchSize int
    The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
    Name string
    The name of the function.
    RequestMappingTemplate string
    The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
    RequestMappingTemplateS3Location string
    Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
    ResponseMappingTemplate string
    The Function response mapping template.
    ResponseMappingTemplateS3Location string
    The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
    Runtime Pulumi.AwsNative.AppSync.Inputs.FunctionConfigurationAppSyncRuntime
    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.
    SyncConfig Pulumi.AwsNative.AppSync.Inputs.FunctionConfigurationSyncConfig
    Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
    ApiId string
    The AWS AppSync GraphQL API that you want to attach using this function.
    DataSourceName string
    The name of data source this function will attach.
    Code string
    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.
    CodeS3Location string
    The Amazon S3 endpoint (where the code is located??).
    Description string
    The function description.
    FunctionVersion string
    The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
    MaxBatchSize int
    The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
    Name string
    The name of the function.
    RequestMappingTemplate string
    The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
    RequestMappingTemplateS3Location string
    Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
    ResponseMappingTemplate string
    The Function response mapping template.
    ResponseMappingTemplateS3Location string
    The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
    Runtime FunctionConfigurationAppSyncRuntimeArgs
    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.
    SyncConfig FunctionConfigurationSyncConfigArgs
    Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
    apiId String
    The AWS AppSync GraphQL API that you want to attach using this function.
    dataSourceName String
    The name of data source this function will attach.
    code String
    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.
    codeS3Location String
    The Amazon S3 endpoint (where the code is located??).
    description String
    The function description.
    functionVersion String
    The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
    maxBatchSize Integer
    The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
    name String
    The name of the function.
    requestMappingTemplate String
    The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
    requestMappingTemplateS3Location String
    Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
    responseMappingTemplate String
    The Function response mapping template.
    responseMappingTemplateS3Location String
    The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
    runtime FunctionConfigurationAppSyncRuntime
    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.
    syncConfig FunctionConfigurationSyncConfig
    Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
    apiId string
    The AWS AppSync GraphQL API that you want to attach using this function.
    dataSourceName string
    The name of data source this function will attach.
    code string
    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.
    codeS3Location string
    The Amazon S3 endpoint (where the code is located??).
    description string
    The function description.
    functionVersion string
    The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
    maxBatchSize number
    The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
    name string
    The name of the function.
    requestMappingTemplate string
    The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
    requestMappingTemplateS3Location string
    Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
    responseMappingTemplate string
    The Function response mapping template.
    responseMappingTemplateS3Location string
    The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
    runtime FunctionConfigurationAppSyncRuntime
    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.
    syncConfig FunctionConfigurationSyncConfig
    Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
    api_id str
    The AWS AppSync GraphQL API that you want to attach using this function.
    data_source_name str
    The name of data source this function will attach.
    code str
    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.
    code_s3_location str
    The Amazon S3 endpoint (where the code is located??).
    description str
    The function description.
    function_version str
    The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
    max_batch_size int
    The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
    name str
    The name of the function.
    request_mapping_template str
    The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
    request_mapping_template_s3_location str
    Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
    response_mapping_template str
    The Function response mapping template.
    response_mapping_template_s3_location str
    The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
    runtime FunctionConfigurationAppSyncRuntimeArgs
    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.
    sync_config FunctionConfigurationSyncConfigArgs
    Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
    apiId String
    The AWS AppSync GraphQL API that you want to attach using this function.
    dataSourceName String
    The name of data source this function will attach.
    code String
    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.
    codeS3Location String
    The Amazon S3 endpoint (where the code is located??).
    description String
    The function description.
    functionVersion String
    The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
    maxBatchSize Number
    The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
    name String
    The name of the function.
    requestMappingTemplate String
    The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
    requestMappingTemplateS3Location String
    Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
    responseMappingTemplate String
    The Function response mapping template.
    responseMappingTemplateS3Location String
    The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
    runtime Property Map
    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.
    syncConfig Property Map
    Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FunctionConfiguration resource produces the following output properties:

    FunctionArn string
    The ARN for the function generated by the service
    FunctionId string
    The unique identifier for the function generated by the service
    Id string
    The provider-assigned unique ID for this managed resource.
    FunctionArn string
    The ARN for the function generated by the service
    FunctionId string
    The unique identifier for the function generated by the service
    Id string
    The provider-assigned unique ID for this managed resource.
    functionArn String
    The ARN for the function generated by the service
    functionId String
    The unique identifier for the function generated by the service
    id String
    The provider-assigned unique ID for this managed resource.
    functionArn string
    The ARN for the function generated by the service
    functionId string
    The unique identifier for the function generated by the service
    id string
    The provider-assigned unique ID for this managed resource.
    function_arn str
    The ARN for the function generated by the service
    function_id str
    The unique identifier for the function generated by the service
    id str
    The provider-assigned unique ID for this managed resource.
    functionArn String
    The ARN for the function generated by the service
    functionId String
    The unique identifier for the function generated by the service
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    FunctionConfigurationAppSyncRuntime, FunctionConfigurationAppSyncRuntimeArgs

    Name string
    The name of the runtime to use. Currently, the only allowed value is APPSYNC_JS.
    RuntimeVersion string
    The version of the runtime to use. Currently, the only allowed version is 1.0.0.
    Name string
    The name of the runtime to use. Currently, the only allowed value is APPSYNC_JS.
    RuntimeVersion string
    The version of the runtime to use. Currently, the only allowed version is 1.0.0.
    name String
    The name of the runtime to use. Currently, the only allowed value is APPSYNC_JS.
    runtimeVersion String
    The version of the runtime to use. Currently, the only allowed version is 1.0.0.
    name string
    The name of the runtime to use. Currently, the only allowed value is APPSYNC_JS.
    runtimeVersion string
    The version of the runtime to use. Currently, the only allowed version is 1.0.0.
    name str
    The name of the runtime to use. Currently, the only allowed value is APPSYNC_JS.
    runtime_version str
    The version of the runtime to use. Currently, the only allowed version is 1.0.0.
    name String
    The name of the runtime to use. Currently, the only allowed value is APPSYNC_JS.
    runtimeVersion String
    The version of the runtime to use. Currently, the only allowed version is 1.0.0.

    FunctionConfigurationLambdaConflictHandlerConfig, FunctionConfigurationLambdaConflictHandlerConfigArgs

    LambdaConflictHandlerArn string
    The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
    LambdaConflictHandlerArn string
    The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
    lambdaConflictHandlerArn String
    The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
    lambdaConflictHandlerArn string
    The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
    lambda_conflict_handler_arn str
    The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
    lambdaConflictHandlerArn String
    The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

    FunctionConfigurationSyncConfig, FunctionConfigurationSyncConfigArgs

    ConflictDetection string
    The Conflict Detection strategy to use.
    ConflictHandler string
    The Conflict Resolution strategy to perform in the event of a conflict.
    LambdaConflictHandlerConfig Pulumi.AwsNative.AppSync.Inputs.FunctionConfigurationLambdaConflictHandlerConfig
    ConflictDetection string
    The Conflict Detection strategy to use.
    ConflictHandler string
    The Conflict Resolution strategy to perform in the event of a conflict.
    LambdaConflictHandlerConfig FunctionConfigurationLambdaConflictHandlerConfig
    conflictDetection String
    The Conflict Detection strategy to use.
    conflictHandler String
    The Conflict Resolution strategy to perform in the event of a conflict.
    lambdaConflictHandlerConfig FunctionConfigurationLambdaConflictHandlerConfig
    conflictDetection string
    The Conflict Detection strategy to use.
    conflictHandler string
    The Conflict Resolution strategy to perform in the event of a conflict.
    lambdaConflictHandlerConfig FunctionConfigurationLambdaConflictHandlerConfig
    conflict_detection str
    The Conflict Detection strategy to use.
    conflict_handler str
    The Conflict Resolution strategy to perform in the event of a conflict.
    lambda_conflict_handler_config FunctionConfigurationLambdaConflictHandlerConfig
    conflictDetection String
    The Conflict Detection strategy to use.
    conflictHandler String
    The Conflict Resolution strategy to perform in the event of a conflict.
    lambdaConflictHandlerConfig Property Map

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.101.0 published on Thursday, Apr 11, 2024 by Pulumi