scaleway.MnqSnsTopic
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 mainMnqSns = new scaleway.MnqSns("mainMnqSns", {});
const mainMnqSnsCredentials = new scaleway.MnqSnsCredentials("mainMnqSnsCredentials", {
projectId: mainMnqSns.projectId,
permissions: {
canManage: true,
},
});
const topic = new scaleway.MnqSnsTopic("topic", {
projectId: mainMnqSns.projectId,
accessKey: mainMnqSnsCredentials.accessKey,
secretKey: mainMnqSnsCredentials.secretKey,
});
import pulumi
import pulumiverse_scaleway as scaleway
main_mnq_sns = scaleway.MnqSns("mainMnqSns")
main_mnq_sns_credentials = scaleway.MnqSnsCredentials("mainMnqSnsCredentials",
project_id=main_mnq_sns.project_id,
permissions=scaleway.MnqSnsCredentialsPermissionsArgs(
can_manage=True,
))
topic = scaleway.MnqSnsTopic("topic",
project_id=main_mnq_sns.project_id,
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 {
mainMnqSns, err := scaleway.NewMnqSns(ctx, "mainMnqSns", nil)
if err != nil {
return err
}
mainMnqSnsCredentials, err := scaleway.NewMnqSnsCredentials(ctx, "mainMnqSnsCredentials", &scaleway.MnqSnsCredentialsArgs{
ProjectId: mainMnqSns.ProjectId,
Permissions: &scaleway.MnqSnsCredentialsPermissionsArgs{
CanManage: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = scaleway.NewMnqSnsTopic(ctx, "topic", &scaleway.MnqSnsTopicArgs{
ProjectId: mainMnqSns.ProjectId,
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 mainMnqSns = new Scaleway.MnqSns("mainMnqSns");
var mainMnqSnsCredentials = new Scaleway.MnqSnsCredentials("mainMnqSnsCredentials", new()
{
ProjectId = mainMnqSns.ProjectId,
Permissions = new Scaleway.Inputs.MnqSnsCredentialsPermissionsArgs
{
CanManage = true,
},
});
var topic = new Scaleway.MnqSnsTopic("topic", new()
{
ProjectId = mainMnqSns.ProjectId,
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 mainMnqSns = new MnqSns("mainMnqSns");
var mainMnqSnsCredentials = new MnqSnsCredentials("mainMnqSnsCredentials", MnqSnsCredentialsArgs.builder()
.projectId(mainMnqSns.projectId())
.permissions(MnqSnsCredentialsPermissionsArgs.builder()
.canManage(true)
.build())
.build());
var topic = new MnqSnsTopic("topic", MnqSnsTopicArgs.builder()
.projectId(mainMnqSns.projectId())
.accessKey(mainMnqSnsCredentials.accessKey())
.secretKey(mainMnqSnsCredentials.secretKey())
.build());
}
}
resources:
mainMnqSns:
type: scaleway:MnqSns
mainMnqSnsCredentials:
type: scaleway:MnqSnsCredentials
properties:
projectId: ${mainMnqSns.projectId}
permissions:
canManage: true
topic:
type: scaleway:MnqSnsTopic
properties:
projectId: ${mainMnqSns.projectId}
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
The MnqSnsTopic resource accepts the following input properties:
- Access
Key string - The access key of the SNS credentials.
- Secret
Key string - 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 string
- The unique name of the SNS topic. Either
name
orname_prefix
is required. Conflicts withname_prefix
. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Project
Id string project_id
) The ID of the Project in which SNS is enabled.- Region string
region
). The region in which SNS is enabled.- Sns
Endpoint string - The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to
https://sns.mnq.{region}.scaleway.com
.
- Access
Key string - The access key of the SNS credentials.
- Secret
Key string - 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 string
- The unique name of the SNS topic. Either
name
orname_prefix
is required. Conflicts withname_prefix
. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Project
Id string project_id
) The ID of the Project in which SNS is enabled.- Region string
region
). The region in which SNS is enabled.- Sns
Endpoint string - The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to
https://sns.mnq.{region}.scaleway.com
.
- access
Key String - The access key of the SNS credentials.
- secret
Key String - The secret key of the SNS credentials.
- content
Based BooleanDeduplication - Specifies whether to enable content-based deduplication.
- fifo
Topic 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
orname_prefix
is required. Conflicts withname_prefix
. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - project
Id String project_id
) The ID of the Project in which SNS is enabled.- region String
region
). The region in which SNS is enabled.- sns
Endpoint String - The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to
https://sns.mnq.{region}.scaleway.com
.
- access
Key string - The access key of the SNS credentials.
- secret
Key string - The secret key of the SNS credentials.
- content
Based booleanDeduplication - Specifies whether to enable content-based deduplication.
- fifo
Topic 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
orname_prefix
is required. Conflicts withname_prefix
. - name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - project
Id string project_id
) The ID of the Project in which SNS is enabled.- region string
region
). The region in which SNS is enabled.- sns
Endpoint 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
name
orname_prefix
is 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
.
- access
Key String - The access key of the SNS credentials.
- secret
Key String - The secret key of the SNS credentials.
- content
Based BooleanDeduplication - Specifies whether to enable content-based deduplication.
- fifo
Topic 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
orname_prefix
is required. Conflicts withname_prefix
. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - project
Id String project_id
) The ID of the Project in which SNS is enabled.- region String
region
). The region in which SNS is enabled.- sns
Endpoint 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:
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.
- Access
Key string - The access key of the SNS credentials.
- Arn string
- 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 string
- The unique name of the SNS topic. Either
name
orname_prefix
is required. Conflicts withname_prefix
. - Name
Prefix 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}'
- Project
Id string project_id
) The ID of the Project in which SNS is enabled.- Region string
region
). The region in which SNS is enabled.- Secret
Key string - The secret key of the SNS credentials.
- Sns
Endpoint string - The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to
https://sns.mnq.{region}.scaleway.com
.
- Access
Key string - The access key of the SNS credentials.
- Arn string
- 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 string
- The unique name of the SNS topic. Either
name
orname_prefix
is required. Conflicts withname_prefix
. - Name
Prefix 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}'
- Project
Id string project_id
) The ID of the Project in which SNS is enabled.- Region string
region
). The region in which SNS is enabled.- Secret
Key string - The secret key of the SNS credentials.
- Sns
Endpoint string - The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to
https://sns.mnq.{region}.scaleway.com
.
- access
Key String - The access key of the SNS credentials.
- arn String
- The ARN of the topic
- content
Based BooleanDeduplication - Specifies whether to enable content-based deduplication.
- fifo
Topic 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
orname_prefix
is required. Conflicts withname_prefix
. - name
Prefix 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}'
- project
Id String project_id
) The ID of the Project in which SNS is enabled.- region String
region
). The region in which SNS is enabled.- secret
Key String - The secret key of the SNS credentials.
- sns
Endpoint String - The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to
https://sns.mnq.{region}.scaleway.com
.
- access
Key string - The access key of the SNS credentials.
- arn string
- The ARN of the topic
- content
Based booleanDeduplication - Specifies whether to enable content-based deduplication.
- fifo
Topic 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
orname_prefix
is required. Conflicts withname_prefix
. - name
Prefix 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}'
- project
Id string project_id
) The ID of the Project in which SNS is enabled.- region string
region
). The region in which SNS is enabled.- secret
Key string - The secret key of the SNS credentials.
- sns
Endpoint 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
name
orname_prefix
is 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
.
- access
Key String - The access key of the SNS credentials.
- arn String
- The ARN of the topic
- content
Based BooleanDeduplication - Specifies whether to enable content-based deduplication.
- fifo
Topic 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
orname_prefix
is required. Conflicts withname_prefix
. - name
Prefix 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}'
- project
Id String project_id
) The ID of the Project in which SNS is enabled.- region String
region
). The region in which SNS is enabled.- secret
Key String - The secret key of the SNS credentials.
- sns
Endpoint 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.