SubscriptionArgs

data class SubscriptionArgs(val comment: Output<String>? = null, val projectName: Output<String>? = null, val topicName: Output<String>? = null) : ConvertibleToJava<SubscriptionArgs>

The subscription is the basic unit of resource usage in Datahub Service under Publish/Subscribe model. You can manage the relationships between user and topics by using subscriptions. Refer to details.

NOTE: Available since v1.19.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.datahub.Project;
import com.pulumi.alicloud.datahub.ProjectArgs;
import com.pulumi.alicloud.datahub.Topic;
import com.pulumi.alicloud.datahub.TopicArgs;
import com.pulumi.alicloud.datahub.Subscription;
import com.pulumi.alicloud.datahub.SubscriptionArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform_example");
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.comment("created by terraform")
.build());
var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()
.projectName(exampleProject.name())
.recordType("BLOB")
.shardCount(3)
.lifeCycle(7)
.comment("created by terraform")
.build());
var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
.projectName(exampleProject.name())
.topicName(exampleTopic.name())
.comment("created by terraform")
.build());
}
}

Import

Datahub subscription can be imported using the ID, e.g.

$ pulumi import alicloud:datahub/subscription:Subscription example tf_datahub_project:tf_datahub_topic:1539073399567UgCzY

Constructors

Link copied to clipboard
fun SubscriptionArgs(comment: Output<String>? = null, projectName: Output<String>? = null, topicName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SubscriptionArgs

Properties

Link copied to clipboard
val comment: Output<String>? = null

Comment of the datahub subscription. It cannot be longer than 255 characters.

Link copied to clipboard
val projectName: Output<String>? = null

The name of the datahub project that the subscription belongs to. Its length is limited to 3-32 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.

Link copied to clipboard
val topicName: Output<String>? = null

The name of the datahub topic that the subscription belongs to. Its length is limited to 1-128 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.