scaleway.FunctionTrigger
Explore with Pulumi AI
Creates and manages Scaleway Function Triggers. For more information see the documentation.
Example Usage
SQS
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const main = new scaleway.FunctionTrigger("main", {
functionId: scaleway_function.main.id,
sqs: {
projectId: scaleway_mnq_sqs.main.project_id,
queue: "MyQueue",
region: scaleway_mnq_sqs.main.region,
},
});
import pulumi
import pulumiverse_scaleway as scaleway
main = scaleway.FunctionTrigger("main",
function_id=scaleway_function["main"]["id"],
sqs=scaleway.FunctionTriggerSqsArgs(
project_id=scaleway_mnq_sqs["main"]["project_id"],
queue="MyQueue",
region=scaleway_mnq_sqs["main"]["region"],
))
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
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{
ProjectId: pulumi.Any(scaleway_mnq_sqs.Main.Project_id),
Queue: pulumi.String("MyQueue"),
Region: pulumi.Any(scaleway_mnq_sqs.Main.Region),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.FunctionTrigger("main", new()
{
FunctionId = scaleway_function.Main.Id,
Sqs = new Scaleway.Inputs.FunctionTriggerSqsArgs
{
ProjectId = scaleway_mnq_sqs.Main.Project_id,
Queue = "MyQueue",
Region = scaleway_mnq_sqs.Main.Region,
},
});
});
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()
.projectId(scaleway_mnq_sqs.main().project_id())
.queue("MyQueue")
.region(scaleway_mnq_sqs.main().region())
.build())
.build());
}
}
resources:
main:
type: scaleway:FunctionTrigger
properties:
functionId: ${scaleway_function.main.id}
sqs:
projectId: ${scaleway_mnq_sqs.main.project_id}
queue: MyQueue
region: ${scaleway_mnq_sqs.main.region}
Nats
Coming soon!
Coming soon!
Coming soon!
Coming soon!
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.FunctionTriggerNatsArgs;
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()
.containerId(scaleway_container.main().id())
.nats(FunctionTriggerNatsArgs.builder()
.accountId(scaleway_mnq_nats_account.main().id())
.subject("MySubject")
.region(scaleway_mnq_nats_account.main().region())
.build())
.build());
}
}
resources:
main:
type: scaleway:FunctionTrigger
properties:
containerId: ${scaleway_container.main.id}
nats:
accountId: ${scaleway_mnq_nats_account.main.id}
subject: MySubject
region: ${scaleway_mnq_nats_account.main.region}
Create FunctionTrigger Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FunctionTrigger(name: string, args: FunctionTriggerArgs, opts?: CustomResourceOptions);
@overload
def FunctionTrigger(resource_name: str,
args: FunctionTriggerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FunctionTrigger(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
nats: Optional[FunctionTriggerNatsArgs] = None,
region: Optional[str] = None,
sqs: Optional[FunctionTriggerSqsArgs] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var functionTriggerResource = new Scaleway.FunctionTrigger("functionTriggerResource", new()
{
FunctionId = "string",
Description = "string",
Name = "string",
Nats = new Scaleway.Inputs.FunctionTriggerNatsArgs
{
Subject = "string",
AccountId = "string",
ProjectId = "string",
Region = "string",
},
Region = "string",
Sqs = new Scaleway.Inputs.FunctionTriggerSqsArgs
{
Queue = "string",
ProjectId = "string",
Region = "string",
},
});
example, err := scaleway.NewFunctionTrigger(ctx, "functionTriggerResource", &scaleway.FunctionTriggerArgs{
FunctionId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Nats: &scaleway.FunctionTriggerNatsArgs{
Subject: pulumi.String("string"),
AccountId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
},
Region: pulumi.String("string"),
Sqs: &scaleway.FunctionTriggerSqsArgs{
Queue: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
},
})
var functionTriggerResource = new FunctionTrigger("functionTriggerResource", FunctionTriggerArgs.builder()
.functionId("string")
.description("string")
.name("string")
.nats(FunctionTriggerNatsArgs.builder()
.subject("string")
.accountId("string")
.projectId("string")
.region("string")
.build())
.region("string")
.sqs(FunctionTriggerSqsArgs.builder()
.queue("string")
.projectId("string")
.region("string")
.build())
.build());
function_trigger_resource = scaleway.FunctionTrigger("functionTriggerResource",
function_id="string",
description="string",
name="string",
nats=scaleway.FunctionTriggerNatsArgs(
subject="string",
account_id="string",
project_id="string",
region="string",
),
region="string",
sqs=scaleway.FunctionTriggerSqsArgs(
queue="string",
project_id="string",
region="string",
))
const functionTriggerResource = new scaleway.FunctionTrigger("functionTriggerResource", {
functionId: "string",
description: "string",
name: "string",
nats: {
subject: "string",
accountId: "string",
projectId: "string",
region: "string",
},
region: "string",
sqs: {
queue: "string",
projectId: "string",
region: "string",
},
});
type: scaleway:FunctionTrigger
properties:
description: string
functionId: string
name: string
nats:
accountId: string
projectId: string
region: string
subject: string
region: string
sqs:
projectId: string
queue: string
region: string
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:
- Function
Id 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.
- Nats
Pulumiverse.
Scaleway. Inputs. Function Trigger Nats - The configuration for the Scaleway's Nats used by the trigger
- Region string
region
). The region in which the namespace should be created.- Sqs
Pulumiverse.
Scaleway. Inputs. Function Trigger Sqs - The configuration of the Scaleway's SQS used by the trigger
- Function
Id 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.
- Nats
Function
Trigger Nats Args - The configuration for the Scaleway's Nats used by the trigger
- Region string
region
). The region in which the namespace should be created.- Sqs
Function
Trigger Sqs Args - The configuration of the Scaleway's SQS used by the trigger
- function
Id 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.
- nats
Function
Trigger Nats - The configuration for the Scaleway's Nats used by the trigger
- region String
region
). The region in which the namespace should be created.- sqs
Function
Trigger Sqs - The configuration of the Scaleway's SQS used by the trigger
- function
Id 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.
- nats
Function
Trigger Nats - The configuration for the Scaleway's Nats used by the trigger
- region string
region
). The region in which the namespace should be created.- sqs
Function
Trigger Sqs - 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.
- nats
Function
Trigger Nats Args - The configuration for the Scaleway's Nats used by the trigger
- region str
region
). The region in which the namespace should be created.- sqs
Function
Trigger Sqs Args - The configuration of the Scaleway's SQS used by the trigger
- function
Id 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.
- nats Property Map
- The configuration for the Scaleway's Nats used by the trigger
- 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,
nats: Optional[FunctionTriggerNatsArgs] = 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.
- Description string
- The description of the trigger.
- Function
Id string - The ID of the function to create a trigger for
- Name string
- The unique name of the trigger. Default to a generated name.
- Nats
Pulumiverse.
Scaleway. Inputs. Function Trigger Nats - The configuration for the Scaleway's Nats used by the trigger
- Region string
region
). The region in which the namespace should be created.- Sqs
Pulumiverse.
Scaleway. Inputs. Function Trigger Sqs - The configuration of the Scaleway's SQS used by the trigger
- Description string
- The description of the trigger.
- Function
Id string - The ID of the function to create a trigger for
- Name string
- The unique name of the trigger. Default to a generated name.
- Nats
Function
Trigger Nats Args - The configuration for the Scaleway's Nats used by the trigger
- Region string
region
). The region in which the namespace should be created.- Sqs
Function
Trigger Sqs Args - The configuration of the Scaleway's SQS used by the trigger
- description String
- The description of the trigger.
- function
Id String - The ID of the function to create a trigger for
- name String
- The unique name of the trigger. Default to a generated name.
- nats
Function
Trigger Nats - The configuration for the Scaleway's Nats used by the trigger
- region String
region
). The region in which the namespace should be created.- sqs
Function
Trigger Sqs - The configuration of the Scaleway's SQS used by the trigger
- description string
- The description of the trigger.
- function
Id string - The ID of the function to create a trigger for
- name string
- The unique name of the trigger. Default to a generated name.
- nats
Function
Trigger Nats - The configuration for the Scaleway's Nats used by the trigger
- region string
region
). The region in which the namespace should be created.- sqs
Function
Trigger Sqs - 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.
- nats
Function
Trigger Nats Args - The configuration for the Scaleway's Nats used by the trigger
- region str
region
). The region in which the namespace should be created.- sqs
Function
Trigger Sqs Args - The configuration of the Scaleway's SQS used by the trigger
- description String
- The description of the trigger.
- function
Id String - The ID of the function to create a trigger for
- name String
- The unique name of the trigger. Default to a generated name.
- nats Property Map
- The configuration for the Scaleway's Nats used by the trigger
- 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
FunctionTriggerNats, FunctionTriggerNatsArgs
- subject str
- The subject to listen to
- account_
id str - ID of the mnq nats account.
- project_
id str - ID of the project that contain the mnq nats account, defaults to provider's project
- region str
- Region where the mnq nats account is, defaults to provider's region
FunctionTriggerSqs, FunctionTriggerSqsArgs
- Queue string
- Name of the queue
- Namespace
Id string - ID of the mnq namespace. Deprecated.
- Project
Id string - ID of the project that contain the mnq namespace, defaults to provider's project
- Region string
- Region where the mnq namespace is, defaults to provider's region
- Queue string
- Name of the queue
- Namespace
Id string - ID of the mnq namespace. Deprecated.
- Project
Id string - ID of the project that contain the mnq namespace, defaults to provider's project
- Region string
- Region where the mnq namespace is, defaults to provider's region
- queue String
- Name of the queue
- namespace
Id String - ID of the mnq namespace. Deprecated.
- project
Id String - ID of the project that contain the mnq namespace, defaults to provider's project
- region String
- Region where the mnq namespace is, defaults to provider's region
- queue string
- Name of the queue
- namespace
Id string - ID of the mnq namespace. Deprecated.
- project
Id string - ID of the project that contain the mnq namespace, defaults to provider's project
- region string
- Region where the mnq namespace is, defaults to provider's region
- queue str
- Name of the queue
- namespace_
id str - ID of the mnq namespace. Deprecated.
- project_
id str - ID of the project that contain the mnq namespace, defaults to provider's project
- region str
- Region where the mnq namespace is, defaults to provider's region
- queue String
- Name of the queue
- namespace
Id String - ID of the mnq namespace. Deprecated.
- project
Id String - ID of the project that contain the mnq namespace, defaults to provider's project
- region String
- Region where the mnq namespace is, defaults to provider's region
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.