1. Packages
  2. Scaleway
  3. API Docs
  4. MnqSnsTopic
Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse

scaleway.MnqSnsTopic

Explore with Pulumi AI

Deprecated: scaleway.index/mnqsnstopic.MnqSnsTopic has been deprecated in favor of scaleway.mnq/snstopic.SnsTopic

Manage Scaleway Messaging and queuing SNS topics. For further information, see our main documentation.

Example Usage

Basic

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

const main = new scaleway.mnq.Sns("main", {});
const mainSnsCredentials = new scaleway.mnq.SnsCredentials("main", {
    projectId: main.projectId,
    permissions: {
        canManage: true,
    },
});
const topic = new scaleway.mnq.SnsTopic("topic", {
    projectId: main.projectId,
    name: "my-topic",
    accessKey: mainSnsCredentials.accessKey,
    secretKey: mainSnsCredentials.secretKey,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.mnq.Sns("main")
main_sns_credentials = scaleway.mnq.SnsCredentials("main",
    project_id=main.project_id,
    permissions={
        "can_manage": True,
    })
topic = scaleway.mnq.SnsTopic("topic",
    project_id=main.project_id,
    name="my-topic",
    access_key=main_sns_credentials.access_key,
    secret_key=main_sns_credentials.secret_key)
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 {
		main, err := mnq.NewSns(ctx, "main", nil)
		if err != nil {
			return err
		}
		mainSnsCredentials, err := mnq.NewSnsCredentials(ctx, "main", &mnq.SnsCredentialsArgs{
			ProjectId: main.ProjectId,
			Permissions: &mnq.SnsCredentialsPermissionsArgs{
				CanManage: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		_, err = mnq.NewSnsTopic(ctx, "topic", &mnq.SnsTopicArgs{
			ProjectId: main.ProjectId,
			Name:      pulumi.String("my-topic"),
			AccessKey: mainSnsCredentials.AccessKey,
			SecretKey: mainSnsCredentials.SecretKey,
		})
		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");

    var mainSnsCredentials = new Scaleway.Mnq.SnsCredentials("main", new()
    {
        ProjectId = main.ProjectId,
        Permissions = new Scaleway.Mnq.Inputs.SnsCredentialsPermissionsArgs
        {
            CanManage = true,
        },
    });

    var topic = new Scaleway.Mnq.SnsTopic("topic", new()
    {
        ProjectId = main.ProjectId,
        Name = "my-topic",
        AccessKey = mainSnsCredentials.AccessKey,
        SecretKey = mainSnsCredentials.SecretKey,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.mnq.Sns;
import com.pulumi.scaleway.mnq.SnsCredentials;
import com.pulumi.scaleway.mnq.SnsCredentialsArgs;
import com.pulumi.scaleway.mnq.inputs.SnsCredentialsPermissionsArgs;
import com.pulumi.scaleway.mnq.SnsTopic;
import com.pulumi.scaleway.mnq.SnsTopicArgs;
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");

        var mainSnsCredentials = new SnsCredentials("mainSnsCredentials", SnsCredentialsArgs.builder()
            .projectId(main.projectId())
            .permissions(SnsCredentialsPermissionsArgs.builder()
                .canManage(true)
                .build())
            .build());

        var topic = new SnsTopic("topic", SnsTopicArgs.builder()
            .projectId(main.projectId())
            .name("my-topic")
            .accessKey(mainSnsCredentials.accessKey())
            .secretKey(mainSnsCredentials.secretKey())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:mnq:Sns
  mainSnsCredentials:
    type: scaleway:mnq:SnsCredentials
    name: main
    properties:
      projectId: ${main.projectId}
      permissions:
        canManage: true
  topic:
    type: scaleway:mnq:SnsTopic
    properties:
      projectId: ${main.projectId}
      name: my-topic
      accessKey: ${mainSnsCredentials.accessKey}
      secretKey: ${mainSnsCredentials.secretKey}
Copy

Create MnqSnsTopic Resource

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

Constructor syntax

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

@overload
def MnqSnsTopic(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                access_key: Optional[str] = None,
                content_based_deduplication: Optional[bool] = None,
                fifo_topic: Optional[bool] = None,
                name: Optional[str] = None,
                name_prefix: Optional[str] = None,
                project_id: Optional[str] = None,
                region: Optional[str] = None,
                secret_key: Optional[str] = None,
                sns_endpoint: Optional[str] = None)
func NewMnqSnsTopic(ctx *Context, name string, args MnqSnsTopicArgs, opts ...ResourceOption) (*MnqSnsTopic, error)
public MnqSnsTopic(string name, MnqSnsTopicArgs args, CustomResourceOptions? opts = null)
public MnqSnsTopic(String name, MnqSnsTopicArgs args)
public MnqSnsTopic(String name, MnqSnsTopicArgs args, CustomResourceOptions options)
type: scaleway:MnqSnsTopic
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 This property is required. MnqSnsTopicArgs
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 This property is required. MnqSnsTopicArgs
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 This property is required. MnqSnsTopicArgs
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 This property is required. MnqSnsTopicArgs
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. MnqSnsTopicArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

AccessKey This property is required. string
The access key of the SNS credentials.
SecretKey This property is required. string
The secret key of the SNS credentials.
ContentBasedDeduplication bool
Specifies whether to enable content-based deduplication.
FifoTopic bool
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
Name Changes to this property will trigger replacement. string
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
NamePrefix Changes to this property will trigger replacement. string
Creates a unique name beginning with the specified prefix. Conflicts with name.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the Project in which SNS is enabled.
Region Changes to this property will trigger replacement. string
region). The region in which SNS is enabled.
SnsEndpoint string
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
AccessKey This property is required. string
The access key of the SNS credentials.
SecretKey This property is required. string
The secret key of the SNS credentials.
ContentBasedDeduplication bool
Specifies whether to enable content-based deduplication.
FifoTopic bool
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
Name Changes to this property will trigger replacement. string
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
NamePrefix Changes to this property will trigger replacement. string
Creates a unique name beginning with the specified prefix. Conflicts with name.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the Project in which SNS is enabled.
Region Changes to this property will trigger replacement. string
region). The region in which SNS is enabled.
SnsEndpoint string
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
accessKey This property is required. String
The access key of the SNS credentials.
secretKey This property is required. String
The secret key of the SNS credentials.
contentBasedDeduplication Boolean
Specifies whether to enable content-based deduplication.
fifoTopic Boolean
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
name Changes to this property will trigger replacement. String
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
namePrefix Changes to this property will trigger replacement. String
Creates a unique name beginning with the specified prefix. Conflicts with name.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the Project in which SNS is enabled.
region Changes to this property will trigger replacement. String
region). The region in which SNS is enabled.
snsEndpoint String
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
accessKey This property is required. string
The access key of the SNS credentials.
secretKey This property is required. string
The secret key of the SNS credentials.
contentBasedDeduplication boolean
Specifies whether to enable content-based deduplication.
fifoTopic boolean
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
name Changes to this property will trigger replacement. string
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
namePrefix Changes to this property will trigger replacement. string
Creates a unique name beginning with the specified prefix. Conflicts with name.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the Project in which SNS is enabled.
region Changes to this property will trigger replacement. string
region). The region in which SNS is enabled.
snsEndpoint string
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
access_key This property is required. str
The access key of the SNS credentials.
secret_key This property is required. str
The secret key of the SNS credentials.
content_based_deduplication bool
Specifies whether to enable content-based deduplication.
fifo_topic bool
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
name Changes to this property will trigger replacement. str
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
name_prefix Changes to this property will trigger replacement. str
Creates a unique name beginning with the specified prefix. Conflicts with name.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the Project in which SNS is enabled.
region Changes to this property will trigger replacement. str
region). The region in which SNS is enabled.
sns_endpoint str
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
accessKey This property is required. String
The access key of the SNS credentials.
secretKey This property is required. String
The secret key of the SNS credentials.
contentBasedDeduplication Boolean
Specifies whether to enable content-based deduplication.
fifoTopic Boolean
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
name Changes to this property will trigger replacement. String
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
namePrefix Changes to this property will trigger replacement. String
Creates a unique name beginning with the specified prefix. Conflicts with name.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the Project in which SNS is enabled.
region Changes to this property will trigger replacement. String
region). The region in which SNS is enabled.
snsEndpoint String
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.

Outputs

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

Arn string
The ARN of the topic
Id string
The provider-assigned unique ID for this managed resource.
Owner string
Owner of the SNS topic, should have format 'project-${project_id}'
Arn string
The ARN of the topic
Id string
The provider-assigned unique ID for this managed resource.
Owner string
Owner of the SNS topic, should have format 'project-${project_id}'
arn String
The ARN of the topic
id String
The provider-assigned unique ID for this managed resource.
owner String
Owner of the SNS topic, should have format 'project-${project_id}'
arn string
The ARN of the topic
id string
The provider-assigned unique ID for this managed resource.
owner string
Owner of the SNS topic, should have format 'project-${project_id}'
arn str
The ARN of the topic
id str
The provider-assigned unique ID for this managed resource.
owner str
Owner of the SNS topic, should have format 'project-${project_id}'
arn String
The ARN of the topic
id String
The provider-assigned unique ID for this managed resource.
owner String
Owner of the SNS topic, should have format 'project-${project_id}'

Look up Existing MnqSnsTopic Resource

Get an existing MnqSnsTopic 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?: MnqSnsTopicState, opts?: CustomResourceOptions): MnqSnsTopic
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_key: Optional[str] = None,
        arn: Optional[str] = None,
        content_based_deduplication: Optional[bool] = None,
        fifo_topic: Optional[bool] = None,
        name: Optional[str] = None,
        name_prefix: Optional[str] = None,
        owner: Optional[str] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None,
        secret_key: Optional[str] = None,
        sns_endpoint: Optional[str] = None) -> MnqSnsTopic
func GetMnqSnsTopic(ctx *Context, name string, id IDInput, state *MnqSnsTopicState, opts ...ResourceOption) (*MnqSnsTopic, error)
public static MnqSnsTopic Get(string name, Input<string> id, MnqSnsTopicState? state, CustomResourceOptions? opts = null)
public static MnqSnsTopic get(String name, Output<String> id, MnqSnsTopicState state, CustomResourceOptions options)
resources:  _:    type: scaleway:MnqSnsTopic    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:
AccessKey string
The access key of the SNS credentials.
Arn string
The ARN of the topic
ContentBasedDeduplication bool
Specifies whether to enable content-based deduplication.
FifoTopic bool
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
Name Changes to this property will trigger replacement. string
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
NamePrefix Changes to this property will trigger replacement. string
Creates a unique name beginning with the specified prefix. Conflicts with name.
Owner string
Owner of the SNS topic, should have format 'project-${project_id}'
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the Project in which SNS is enabled.
Region Changes to this property will trigger replacement. string
region). The region in which SNS is enabled.
SecretKey string
The secret key of the SNS credentials.
SnsEndpoint string
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
AccessKey string
The access key of the SNS credentials.
Arn string
The ARN of the topic
ContentBasedDeduplication bool
Specifies whether to enable content-based deduplication.
FifoTopic bool
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
Name Changes to this property will trigger replacement. string
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
NamePrefix Changes to this property will trigger replacement. string
Creates a unique name beginning with the specified prefix. Conflicts with name.
Owner string
Owner of the SNS topic, should have format 'project-${project_id}'
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the Project in which SNS is enabled.
Region Changes to this property will trigger replacement. string
region). The region in which SNS is enabled.
SecretKey string
The secret key of the SNS credentials.
SnsEndpoint string
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
accessKey String
The access key of the SNS credentials.
arn String
The ARN of the topic
contentBasedDeduplication Boolean
Specifies whether to enable content-based deduplication.
fifoTopic Boolean
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
name Changes to this property will trigger replacement. String
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
namePrefix Changes to this property will trigger replacement. String
Creates a unique name beginning with the specified prefix. Conflicts with name.
owner String
Owner of the SNS topic, should have format 'project-${project_id}'
projectId Changes to this property will trigger replacement. String
project_id) The ID of the Project in which SNS is enabled.
region Changes to this property will trigger replacement. String
region). The region in which SNS is enabled.
secretKey String
The secret key of the SNS credentials.
snsEndpoint String
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
accessKey string
The access key of the SNS credentials.
arn string
The ARN of the topic
contentBasedDeduplication boolean
Specifies whether to enable content-based deduplication.
fifoTopic boolean
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
name Changes to this property will trigger replacement. string
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
namePrefix Changes to this property will trigger replacement. string
Creates a unique name beginning with the specified prefix. Conflicts with name.
owner string
Owner of the SNS topic, should have format 'project-${project_id}'
projectId Changes to this property will trigger replacement. string
project_id) The ID of the Project in which SNS is enabled.
region Changes to this property will trigger replacement. string
region). The region in which SNS is enabled.
secretKey string
The secret key of the SNS credentials.
snsEndpoint string
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
access_key str
The access key of the SNS credentials.
arn str
The ARN of the topic
content_based_deduplication bool
Specifies whether to enable content-based deduplication.
fifo_topic bool
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
name Changes to this property will trigger replacement. str
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
name_prefix Changes to this property will trigger replacement. str
Creates a unique name beginning with the specified prefix. Conflicts with name.
owner str
Owner of the SNS topic, should have format 'project-${project_id}'
project_id Changes to this property will trigger replacement. str
project_id) The ID of the Project in which SNS is enabled.
region Changes to this property will trigger replacement. str
region). The region in which SNS is enabled.
secret_key str
The secret key of the SNS credentials.
sns_endpoint str
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.
accessKey String
The access key of the SNS credentials.
arn String
The ARN of the topic
contentBasedDeduplication Boolean
Specifies whether to enable content-based deduplication.
fifoTopic Boolean
Whether the topic is a FIFO topic. If true, the topic name must end with .fifo.
name Changes to this property will trigger replacement. String
The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_prefix.
namePrefix Changes to this property will trigger replacement. String
Creates a unique name beginning with the specified prefix. Conflicts with name.
owner String
Owner of the SNS topic, should have format 'project-${project_id}'
projectId Changes to this property will trigger replacement. String
project_id) The ID of the Project in which SNS is enabled.
region Changes to this property will trigger replacement. String
region). The region in which SNS is enabled.
secretKey String
The secret key of the SNS credentials.
snsEndpoint String
The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to https://sns.mnq.{region}.scaleway.com.

Import

SNS topics can be imported using {region}/{project-id}/{topic-name}, e.g.

bash

$ pulumi import scaleway:index/mnqSnsTopic:MnqSnsTopic main fr-par/11111111111111111111111111111111/my-topic
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.