1. Packages
  2. AWS
  3. API Docs
  4. connect
  5. LambdaFunctionAssociation
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.connect.LambdaFunctionAssociation

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Provides an Amazon Connect Lambda Function Association. For more information see Amazon Connect: Getting Started and Invoke AWS Lambda functions.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.connect.LambdaFunctionAssociation("example", {
        functionArn: exampleAwsLambdaFunction.arn,
        instanceId: exampleAwsConnectInstance.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.connect.LambdaFunctionAssociation("example",
        function_arn=example_aws_lambda_function["arn"],
        instance_id=example_aws_connect_instance["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := connect.NewLambdaFunctionAssociation(ctx, "example", &connect.LambdaFunctionAssociationArgs{
    			FunctionArn: pulumi.Any(exampleAwsLambdaFunction.Arn),
    			InstanceId:  pulumi.Any(exampleAwsConnectInstance.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Connect.LambdaFunctionAssociation("example", new()
        {
            FunctionArn = exampleAwsLambdaFunction.Arn,
            InstanceId = exampleAwsConnectInstance.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.connect.LambdaFunctionAssociation;
    import com.pulumi.aws.connect.LambdaFunctionAssociationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new LambdaFunctionAssociation("example", LambdaFunctionAssociationArgs.builder()
                .functionArn(exampleAwsLambdaFunction.arn())
                .instanceId(exampleAwsConnectInstance.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:connect:LambdaFunctionAssociation
        properties:
          functionArn: ${exampleAwsLambdaFunction.arn}
          instanceId: ${exampleAwsConnectInstance.id}
    

    Create LambdaFunctionAssociation Resource

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

    Constructor syntax

    new LambdaFunctionAssociation(name: string, args: LambdaFunctionAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def LambdaFunctionAssociation(resource_name: str,
                                  args: LambdaFunctionAssociationArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def LambdaFunctionAssociation(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  function_arn: Optional[str] = None,
                                  instance_id: Optional[str] = None)
    func NewLambdaFunctionAssociation(ctx *Context, name string, args LambdaFunctionAssociationArgs, opts ...ResourceOption) (*LambdaFunctionAssociation, error)
    public LambdaFunctionAssociation(string name, LambdaFunctionAssociationArgs args, CustomResourceOptions? opts = null)
    public LambdaFunctionAssociation(String name, LambdaFunctionAssociationArgs args)
    public LambdaFunctionAssociation(String name, LambdaFunctionAssociationArgs args, CustomResourceOptions options)
    
    type: aws:connect:LambdaFunctionAssociation
    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 LambdaFunctionAssociationArgs
    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 LambdaFunctionAssociationArgs
    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 LambdaFunctionAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LambdaFunctionAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LambdaFunctionAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var lambdaFunctionAssociationResource = new Aws.Connect.LambdaFunctionAssociation("lambdaFunctionAssociationResource", new()
    {
        FunctionArn = "string",
        InstanceId = "string",
    });
    
    example, err := connect.NewLambdaFunctionAssociation(ctx, "lambdaFunctionAssociationResource", &connect.LambdaFunctionAssociationArgs{
    	FunctionArn: pulumi.String("string"),
    	InstanceId:  pulumi.String("string"),
    })
    
    var lambdaFunctionAssociationResource = new LambdaFunctionAssociation("lambdaFunctionAssociationResource", LambdaFunctionAssociationArgs.builder()
        .functionArn("string")
        .instanceId("string")
        .build());
    
    lambda_function_association_resource = aws.connect.LambdaFunctionAssociation("lambdaFunctionAssociationResource",
        function_arn="string",
        instance_id="string")
    
    const lambdaFunctionAssociationResource = new aws.connect.LambdaFunctionAssociation("lambdaFunctionAssociationResource", {
        functionArn: "string",
        instanceId: "string",
    });
    
    type: aws:connect:LambdaFunctionAssociation
    properties:
        functionArn: string
        instanceId: string
    

    LambdaFunctionAssociation 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 LambdaFunctionAssociation resource accepts the following input properties:

    FunctionArn string
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    InstanceId string
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    FunctionArn string
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    InstanceId string
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    functionArn String
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    instanceId String
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    functionArn string
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    instanceId string
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    function_arn str
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    instance_id str
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    functionArn String
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    instanceId String
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing LambdaFunctionAssociation Resource

    Get an existing LambdaFunctionAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LambdaFunctionAssociationState, opts?: CustomResourceOptions): LambdaFunctionAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            function_arn: Optional[str] = None,
            instance_id: Optional[str] = None) -> LambdaFunctionAssociation
    func GetLambdaFunctionAssociation(ctx *Context, name string, id IDInput, state *LambdaFunctionAssociationState, opts ...ResourceOption) (*LambdaFunctionAssociation, error)
    public static LambdaFunctionAssociation Get(string name, Input<string> id, LambdaFunctionAssociationState? state, CustomResourceOptions? opts = null)
    public static LambdaFunctionAssociation get(String name, Output<String> id, LambdaFunctionAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    FunctionArn string
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    InstanceId string
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    FunctionArn string
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    InstanceId string
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    functionArn String
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    instanceId String
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    functionArn string
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    instanceId string
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    function_arn str
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    instance_id str
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    functionArn String
    Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
    instanceId String
    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    Import

    Using pulumi import, import aws_connect_lambda_function_association using the instance_id and function_arn separated by a comma (,). For example:

    $ pulumi import aws:connect/lambdaFunctionAssociation:LambdaFunctionAssociation example aaaaaaaa-bbbb-cccc-dddd-111111111111,arn:aws:lambda:us-west-2:123456789123:function:example
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi