UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

231 lines (230 loc) 7.78 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * Manages a DMS kafka topic resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const kafkaInstanceId = config.requireObject("kafkaInstanceId"); * const topic = new huaweicloud.dms.KafkaTopic("topic", { * instanceId: kafkaInstanceId, * partitions: 20, * }); * ``` * * ## Import * * DMS kafka topics can be imported using the kafka instance ID and topic name separated by a slash, e.g. * * ```sh * $ pulumi import huaweicloud:Dms/kafkaTopic:KafkaTopic topic c8057fe5-23a8-46ef-ad83-c0055b4e0c5c/topic_1 * ``` */ export declare class KafkaTopic extends pulumi.CustomResource { /** * Get an existing KafkaTopic 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?: KafkaTopicState, opts?: pulumi.CustomResourceOptions): KafkaTopic; /** * Returns true if the given object is an instance of KafkaTopic. 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 KafkaTopic; /** * Specifies the aging time in hours. * The value ranges from `1` to `720` and defaults to `72`. */ readonly agingTime: pulumi.Output<number>; /** * Specifies the other topic configurations. */ readonly configs: pulumi.Output<outputs.Dms.KafkaTopicConfig[]>; /** * Indicates the topic create time. */ readonly createdAt: pulumi.Output<string>; /** * Specifies the description of topic. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies the ID of the DMS kafka instance to which the topic belongs. * Changing this creates a new resource. */ readonly instanceId: pulumi.Output<string>; /** * Specifies the configuration name. */ readonly name: pulumi.Output<string>; /** * Specifies the integers list of brokers for new partitions. */ readonly newPartitionBrokers: pulumi.Output<number[] | undefined>; /** * Specifies the partition number. The value ranges from `1` to `200`. */ readonly partitions: pulumi.Output<number>; /** * Indicates whether this policy is the default policy. */ readonly policiesOnly: pulumi.Output<boolean>; /** * The region in which to create the DMS kafka topic resource. If omitted, the * provider-level region will be used. Changing this creates a new resource. */ readonly region: pulumi.Output<string>; /** * Specifies the replica number. * The value ranges from `1` to `3` and defaults to `3`. Changing this creates a new resource. */ readonly replicas: pulumi.Output<number>; /** * Whether or not to enable synchronous flushing. */ readonly syncFlushing: pulumi.Output<boolean>; /** * Whether or not to enable synchronous replication. */ readonly syncReplication: pulumi.Output<boolean>; /** * Indicates the topic type. */ readonly type: pulumi.Output<string>; /** * Create a KafkaTopic 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: KafkaTopicArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering KafkaTopic resources. */ export interface KafkaTopicState { /** * Specifies the aging time in hours. * The value ranges from `1` to `720` and defaults to `72`. */ agingTime?: pulumi.Input<number>; /** * Specifies the other topic configurations. */ configs?: pulumi.Input<pulumi.Input<inputs.Dms.KafkaTopicConfig>[]>; /** * Indicates the topic create time. */ createdAt?: pulumi.Input<string>; /** * Specifies the description of topic. */ description?: pulumi.Input<string>; /** * Specifies the ID of the DMS kafka instance to which the topic belongs. * Changing this creates a new resource. */ instanceId?: pulumi.Input<string>; /** * Specifies the configuration name. */ name?: pulumi.Input<string>; /** * Specifies the integers list of brokers for new partitions. */ newPartitionBrokers?: pulumi.Input<pulumi.Input<number>[]>; /** * Specifies the partition number. The value ranges from `1` to `200`. */ partitions?: pulumi.Input<number>; /** * Indicates whether this policy is the default policy. */ policiesOnly?: pulumi.Input<boolean>; /** * The region in which to create the DMS kafka topic resource. If omitted, the * provider-level region will be used. Changing this creates a new resource. */ region?: pulumi.Input<string>; /** * Specifies the replica number. * The value ranges from `1` to `3` and defaults to `3`. Changing this creates a new resource. */ replicas?: pulumi.Input<number>; /** * Whether or not to enable synchronous flushing. */ syncFlushing?: pulumi.Input<boolean>; /** * Whether or not to enable synchronous replication. */ syncReplication?: pulumi.Input<boolean>; /** * Indicates the topic type. */ type?: pulumi.Input<string>; } /** * The set of arguments for constructing a KafkaTopic resource. */ export interface KafkaTopicArgs { /** * Specifies the aging time in hours. * The value ranges from `1` to `720` and defaults to `72`. */ agingTime?: pulumi.Input<number>; /** * Specifies the other topic configurations. */ configs?: pulumi.Input<pulumi.Input<inputs.Dms.KafkaTopicConfig>[]>; /** * Specifies the description of topic. */ description?: pulumi.Input<string>; /** * Specifies the ID of the DMS kafka instance to which the topic belongs. * Changing this creates a new resource. */ instanceId: pulumi.Input<string>; /** * Specifies the configuration name. */ name?: pulumi.Input<string>; /** * Specifies the integers list of brokers for new partitions. */ newPartitionBrokers?: pulumi.Input<pulumi.Input<number>[]>; /** * Specifies the partition number. The value ranges from `1` to `200`. */ partitions: pulumi.Input<number>; /** * The region in which to create the DMS kafka topic resource. If omitted, the * provider-level region will be used. Changing this creates a new resource. */ region?: pulumi.Input<string>; /** * Specifies the replica number. * The value ranges from `1` to `3` and defaults to `3`. Changing this creates a new resource. */ replicas?: pulumi.Input<number>; /** * Whether or not to enable synchronous flushing. */ syncFlushing?: pulumi.Input<boolean>; /** * Whether or not to enable synchronous replication. */ syncReplication?: pulumi.Input<boolean>; }