1. Packages
  2. Scaleway
  3. API Docs
  4. MnqSnsTopic
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.MnqSnsTopic

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    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.MnqSns("main", {});
    const mainMnqSnsCredentials = new scaleway.MnqSnsCredentials("main", {
        projectId: main.projectId,
        permissions: {
            canManage: true,
        },
    });
    const topic = new scaleway.MnqSnsTopic("topic", {
        projectId: main.projectId,
        name: "my-topic",
        accessKey: mainMnqSnsCredentials.accessKey,
        secretKey: mainMnqSnsCredentials.secretKey,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.MnqSns("main")
    main_mnq_sns_credentials = scaleway.MnqSnsCredentials("main",
        project_id=main.project_id,
        permissions={
            "can_manage": True,
        })
    topic = scaleway.MnqSnsTopic("topic",
        project_id=main.project_id,
        name="my-topic",
        access_key=main_mnq_sns_credentials.access_key,
        secret_key=main_mnq_sns_credentials.secret_key)
    
    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 {
    		main, err := scaleway.NewMnqSns(ctx, "main", nil)
    		if err != nil {
    			return err
    		}
    		mainMnqSnsCredentials, err := scaleway.NewMnqSnsCredentials(ctx, "main", &scaleway.MnqSnsCredentialsArgs{
    			ProjectId: main.ProjectId,
    			Permissions: &scaleway.MnqSnsCredentialsPermissionsArgs{
    				CanManage: pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewMnqSnsTopic(ctx, "topic", &scaleway.MnqSnsTopicArgs{
    			ProjectId: main.ProjectId,
    			Name:      pulumi.String("my-topic"),
    			AccessKey: mainMnqSnsCredentials.AccessKey,
    			SecretKey: mainMnqSnsCredentials.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.MnqSns("main");
    
        var mainMnqSnsCredentials = new Scaleway.MnqSnsCredentials("main", new()
        {
            ProjectId = main.ProjectId,
            Permissions = new Scaleway.Inputs.MnqSnsCredentialsPermissionsArgs
            {
                CanManage = true,
            },
        });
    
        var topic = new Scaleway.MnqSnsTopic("topic", new()
        {
            ProjectId = main.ProjectId,
            Name = "my-topic",
            AccessKey = mainMnqSnsCredentials.AccessKey,
            SecretKey = mainMnqSnsCredentials.SecretKey,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.MnqSns;
    import com.pulumi.scaleway.MnqSnsCredentials;
    import com.pulumi.scaleway.MnqSnsCredentialsArgs;
    import com.pulumi.scaleway.inputs.MnqSnsCredentialsPermissionsArgs;
    import com.pulumi.scaleway.MnqSnsTopic;
    import com.pulumi.scaleway.MnqSnsTopicArgs;
    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");
    
            var mainMnqSnsCredentials = new MnqSnsCredentials("mainMnqSnsCredentials", MnqSnsCredentialsArgs.builder()
                .projectId(main.projectId())
                .permissions(MnqSnsCredentialsPermissionsArgs.builder()
                    .canManage(true)
                    .build())
                .build());
    
            var topic = new MnqSnsTopic("topic", MnqSnsTopicArgs.builder()
                .projectId(main.projectId())
                .name("my-topic")
                .accessKey(mainMnqSnsCredentials.accessKey())
                .secretKey(mainMnqSnsCredentials.secretKey())
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:MnqSns
      mainMnqSnsCredentials:
        type: scaleway:MnqSnsCredentials
        name: main
        properties:
          projectId: ${main.projectId}
          permissions:
            canManage: true
      topic:
        type: scaleway:MnqSnsTopic
        properties:
          projectId: ${main.projectId}
          name: my-topic
          accessKey: ${mainMnqSnsCredentials.accessKey}
          secretKey: ${mainMnqSnsCredentials.secretKey}
    

    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,
                    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 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 string
    The unique name of the resource.
    args MnqSnsTopicArgs
    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 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 string
    The unique name of the resource.
    args MnqSnsTopicArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MnqSnsTopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MnqSnsTopicArgs
    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 mnqSnsTopicResource = new Scaleway.MnqSnsTopic("mnqSnsTopicResource", new()
    {
        AccessKey = "string",
        SecretKey = "string",
        ContentBasedDeduplication = false,
        FifoTopic = false,
        Name = "string",
        NamePrefix = "string",
        ProjectId = "string",
        Region = "string",
        SnsEndpoint = "string",
    });
    
    example, err := scaleway.NewMnqSnsTopic(ctx, "mnqSnsTopicResource", &scaleway.MnqSnsTopicArgs{
    	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 mnqSnsTopicResource = new MnqSnsTopic("mnqSnsTopicResource", MnqSnsTopicArgs.builder()
        .accessKey("string")
        .secretKey("string")
        .contentBasedDeduplication(false)
        .fifoTopic(false)
        .name("string")
        .namePrefix("string")
        .projectId("string")
        .region("string")
        .snsEndpoint("string")
        .build());
    
    mnq_sns_topic_resource = scaleway.MnqSnsTopic("mnqSnsTopicResource",
        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 mnqSnsTopicResource = new scaleway.MnqSnsTopic("mnqSnsTopicResource", {
        accessKey: "string",
        secretKey: "string",
        contentBasedDeduplication: false,
        fifoTopic: false,
        name: "string",
        namePrefix: "string",
        projectId: "string",
        region: "string",
        snsEndpoint: "string",
    });
    
    type: scaleway:MnqSnsTopic
    properties:
        accessKey: string
        contentBasedDeduplication: false
        fifoTopic: false
        name: string
        namePrefix: string
        projectId: string
        region: string
        secretKey: string
        snsEndpoint: string
    

    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 string
    The access key of the SNS credentials.
    SecretKey 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 string
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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.
    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 string
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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.
    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 String
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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.
    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 string
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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_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 str
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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.
    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 String
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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 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)
    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:
    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 string
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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
    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 string
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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
    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 String
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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
    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 string
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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_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 str
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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
    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 String
    The unique name of the SNS topic. Either name or name_prefix is required. Conflicts with name_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:index/mnqSnsTopic:MnqSnsTopic 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 scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse