1. Packages
  2. Scaleway
  3. API Docs
  4. ContainerTrigger
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

scaleway.ContainerTrigger

Explore with Pulumi AI

scaleway logo
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

    Creates and manages Scaleway Container 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.ContainerTrigger("main", {
        containerId: scaleway_container.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.ContainerTrigger("main",
        container_id=scaleway_container["main"]["id"],
        sqs=scaleway.ContainerTriggerSqsArgs(
            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.NewContainerTrigger(ctx, "main", &scaleway.ContainerTriggerArgs{
    			ContainerId: pulumi.Any(scaleway_container.Main.Id),
    			Sqs: &scaleway.ContainerTriggerSqsArgs{
    				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.ContainerTrigger("main", new()
        {
            ContainerId = scaleway_container.Main.Id,
            Sqs = new Scaleway.Inputs.ContainerTriggerSqsArgs
            {
                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.ContainerTrigger;
    import com.pulumi.scaleway.ContainerTriggerArgs;
    import com.pulumi.scaleway.inputs.ContainerTriggerSqsArgs;
    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 ContainerTrigger("main", ContainerTriggerArgs.builder()        
                .containerId(scaleway_container.main().id())
                .sqs(ContainerTriggerSqsArgs.builder()
                    .projectId(scaleway_mnq_sqs.main().project_id())
                    .queue("MyQueue")
                    .region(scaleway_mnq_sqs.main().region())
                    .build())
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:ContainerTrigger
        properties:
          containerId: ${scaleway_container.main.id}
          sqs:
            projectId: ${scaleway_mnq_sqs.main.project_id}
            queue: MyQueue
            region: ${scaleway_mnq_sqs.main.region}
    

    Nats

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.ContainerTrigger("main", {
        containerId: scaleway_container.main.id,
        nats: {
            accountId: scaleway_mnq_nats_account.main.id,
            subject: "MySubject",
            region: scaleway_mnq_nats_account.main.region,
        },
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.ContainerTrigger("main",
        container_id=scaleway_container["main"]["id"],
        nats=scaleway.ContainerTriggerNatsArgs(
            account_id=scaleway_mnq_nats_account["main"]["id"],
            subject="MySubject",
            region=scaleway_mnq_nats_account["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.NewContainerTrigger(ctx, "main", &scaleway.ContainerTriggerArgs{
    			ContainerId: pulumi.Any(scaleway_container.Main.Id),
    			Nats: &scaleway.ContainerTriggerNatsArgs{
    				AccountId: pulumi.Any(scaleway_mnq_nats_account.Main.Id),
    				Subject:   pulumi.String("MySubject"),
    				Region:    pulumi.Any(scaleway_mnq_nats_account.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.ContainerTrigger("main", new()
        {
            ContainerId = scaleway_container.Main.Id,
            Nats = new Scaleway.Inputs.ContainerTriggerNatsArgs
            {
                AccountId = scaleway_mnq_nats_account.Main.Id,
                Subject = "MySubject",
                Region = scaleway_mnq_nats_account.Main.Region,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ContainerTrigger;
    import com.pulumi.scaleway.ContainerTriggerArgs;
    import com.pulumi.scaleway.inputs.ContainerTriggerNatsArgs;
    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 ContainerTrigger("main", ContainerTriggerArgs.builder()        
                .containerId(scaleway_container.main().id())
                .nats(ContainerTriggerNatsArgs.builder()
                    .accountId(scaleway_mnq_nats_account.main().id())
                    .subject("MySubject")
                    .region(scaleway_mnq_nats_account.main().region())
                    .build())
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:ContainerTrigger
        properties:
          containerId: ${scaleway_container.main.id}
          nats:
            accountId: ${scaleway_mnq_nats_account.main.id}
            subject: MySubject
            region: ${scaleway_mnq_nats_account.main.region}
    

    Create ContainerTrigger Resource

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

    Constructor syntax

    new ContainerTrigger(name: string, args: ContainerTriggerArgs, opts?: CustomResourceOptions);
    @overload
    def ContainerTrigger(resource_name: str,
                         args: ContainerTriggerArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContainerTrigger(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         container_id: Optional[str] = None,
                         description: Optional[str] = None,
                         name: Optional[str] = None,
                         nats: Optional[ContainerTriggerNatsArgs] = None,
                         region: Optional[str] = None,
                         sqs: Optional[ContainerTriggerSqsArgs] = None)
    func NewContainerTrigger(ctx *Context, name string, args ContainerTriggerArgs, opts ...ResourceOption) (*ContainerTrigger, error)
    public ContainerTrigger(string name, ContainerTriggerArgs args, CustomResourceOptions? opts = null)
    public ContainerTrigger(String name, ContainerTriggerArgs args)
    public ContainerTrigger(String name, ContainerTriggerArgs args, CustomResourceOptions options)
    
    type: scaleway:ContainerTrigger
    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 ContainerTriggerArgs
    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 ContainerTriggerArgs
    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 ContainerTriggerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContainerTriggerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContainerTriggerArgs
    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 containerTriggerResource = new Scaleway.ContainerTrigger("containerTriggerResource", new()
    {
        ContainerId = "string",
        Description = "string",
        Name = "string",
        Nats = new Scaleway.Inputs.ContainerTriggerNatsArgs
        {
            Subject = "string",
            AccountId = "string",
            ProjectId = "string",
            Region = "string",
        },
        Region = "string",
        Sqs = new Scaleway.Inputs.ContainerTriggerSqsArgs
        {
            Queue = "string",
            ProjectId = "string",
            Region = "string",
        },
    });
    
    example, err := scaleway.NewContainerTrigger(ctx, "containerTriggerResource", &scaleway.ContainerTriggerArgs{
    	ContainerId: pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Nats: &scaleway.ContainerTriggerNatsArgs{
    		Subject:   pulumi.String("string"),
    		AccountId: pulumi.String("string"),
    		ProjectId: pulumi.String("string"),
    		Region:    pulumi.String("string"),
    	},
    	Region: pulumi.String("string"),
    	Sqs: &scaleway.ContainerTriggerSqsArgs{
    		Queue:     pulumi.String("string"),
    		ProjectId: pulumi.String("string"),
    		Region:    pulumi.String("string"),
    	},
    })
    
    var containerTriggerResource = new ContainerTrigger("containerTriggerResource", ContainerTriggerArgs.builder()
        .containerId("string")
        .description("string")
        .name("string")
        .nats(ContainerTriggerNatsArgs.builder()
            .subject("string")
            .accountId("string")
            .projectId("string")
            .region("string")
            .build())
        .region("string")
        .sqs(ContainerTriggerSqsArgs.builder()
            .queue("string")
            .projectId("string")
            .region("string")
            .build())
        .build());
    
    container_trigger_resource = scaleway.ContainerTrigger("containerTriggerResource",
        container_id="string",
        description="string",
        name="string",
        nats=scaleway.ContainerTriggerNatsArgs(
            subject="string",
            account_id="string",
            project_id="string",
            region="string",
        ),
        region="string",
        sqs=scaleway.ContainerTriggerSqsArgs(
            queue="string",
            project_id="string",
            region="string",
        ))
    
    const containerTriggerResource = new scaleway.ContainerTrigger("containerTriggerResource", {
        containerId: "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:ContainerTrigger
    properties:
        containerId: string
        description: string
        name: string
        nats:
            accountId: string
            projectId: string
            region: string
            subject: string
        region: string
        sqs:
            projectId: string
            queue: string
            region: string
    

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

    ContainerId string
    The ID of the container 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.ContainerTriggerNats
    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.ContainerTriggerSqs
    The configuration of the Scaleway's SQS used by the trigger
    ContainerId string
    The ID of the container 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 ContainerTriggerNatsArgs
    The configuration for the Scaleway's Nats used by the trigger
    Region string
    region). The region in which the namespace should be created.
    Sqs ContainerTriggerSqsArgs
    The configuration of the Scaleway's SQS used by the trigger
    containerId String
    The ID of the container 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 ContainerTriggerNats
    The configuration for the Scaleway's Nats used by the trigger
    region String
    region). The region in which the namespace should be created.
    sqs ContainerTriggerSqs
    The configuration of the Scaleway's SQS used by the trigger
    containerId string
    The ID of the container 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 ContainerTriggerNats
    The configuration for the Scaleway's Nats used by the trigger
    region string
    region). The region in which the namespace should be created.
    sqs ContainerTriggerSqs
    The configuration of the Scaleway's SQS used by the trigger
    container_id str
    The ID of the container 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 ContainerTriggerNatsArgs
    The configuration for the Scaleway's Nats used by the trigger
    region str
    region). The region in which the namespace should be created.
    sqs ContainerTriggerSqsArgs
    The configuration of the Scaleway's SQS used by the trigger
    containerId String
    The ID of the container 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 ContainerTrigger 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 ContainerTrigger Resource

    Get an existing ContainerTrigger 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?: ContainerTriggerState, opts?: CustomResourceOptions): ContainerTrigger
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            container_id: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            nats: Optional[ContainerTriggerNatsArgs] = None,
            region: Optional[str] = None,
            sqs: Optional[ContainerTriggerSqsArgs] = None) -> ContainerTrigger
    func GetContainerTrigger(ctx *Context, name string, id IDInput, state *ContainerTriggerState, opts ...ResourceOption) (*ContainerTrigger, error)
    public static ContainerTrigger Get(string name, Input<string> id, ContainerTriggerState? state, CustomResourceOptions? opts = null)
    public static ContainerTrigger get(String name, Output<String> id, ContainerTriggerState 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:
    ContainerId string
    The ID of the container 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.ContainerTriggerNats
    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.ContainerTriggerSqs
    The configuration of the Scaleway's SQS used by the trigger
    ContainerId string
    The ID of the container 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 ContainerTriggerNatsArgs
    The configuration for the Scaleway's Nats used by the trigger
    Region string
    region). The region in which the namespace should be created.
    Sqs ContainerTriggerSqsArgs
    The configuration of the Scaleway's SQS used by the trigger
    containerId String
    The ID of the container 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 ContainerTriggerNats
    The configuration for the Scaleway's Nats used by the trigger
    region String
    region). The region in which the namespace should be created.
    sqs ContainerTriggerSqs
    The configuration of the Scaleway's SQS used by the trigger
    containerId string
    The ID of the container 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 ContainerTriggerNats
    The configuration for the Scaleway's Nats used by the trigger
    region string
    region). The region in which the namespace should be created.
    sqs ContainerTriggerSqs
    The configuration of the Scaleway's SQS used by the trigger
    container_id str
    The ID of the container 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 ContainerTriggerNatsArgs
    The configuration for the Scaleway's Nats used by the trigger
    region str
    region). The region in which the namespace should be created.
    sqs ContainerTriggerSqsArgs
    The configuration of the Scaleway's SQS used by the trigger
    containerId String
    The ID of the container 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

    Supporting Types

    ContainerTriggerNats, ContainerTriggerNatsArgs

    Subject string
    The subject to listen to
    AccountId string
    ID of the mnq nats account.
    ProjectId string
    ID of the project that contain the mnq nats account, defaults to provider's project
    Region string
    Region where the mnq nats account is, defaults to provider's region
    Subject string
    The subject to listen to
    AccountId string
    ID of the mnq nats account.
    ProjectId string
    ID of the project that contain the mnq nats account, defaults to provider's project
    Region string
    Region where the mnq nats account is, defaults to provider's region
    subject String
    The subject to listen to
    accountId String
    ID of the mnq nats account.
    projectId String
    ID of the project that contain the mnq nats account, defaults to provider's project
    region String
    Region where the mnq nats account is, defaults to provider's region
    subject string
    The subject to listen to
    accountId string
    ID of the mnq nats account.
    projectId string
    ID of the project that contain the mnq nats account, defaults to provider's project
    region string
    Region where the mnq nats account is, defaults to provider's region
    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
    subject String
    The subject to listen to
    accountId String
    ID of the mnq nats account.
    projectId String
    ID of the project that contain the mnq nats account, defaults to provider's project
    region String
    Region where the mnq nats account is, defaults to provider's region

    ContainerTriggerSqs, ContainerTriggerSqsArgs

    Queue string
    Name of the queue
    NamespaceId string
    ID of the mnq namespace. Deprecated.

    Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

    ProjectId string
    ID of the project where sqs is enabled, defaults to provider's project
    Region string
    Region where sqs is enabled, defaults to provider's region
    Queue string
    Name of the queue
    NamespaceId string
    ID of the mnq namespace. Deprecated.

    Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

    ProjectId string
    ID of the project where sqs is enabled, defaults to provider's project
    Region string
    Region where sqs is enabled, defaults to provider's region
    queue String
    Name of the queue
    namespaceId String
    ID of the mnq namespace. Deprecated.

    Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

    projectId String
    ID of the project where sqs is enabled, defaults to provider's project
    region String
    Region where sqs is enabled, defaults to provider's region
    queue string
    Name of the queue
    namespaceId string
    ID of the mnq namespace. Deprecated.

    Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

    projectId string
    ID of the project where sqs is enabled, defaults to provider's project
    region string
    Region where sqs is enabled, defaults to provider's region
    queue str
    Name of the queue
    namespace_id str
    ID of the mnq namespace. Deprecated.

    Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

    project_id str
    ID of the project where sqs is enabled, defaults to provider's project
    region str
    Region where sqs is enabled, defaults to provider's region
    queue String
    Name of the queue
    namespaceId String
    ID of the mnq namespace. Deprecated.

    Deprecated: The 'namespace_id' field is deprecated and will be removed in the next major version. It is no longer necessary to specify it

    projectId String
    ID of the project where sqs is enabled, defaults to provider's project
    region String
    Region where sqs is enabled, defaults to provider's region

    Import

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

    bash

    $ pulumi import scaleway:index/containerTrigger:ContainerTrigger 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.
    scaleway logo
    Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse