1. Packages
  2. Scaleway
  3. API Docs
  4. mnq
  5. Sns
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.mnq.Sns

Explore with Pulumi AI

Activates Scaleway Messaging and Queuing SNS in a Project. For further information, see our main documentation.

Example Usage

Basic

Activate SNS in the default Project

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.mnq.Sns("main", {});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.mnq.Sns("main")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/mnq"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := mnq.NewSns(ctx, "main", nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.Mnq.Sns("main");

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.mnq.Sns;
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 Sns("main");

    }
}
Copy
resources:
  main:
    type: scaleway:mnq:Sns
Copy

Activate SNS in a specific Project

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";

const project = scaleway.account.getProject({
    name: "default",
});
// For specific Project in default region
const forProject = new scaleway.mnq.Sns("for_project", {projectId: project.then(project => project.id)});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

project = scaleway.account.get_project(name="default")
# For specific Project in default region
for_project = scaleway.mnq.Sns("for_project", project_id=project.id)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/account"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/mnq"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := account.LookupProject(ctx, &account.LookupProjectArgs{
			Name: pulumi.StringRef("default"),
		}, nil)
		if err != nil {
			return err
		}
		// For specific Project in default region
		_, err = mnq.NewSns(ctx, "for_project", &mnq.SnsArgs{
			ProjectId: pulumi.String(project.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var project = Scaleway.Account.GetProject.Invoke(new()
    {
        Name = "default",
    });

    // For specific Project in default region
    var forProject = new Scaleway.Mnq.Sns("for_project", new()
    {
        ProjectId = project.Apply(getProjectResult => getProjectResult.Id),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.account.AccountFunctions;
import com.pulumi.scaleway.account.inputs.GetProjectArgs;
import com.pulumi.scaleway.mnq.Sns;
import com.pulumi.scaleway.mnq.SnsArgs;
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 = AccountFunctions.getProject(GetProjectArgs.builder()
            .name("default")
            .build());

        // For specific Project in default region
        var forProject = new Sns("forProject", SnsArgs.builder()
            .projectId(project.applyValue(getProjectResult -> getProjectResult.id()))
            .build());

    }
}
Copy
resources:
  # For specific Project in default region
  forProject:
    type: scaleway:mnq:Sns
    name: for_project
    properties:
      projectId: ${project.id}
variables:
  project:
    fn::invoke:
      function: scaleway:account:getProject
      arguments:
        name: default
Copy

Create Sns Resource

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

Constructor syntax

new Sns(name: string, args?: SnsArgs, opts?: CustomResourceOptions);
@overload
def Sns(resource_name: str,
        args: Optional[SnsArgs] = None,
        opts: Optional[ResourceOptions] = None)

@overload
def Sns(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None)
func NewSns(ctx *Context, name string, args *SnsArgs, opts ...ResourceOption) (*Sns, error)
public Sns(string name, SnsArgs? args = null, CustomResourceOptions? opts = null)
public Sns(String name, SnsArgs args)
public Sns(String name, SnsArgs args, CustomResourceOptions options)
type: scaleway:mnq:Sns
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args SnsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args SnsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args SnsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args SnsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SnsArgs
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 snsResource = new Scaleway.Mnq.Sns("snsResource", new()
{
    ProjectId = "string",
    Region = "string",
});
Copy
example, err := mnq.NewSns(ctx, "snsResource", &mnq.SnsArgs{
	ProjectId: pulumi.String("string"),
	Region:    pulumi.String("string"),
})
Copy
var snsResource = new Sns("snsResource", SnsArgs.builder()
    .projectId("string")
    .region("string")
    .build());
Copy
sns_resource = scaleway.mnq.Sns("snsResource",
    project_id="string",
    region="string")
Copy
const snsResource = new scaleway.mnq.Sns("snsResource", {
    projectId: "string",
    region: "string",
});
Copy
type: scaleway:mnq:Sns
properties:
    projectId: string
    region: string
Copy

Sns Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Sns resource accepts the following input properties:

ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project in which SNS will be enabled.
Region Changes to this property will trigger replacement. string
region). The region in which SNS will be enabled.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project in which SNS will be enabled.
Region Changes to this property will trigger replacement. string
region). The region in which SNS will be enabled.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project in which SNS will be enabled.
region Changes to this property will trigger replacement. String
region). The region in which SNS will be enabled.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project in which SNS will be enabled.
region Changes to this property will trigger replacement. string
region). The region in which SNS will be enabled.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project in which SNS will be enabled.
region Changes to this property will trigger replacement. str
region). The region in which SNS will be enabled.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project in which SNS will be enabled.
region Changes to this property will trigger replacement. String
region). The region in which SNS will be enabled.

Outputs

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

Get an existing Sns 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?: SnsState, opts?: CustomResourceOptions): Sns
@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) -> Sns
func GetSns(ctx *Context, name string, id IDInput, state *SnsState, opts ...ResourceOption) (*Sns, error)
public static Sns Get(string name, Input<string> id, SnsState? state, CustomResourceOptions? opts = null)
public static Sns get(String name, Output<String> id, SnsState state, CustomResourceOptions options)
resources:  _:    type: scaleway:mnq:Sns    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
project_id) The ID of the project in which SNS will be enabled.
Region Changes to this property will trigger replacement. string
region). The region in which SNS will be enabled.
Endpoint string
The endpoint of the SNS service for this Project.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project in which SNS will be enabled.
Region Changes to this property will trigger replacement. string
region). The region in which SNS will be enabled.
endpoint String
The endpoint of the SNS service for this Project.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project in which SNS will be enabled.
region Changes to this property will trigger replacement. String
region). The region in which SNS will be enabled.
endpoint string
The endpoint of the SNS service for this Project.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project in which SNS will be enabled.
region Changes to this property will trigger replacement. string
region). The region in which SNS will be enabled.
endpoint str
The endpoint of the SNS service for this Project.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project in which SNS will be enabled.
region Changes to this property will trigger replacement. str
region). The region in which SNS will be enabled.
endpoint String
The endpoint of the SNS service for this Project.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project in which SNS will be enabled.
region Changes to this property will trigger replacement. String
region). The region in which SNS will be enabled.

Import

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

bash

$ pulumi import scaleway:mnq/sns:Sns main fr-par/11111111111111111111111111111111
Copy

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.