@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
253 lines (252 loc) • 10 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages an SMN topic resource within HuaweiCloud.
*
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const topic1 = new huaweicloud.Smn.Topic("topic_1", {
* displayName: "The display name of topic_1",
* });
* ```
* ### Topic with policies
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const topic1 = new huaweicloud.Smn.Topic("topic_1", {
* displayName: "The display name of topic_1",
* introduction: "created by terraform",
* servicesPublishAllowed: "obs,vod,cce",
* usersPublishAllowed: "urn:csp:iam::0970d7b7d400f2470fbec00316a03560:root,urn:csp:iam::0970d7b7d400f2470fbec00316a03561:root",
* });
* ```
*
* ## Import
*
* SMN topic can be imported using the `id` (topic urn), e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Smn/topic:Topic topic_1 urn:smn:cn-north-4:0970dd7a1300f5672ff2c003c60ae115:topic_1
* ```
*/
export declare class Topic extends pulumi.CustomResource {
/**
* Get an existing Topic 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?: TopicState, opts?: pulumi.CustomResourceOptions): Topic;
/**
* Returns true if the given object is an instance of Topic. 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 Topic;
/**
* schema: Internal
*/
readonly accessPolicy: pulumi.Output<string | undefined>;
/**
* Time when the topic was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* 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.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* Specifies the enterprise project id of the SMN Topic, Value 0
* indicates the default enterprise project. Changing this parameter will create a new resource.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Specifies the introduction of the topic,
* this will be contained in the subscription invitation.
*/
readonly introduction: pulumi.Output<string | undefined>;
/**
* 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.
*/
readonly name: pulumi.Output<string>;
/**
* 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.
*/
readonly pushPolicy: pulumi.Output<number>;
/**
* 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.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the services that can publish messages to this topic
* separated by comma(,). If left empty, that means no service allowed.
*/
readonly servicesPublishAllowed: pulumi.Output<string | undefined>;
/**
* Specifies the tags of the SMN topic, key/value pair format.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Resource identifier of a topic, which is unique.
*/
readonly topicUrn: pulumi.Output<string>;
/**
* Time when the topic was updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* 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.
*/
readonly usersPublishAllowed: pulumi.Output<string | undefined>;
/**
* Create a Topic 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.
*/
constructor(name: string, args?: TopicArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Topic resources.
*/
export interface TopicState {
/**
* schema: Internal
*/
accessPolicy?: pulumi.Input<string>;
/**
* Time when the topic was created.
*/
createTime?: pulumi.Input<string>;
/**
* 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.Input<string>;
/**
* 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.Input<string>;
/**
* Specifies the introduction of the topic,
* this will be contained in the subscription invitation.
*/
introduction?: pulumi.Input<string>;
/**
* 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.Input<string>;
/**
* 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.Input<number>;
/**
* 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.Input<string>;
/**
* Specifies the services that can publish messages to this topic
* separated by comma(,). If left empty, that means no service allowed.
*/
servicesPublishAllowed?: pulumi.Input<string>;
/**
* Specifies the tags of the SMN topic, key/value pair format.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Resource identifier of a topic, which is unique.
*/
topicUrn?: pulumi.Input<string>;
/**
* Time when the topic was updated.
*/
updateTime?: pulumi.Input<string>;
/**
* 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.Input<string>;
}
/**
* The set of arguments for constructing a Topic resource.
*/
export interface TopicArgs {
/**
* schema: Internal
*/
accessPolicy?: pulumi.Input<string>;
/**
* 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.Input<string>;
/**
* 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.Input<string>;
/**
* Specifies the introduction of the topic,
* this will be contained in the subscription invitation.
*/
introduction?: pulumi.Input<string>;
/**
* 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.Input<string>;
/**
* 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.Input<string>;
/**
* Specifies the services that can publish messages to this topic
* separated by comma(,). If left empty, that means no service allowed.
*/
servicesPublishAllowed?: pulumi.Input<string>;
/**
* Specifies the tags of the SMN topic, key/value pair format.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* 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.Input<string>;
}