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,
});
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)
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
})
}
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,
});
});
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());
}
}
configuration:
kafkaInstanceId:
type: dynamic
resources:
topic:
type: flexibleengine:DmsKafkaTopic
properties:
instanceId: ${kafkaInstanceId}
partitions: 20
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 string
- The unique name of the resource.
- args DmsKafkaTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args DmsKafkaTopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DmsKafkaTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
});
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),
})
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());
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)
const dmsKafkaTopicResource = new flexibleengine.DmsKafkaTopic("dmsKafkaTopicResource", {
instanceId: "string",
agingTime: 0,
dmsKafkaTopicId: "string",
name: "string",
partitions: 0,
region: "string",
replicas: 0,
syncFlushing: false,
syncReplication: false,
});
type: flexibleengine:DmsKafkaTopic
properties:
agingTime: 0
dmsKafkaTopicId: string
instanceId: string
name: string
partitions: 0
region: string
replicas: 0
syncFlushing: false
syncReplication: false
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:
- Instance
Id string - Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
- Aging
Time double - 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 stringTopic Id - 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.
- 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.
- Instance
Id string - Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
- Aging
Time float64 - 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 stringTopic Id - 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.
- 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.
- instance
Id String - Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
- aging
Time Double - 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 StringTopic Id - 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.
- sync
Flushing Boolean - Whether or not to enable synchronous flushing. Changing this creates a new resource.
- sync
Replication Boolean - Whether or not to enable synchronous replication. Changing this creates a new resource.
- instance
Id string - Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
- aging
Time number - 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 stringTopic Id - 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.
- sync
Flushing boolean - Whether or not to enable synchronous flushing. Changing this creates a new resource.
- sync
Replication boolean - Whether or not to enable synchronous replication. Changing this creates a new resource.
- instance_
id 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_ strtopic_ id - 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.
- instance
Id String - Specifies the ID of the DMS Kafka instance to which the topic belongs. Changing this creates a new resource.
- aging
Time Number - 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 StringTopic Id - 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.
- sync
Flushing Boolean - Whether or not to enable synchronous flushing. Changing this creates a new resource.
- sync
Replication 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Aging
Time double - 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 stringTopic Id - The resource ID which equals to the topic name.
- Instance
Id 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.
- 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.
- Aging
Time float64 - 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 stringTopic Id - The resource ID which equals to the topic name.
- Instance
Id 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.
- 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.
- aging
Time Double - 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 StringTopic Id - The resource ID which equals to the topic name.
- instance
Id 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.
- sync
Flushing Boolean - Whether or not to enable synchronous flushing. Changing this creates a new resource.
- sync
Replication Boolean - Whether or not to enable synchronous replication. Changing this creates a new resource.
- aging
Time number - 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 stringTopic Id - The resource ID which equals to the topic name.
- instance
Id 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.
- sync
Flushing boolean - Whether or not to enable synchronous flushing. Changing this creates a new resource.
- sync
Replication 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_ strtopic_ id - 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.
- aging
Time Number - 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 StringTopic Id - The resource ID which equals to the topic name.
- instance
Id 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.
- sync
Flushing Boolean - Whether or not to enable synchronous flushing. Changing this creates a new resource.
- sync
Replication 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
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.