scaleway.mnq.SnsTopic
Explore with Pulumi AI
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,
});
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)
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
	})
}
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,
    });
});
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());
    }
}
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}
Create SnsTopic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SnsTopic(name: string, args: SnsTopicArgs, opts?: CustomResourceOptions);@overload
def SnsTopic(resource_name: str,
             args: SnsTopicArgs,
             opts: Optional[ResourceOptions] = None)
@overload
def SnsTopic(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             access_key: Optional[str] = None,
             secret_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,
             sns_endpoint: Optional[str] = None)func NewSnsTopic(ctx *Context, name string, args SnsTopicArgs, opts ...ResourceOption) (*SnsTopic, error)public SnsTopic(string name, SnsTopicArgs args, CustomResourceOptions? opts = null)
public SnsTopic(String name, SnsTopicArgs args)
public SnsTopic(String name, SnsTopicArgs args, CustomResourceOptions options)
type: scaleway:mnq:SnsTopic
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 SnsTopicArgs
- 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 SnsTopicArgs
- 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 SnsTopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnsTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnsTopicArgs
- 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 snsTopicResource = new Scaleway.Mnq.SnsTopic("snsTopicResource", new()
{
    AccessKey = "string",
    SecretKey = "string",
    ContentBasedDeduplication = false,
    FifoTopic = false,
    Name = "string",
    NamePrefix = "string",
    ProjectId = "string",
    Region = "string",
    SnsEndpoint = "string",
});
example, err := mnq.NewSnsTopic(ctx, "snsTopicResource", &mnq.SnsTopicArgs{
	AccessKey:                 pulumi.String("string"),
	SecretKey:                 pulumi.String("string"),
	ContentBasedDeduplication: pulumi.Bool(false),
	FifoTopic:                 pulumi.Bool(false),
	Name:                      pulumi.String("string"),
	NamePrefix:                pulumi.String("string"),
	ProjectId:                 pulumi.String("string"),
	Region:                    pulumi.String("string"),
	SnsEndpoint:               pulumi.String("string"),
})
var snsTopicResource = new SnsTopic("snsTopicResource", SnsTopicArgs.builder()
    .accessKey("string")
    .secretKey("string")
    .contentBasedDeduplication(false)
    .fifoTopic(false)
    .name("string")
    .namePrefix("string")
    .projectId("string")
    .region("string")
    .snsEndpoint("string")
    .build());
sns_topic_resource = scaleway.mnq.SnsTopic("snsTopicResource",
    access_key="string",
    secret_key="string",
    content_based_deduplication=False,
    fifo_topic=False,
    name="string",
    name_prefix="string",
    project_id="string",
    region="string",
    sns_endpoint="string")
const snsTopicResource = new scaleway.mnq.SnsTopic("snsTopicResource", {
    accessKey: "string",
    secretKey: "string",
    contentBasedDeduplication: false,
    fifoTopic: false,
    name: "string",
    namePrefix: "string",
    projectId: "string",
    region: "string",
    snsEndpoint: "string",
});
type: scaleway:mnq:SnsTopic
properties:
    accessKey: string
    contentBasedDeduplication: false
    fifoTopic: false
    name: string
    namePrefix: string
    projectId: string
    region: string
    secretKey: string
    snsEndpoint: string
SnsTopic 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 SnsTopic resource accepts the following input properties:
- AccessKey string
- The access key of the SNS credentials.
- SecretKey string
- The secret key of the SNS credentials.
- ContentBased boolDeduplication 
- 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 string
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- NamePrefix string
- Creates a unique name beginning with the specified prefix. Conflicts with name.
- ProjectId string
- project_id) The ID of the Project in which SNS is enabled.
- Region 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 string
- The access key of the SNS credentials.
- SecretKey string
- The secret key of the SNS credentials.
- ContentBased boolDeduplication 
- 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 string
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- NamePrefix string
- Creates a unique name beginning with the specified prefix. Conflicts with name.
- ProjectId string
- project_id) The ID of the Project in which SNS is enabled.
- Region 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 String
- The access key of the SNS credentials.
- secretKey String
- The secret key of the SNS credentials.
- contentBased BooleanDeduplication 
- 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 String
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- namePrefix String
- Creates a unique name beginning with the specified prefix. Conflicts with name.
- projectId String
- project_id) The ID of the Project in which SNS is enabled.
- region 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 string
- The access key of the SNS credentials.
- secretKey string
- The secret key of the SNS credentials.
- contentBased booleanDeduplication 
- 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 string
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- namePrefix string
- Creates a unique name beginning with the specified prefix. Conflicts with name.
- projectId string
- project_id) The ID of the Project in which SNS is enabled.
- region 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 str
- The access key of the SNS credentials.
- secret_key str
- The secret key of the SNS credentials.
- content_based_ booldeduplication 
- 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 str
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- name_prefix str
- Creates a unique name beginning with the specified prefix. Conflicts with name.
- project_id str
- project_id) The ID of the Project in which SNS is enabled.
- region 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 String
- The access key of the SNS credentials.
- secretKey String
- The secret key of the SNS credentials.
- contentBased BooleanDeduplication 
- 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 String
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- namePrefix String
- Creates a unique name beginning with the specified prefix. Conflicts with name.
- projectId String
- project_id) The ID of the Project in which SNS is enabled.
- region 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 SnsTopic resource produces the following output properties:
Look up Existing SnsTopic Resource
Get an existing SnsTopic 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?: SnsTopicState, opts?: CustomResourceOptions): SnsTopic@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) -> SnsTopicfunc GetSnsTopic(ctx *Context, name string, id IDInput, state *SnsTopicState, opts ...ResourceOption) (*SnsTopic, error)public static SnsTopic Get(string name, Input<string> id, SnsTopicState? state, CustomResourceOptions? opts = null)public static SnsTopic get(String name, Output<String> id, SnsTopicState state, CustomResourceOptions options)resources:  _:    type: scaleway:mnq:SnsTopic    get:      id: ${id}- 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.
- AccessKey string
- The access key of the SNS credentials.
- Arn string
- The ARN of the topic
- ContentBased boolDeduplication 
- 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 string
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- NamePrefix 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 string
- project_id) The ID of the Project in which SNS is enabled.
- Region 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
- ContentBased boolDeduplication 
- 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 string
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- NamePrefix 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 string
- project_id) The ID of the Project in which SNS is enabled.
- Region 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
- contentBased BooleanDeduplication 
- 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 String
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- namePrefix 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 String
- project_id) The ID of the Project in which SNS is enabled.
- region 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
- contentBased booleanDeduplication 
- 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 string
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- namePrefix 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 string
- project_id) The ID of the Project in which SNS is enabled.
- region 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_ booldeduplication 
- 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 str
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- name_prefix 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 str
- project_id) The ID of the Project in which SNS is enabled.
- region 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
- contentBased BooleanDeduplication 
- 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 String
- The unique name of the SNS topic. Either nameorname_prefixis required. Conflicts withname_prefix.
- namePrefix 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 String
- project_id) The ID of the Project in which SNS is enabled.
- region 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:mnq/snsTopic:SnsTopic main fr-par/11111111111111111111111111111111/my-topic
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 scalewayTerraform Provider.
