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

scaleway.MnqSns

Explore with Pulumi AI

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

    Activate Scaleway Messaging and queuing SNS for a project. For further information please check our documentation

    Example Usage

    Basic

    Activate SNS for default project

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.MnqSns("main", {});
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.MnqSns("main")
    
    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.NewMnqSns(ctx, "main", nil)
    		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.MnqSns("main");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.MnqSns;
    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 MnqSns("main");
    
        }
    }
    
    resources:
      main:
        type: scaleway:MnqSns
    

    Activate SNS for a specific project

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const project = scaleway.getAccountProject({
        name: "default",
    });
    // For specific project in default region
    const forProject = new scaleway.MnqSns("forProject", {projectId: project.then(project => project.id)});
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    project = scaleway.get_account_project(name="default")
    # For specific project in default region
    for_project = scaleway.MnqSns("forProject", project_id=project.id)
    
    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 {
    		project, err := scaleway.LookupAccountProject(ctx, &scaleway.LookupAccountProjectArgs{
    			Name: pulumi.StringRef("default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// For specific project in default region
    		_, err = scaleway.NewMnqSns(ctx, "forProject", &scaleway.MnqSnsArgs{
    			ProjectId: pulumi.String(project.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var project = Scaleway.GetAccountProject.Invoke(new()
        {
            Name = "default",
        });
    
        // For specific project in default region
        var forProject = new Scaleway.MnqSns("forProject", new()
        {
            ProjectId = project.Apply(getAccountProjectResult => getAccountProjectResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetAccountProjectArgs;
    import com.pulumi.scaleway.MnqSns;
    import com.pulumi.scaleway.MnqSnsArgs;
    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) {
            final var project = ScalewayFunctions.getAccountProject(GetAccountProjectArgs.builder()
                .name("default")
                .build());
    
            // For specific project in default region
            var forProject = new MnqSns("forProject", MnqSnsArgs.builder()        
                .projectId(project.applyValue(getAccountProjectResult -> getAccountProjectResult.id()))
                .build());
    
        }
    }
    
    resources:
      # For specific project in default region
      forProject:
        type: scaleway:MnqSns
        properties:
          projectId: ${project.id}
    variables:
      project:
        fn::invoke:
          Function: scaleway:getAccountProject
          Arguments:
            name: default
    

    Create MnqSns Resource

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

    Constructor syntax

    new MnqSns(name: string, args?: MnqSnsArgs, opts?: CustomResourceOptions);
    @overload
    def MnqSns(resource_name: str,
               args: Optional[MnqSnsArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def MnqSns(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               project_id: Optional[str] = None,
               region: Optional[str] = None)
    func NewMnqSns(ctx *Context, name string, args *MnqSnsArgs, opts ...ResourceOption) (*MnqSns, error)
    public MnqSns(string name, MnqSnsArgs? args = null, CustomResourceOptions? opts = null)
    public MnqSns(String name, MnqSnsArgs args)
    public MnqSns(String name, MnqSnsArgs args, CustomResourceOptions options)
    
    type: scaleway:MnqSns
    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 MnqSnsArgs
    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 MnqSnsArgs
    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 MnqSnsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MnqSnsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MnqSnsArgs
    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 mnqSnsResource = new Scaleway.MnqSns("mnqSnsResource", new()
    {
        ProjectId = "string",
        Region = "string",
    });
    
    example, err := scaleway.NewMnqSns(ctx, "mnqSnsResource", &scaleway.MnqSnsArgs{
    	ProjectId: pulumi.String("string"),
    	Region:    pulumi.String("string"),
    })
    
    var mnqSnsResource = new MnqSns("mnqSnsResource", MnqSnsArgs.builder()
        .projectId("string")
        .region("string")
        .build());
    
    mnq_sns_resource = scaleway.MnqSns("mnqSnsResource",
        project_id="string",
        region="string")
    
    const mnqSnsResource = new scaleway.MnqSns("mnqSnsResource", {
        projectId: "string",
        region: "string",
    });
    
    type: scaleway:MnqSns
    properties:
        projectId: string
        region: string
    

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

    ProjectId string
    project_id) The ID of the project the sns will be enabled for.
    Region string
    region). The region in which sns will be enabled.
    ProjectId string
    project_id) The ID of the project the sns will be enabled for.
    Region string
    region). The region in which sns will be enabled.
    projectId String
    project_id) The ID of the project the sns will be enabled for.
    region String
    region). The region in which sns will be enabled.
    projectId string
    project_id) The ID of the project the sns will be enabled for.
    region string
    region). The region in which sns will be enabled.
    project_id str
    project_id) The ID of the project the sns will be enabled for.
    region str
    region). The region in which sns will be enabled.
    projectId String
    project_id) The ID of the project the sns will be enabled for.
    region String
    region). The region in which sns will be enabled.

    Outputs

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

    Endpoint string
    The endpoint of the SNS service for this project.
    Id string
    The provider-assigned unique ID for this managed resource.
    Endpoint string
    The endpoint of the SNS service for this project.
    Id string
    The provider-assigned unique ID for this managed resource.
    endpoint String
    The endpoint of the SNS service for this project.
    id String
    The provider-assigned unique ID for this managed resource.
    endpoint string
    The endpoint of the SNS service for this project.
    id string
    The provider-assigned unique ID for this managed resource.
    endpoint str
    The endpoint of the SNS service for this project.
    id str
    The provider-assigned unique ID for this managed resource.
    endpoint String
    The endpoint of the SNS service for this project.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MnqSns Resource

    Get an existing MnqSns 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?: MnqSnsState, opts?: CustomResourceOptions): MnqSns
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            endpoint: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None) -> MnqSns
    func GetMnqSns(ctx *Context, name string, id IDInput, state *MnqSnsState, opts ...ResourceOption) (*MnqSns, error)
    public static MnqSns Get(string name, Input<string> id, MnqSnsState? state, CustomResourceOptions? opts = null)
    public static MnqSns get(String name, Output<String> id, MnqSnsState 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:
    Endpoint string
    The endpoint of the SNS service for this project.
    ProjectId string
    project_id) The ID of the project the sns will be enabled for.
    Region string
    region). The region in which sns will be enabled.
    Endpoint string
    The endpoint of the SNS service for this project.
    ProjectId string
    project_id) The ID of the project the sns will be enabled for.
    Region string
    region). The region in which sns will be enabled.
    endpoint String
    The endpoint of the SNS service for this project.
    projectId String
    project_id) The ID of the project the sns will be enabled for.
    region String
    region). The region in which sns will be enabled.
    endpoint string
    The endpoint of the SNS service for this project.
    projectId string
    project_id) The ID of the project the sns will be enabled for.
    region string
    region). The region in which sns will be enabled.
    endpoint str
    The endpoint of the SNS service for this project.
    project_id str
    project_id) The ID of the project the sns will be enabled for.
    region str
    region). The region in which sns will be enabled.
    endpoint String
    The endpoint of the SNS service for this project.
    projectId String
    project_id) The ID of the project the sns will be enabled for.
    region String
    region). The region in which sns will be enabled.

    Import

    SNS status can be imported using the {region}/{project_id}, e.g.

    bash

    $ pulumi import scaleway:index/mnqSns:MnqSns main fr-par/11111111111111111111111111111111
    

    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