1. Packages
  2. Scaleway
  3. API Docs
  4. FunctionTrigger
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

scaleway.FunctionTrigger

Explore with Pulumi AI

scaleway logo
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

    Creates and manages Scaleway Function Triggers. For more information see the documentation.

    Examples

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@lbrlabs/pulumi-scaleway";
    
    const main = new scaleway.FunctionTrigger("main", {
        functionId: scaleway_function.main.id,
        sqs: {
            namespaceId: scaleway_mnq_namespace.main.id,
            queue: "MyQueue",
            projectId: scaleway_mnq_namespace.main.project_id,
            region: scaleway_mnq_namespace.main.region,
        },
    });
    
    import pulumi
    import lbrlabs_pulumi_scaleway as scaleway
    
    main = scaleway.FunctionTrigger("main",
        function_id=scaleway_function["main"]["id"],
        sqs=scaleway.FunctionTriggerSqsArgs(
            namespace_id=scaleway_mnq_namespace["main"]["id"],
            queue="MyQueue",
            project_id=scaleway_mnq_namespace["main"]["project_id"],
            region=scaleway_mnq_namespace["main"]["region"],
        ))
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.FunctionTrigger("main", new()
        {
            FunctionId = scaleway_function.Main.Id,
            Sqs = new Scaleway.Inputs.FunctionTriggerSqsArgs
            {
                NamespaceId = scaleway_mnq_namespace.Main.Id,
                Queue = "MyQueue",
                ProjectId = scaleway_mnq_namespace.Main.Project_id,
                Region = scaleway_mnq_namespace.Main.Region,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewFunctionTrigger(ctx, "main", &scaleway.FunctionTriggerArgs{
    			FunctionId: pulumi.Any(scaleway_function.Main.Id),
    			Sqs: &scaleway.FunctionTriggerSqsArgs{
    				NamespaceId: pulumi.Any(scaleway_mnq_namespace.Main.Id),
    				Queue:       pulumi.String("MyQueue"),
    				ProjectId:   pulumi.Any(scaleway_mnq_namespace.Main.Project_id),
    				Region:      pulumi.Any(scaleway_mnq_namespace.Main.Region),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.FunctionTrigger;
    import com.pulumi.scaleway.FunctionTriggerArgs;
    import com.pulumi.scaleway.inputs.FunctionTriggerSqsArgs;
    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 main = new FunctionTrigger("main", FunctionTriggerArgs.builder()        
                .functionId(scaleway_function.main().id())
                .sqs(FunctionTriggerSqsArgs.builder()
                    .namespaceId(scaleway_mnq_namespace.main().id())
                    .queue("MyQueue")
                    .projectId(scaleway_mnq_namespace.main().project_id())
                    .region(scaleway_mnq_namespace.main().region())
                    .build())
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:FunctionTrigger
        properties:
          functionId: ${scaleway_function.main.id}
          sqs:
            namespaceId: ${scaleway_mnq_namespace.main.id}
            queue: MyQueue
            projectId: ${scaleway_mnq_namespace.main.project_id}
            region: ${scaleway_mnq_namespace.main.region}
    

    Create FunctionTrigger Resource

    new FunctionTrigger(name: string, args: FunctionTriggerArgs, opts?: CustomResourceOptions);
    @overload
    def FunctionTrigger(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        description: Optional[str] = None,
                        function_id: Optional[str] = None,
                        name: Optional[str] = None,
                        region: Optional[str] = None,
                        sqs: Optional[FunctionTriggerSqsArgs] = None)
    @overload
    def FunctionTrigger(resource_name: str,
                        args: FunctionTriggerArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewFunctionTrigger(ctx *Context, name string, args FunctionTriggerArgs, opts ...ResourceOption) (*FunctionTrigger, error)
    public FunctionTrigger(string name, FunctionTriggerArgs args, CustomResourceOptions? opts = null)
    public FunctionTrigger(String name, FunctionTriggerArgs args)
    public FunctionTrigger(String name, FunctionTriggerArgs args, CustomResourceOptions options)
    
    type: scaleway:FunctionTrigger
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args FunctionTriggerArgs
    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 FunctionTriggerArgs
    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 FunctionTriggerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionTriggerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionTriggerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    FunctionId string

    The ID of the function to create a trigger for

    Description string

    The description of the trigger.

    Name string

    The unique name of the trigger. Default to a generated name.

    Region string

    region). The region in which the namespace should be created.

    Sqs Lbrlabs.PulumiPackage.Scaleway.Inputs.FunctionTriggerSqs

    The configuration of the Scaleway's SQS used by the trigger

    FunctionId string

    The ID of the function to create a trigger for

    Description string

    The description of the trigger.

    Name string

    The unique name of the trigger. Default to a generated name.

    Region string

    region). The region in which the namespace should be created.

    Sqs FunctionTriggerSqsArgs

    The configuration of the Scaleway's SQS used by the trigger

    functionId String

    The ID of the function to create a trigger for

    description String

    The description of the trigger.

    name String

    The unique name of the trigger. Default to a generated name.

    region String

    region). The region in which the namespace should be created.

    sqs FunctionTriggerSqs

    The configuration of the Scaleway's SQS used by the trigger

    functionId string

    The ID of the function to create a trigger for

    description string

    The description of the trigger.

    name string

    The unique name of the trigger. Default to a generated name.

    region string

    region). The region in which the namespace should be created.

    sqs FunctionTriggerSqs

    The configuration of the Scaleway's SQS used by the trigger

    function_id str

    The ID of the function to create a trigger for

    description str

    The description of the trigger.

    name str

    The unique name of the trigger. Default to a generated name.

    region str

    region). The region in which the namespace should be created.

    sqs FunctionTriggerSqsArgs

    The configuration of the Scaleway's SQS used by the trigger

    functionId String

    The ID of the function to create a trigger for

    description String

    The description of the trigger.

    name String

    The unique name of the trigger. Default to a generated name.

    region String

    region). The region in which the namespace should be created.

    sqs Property Map

    The configuration of the Scaleway's SQS used by the trigger

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FunctionTrigger 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 FunctionTrigger Resource

    Get an existing FunctionTrigger 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?: FunctionTriggerState, opts?: CustomResourceOptions): FunctionTrigger
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            function_id: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            sqs: Optional[FunctionTriggerSqsArgs] = None) -> FunctionTrigger
    func GetFunctionTrigger(ctx *Context, name string, id IDInput, state *FunctionTriggerState, opts ...ResourceOption) (*FunctionTrigger, error)
    public static FunctionTrigger Get(string name, Input<string> id, FunctionTriggerState? state, CustomResourceOptions? opts = null)
    public static FunctionTrigger get(String name, Output<String> id, FunctionTriggerState 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:
    Description string

    The description of the trigger.

    FunctionId string

    The ID of the function to create a trigger for

    Name string

    The unique name of the trigger. Default to a generated name.

    Region string

    region). The region in which the namespace should be created.

    Sqs Lbrlabs.PulumiPackage.Scaleway.Inputs.FunctionTriggerSqs

    The configuration of the Scaleway's SQS used by the trigger

    Description string

    The description of the trigger.

    FunctionId string

    The ID of the function to create a trigger for

    Name string

    The unique name of the trigger. Default to a generated name.

    Region string

    region). The region in which the namespace should be created.

    Sqs FunctionTriggerSqsArgs

    The configuration of the Scaleway's SQS used by the trigger

    description String

    The description of the trigger.

    functionId String

    The ID of the function to create a trigger for

    name String

    The unique name of the trigger. Default to a generated name.

    region String

    region). The region in which the namespace should be created.

    sqs FunctionTriggerSqs

    The configuration of the Scaleway's SQS used by the trigger

    description string

    The description of the trigger.

    functionId string

    The ID of the function to create a trigger for

    name string

    The unique name of the trigger. Default to a generated name.

    region string

    region). The region in which the namespace should be created.

    sqs FunctionTriggerSqs

    The configuration of the Scaleway's SQS used by the trigger

    description str

    The description of the trigger.

    function_id str

    The ID of the function to create a trigger for

    name str

    The unique name of the trigger. Default to a generated name.

    region str

    region). The region in which the namespace should be created.

    sqs FunctionTriggerSqsArgs

    The configuration of the Scaleway's SQS used by the trigger

    description String

    The description of the trigger.

    functionId String

    The ID of the function to create a trigger for

    name String

    The unique name of the trigger. Default to a generated name.

    region String

    region). The region in which the namespace should be created.

    sqs Property Map

    The configuration of the Scaleway's SQS used by the trigger

    Supporting Types

    FunctionTriggerSqs, FunctionTriggerSqsArgs

    NamespaceId string

    ID of the mnq namespace

    Queue string

    Name of the queue

    ProjectId string

    ID of the project that contain the mnq namespace, defaults to provider's project

    Region string

    region). The region in which the namespace should be created.

    NamespaceId string

    ID of the mnq namespace

    Queue string

    Name of the queue

    ProjectId string

    ID of the project that contain the mnq namespace, defaults to provider's project

    Region string

    region). The region in which the namespace should be created.

    namespaceId String

    ID of the mnq namespace

    queue String

    Name of the queue

    projectId String

    ID of the project that contain the mnq namespace, defaults to provider's project

    region String

    region). The region in which the namespace should be created.

    namespaceId string

    ID of the mnq namespace

    queue string

    Name of the queue

    projectId string

    ID of the project that contain the mnq namespace, defaults to provider's project

    region string

    region). The region in which the namespace should be created.

    namespace_id str

    ID of the mnq namespace

    queue str

    Name of the queue

    project_id str

    ID of the project that contain the mnq namespace, defaults to provider's project

    region str

    region). The region in which the namespace should be created.

    namespaceId String

    ID of the mnq namespace

    queue String

    Name of the queue

    projectId String

    ID of the project that contain the mnq namespace, defaults to provider's project

    region String

    region). The region in which the namespace should be created.

    Import

    Function Triggers can be imported using the {region}/{id}, e.g. bash

     $ pulumi import scaleway:index/functionTrigger:FunctionTrigger main fr-par/11111111-1111-1111-1111-111111111111
    

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the scaleway Terraform Provider.

    scaleway logo
    Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs