1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. DmsKafkaTopic
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.DmsKafkaTopic

Explore with Pulumi AI

Manages a DMS Kafka topic resource within FlexibleEngine.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const config = new pulumi.Config();
const kafkaInstanceId = config.requireObject("kafkaInstanceId");
const topic = new flexibleengine.DmsKafkaTopic("topic", {
    instanceId: kafkaInstanceId,
    partitions: 20,
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

config = pulumi.Config()
kafka_instance_id = config.require_object("kafkaInstanceId")
topic = flexibleengine.DmsKafkaTopic("topic",
    instance_id=kafka_instance_id,
    partitions=20)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
	"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, "")
		kafkaInstanceId := cfg.RequireObject("kafkaInstanceId")
		_, err := flexibleengine.NewDmsKafkaTopic(ctx, "topic", &flexibleengine.DmsKafkaTopicArgs{
			InstanceId: pulumi.Any(kafkaInstanceId),
			Partitions: pulumi.Float64(20),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var kafkaInstanceId = config.RequireObject<dynamic>("kafkaInstanceId");
    var topic = new Flexibleengine.DmsKafkaTopic("topic", new()
    {
        InstanceId = kafkaInstanceId,
        Partitions = 20,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.DmsKafkaTopic;
import com.pulumi.flexibleengine.DmsKafkaTopicArgs;
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 kafkaInstanceId = config.get("kafkaInstanceId");
        var topic = new DmsKafkaTopic("topic", DmsKafkaTopicArgs.builder()
            .instanceId(kafkaInstanceId)
            .partitions(20)
            .build());

    }
}
Copy
configuration:
  kafkaInstanceId:
    type: dynamic
resources:
  topic:
    type: flexibleengine:DmsKafkaTopic
    properties:
      instanceId: ${kafkaInstanceId}
      partitions: 20
Copy

Create DmsKafkaTopic Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DmsKafkaTopic(name: string, args: DmsKafkaTopicArgs, opts?: CustomResourceOptions);
@overload
def DmsKafkaTopic(resource_name: str,
                  args: DmsKafkaTopicArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def DmsKafkaTopic(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  instance_id: Optional[str] = None,
                  aging_time: Optional[float] = None,
                  dms_kafka_topic_id: Optional[str] = None,
                  name: Optional[str] = None,
                  partitions: Optional[float] = None,
                  region: Optional[str] = None,
                  replicas: Optional[float] = None,
                  sync_flushing: Optional[bool] = None,
                  sync_replication: Optional[bool] = None)
func NewDmsKafkaTopic(ctx *Context, name string, args DmsKafkaTopicArgs, opts ...ResourceOption) (*DmsKafkaTopic, error)
public DmsKafkaTopic(string name, DmsKafkaTopicArgs args, CustomResourceOptions? opts = null)
public DmsKafkaTopic(String name, DmsKafkaTopicArgs args)
public DmsKafkaTopic(String name, DmsKafkaTopicArgs args, CustomResourceOptions options)
type: flexibleengine:DmsKafkaTopic
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DmsKafkaTopicArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DmsKafkaTopicArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DmsKafkaTopicArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DmsKafkaTopicArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DmsKafkaTopicArgs
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 dmsKafkaTopicResource = new Flexibleengine.DmsKafkaTopic("dmsKafkaTopicResource", new()
{
    InstanceId = "string",
    AgingTime = 0,
    DmsKafkaTopicId = "string",
    Name = "string",
    Partitions = 0,
    Region = "string",
    Replicas = 0,
    SyncFlushing = false,
    SyncReplication = false,
});
Copy
example, err := flexibleengine.NewDmsKafkaTopic(ctx, "dmsKafkaTopicResource", &flexibleengine.DmsKafkaTopicArgs{
InstanceId: pulumi.String("string"),
AgingTime: pulumi.Float64(0),
DmsKafkaTopicId: pulumi.String("string"),
Name: pulumi.String("string"),
Partitions: pulumi.Float64(0),
Region: pulumi.String("string"),
Replicas: pulumi.Float64(0),
SyncFlushing: pulumi.Bool(false),
SyncReplication: pulumi.Bool(false),
})
Copy
var dmsKafkaTopicResource = new DmsKafkaTopic("dmsKafkaTopicResource", DmsKafkaTopicArgs.builder()
    .instanceId("string")
    .agingTime(0)
    .dmsKafkaTopicId("string")
    .name("string")
    .partitions(0)
    .region("string")
    .replicas(0)
    .syncFlushing(false)
    .syncReplication(false)
    .build());
Copy
dms_kafka_topic_resource = flexibleengine.DmsKafkaTopic("dmsKafkaTopicResource",
    instance_id="string",
    aging_time=0,
    dms_kafka_topic_id="string",
    name="string",
    partitions=0,
    region="string",
    replicas=0,
    sync_flushing=False,
    sync_replication=False)
Copy
const dmsKafkaTopicResource = new flexibleengine.DmsKafkaTopic("dmsKafkaTopicResource", {
    instanceId: "string",
    agingTime: 0,
    dmsKafkaTopicId: "string",
    name: "string",
    partitions: 0,
    region: "string",
    replicas: 0,
    syncFlushing: false,
    syncReplication: false,
});
Copy
type: flexibleengine:DmsKafkaTopic
properties:
    agingTime: 0
    dmsKafkaTopicId: string
    instanceId: string
    name: string
    partitions: 0
    region: string
    replicas: 0
    syncFlushing: false
    syncReplication: false
Copy

DmsKafkaTopic 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 DmsKafkaTopic resource accepts the following input properties:

InstanceId This property is required. string
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
AgingTime double
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
DmsKafkaTopicId string
The resource ID which equals to the topic name.
Name string
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
Partitions double
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
Region string
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.
Replicas double
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
SyncFlushing bool
Whether or not to enable synchronous flushing. Changing this creates a new resource.
SyncReplication bool
Whether or not to enable synchronous replication. Changing this creates a new resource.
InstanceId This property is required. string
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
AgingTime float64
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
DmsKafkaTopicId string
The resource ID which equals to the topic name.
Name string
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
Partitions float64
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
Region string
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.
Replicas float64
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
SyncFlushing bool
Whether or not to enable synchronous flushing. Changing this creates a new resource.
SyncReplication bool
Whether or not to enable synchronous replication. Changing this creates a new resource.
instanceId This property is required. String
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
agingTime Double
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
dmsKafkaTopicId String
The resource ID which equals to the topic name.
name String
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
partitions Double
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
region String
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.
replicas Double
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
syncFlushing Boolean
Whether or not to enable synchronous flushing. Changing this creates a new resource.
syncReplication Boolean
Whether or not to enable synchronous replication. Changing this creates a new resource.
instanceId This property is required. string
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
agingTime number
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
dmsKafkaTopicId string
The resource ID which equals to the topic name.
name string
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
partitions number
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
region string
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.
replicas number
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
syncFlushing boolean
Whether or not to enable synchronous flushing. Changing this creates a new resource.
syncReplication boolean
Whether or not to enable synchronous replication. Changing this creates a new resource.
instance_id This property is required. str
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
aging_time float
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
dms_kafka_topic_id str
The resource ID which equals to the topic name.
name str
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
partitions float
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
region str
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.
replicas float
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
sync_flushing bool
Whether or not to enable synchronous flushing. Changing this creates a new resource.
sync_replication bool
Whether or not to enable synchronous replication. Changing this creates a new resource.
instanceId This property is required. String
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
agingTime Number
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
dmsKafkaTopicId String
The resource ID which equals to the topic name.
name String
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
partitions Number
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
region String
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.
replicas Number
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
syncFlushing Boolean
Whether or not to enable synchronous flushing. Changing this creates a new resource.
syncReplication Boolean
Whether or not to enable synchronous replication. Changing this creates a new resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the DmsKafkaTopic resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DmsKafkaTopic Resource

Get an existing DmsKafkaTopic 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?: DmsKafkaTopicState, opts?: CustomResourceOptions): DmsKafkaTopic
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        aging_time: Optional[float] = None,
        dms_kafka_topic_id: Optional[str] = None,
        instance_id: Optional[str] = None,
        name: Optional[str] = None,
        partitions: Optional[float] = None,
        region: Optional[str] = None,
        replicas: Optional[float] = None,
        sync_flushing: Optional[bool] = None,
        sync_replication: Optional[bool] = None) -> DmsKafkaTopic
func GetDmsKafkaTopic(ctx *Context, name string, id IDInput, state *DmsKafkaTopicState, opts ...ResourceOption) (*DmsKafkaTopic, error)
public static DmsKafkaTopic Get(string name, Input<string> id, DmsKafkaTopicState? state, CustomResourceOptions? opts = null)
public static DmsKafkaTopic get(String name, Output<String> id, DmsKafkaTopicState state, CustomResourceOptions options)
resources:  _:    type: flexibleengine:DmsKafkaTopic    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AgingTime double
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
DmsKafkaTopicId string
The resource ID which equals to the topic name.
InstanceId string
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
Name string
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
Partitions double
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
Region string
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.
Replicas double
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
SyncFlushing bool
Whether or not to enable synchronous flushing. Changing this creates a new resource.
SyncReplication bool
Whether or not to enable synchronous replication. Changing this creates a new resource.
AgingTime float64
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
DmsKafkaTopicId string
The resource ID which equals to the topic name.
InstanceId string
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
Name string
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
Partitions float64
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
Region string
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.
Replicas float64
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
SyncFlushing bool
Whether or not to enable synchronous flushing. Changing this creates a new resource.
SyncReplication bool
Whether or not to enable synchronous replication. Changing this creates a new resource.
agingTime Double
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
dmsKafkaTopicId String
The resource ID which equals to the topic name.
instanceId String
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
name String
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
partitions Double
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
region String
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.
replicas Double
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
syncFlushing Boolean
Whether or not to enable synchronous flushing. Changing this creates a new resource.
syncReplication Boolean
Whether or not to enable synchronous replication. Changing this creates a new resource.
agingTime number
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
dmsKafkaTopicId string
The resource ID which equals to the topic name.
instanceId string
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
name string
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
partitions number
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
region string
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.
replicas number
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
syncFlushing boolean
Whether or not to enable synchronous flushing. Changing this creates a new resource.
syncReplication boolean
Whether or not to enable synchronous replication. Changing this creates a new resource.
aging_time float
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
dms_kafka_topic_id str
The resource ID which equals to the topic name.
instance_id str
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
name str
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
partitions float
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
region str
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.
replicas float
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
sync_flushing bool
Whether or not to enable synchronous flushing. Changing this creates a new resource.
sync_replication bool
Whether or not to enable synchronous replication. Changing this creates a new resource.
agingTime Number
Specifies the aging time in hours. The value ranges from 1 to 720 and defaults to 72. Changing this creates a new resource.
dmsKafkaTopicId String
The resource ID which equals to the topic name.
instanceId String
Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
name String
Specifies the name of the topic. The name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, hyphens (-) and underscores (_). Changing this creates a new resource.
partitions Number
Specifies the partition number. The value ranges from 1 to 50 and defaults to 3. Changing this creates a new resource.
region String
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.
replicas Number
Specifies the replica number. The value ranges from 1 to 3 and defaults to 3. Changing this creates a new resource.
syncFlushing Boolean
Whether or not to enable synchronous flushing. Changing this creates a new resource.
syncReplication Boolean
Whether or not to enable synchronous replication. Changing this creates a new resource.

Import

DMS Kafka topics can be imported using the Kafka instance ID and topic name separated by a slash, e.g.:

$ pulumi import flexibleengine:index/dmsKafkaTopic:DmsKafkaTopic topic c8057fe5-23a8-46ef-ad83-c0055b4e0c5c/topic_1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
License
Notes
This Pulumi package is based on the flexibleengine Terraform Provider.