@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
220 lines (219 loc) • 7.5 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages Scaleway Messaging and Queuing SNS topic subscriptions.
* For further information, see
* our [main documentation](https://www.scaleway.com/en/docs/messaging/reference-content/sns-overview/).
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // For default project in default region
* const main = new scaleway.mnq.Sns("main", {});
* const mainSnsCredentials = new scaleway.mnq.SnsCredentials("main", {
* projectId: main.projectId,
* permissions: {
* canManage: true,
* canPublish: true,
* canReceive: true,
* },
* });
* const topic = new scaleway.mnq.SnsTopic("topic", {
* projectId: main.projectId,
* name: "my-topic",
* accessKey: mainSnsCredentials.accessKey,
* secretKey: mainSnsCredentials.secretKey,
* });
* const mainSnsTopicSubscription = new scaleway.mnq.SnsTopicSubscription("main", {
* projectId: main.projectId,
* accessKey: mainSnsCredentials.accessKey,
* secretKey: mainSnsCredentials.secretKey,
* topicId: topic.id,
* protocol: "http",
* endpoint: "http://example.com",
* });
* ```
*
* ## Import
*
* SNS topic subscriptions can be imported using `{region}/{project-id}/{topic-name}/{subscription-id}`, e.g.
*
* bash
*
* ```sh
* $ pulumi import scaleway:index/mnqSnsTopicSubscription:MnqSnsTopicSubscription main fr-par/11111111111111111111111111111111/my-topic/11111111111111111111111111111111
* ```
*
* @deprecated scaleway.index/mnqsnstopicsubscription.MnqSnsTopicSubscription has been deprecated in favor of scaleway.mnq/snstopicsubscription.SnsTopicSubscription
*/
export declare class MnqSnsTopicSubscription extends pulumi.CustomResource {
/**
* Get an existing MnqSnsTopicSubscription resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MnqSnsTopicSubscriptionState, opts?: pulumi.CustomResourceOptions): MnqSnsTopicSubscription;
/**
* Returns true if the given object is an instance of MnqSnsTopicSubscription. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is MnqSnsTopicSubscription;
/**
* The access key of the SNS credentials.
*/
readonly accessKey: pulumi.Output<string>;
/**
* The ARN of the topic subscription
*/
readonly arn: pulumi.Output<string>;
/**
* Endpoint of the subscription
*/
readonly endpoint: pulumi.Output<string | undefined>;
/**
* `projectId`) The ID of the Project in which SNS is enabled.
*/
readonly projectId: pulumi.Output<string>;
/**
* Protocol of the SNS topic subscription.
*/
readonly protocol: pulumi.Output<string>;
/**
* Activate JSON redrive policy.
*/
readonly redrivePolicy: pulumi.Output<boolean>;
/**
* `region`). The region
* in which SNS is enabled.
*/
readonly region: pulumi.Output<string>;
/**
* The secret key of the SNS credentials.
*/
readonly secretKey: pulumi.Output<string>;
/**
* The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to `https://sns.mnq.{region}.scaleway.com`.
*/
readonly snsEndpoint: pulumi.Output<string | undefined>;
/**
* The ARN of the topic. Either `topicId` or `topicArn` is required.
*/
readonly topicArn: pulumi.Output<string | undefined>;
/**
* The ID of the topic. Either `topicId` or `topicArn` is required. Conflicts with `topicArn`.
*/
readonly topicId: pulumi.Output<string | undefined>;
/**
* Create a MnqSnsTopicSubscription resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
/** @deprecated scaleway.index/mnqsnstopicsubscription.MnqSnsTopicSubscription has been deprecated in favor of scaleway.mnq/snstopicsubscription.SnsTopicSubscription */
constructor(name: string, args: MnqSnsTopicSubscriptionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering MnqSnsTopicSubscription resources.
*/
export interface MnqSnsTopicSubscriptionState {
/**
* The access key of the SNS credentials.
*/
accessKey?: pulumi.Input<string>;
/**
* The ARN of the topic subscription
*/
arn?: pulumi.Input<string>;
/**
* Endpoint of the subscription
*/
endpoint?: pulumi.Input<string>;
/**
* `projectId`) The ID of the Project in which SNS is enabled.
*/
projectId?: pulumi.Input<string>;
/**
* Protocol of the SNS topic subscription.
*/
protocol?: pulumi.Input<string>;
/**
* Activate JSON redrive policy.
*/
redrivePolicy?: pulumi.Input<boolean>;
/**
* `region`). The region
* in which SNS is enabled.
*/
region?: pulumi.Input<string>;
/**
* The secret key of the SNS credentials.
*/
secretKey?: pulumi.Input<string>;
/**
* The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to `https://sns.mnq.{region}.scaleway.com`.
*/
snsEndpoint?: pulumi.Input<string>;
/**
* The ARN of the topic. Either `topicId` or `topicArn` is required.
*/
topicArn?: pulumi.Input<string>;
/**
* The ID of the topic. Either `topicId` or `topicArn` is required. Conflicts with `topicArn`.
*/
topicId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MnqSnsTopicSubscription resource.
*/
export interface MnqSnsTopicSubscriptionArgs {
/**
* The access key of the SNS credentials.
*/
accessKey: pulumi.Input<string>;
/**
* Endpoint of the subscription
*/
endpoint?: pulumi.Input<string>;
/**
* `projectId`) The ID of the Project in which SNS is enabled.
*/
projectId?: pulumi.Input<string>;
/**
* Protocol of the SNS topic subscription.
*/
protocol: pulumi.Input<string>;
/**
* Activate JSON redrive policy.
*/
redrivePolicy?: pulumi.Input<boolean>;
/**
* `region`). The region
* in which SNS is enabled.
*/
region?: pulumi.Input<string>;
/**
* The secret key of the SNS credentials.
*/
secretKey: pulumi.Input<string>;
/**
* The endpoint of the SNS service. Can contain a {region} placeholder. Defaults to `https://sns.mnq.{region}.scaleway.com`.
*/
snsEndpoint?: pulumi.Input<string>;
/**
* The ARN of the topic. Either `topicId` or `topicArn` is required.
*/
topicArn?: pulumi.Input<string>;
/**
* The ID of the topic. Either `topicId` or `topicArn` is required. Conflicts with `topicArn`.
*/
topicId?: pulumi.Input<string>;
}