opentelekomcloud.SmnSubscriptionV2
Explore with Pulumi AI
Up-to-date reference of API arguments for SMN subscription you can get at documentation portal
Manages a V2 subscription resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const topic1 = new opentelekomcloud.SmnTopicV2("topic1", {displayName: "The display name of topic_1"});
const subscription1 = new opentelekomcloud.SmnSubscriptionV2("subscription1", {
topicUrn: topic1.smnTopicV2Id,
endpoint: "mailtest@gmail.com",
protocol: "email",
remark: "O&M",
});
const subscription2 = new opentelekomcloud.SmnSubscriptionV2("subscription2", {
topicUrn: topic1.smnTopicV2Id,
endpoint: "13600000000",
protocol: "sms",
remark: "O&M",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
topic1 = opentelekomcloud.SmnTopicV2("topic1", display_name="The display name of topic_1")
subscription1 = opentelekomcloud.SmnSubscriptionV2("subscription1",
topic_urn=topic1.smn_topic_v2_id,
endpoint="mailtest@gmail.com",
protocol="email",
remark="O&M")
subscription2 = opentelekomcloud.SmnSubscriptionV2("subscription2",
topic_urn=topic1.smn_topic_v2_id,
endpoint="13600000000",
protocol="sms",
remark="O&M")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
topic1, err := opentelekomcloud.NewSmnTopicV2(ctx, "topic1", &opentelekomcloud.SmnTopicV2Args{
DisplayName: pulumi.String("The display name of topic_1"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewSmnSubscriptionV2(ctx, "subscription1", &opentelekomcloud.SmnSubscriptionV2Args{
TopicUrn: topic1.SmnTopicV2Id,
Endpoint: pulumi.String("mailtest@gmail.com"),
Protocol: pulumi.String("email"),
Remark: pulumi.String("O&M"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewSmnSubscriptionV2(ctx, "subscription2", &opentelekomcloud.SmnSubscriptionV2Args{
TopicUrn: topic1.SmnTopicV2Id,
Endpoint: pulumi.String("13600000000"),
Protocol: pulumi.String("sms"),
Remark: pulumi.String("O&M"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var topic1 = new Opentelekomcloud.SmnTopicV2("topic1", new()
{
DisplayName = "The display name of topic_1",
});
var subscription1 = new Opentelekomcloud.SmnSubscriptionV2("subscription1", new()
{
TopicUrn = topic1.SmnTopicV2Id,
Endpoint = "mailtest@gmail.com",
Protocol = "email",
Remark = "O&M",
});
var subscription2 = new Opentelekomcloud.SmnSubscriptionV2("subscription2", new()
{
TopicUrn = topic1.SmnTopicV2Id,
Endpoint = "13600000000",
Protocol = "sms",
Remark = "O&M",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.SmnTopicV2;
import com.pulumi.opentelekomcloud.SmnTopicV2Args;
import com.pulumi.opentelekomcloud.SmnSubscriptionV2;
import com.pulumi.opentelekomcloud.SmnSubscriptionV2Args;
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 topic1 = new SmnTopicV2("topic1", SmnTopicV2Args.builder()
.displayName("The display name of topic_1")
.build());
var subscription1 = new SmnSubscriptionV2("subscription1", SmnSubscriptionV2Args.builder()
.topicUrn(topic1.smnTopicV2Id())
.endpoint("mailtest@gmail.com")
.protocol("email")
.remark("O&M")
.build());
var subscription2 = new SmnSubscriptionV2("subscription2", SmnSubscriptionV2Args.builder()
.topicUrn(topic1.smnTopicV2Id())
.endpoint("13600000000")
.protocol("sms")
.remark("O&M")
.build());
}
}
resources:
topic1:
type: opentelekomcloud:SmnTopicV2
properties:
displayName: The display name of topic_1
subscription1:
type: opentelekomcloud:SmnSubscriptionV2
properties:
topicUrn: ${topic1.smnTopicV2Id}
endpoint: mailtest@gmail.com
protocol: email
remark: O&M
subscription2:
type: opentelekomcloud:SmnSubscriptionV2
properties:
topicUrn: ${topic1.smnTopicV2Id}
endpoint: '13600000000'
protocol: sms
remark: O&M
Create SmnSubscriptionV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SmnSubscriptionV2(name: string, args: SmnSubscriptionV2Args, opts?: CustomResourceOptions);
@overload
def SmnSubscriptionV2(resource_name: str,
args: SmnSubscriptionV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def SmnSubscriptionV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoint: Optional[str] = None,
protocol: Optional[str] = None,
topic_urn: Optional[str] = None,
project_name: Optional[str] = None,
remark: Optional[str] = None,
smn_subscription_v2_id: Optional[str] = None)
func NewSmnSubscriptionV2(ctx *Context, name string, args SmnSubscriptionV2Args, opts ...ResourceOption) (*SmnSubscriptionV2, error)
public SmnSubscriptionV2(string name, SmnSubscriptionV2Args args, CustomResourceOptions? opts = null)
public SmnSubscriptionV2(String name, SmnSubscriptionV2Args args)
public SmnSubscriptionV2(String name, SmnSubscriptionV2Args args, CustomResourceOptions options)
type: opentelekomcloud:SmnSubscriptionV2
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 SmnSubscriptionV2Args
- 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 SmnSubscriptionV2Args
- 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 SmnSubscriptionV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SmnSubscriptionV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SmnSubscriptionV2Args
- 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 smnSubscriptionV2Resource = new Opentelekomcloud.SmnSubscriptionV2("smnSubscriptionV2Resource", new()
{
Endpoint = "string",
Protocol = "string",
TopicUrn = "string",
ProjectName = "string",
Remark = "string",
SmnSubscriptionV2Id = "string",
});
example, err := opentelekomcloud.NewSmnSubscriptionV2(ctx, "smnSubscriptionV2Resource", &opentelekomcloud.SmnSubscriptionV2Args{
Endpoint: pulumi.String("string"),
Protocol: pulumi.String("string"),
TopicUrn: pulumi.String("string"),
ProjectName: pulumi.String("string"),
Remark: pulumi.String("string"),
SmnSubscriptionV2Id: pulumi.String("string"),
})
var smnSubscriptionV2Resource = new SmnSubscriptionV2("smnSubscriptionV2Resource", SmnSubscriptionV2Args.builder()
.endpoint("string")
.protocol("string")
.topicUrn("string")
.projectName("string")
.remark("string")
.smnSubscriptionV2Id("string")
.build());
smn_subscription_v2_resource = opentelekomcloud.SmnSubscriptionV2("smnSubscriptionV2Resource",
endpoint="string",
protocol="string",
topic_urn="string",
project_name="string",
remark="string",
smn_subscription_v2_id="string")
const smnSubscriptionV2Resource = new opentelekomcloud.SmnSubscriptionV2("smnSubscriptionV2Resource", {
endpoint: "string",
protocol: "string",
topicUrn: "string",
projectName: "string",
remark: "string",
smnSubscriptionV2Id: "string",
});
type: opentelekomcloud:SmnSubscriptionV2
properties:
endpoint: string
projectName: string
protocol: string
remark: string
smnSubscriptionV2Id: string
topicUrn: string
SmnSubscriptionV2 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 SmnSubscriptionV2 resource accepts the following input properties:
- Endpoint string
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- Protocol string
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - Topic
Urn string - Specifies the resource identifier of a topic, which is unique.
- Project
Name string - The project name for the subscription.
- Remark string
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- Smn
Subscription stringV2Id
- Endpoint string
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- Protocol string
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - Topic
Urn string - Specifies the resource identifier of a topic, which is unique.
- Project
Name string - The project name for the subscription.
- Remark string
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- Smn
Subscription stringV2Id
- endpoint String
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- protocol String
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - topic
Urn String - Specifies the resource identifier of a topic, which is unique.
- project
Name String - The project name for the subscription.
- remark String
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- smn
Subscription StringV2Id
- endpoint string
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- protocol string
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - topic
Urn string - Specifies the resource identifier of a topic, which is unique.
- project
Name string - The project name for the subscription.
- remark string
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- smn
Subscription stringV2Id
- endpoint str
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- protocol str
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - topic_
urn str - Specifies the resource identifier of a topic, which is unique.
- project_
name str - The project name for the subscription.
- remark str
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- smn_
subscription_ strv2_ id
- endpoint String
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- protocol String
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - topic
Urn String - Specifies the resource identifier of a topic, which is unique.
- project
Name String - The project name for the subscription.
- remark String
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- smn
Subscription StringV2Id
Outputs
All input properties are implicitly available as output properties. Additionally, the SmnSubscriptionV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner string
- The project ID of the topic creator.
- Status double
- The subscription status.
- Subscription
Urn string - The resource identifier of a subscription.
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner string
- The project ID of the topic creator.
- Status float64
- The subscription status.
- Subscription
Urn string - The resource identifier of a subscription.
- id String
- The provider-assigned unique ID for this managed resource.
- owner String
- The project ID of the topic creator.
- status Double
- The subscription status.
- subscription
Urn String - The resource identifier of a subscription.
- id string
- The provider-assigned unique ID for this managed resource.
- owner string
- The project ID of the topic creator.
- status number
- The subscription status.
- subscription
Urn string - The resource identifier of a subscription.
- id str
- The provider-assigned unique ID for this managed resource.
- owner str
- The project ID of the topic creator.
- status float
- The subscription status.
- subscription_
urn str - The resource identifier of a subscription.
- id String
- The provider-assigned unique ID for this managed resource.
- owner String
- The project ID of the topic creator.
- status Number
- The subscription status.
- subscription
Urn String - The resource identifier of a subscription.
Look up Existing SmnSubscriptionV2 Resource
Get an existing SmnSubscriptionV2 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?: SmnSubscriptionV2State, opts?: CustomResourceOptions): SmnSubscriptionV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
endpoint: Optional[str] = None,
owner: Optional[str] = None,
project_name: Optional[str] = None,
protocol: Optional[str] = None,
remark: Optional[str] = None,
smn_subscription_v2_id: Optional[str] = None,
status: Optional[float] = None,
subscription_urn: Optional[str] = None,
topic_urn: Optional[str] = None) -> SmnSubscriptionV2
func GetSmnSubscriptionV2(ctx *Context, name string, id IDInput, state *SmnSubscriptionV2State, opts ...ResourceOption) (*SmnSubscriptionV2, error)
public static SmnSubscriptionV2 Get(string name, Input<string> id, SmnSubscriptionV2State? state, CustomResourceOptions? opts = null)
public static SmnSubscriptionV2 get(String name, Output<String> id, SmnSubscriptionV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:SmnSubscriptionV2 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.
- Endpoint string
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- Owner string
- The project ID of the topic creator.
- Project
Name string - The project name for the subscription.
- Protocol string
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - Remark string
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- Smn
Subscription stringV2Id - Status double
- The subscription status.
- Subscription
Urn string - The resource identifier of a subscription.
- Topic
Urn string - Specifies the resource identifier of a topic, which is unique.
- Endpoint string
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- Owner string
- The project ID of the topic creator.
- Project
Name string - The project name for the subscription.
- Protocol string
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - Remark string
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- Smn
Subscription stringV2Id - Status float64
- The subscription status.
- Subscription
Urn string - The resource identifier of a subscription.
- Topic
Urn string - Specifies the resource identifier of a topic, which is unique.
- endpoint String
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- owner String
- The project ID of the topic creator.
- project
Name String - The project name for the subscription.
- protocol String
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - remark String
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- smn
Subscription StringV2Id - status Double
- The subscription status.
- subscription
Urn String - The resource identifier of a subscription.
- topic
Urn String - Specifies the resource identifier of a topic, which is unique.
- endpoint string
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- owner string
- The project ID of the topic creator.
- project
Name string - The project name for the subscription.
- protocol string
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - remark string
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- smn
Subscription stringV2Id - status number
- The subscription status.
- subscription
Urn string - The resource identifier of a subscription.
- topic
Urn string - Specifies the resource identifier of a topic, which is unique.
- endpoint str
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- owner str
- The project ID of the topic creator.
- project_
name str - The project name for the subscription.
- protocol str
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - remark str
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- smn_
subscription_ strv2_ id - status float
- The subscription status.
- subscription_
urn str - The resource identifier of a subscription.
- topic_
urn str - Specifies the resource identifier of a topic, which is unique.
- endpoint String
- Specifies the message endpoint.
- For an HTTP subscription, the endpoint starts with http://.
- For an HTTPS subscription, the endpoint starts with https://.
- For an email subscription, the endpoint is a mail address.
- For an SMS message subscription, the endpoint is a phone number.
- owner String
- The project ID of the topic creator.
- project
Name String - The project name for the subscription.
- protocol String
- Specifies protocol of the message endpoint. Currently,
email
,sms
,http
, andhttps
are supported. - remark String
- Specifies the remark information. The remarks must be a UTF-8-coded character string containing 128 bytes.
- smn
Subscription StringV2Id - status Number
- The subscription status.
- subscription
Urn String - The resource identifier of a subscription.
- topic
Urn String - Specifies the resource identifier of a topic, which is unique.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.