Documentation ¶
Index ¶
- func PkgVersion() (semver.Version, error)
- type GetTopicsArgs
- type GetTopicsOutputArgs
- type GetTopicsResult
- type GetTopicsResultOutput
- func (o GetTopicsResultOutput) DisplayName() pulumi.StringPtrOutput
- func (GetTopicsResultOutput) ElementType() reflect.Type
- func (o GetTopicsResultOutput) EnterpriseProjectId() pulumi.StringPtrOutput
- func (o GetTopicsResultOutput) Id() pulumi.StringOutput
- func (o GetTopicsResultOutput) Name() pulumi.StringPtrOutput
- func (o GetTopicsResultOutput) Region() pulumi.StringOutput
- func (o GetTopicsResultOutput) ToGetTopicsResultOutput() GetTopicsResultOutput
- func (o GetTopicsResultOutput) ToGetTopicsResultOutputWithContext(ctx context.Context) GetTopicsResultOutput
- func (o GetTopicsResultOutput) TopicUrn() pulumi.StringPtrOutput
- func (o GetTopicsResultOutput) Topics() GetTopicsTopicArrayOutput
- type GetTopicsTopic
- type GetTopicsTopicArgs
- type GetTopicsTopicArray
- type GetTopicsTopicArrayInput
- type GetTopicsTopicArrayOutput
- func (GetTopicsTopicArrayOutput) ElementType() reflect.Type
- func (o GetTopicsTopicArrayOutput) Index(i pulumi.IntInput) GetTopicsTopicOutput
- func (o GetTopicsTopicArrayOutput) ToGetTopicsTopicArrayOutput() GetTopicsTopicArrayOutput
- func (o GetTopicsTopicArrayOutput) ToGetTopicsTopicArrayOutputWithContext(ctx context.Context) GetTopicsTopicArrayOutput
- type GetTopicsTopicInput
- type GetTopicsTopicOutput
- func (o GetTopicsTopicOutput) DisplayName() pulumi.StringOutput
- func (GetTopicsTopicOutput) ElementType() reflect.Type
- func (o GetTopicsTopicOutput) EnterpriseProjectId() pulumi.StringOutput
- func (o GetTopicsTopicOutput) Id() pulumi.StringOutput
- func (o GetTopicsTopicOutput) Name() pulumi.StringOutput
- func (o GetTopicsTopicOutput) PushPolicy() pulumi.IntOutput
- func (o GetTopicsTopicOutput) Tags() pulumi.StringMapOutput
- func (o GetTopicsTopicOutput) ToGetTopicsTopicOutput() GetTopicsTopicOutput
- func (o GetTopicsTopicOutput) ToGetTopicsTopicOutputWithContext(ctx context.Context) GetTopicsTopicOutput
- func (o GetTopicsTopicOutput) TopicUrn() pulumi.StringOutput
- type Subscription
- type SubscriptionArgs
- type SubscriptionArray
- type SubscriptionArrayInput
- type SubscriptionArrayOutput
- func (SubscriptionArrayOutput) ElementType() reflect.Type
- func (o SubscriptionArrayOutput) Index(i pulumi.IntInput) SubscriptionOutput
- func (o SubscriptionArrayOutput) ToSubscriptionArrayOutput() SubscriptionArrayOutput
- func (o SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput
- type SubscriptionInput
- type SubscriptionMap
- type SubscriptionMapInput
- type SubscriptionMapOutput
- func (SubscriptionMapOutput) ElementType() reflect.Type
- func (o SubscriptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionOutput
- func (o SubscriptionMapOutput) ToSubscriptionMapOutput() SubscriptionMapOutput
- func (o SubscriptionMapOutput) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput
- type SubscriptionOutput
- func (SubscriptionOutput) ElementType() reflect.Type
- func (o SubscriptionOutput) Endpoint() pulumi.StringOutput
- func (o SubscriptionOutput) Owner() pulumi.StringOutput
- func (o SubscriptionOutput) Protocol() pulumi.StringOutput
- func (o SubscriptionOutput) Region() pulumi.StringOutput
- func (o SubscriptionOutput) Remark() pulumi.StringPtrOutput
- func (o SubscriptionOutput) Status() pulumi.IntOutput
- func (o SubscriptionOutput) SubscriptionUrn() pulumi.StringOutput
- func (o SubscriptionOutput) ToSubscriptionOutput() SubscriptionOutput
- func (o SubscriptionOutput) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
- func (o SubscriptionOutput) TopicUrn() pulumi.StringOutput
- type SubscriptionState
- type Topic
- type TopicArgs
- type TopicArray
- type TopicArrayInput
- type TopicArrayOutput
- type TopicInput
- type TopicMap
- type TopicMapInput
- type TopicMapOutput
- type TopicOutput
- func (o TopicOutput) CreateTime() pulumi.StringOutput
- func (o TopicOutput) DisplayName() pulumi.StringPtrOutput
- func (TopicOutput) ElementType() reflect.Type
- func (o TopicOutput) EnterpriseProjectId() pulumi.StringOutput
- func (o TopicOutput) Introduction() pulumi.StringPtrOutput
- func (o TopicOutput) Name() pulumi.StringOutput
- func (o TopicOutput) PushPolicy() pulumi.IntOutput
- func (o TopicOutput) Region() pulumi.StringOutput
- func (o TopicOutput) ServicesPublishAllowed() pulumi.StringPtrOutput
- func (o TopicOutput) Tags() pulumi.StringMapOutput
- func (o TopicOutput) ToTopicOutput() TopicOutput
- func (o TopicOutput) ToTopicOutputWithContext(ctx context.Context) TopicOutput
- func (o TopicOutput) TopicUrn() pulumi.StringOutput
- func (o TopicOutput) UpdateTime() pulumi.StringOutput
- func (o TopicOutput) UsersPublishAllowed() pulumi.StringPtrOutput
- type TopicState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶ added in v0.0.2
PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.
Types ¶
type GetTopicsArgs ¶
type GetTopicsArgs struct { // Specifies the topic display name. DisplayName *string `pulumi:"displayName"` // Specifies the enterprise project ID of the SMN topic. EnterpriseProjectId *string `pulumi:"enterpriseProjectId"` // Specifies the name of the topic. Name *string `pulumi:"name"` // Specifies the region in which to obtain the SMN topics. If omitted, the // provider-level region will be used. Region *string `pulumi:"region"` // Specifies the topic URN. TopicUrn *string `pulumi:"topicUrn"` }
A collection of arguments for invoking getTopics.
type GetTopicsOutputArgs ¶
type GetTopicsOutputArgs struct { // Specifies the topic display name. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // Specifies the enterprise project ID of the SMN topic. EnterpriseProjectId pulumi.StringPtrInput `pulumi:"enterpriseProjectId"` // Specifies the name of the topic. Name pulumi.StringPtrInput `pulumi:"name"` // Specifies the region in which to obtain the SMN topics. If omitted, the // provider-level region will be used. Region pulumi.StringPtrInput `pulumi:"region"` // Specifies the topic URN. TopicUrn pulumi.StringPtrInput `pulumi:"topicUrn"` }
A collection of arguments for invoking getTopics.
func (GetTopicsOutputArgs) ElementType ¶
func (GetTopicsOutputArgs) ElementType() reflect.Type
type GetTopicsResult ¶
type GetTopicsResult struct { // The topic display name. DisplayName *string `pulumi:"displayName"` // The enterprise project ID of the SMN topic. EnterpriseProjectId *string `pulumi:"enterpriseProjectId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The name of the topic. Name *string `pulumi:"name"` Region string `pulumi:"region"` // The topic URN. TopicUrn *string `pulumi:"topicUrn"` // An array of SMN topics found. Structure is documented below. Topics []GetTopicsTopic `pulumi:"topics"` }
A collection of values returned by getTopics.
func GetTopics ¶
func GetTopics(ctx *pulumi.Context, args *GetTopicsArgs, opts ...pulumi.InvokeOption) (*GetTopicsResult, error)
Use this data source to get a list of SMN topics.
## Example Usage
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Smn" "github.com/pulumi/pulumi-huaweicloud/sdk/go/huaweicloud/Smn" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { cfg := config.New(ctx, "") topicName := cfg.RequireObject("topicName") _, err := Smn.GetTopics(ctx, &smn.GetTopicsArgs{ Name: pulumi.StringRef(topicName), }, nil) if err != nil { return err } return nil }) }
```
type GetTopicsResultOutput ¶
type GetTopicsResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getTopics.
func GetTopicsOutput ¶
func GetTopicsOutput(ctx *pulumi.Context, args GetTopicsOutputArgs, opts ...pulumi.InvokeOption) GetTopicsResultOutput
func (GetTopicsResultOutput) DisplayName ¶
func (o GetTopicsResultOutput) DisplayName() pulumi.StringPtrOutput
The topic display name.
func (GetTopicsResultOutput) ElementType ¶
func (GetTopicsResultOutput) ElementType() reflect.Type
func (GetTopicsResultOutput) EnterpriseProjectId ¶
func (o GetTopicsResultOutput) EnterpriseProjectId() pulumi.StringPtrOutput
The enterprise project ID of the SMN topic.
func (GetTopicsResultOutput) Id ¶
func (o GetTopicsResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetTopicsResultOutput) Name ¶
func (o GetTopicsResultOutput) Name() pulumi.StringPtrOutput
The name of the topic.
func (GetTopicsResultOutput) Region ¶
func (o GetTopicsResultOutput) Region() pulumi.StringOutput
func (GetTopicsResultOutput) ToGetTopicsResultOutput ¶
func (o GetTopicsResultOutput) ToGetTopicsResultOutput() GetTopicsResultOutput
func (GetTopicsResultOutput) ToGetTopicsResultOutputWithContext ¶
func (o GetTopicsResultOutput) ToGetTopicsResultOutputWithContext(ctx context.Context) GetTopicsResultOutput
func (GetTopicsResultOutput) TopicUrn ¶
func (o GetTopicsResultOutput) TopicUrn() pulumi.StringPtrOutput
The topic URN.
func (GetTopicsResultOutput) Topics ¶
func (o GetTopicsResultOutput) Topics() GetTopicsTopicArrayOutput
An array of SMN topics found. Structure is documented below.
type GetTopicsTopic ¶
type GetTopicsTopic struct { // Specifies the topic display name. DisplayName string `pulumi:"displayName"` // Specifies the enterprise project ID of the SMN topic. EnterpriseProjectId string `pulumi:"enterpriseProjectId"` // The topic ID. The value is the topic URN. Id string `pulumi:"id"` // Specifies the name of the topic. Name string `pulumi:"name"` // Message pushing policy. // + **0**: indicates that the message sending fails and the message is cached in the queue. // + **1**: indicates that the failed message is discarded. PushPolicy int `pulumi:"pushPolicy"` // The tags of the SMN topic, key/value pair format. Tags map[string]string `pulumi:"tags"` // Specifies the topic URN. TopicUrn string `pulumi:"topicUrn"` }
type GetTopicsTopicArgs ¶
type GetTopicsTopicArgs struct { // Specifies the topic display name. DisplayName pulumi.StringInput `pulumi:"displayName"` // Specifies the enterprise project ID of the SMN topic. EnterpriseProjectId pulumi.StringInput `pulumi:"enterpriseProjectId"` // The topic ID. The value is the topic URN. Id pulumi.StringInput `pulumi:"id"` // Specifies the name of the topic. Name pulumi.StringInput `pulumi:"name"` // Message pushing policy. // + **0**: indicates that the message sending fails and the message is cached in the queue. // + **1**: indicates that the failed message is discarded. PushPolicy pulumi.IntInput `pulumi:"pushPolicy"` // The tags of the SMN topic, key/value pair format. Tags pulumi.StringMapInput `pulumi:"tags"` // Specifies the topic URN. TopicUrn pulumi.StringInput `pulumi:"topicUrn"` }
func (GetTopicsTopicArgs) ElementType ¶
func (GetTopicsTopicArgs) ElementType() reflect.Type
func (GetTopicsTopicArgs) ToGetTopicsTopicOutput ¶
func (i GetTopicsTopicArgs) ToGetTopicsTopicOutput() GetTopicsTopicOutput
func (GetTopicsTopicArgs) ToGetTopicsTopicOutputWithContext ¶
func (i GetTopicsTopicArgs) ToGetTopicsTopicOutputWithContext(ctx context.Context) GetTopicsTopicOutput
type GetTopicsTopicArray ¶
type GetTopicsTopicArray []GetTopicsTopicInput
func (GetTopicsTopicArray) ElementType ¶
func (GetTopicsTopicArray) ElementType() reflect.Type
func (GetTopicsTopicArray) ToGetTopicsTopicArrayOutput ¶
func (i GetTopicsTopicArray) ToGetTopicsTopicArrayOutput() GetTopicsTopicArrayOutput
func (GetTopicsTopicArray) ToGetTopicsTopicArrayOutputWithContext ¶
func (i GetTopicsTopicArray) ToGetTopicsTopicArrayOutputWithContext(ctx context.Context) GetTopicsTopicArrayOutput
type GetTopicsTopicArrayInput ¶
type GetTopicsTopicArrayInput interface { pulumi.Input ToGetTopicsTopicArrayOutput() GetTopicsTopicArrayOutput ToGetTopicsTopicArrayOutputWithContext(context.Context) GetTopicsTopicArrayOutput }
GetTopicsTopicArrayInput is an input type that accepts GetTopicsTopicArray and GetTopicsTopicArrayOutput values. You can construct a concrete instance of `GetTopicsTopicArrayInput` via:
GetTopicsTopicArray{ GetTopicsTopicArgs{...} }
type GetTopicsTopicArrayOutput ¶
type GetTopicsTopicArrayOutput struct{ *pulumi.OutputState }
func (GetTopicsTopicArrayOutput) ElementType ¶
func (GetTopicsTopicArrayOutput) ElementType() reflect.Type
func (GetTopicsTopicArrayOutput) Index ¶
func (o GetTopicsTopicArrayOutput) Index(i pulumi.IntInput) GetTopicsTopicOutput
func (GetTopicsTopicArrayOutput) ToGetTopicsTopicArrayOutput ¶
func (o GetTopicsTopicArrayOutput) ToGetTopicsTopicArrayOutput() GetTopicsTopicArrayOutput
func (GetTopicsTopicArrayOutput) ToGetTopicsTopicArrayOutputWithContext ¶
func (o GetTopicsTopicArrayOutput) ToGetTopicsTopicArrayOutputWithContext(ctx context.Context) GetTopicsTopicArrayOutput
type GetTopicsTopicInput ¶
type GetTopicsTopicInput interface { pulumi.Input ToGetTopicsTopicOutput() GetTopicsTopicOutput ToGetTopicsTopicOutputWithContext(context.Context) GetTopicsTopicOutput }
GetTopicsTopicInput is an input type that accepts GetTopicsTopicArgs and GetTopicsTopicOutput values. You can construct a concrete instance of `GetTopicsTopicInput` via:
GetTopicsTopicArgs{...}
type GetTopicsTopicOutput ¶
type GetTopicsTopicOutput struct{ *pulumi.OutputState }
func (GetTopicsTopicOutput) DisplayName ¶
func (o GetTopicsTopicOutput) DisplayName() pulumi.StringOutput
Specifies the topic display name.
func (GetTopicsTopicOutput) ElementType ¶
func (GetTopicsTopicOutput) ElementType() reflect.Type
func (GetTopicsTopicOutput) EnterpriseProjectId ¶
func (o GetTopicsTopicOutput) EnterpriseProjectId() pulumi.StringOutput
Specifies the enterprise project ID of the SMN topic.
func (GetTopicsTopicOutput) Id ¶
func (o GetTopicsTopicOutput) Id() pulumi.StringOutput
The topic ID. The value is the topic URN.
func (GetTopicsTopicOutput) Name ¶
func (o GetTopicsTopicOutput) Name() pulumi.StringOutput
Specifies the name of the topic.
func (GetTopicsTopicOutput) PushPolicy ¶
func (o GetTopicsTopicOutput) PushPolicy() pulumi.IntOutput
Message pushing policy. + **0**: indicates that the message sending fails and the message is cached in the queue. + **1**: indicates that the failed message is discarded.
func (GetTopicsTopicOutput) Tags ¶
func (o GetTopicsTopicOutput) Tags() pulumi.StringMapOutput
The tags of the SMN topic, key/value pair format.
func (GetTopicsTopicOutput) ToGetTopicsTopicOutput ¶
func (o GetTopicsTopicOutput) ToGetTopicsTopicOutput() GetTopicsTopicOutput
func (GetTopicsTopicOutput) ToGetTopicsTopicOutputWithContext ¶
func (o GetTopicsTopicOutput) ToGetTopicsTopicOutputWithContext(ctx context.Context) GetTopicsTopicOutput
func (GetTopicsTopicOutput) TopicUrn ¶
func (o GetTopicsTopicOutput) TopicUrn() pulumi.StringOutput
Specifies the topic URN.
type Subscription ¶
type Subscription struct { pulumi.CustomResourceState // Message endpoint. Changing this parameter will create a new resource. // + **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 an mail address. // + **For an SMS message subscription**, the endpoint is a phone number, // the format is \[+\]\[country code\]\[phone number\], e.g. +86185xxxx0000. // + **For a functionstage subscription**, the endpoint is a function urn. // + **For a functiongraph subscription**, the endpoint is a workflow ID. Endpoint pulumi.StringOutput `pulumi:"endpoint"` // Project ID of the topic creator. Owner pulumi.StringOutput `pulumi:"owner"` // Specifies the protocol of the message endpoint. Currently, email, sms, http, // https, functionstage and functiongraph are supported. Changing this parameter will create a new resource. Protocol pulumi.StringOutput `pulumi:"protocol"` // The region in which to create the SMN subscription resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringOutput `pulumi:"region"` // Remark information. The remarks must be a UTF-8-coded character string // containing 128 bytes. Changing this parameter will create a new resource. Remark pulumi.StringPtrOutput `pulumi:"remark"` // Subscription status. // + **0**: indicates that the subscription is not confirmed. // + **1**: indicates that the subscription is confirmed. // + **3**: indicates that the subscription is canceled. Status pulumi.IntOutput `pulumi:"status"` // Resource identifier of a subscription, which is unique. SubscriptionUrn pulumi.StringOutput `pulumi:"subscriptionUrn"` // Specifies the resource identifier of a topic, which is unique. // Changing this parameter will create a new resource. TopicUrn pulumi.StringOutput `pulumi:"topicUrn"` }
Manages an SMN subscription resource within HuaweiCloud.
## Example Usage
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Smn" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { topic1, err := Smn.NewTopic(ctx, "topic1", &Smn.TopicArgs{ DisplayName: pulumi.String("The display name of topic_1"), }) if err != nil { return err } _, err = Smn.NewSubscription(ctx, "subscription1", &Smn.SubscriptionArgs{ TopicUrn: topic1.ID(), Endpoint: pulumi.String("mailtest@gmail.com"), Protocol: pulumi.String("email"), Remark: pulumi.String("O&M"), }) if err != nil { return err } _, err = Smn.NewSubscription(ctx, "subscription2", &Smn.SubscriptionArgs{ TopicUrn: topic1.ID(), Endpoint: pulumi.String("13600000000"), Protocol: pulumi.String("sms"), Remark: pulumi.String("O&M"), }) if err != nil { return err } return nil }) }
```
## Import
SMN subscription can be imported using the `id` (subscription urn), e.g.
```sh
$ pulumi import huaweicloud:Smn/subscription:Subscription subscription_1 urn:smn:cn-north-4:0970dd7a1300f5672ff2c003c60ae115:topic_1:a2aa5a1f66df494184f4e108398de1a6
```
func GetSubscription ¶
func GetSubscription(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubscriptionState, opts ...pulumi.ResourceOption) (*Subscription, error)
GetSubscription gets an existing Subscription resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewSubscription ¶
func NewSubscription(ctx *pulumi.Context, name string, args *SubscriptionArgs, opts ...pulumi.ResourceOption) (*Subscription, error)
NewSubscription registers a new resource with the given unique name, arguments, and options.
func (*Subscription) ElementType ¶
func (*Subscription) ElementType() reflect.Type
func (*Subscription) ToSubscriptionOutput ¶
func (i *Subscription) ToSubscriptionOutput() SubscriptionOutput
func (*Subscription) ToSubscriptionOutputWithContext ¶
func (i *Subscription) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
type SubscriptionArgs ¶
type SubscriptionArgs struct { // Message endpoint. Changing this parameter will create a new resource. // + **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 an mail address. // + **For an SMS message subscription**, the endpoint is a phone number, // the format is \[+\]\[country code\]\[phone number\], e.g. +86185xxxx0000. // + **For a functionstage subscription**, the endpoint is a function urn. // + **For a functiongraph subscription**, the endpoint is a workflow ID. Endpoint pulumi.StringInput // Specifies the protocol of the message endpoint. Currently, email, sms, http, // https, functionstage and functiongraph are supported. Changing this parameter will create a new resource. Protocol pulumi.StringInput // The region in which to create the SMN subscription resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Remark information. The remarks must be a UTF-8-coded character string // containing 128 bytes. Changing this parameter will create a new resource. Remark pulumi.StringPtrInput // Specifies the resource identifier of a topic, which is unique. // Changing this parameter will create a new resource. TopicUrn pulumi.StringInput }
The set of arguments for constructing a Subscription resource.
func (SubscriptionArgs) ElementType ¶
func (SubscriptionArgs) ElementType() reflect.Type
type SubscriptionArray ¶
type SubscriptionArray []SubscriptionInput
func (SubscriptionArray) ElementType ¶
func (SubscriptionArray) ElementType() reflect.Type
func (SubscriptionArray) ToSubscriptionArrayOutput ¶
func (i SubscriptionArray) ToSubscriptionArrayOutput() SubscriptionArrayOutput
func (SubscriptionArray) ToSubscriptionArrayOutputWithContext ¶
func (i SubscriptionArray) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput
type SubscriptionArrayInput ¶
type SubscriptionArrayInput interface { pulumi.Input ToSubscriptionArrayOutput() SubscriptionArrayOutput ToSubscriptionArrayOutputWithContext(context.Context) SubscriptionArrayOutput }
SubscriptionArrayInput is an input type that accepts SubscriptionArray and SubscriptionArrayOutput values. You can construct a concrete instance of `SubscriptionArrayInput` via:
SubscriptionArray{ SubscriptionArgs{...} }
type SubscriptionArrayOutput ¶
type SubscriptionArrayOutput struct{ *pulumi.OutputState }
func (SubscriptionArrayOutput) ElementType ¶
func (SubscriptionArrayOutput) ElementType() reflect.Type
func (SubscriptionArrayOutput) Index ¶
func (o SubscriptionArrayOutput) Index(i pulumi.IntInput) SubscriptionOutput
func (SubscriptionArrayOutput) ToSubscriptionArrayOutput ¶
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutput() SubscriptionArrayOutput
func (SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext ¶
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput
type SubscriptionInput ¶
type SubscriptionInput interface { pulumi.Input ToSubscriptionOutput() SubscriptionOutput ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput }
type SubscriptionMap ¶
type SubscriptionMap map[string]SubscriptionInput
func (SubscriptionMap) ElementType ¶
func (SubscriptionMap) ElementType() reflect.Type
func (SubscriptionMap) ToSubscriptionMapOutput ¶
func (i SubscriptionMap) ToSubscriptionMapOutput() SubscriptionMapOutput
func (SubscriptionMap) ToSubscriptionMapOutputWithContext ¶
func (i SubscriptionMap) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput
type SubscriptionMapInput ¶
type SubscriptionMapInput interface { pulumi.Input ToSubscriptionMapOutput() SubscriptionMapOutput ToSubscriptionMapOutputWithContext(context.Context) SubscriptionMapOutput }
SubscriptionMapInput is an input type that accepts SubscriptionMap and SubscriptionMapOutput values. You can construct a concrete instance of `SubscriptionMapInput` via:
SubscriptionMap{ "key": SubscriptionArgs{...} }
type SubscriptionMapOutput ¶
type SubscriptionMapOutput struct{ *pulumi.OutputState }
func (SubscriptionMapOutput) ElementType ¶
func (SubscriptionMapOutput) ElementType() reflect.Type
func (SubscriptionMapOutput) MapIndex ¶
func (o SubscriptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionOutput
func (SubscriptionMapOutput) ToSubscriptionMapOutput ¶
func (o SubscriptionMapOutput) ToSubscriptionMapOutput() SubscriptionMapOutput
func (SubscriptionMapOutput) ToSubscriptionMapOutputWithContext ¶
func (o SubscriptionMapOutput) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput
type SubscriptionOutput ¶
type SubscriptionOutput struct{ *pulumi.OutputState }
func (SubscriptionOutput) ElementType ¶
func (SubscriptionOutput) ElementType() reflect.Type
func (SubscriptionOutput) Endpoint ¶
func (o SubscriptionOutput) Endpoint() pulumi.StringOutput
Message endpoint. Changing this parameter will create a new resource.
- **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 an mail address.
- **For an SMS message subscription**, the endpoint is a phone number, the format is \[+\]\[country code\]\[phone number\], e.g. +86185xxxx0000.
- **For a functionstage subscription**, the endpoint is a function urn.
- **For a functiongraph subscription**, the endpoint is a workflow ID.
func (SubscriptionOutput) Owner ¶
func (o SubscriptionOutput) Owner() pulumi.StringOutput
Project ID of the topic creator.
func (SubscriptionOutput) Protocol ¶
func (o SubscriptionOutput) Protocol() pulumi.StringOutput
Specifies the protocol of the message endpoint. Currently, email, sms, http, https, functionstage and functiongraph are supported. Changing this parameter will create a new resource.
func (SubscriptionOutput) Region ¶
func (o SubscriptionOutput) Region() pulumi.StringOutput
The region in which to create the SMN subscription resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
func (SubscriptionOutput) Remark ¶
func (o SubscriptionOutput) Remark() pulumi.StringPtrOutput
Remark information. The remarks must be a UTF-8-coded character string containing 128 bytes. Changing this parameter will create a new resource.
func (SubscriptionOutput) Status ¶
func (o SubscriptionOutput) Status() pulumi.IntOutput
Subscription status. + **0**: indicates that the subscription is not confirmed. + **1**: indicates that the subscription is confirmed. + **3**: indicates that the subscription is canceled.
func (SubscriptionOutput) SubscriptionUrn ¶
func (o SubscriptionOutput) SubscriptionUrn() pulumi.StringOutput
Resource identifier of a subscription, which is unique.
func (SubscriptionOutput) ToSubscriptionOutput ¶
func (o SubscriptionOutput) ToSubscriptionOutput() SubscriptionOutput
func (SubscriptionOutput) ToSubscriptionOutputWithContext ¶
func (o SubscriptionOutput) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
func (SubscriptionOutput) TopicUrn ¶
func (o SubscriptionOutput) TopicUrn() pulumi.StringOutput
Specifies the resource identifier of a topic, which is unique. Changing this parameter will create a new resource.
type SubscriptionState ¶
type SubscriptionState struct { // Message endpoint. Changing this parameter will create a new resource. // + **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 an mail address. // + **For an SMS message subscription**, the endpoint is a phone number, // the format is \[+\]\[country code\]\[phone number\], e.g. +86185xxxx0000. // + **For a functionstage subscription**, the endpoint is a function urn. // + **For a functiongraph subscription**, the endpoint is a workflow ID. Endpoint pulumi.StringPtrInput // Project ID of the topic creator. Owner pulumi.StringPtrInput // Specifies the protocol of the message endpoint. Currently, email, sms, http, // https, functionstage and functiongraph are supported. Changing this parameter will create a new resource. Protocol pulumi.StringPtrInput // The region in which to create the SMN subscription resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Remark information. The remarks must be a UTF-8-coded character string // containing 128 bytes. Changing this parameter will create a new resource. Remark pulumi.StringPtrInput // Subscription status. // + **0**: indicates that the subscription is not confirmed. // + **1**: indicates that the subscription is confirmed. // + **3**: indicates that the subscription is canceled. Status pulumi.IntPtrInput // Resource identifier of a subscription, which is unique. SubscriptionUrn pulumi.StringPtrInput // Specifies the resource identifier of a topic, which is unique. // Changing this parameter will create a new resource. TopicUrn pulumi.StringPtrInput }
func (SubscriptionState) ElementType ¶
func (SubscriptionState) ElementType() reflect.Type
type Topic ¶
type Topic struct { pulumi.CustomResourceState // Time when the topic was created. CreateTime pulumi.StringOutput `pulumi:"createTime"` // Specifies the topic display name, which is presented as the name of the email // sender in an email message. The name can contains of 0 to 192 characters. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // Specifies the enterprise project id of the SMN Topic, Value 0 // indicates the default enterprise project. Changing this parameter will create a new resource. EnterpriseProjectId pulumi.StringOutput `pulumi:"enterpriseProjectId"` // Specifies the introduction of the topic, // this will be contained in the subscription invitation. Introduction pulumi.StringPtrOutput `pulumi:"introduction"` // Specifies the name of the topic to be created. The name can contains of 1 to 255 // characters and must start with a letter or digit, and can only contain letters, digits, underscores (_), and hyphens (-). // Changing this parameter will create a new resource. Name pulumi.StringOutput `pulumi:"name"` // Message pushing policy. // + **0**: indicates that the message sending fails and the message is cached in the queue. // + **1**: indicates that the failed message is discarded. PushPolicy pulumi.IntOutput `pulumi:"pushPolicy"` // The region in which to create the SMN topic resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringOutput `pulumi:"region"` // Specifies the services that can publish messages to this topic // separated by comma(,). If left empty, that means no service allowed. ServicesPublishAllowed pulumi.StringPtrOutput `pulumi:"servicesPublishAllowed"` // Specifies the tags of the SMN topic, key/value pair format. Tags pulumi.StringMapOutput `pulumi:"tags"` // Resource identifier of a topic, which is unique. TopicUrn pulumi.StringOutput `pulumi:"topicUrn"` // Time when the topic was updated. UpdateTime pulumi.StringOutput `pulumi:"updateTime"` // Specifies the users who can publish messages to this topic. // The value can be **\*** which indicates all users or user account URNs separated by comma(,). The format of // user account URN is **urn:csp:iam::domainId:root**. **domainId** indicates the account ID of another user. // If left empty, that means only the topic creator can publish messages. UsersPublishAllowed pulumi.StringPtrOutput `pulumi:"usersPublishAllowed"` }
Manages an SMN topic resource within HuaweiCloud.
## Example Usage ### Basic Usage
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Smn" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := Smn.NewTopic(ctx, "topic1", &Smn.TopicArgs{ DisplayName: pulumi.String("The display name of topic_1"), }) if err != nil { return err } return nil }) }
``` ### Topic with policies
```go package main
import (
"github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Smn" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := Smn.NewTopic(ctx, "topic1", &Smn.TopicArgs{ DisplayName: pulumi.String("The display name of topic_1"), Introduction: pulumi.String("created by terraform"), ServicesPublishAllowed: pulumi.String("obs,vod,cce"), UsersPublishAllowed: pulumi.String("urn:csp:iam::0970d7b7d400f2470fbec00316a03560:root,urn:csp:iam::0970d7b7d400f2470fbec00316a03561:root"), }) if err != nil { return err } return nil }) }
```
## Import
SMN topic can be imported using the `id` (topic urn), e.g.
```sh
$ pulumi import huaweicloud:Smn/topic:Topic topic_1 urn:smn:cn-north-4:0970dd7a1300f5672ff2c003c60ae115:topic_1
```
func GetTopic ¶
func GetTopic(ctx *pulumi.Context, name string, id pulumi.IDInput, state *TopicState, opts ...pulumi.ResourceOption) (*Topic, error)
GetTopic gets an existing Topic resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewTopic ¶
func NewTopic(ctx *pulumi.Context, name string, args *TopicArgs, opts ...pulumi.ResourceOption) (*Topic, error)
NewTopic registers a new resource with the given unique name, arguments, and options.
func (*Topic) ElementType ¶
func (*Topic) ToTopicOutput ¶
func (i *Topic) ToTopicOutput() TopicOutput
func (*Topic) ToTopicOutputWithContext ¶
func (i *Topic) ToTopicOutputWithContext(ctx context.Context) TopicOutput
type TopicArgs ¶
type TopicArgs struct { // Specifies the topic display name, which is presented as the name of the email // sender in an email message. The name can contains of 0 to 192 characters. DisplayName pulumi.StringPtrInput // Specifies the enterprise project id of the SMN Topic, Value 0 // indicates the default enterprise project. Changing this parameter will create a new resource. EnterpriseProjectId pulumi.StringPtrInput // Specifies the introduction of the topic, // this will be contained in the subscription invitation. Introduction pulumi.StringPtrInput // Specifies the name of the topic to be created. The name can contains of 1 to 255 // characters and must start with a letter or digit, and can only contain letters, digits, underscores (_), and hyphens (-). // Changing this parameter will create a new resource. Name pulumi.StringPtrInput // The region in which to create the SMN topic resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Specifies the services that can publish messages to this topic // separated by comma(,). If left empty, that means no service allowed. ServicesPublishAllowed pulumi.StringPtrInput // Specifies the tags of the SMN topic, key/value pair format. Tags pulumi.StringMapInput // Specifies the users who can publish messages to this topic. // The value can be **\*** which indicates all users or user account URNs separated by comma(,). The format of // user account URN is **urn:csp:iam::domainId:root**. **domainId** indicates the account ID of another user. // If left empty, that means only the topic creator can publish messages. UsersPublishAllowed pulumi.StringPtrInput }
The set of arguments for constructing a Topic resource.
func (TopicArgs) ElementType ¶
type TopicArray ¶
type TopicArray []TopicInput
func (TopicArray) ElementType ¶
func (TopicArray) ElementType() reflect.Type
func (TopicArray) ToTopicArrayOutput ¶
func (i TopicArray) ToTopicArrayOutput() TopicArrayOutput
func (TopicArray) ToTopicArrayOutputWithContext ¶
func (i TopicArray) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput
type TopicArrayInput ¶
type TopicArrayInput interface { pulumi.Input ToTopicArrayOutput() TopicArrayOutput ToTopicArrayOutputWithContext(context.Context) TopicArrayOutput }
TopicArrayInput is an input type that accepts TopicArray and TopicArrayOutput values. You can construct a concrete instance of `TopicArrayInput` via:
TopicArray{ TopicArgs{...} }
type TopicArrayOutput ¶
type TopicArrayOutput struct{ *pulumi.OutputState }
func (TopicArrayOutput) ElementType ¶
func (TopicArrayOutput) ElementType() reflect.Type
func (TopicArrayOutput) Index ¶
func (o TopicArrayOutput) Index(i pulumi.IntInput) TopicOutput
func (TopicArrayOutput) ToTopicArrayOutput ¶
func (o TopicArrayOutput) ToTopicArrayOutput() TopicArrayOutput
func (TopicArrayOutput) ToTopicArrayOutputWithContext ¶
func (o TopicArrayOutput) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput
type TopicInput ¶
type TopicInput interface { pulumi.Input ToTopicOutput() TopicOutput ToTopicOutputWithContext(ctx context.Context) TopicOutput }
type TopicMap ¶
type TopicMap map[string]TopicInput
func (TopicMap) ElementType ¶
func (TopicMap) ToTopicMapOutput ¶
func (i TopicMap) ToTopicMapOutput() TopicMapOutput
func (TopicMap) ToTopicMapOutputWithContext ¶
func (i TopicMap) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput
type TopicMapInput ¶
type TopicMapInput interface { pulumi.Input ToTopicMapOutput() TopicMapOutput ToTopicMapOutputWithContext(context.Context) TopicMapOutput }
TopicMapInput is an input type that accepts TopicMap and TopicMapOutput values. You can construct a concrete instance of `TopicMapInput` via:
TopicMap{ "key": TopicArgs{...} }
type TopicMapOutput ¶
type TopicMapOutput struct{ *pulumi.OutputState }
func (TopicMapOutput) ElementType ¶
func (TopicMapOutput) ElementType() reflect.Type
func (TopicMapOutput) MapIndex ¶
func (o TopicMapOutput) MapIndex(k pulumi.StringInput) TopicOutput
func (TopicMapOutput) ToTopicMapOutput ¶
func (o TopicMapOutput) ToTopicMapOutput() TopicMapOutput
func (TopicMapOutput) ToTopicMapOutputWithContext ¶
func (o TopicMapOutput) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput
type TopicOutput ¶
type TopicOutput struct{ *pulumi.OutputState }
func (TopicOutput) CreateTime ¶
func (o TopicOutput) CreateTime() pulumi.StringOutput
Time when the topic was created.
func (TopicOutput) DisplayName ¶
func (o TopicOutput) DisplayName() pulumi.StringPtrOutput
Specifies the topic display name, which is presented as the name of the email sender in an email message. The name can contains of 0 to 192 characters.
func (TopicOutput) ElementType ¶
func (TopicOutput) ElementType() reflect.Type
func (TopicOutput) EnterpriseProjectId ¶
func (o TopicOutput) EnterpriseProjectId() pulumi.StringOutput
Specifies the enterprise project id of the SMN Topic, Value 0 indicates the default enterprise project. Changing this parameter will create a new resource.
func (TopicOutput) Introduction ¶ added in v0.0.8
func (o TopicOutput) Introduction() pulumi.StringPtrOutput
Specifies the introduction of the topic, this will be contained in the subscription invitation.
func (TopicOutput) Name ¶
func (o TopicOutput) Name() pulumi.StringOutput
Specifies the name of the topic to be created. The name can contains of 1 to 255 characters and must start with a letter or digit, and can only contain letters, digits, underscores (_), and hyphens (-). Changing this parameter will create a new resource.
func (TopicOutput) PushPolicy ¶
func (o TopicOutput) PushPolicy() pulumi.IntOutput
Message pushing policy. + **0**: indicates that the message sending fails and the message is cached in the queue. + **1**: indicates that the failed message is discarded.
func (TopicOutput) Region ¶
func (o TopicOutput) Region() pulumi.StringOutput
The region in which to create the SMN topic resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
func (TopicOutput) ServicesPublishAllowed ¶ added in v0.0.8
func (o TopicOutput) ServicesPublishAllowed() pulumi.StringPtrOutput
Specifies the services that can publish messages to this topic separated by comma(,). If left empty, that means no service allowed.
func (TopicOutput) Tags ¶
func (o TopicOutput) Tags() pulumi.StringMapOutput
Specifies the tags of the SMN topic, key/value pair format.
func (TopicOutput) ToTopicOutput ¶
func (o TopicOutput) ToTopicOutput() TopicOutput
func (TopicOutput) ToTopicOutputWithContext ¶
func (o TopicOutput) ToTopicOutputWithContext(ctx context.Context) TopicOutput
func (TopicOutput) TopicUrn ¶
func (o TopicOutput) TopicUrn() pulumi.StringOutput
Resource identifier of a topic, which is unique.
func (TopicOutput) UpdateTime ¶
func (o TopicOutput) UpdateTime() pulumi.StringOutput
Time when the topic was updated.
func (TopicOutput) UsersPublishAllowed ¶ added in v0.0.8
func (o TopicOutput) UsersPublishAllowed() pulumi.StringPtrOutput
Specifies the users who can publish messages to this topic. The value can be **\*** which indicates all users or user account URNs separated by comma(,). The format of user account URN is **urn:csp:iam::domainId:root**. **domainId** indicates the account ID of another user. If left empty, that means only the topic creator can publish messages.
type TopicState ¶
type TopicState struct { // Time when the topic was created. CreateTime pulumi.StringPtrInput // Specifies the topic display name, which is presented as the name of the email // sender in an email message. The name can contains of 0 to 192 characters. DisplayName pulumi.StringPtrInput // Specifies the enterprise project id of the SMN Topic, Value 0 // indicates the default enterprise project. Changing this parameter will create a new resource. EnterpriseProjectId pulumi.StringPtrInput // Specifies the introduction of the topic, // this will be contained in the subscription invitation. Introduction pulumi.StringPtrInput // Specifies the name of the topic to be created. The name can contains of 1 to 255 // characters and must start with a letter or digit, and can only contain letters, digits, underscores (_), and hyphens (-). // Changing this parameter will create a new resource. Name pulumi.StringPtrInput // Message pushing policy. // + **0**: indicates that the message sending fails and the message is cached in the queue. // + **1**: indicates that the failed message is discarded. PushPolicy pulumi.IntPtrInput // The region in which to create the SMN topic resource. If omitted, the // provider-level region will be used. Changing this parameter will create a new resource. Region pulumi.StringPtrInput // Specifies the services that can publish messages to this topic // separated by comma(,). If left empty, that means no service allowed. ServicesPublishAllowed pulumi.StringPtrInput // Specifies the tags of the SMN topic, key/value pair format. Tags pulumi.StringMapInput // Resource identifier of a topic, which is unique. TopicUrn pulumi.StringPtrInput // Time when the topic was updated. UpdateTime pulumi.StringPtrInput // Specifies the users who can publish messages to this topic. // The value can be **\*** which indicates all users or user account URNs separated by comma(,). The format of // user account URN is **urn:csp:iam::domainId:root**. **domainId** indicates the account ID of another user. // If left empty, that means only the topic creator can publish messages. UsersPublishAllowed pulumi.StringPtrInput }
func (TopicState) ElementType ¶
func (TopicState) ElementType() reflect.Type