1. Packages
  2. Astra DB
  3. API Docs
  4. Cdc
Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse

astra.Cdc

Explore with Pulumi AI

astra logo
Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse

    astra.Cdc enables cdc for an Astra Serverless table.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Astra = Pulumiverse.Astra;
    
    return await Deployment.RunAsync(() => 
    {
        var streamingTenant_1 = new Astra.StreamingTenant("streamingTenant-1", new()
        {
            TenantName = "terraformtest",
            Topic = "terraformtest",
            Region = "useast-4",
            CloudProvider = "gcp",
            UserEmail = "seb@datastax.com",
        });
    
        var cdc_1 = new Astra.Cdc("cdc-1", new()
        {
            DatabaseId = "5b70892f-e01a-4595-98e6-19ecc9985d50",
            DatabaseName = "sai_test",
            Table = "test",
            Keyspace = "sai_test",
            TopicPartitions = 3,
            TenantName = streamingTenant_1.TenantName,
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                streamingTenant_1,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-astra/sdk/go/astra"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := astra.NewStreamingTenant(ctx, "streamingTenant-1", &astra.StreamingTenantArgs{
    			TenantName:    pulumi.String("terraformtest"),
    			Topic:         pulumi.String("terraformtest"),
    			Region:        pulumi.String("useast-4"),
    			CloudProvider: pulumi.String("gcp"),
    			UserEmail:     pulumi.String("seb@datastax.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = astra.NewCdc(ctx, "cdc-1", &astra.CdcArgs{
    			DatabaseId:      pulumi.String("5b70892f-e01a-4595-98e6-19ecc9985d50"),
    			DatabaseName:    pulumi.String("sai_test"),
    			Table:           pulumi.String("test"),
    			Keyspace:        pulumi.String("sai_test"),
    			TopicPartitions: pulumi.Int(3),
    			TenantName:      streamingTenant_1.TenantName,
    		}, pulumi.DependsOn([]pulumi.Resource{
    			streamingTenant_1,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.astra.StreamingTenant;
    import com.pulumi.astra.StreamingTenantArgs;
    import com.pulumi.astra.Cdc;
    import com.pulumi.astra.CdcArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            var streamingTenant_1 = new StreamingTenant("streamingTenant-1", StreamingTenantArgs.builder()        
                .tenantName("terraformtest")
                .topic("terraformtest")
                .region("useast-4")
                .cloudProvider("gcp")
                .userEmail("seb@datastax.com")
                .build());
    
            var cdc_1 = new Cdc("cdc-1", CdcArgs.builder()        
                .databaseId("5b70892f-e01a-4595-98e6-19ecc9985d50")
                .databaseName("sai_test")
                .table("test")
                .keyspace("sai_test")
                .topicPartitions(3)
                .tenantName(streamingTenant_1.tenantName())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(streamingTenant_1)
                    .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_astra as astra
    
    streaming_tenant_1 = astra.StreamingTenant("streamingTenant-1",
        tenant_name="terraformtest",
        topic="terraformtest",
        region="useast-4",
        cloud_provider="gcp",
        user_email="seb@datastax.com")
    cdc_1 = astra.Cdc("cdc-1",
        database_id="5b70892f-e01a-4595-98e6-19ecc9985d50",
        database_name="sai_test",
        table="test",
        keyspace="sai_test",
        topic_partitions=3,
        tenant_name=streaming_tenant_1.tenant_name,
        opts=pulumi.ResourceOptions(depends_on=[streaming_tenant_1]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as astra from "@pulumiverse/astra";
    
    const streamingTenant_1 = new astra.StreamingTenant("streamingTenant-1", {
        tenantName: "terraformtest",
        topic: "terraformtest",
        region: "useast-4",
        cloudProvider: "gcp",
        userEmail: "seb@datastax.com",
    });
    const cdc_1 = new astra.Cdc("cdc-1", {
        databaseId: "5b70892f-e01a-4595-98e6-19ecc9985d50",
        databaseName: "sai_test",
        table: "test",
        keyspace: "sai_test",
        topicPartitions: 3,
        tenantName: streamingTenant_1.tenantName,
    }, {
        dependsOn: [streamingTenant_1],
    });
    
    resources:
      streamingTenant-1:
        type: astra:StreamingTenant
        properties:
          tenantName: terraformtest
          topic: terraformtest
          region: useast-4
          cloudProvider: gcp
          userEmail: seb@datastax.com
      cdc-1:
        type: astra:Cdc
        properties:
          databaseId: 5b70892f-e01a-4595-98e6-19ecc9985d50
          databaseName: sai_test
          table: test
          keyspace: sai_test
          topicPartitions: 3
          tenantName: ${["streamingTenant-1"].tenantName}
        options:
          dependson:
            - ${["streamingTenant-1"]}
    

    Create Cdc Resource

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

    Constructor syntax

    new Cdc(name: string, args: CdcArgs, opts?: CustomResourceOptions);
    @overload
    def Cdc(resource_name: str,
            args: CdcArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Cdc(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            database_id: Optional[str] = None,
            database_name: Optional[str] = None,
            keyspace: Optional[str] = None,
            table: Optional[str] = None,
            tenant_name: Optional[str] = None,
            topic_partitions: Optional[int] = None)
    func NewCdc(ctx *Context, name string, args CdcArgs, opts ...ResourceOption) (*Cdc, error)
    public Cdc(string name, CdcArgs args, CustomResourceOptions? opts = null)
    public Cdc(String name, CdcArgs args)
    public Cdc(String name, CdcArgs args, CustomResourceOptions options)
    
    type: astra:Cdc
    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 CdcArgs
    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 CdcArgs
    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 CdcArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CdcArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CdcArgs
    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 cdcResource = new Astra.Cdc("cdcResource", new()
    {
        DatabaseId = "string",
        DatabaseName = "string",
        Keyspace = "string",
        Table = "string",
        TenantName = "string",
        TopicPartitions = 0,
    });
    
    example, err := astra.NewCdc(ctx, "cdcResource", &astra.CdcArgs{
    	DatabaseId:      pulumi.String("string"),
    	DatabaseName:    pulumi.String("string"),
    	Keyspace:        pulumi.String("string"),
    	Table:           pulumi.String("string"),
    	TenantName:      pulumi.String("string"),
    	TopicPartitions: pulumi.Int(0),
    })
    
    var cdcResource = new Cdc("cdcResource", CdcArgs.builder()
        .databaseId("string")
        .databaseName("string")
        .keyspace("string")
        .table("string")
        .tenantName("string")
        .topicPartitions(0)
        .build());
    
    cdc_resource = astra.Cdc("cdcResource",
        database_id="string",
        database_name="string",
        keyspace="string",
        table="string",
        tenant_name="string",
        topic_partitions=0)
    
    const cdcResource = new astra.Cdc("cdcResource", {
        databaseId: "string",
        databaseName: "string",
        keyspace: "string",
        table: "string",
        tenantName: "string",
        topicPartitions: 0,
    });
    
    type: astra:Cdc
    properties:
        databaseId: string
        databaseName: string
        keyspace: string
        table: string
        tenantName: string
        topicPartitions: 0
    

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

    DatabaseId string
    Astra database to create the keyspace.
    DatabaseName string
    Astra database name.
    Keyspace string
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    Table string
    Astra database table.
    TenantName string
    Streaming tenant name
    TopicPartitions int
    Number of partitions in cdc topic.
    DatabaseId string
    Astra database to create the keyspace.
    DatabaseName string
    Astra database name.
    Keyspace string
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    Table string
    Astra database table.
    TenantName string
    Streaming tenant name
    TopicPartitions int
    Number of partitions in cdc topic.
    databaseId String
    Astra database to create the keyspace.
    databaseName String
    Astra database name.
    keyspace String
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    table String
    Astra database table.
    tenantName String
    Streaming tenant name
    topicPartitions Integer
    Number of partitions in cdc topic.
    databaseId string
    Astra database to create the keyspace.
    databaseName string
    Astra database name.
    keyspace string
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    table string
    Astra database table.
    tenantName string
    Streaming tenant name
    topicPartitions number
    Number of partitions in cdc topic.
    database_id str
    Astra database to create the keyspace.
    database_name str
    Astra database name.
    keyspace str
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    table str
    Astra database table.
    tenant_name str
    Streaming tenant name
    topic_partitions int
    Number of partitions in cdc topic.
    databaseId String
    Astra database to create the keyspace.
    databaseName String
    Astra database name.
    keyspace String
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    table String
    Astra database table.
    tenantName String
    Streaming tenant name
    topicPartitions Number
    Number of partitions in cdc topic.

    Outputs

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

    ConnectorStatus string
    Connector Status
    DataTopic string
    Data topic name
    Id string
    The provider-assigned unique ID for this managed resource.
    ConnectorStatus string
    Connector Status
    DataTopic string
    Data topic name
    Id string
    The provider-assigned unique ID for this managed resource.
    connectorStatus String
    Connector Status
    dataTopic String
    Data topic name
    id String
    The provider-assigned unique ID for this managed resource.
    connectorStatus string
    Connector Status
    dataTopic string
    Data topic name
    id string
    The provider-assigned unique ID for this managed resource.
    connector_status str
    Connector Status
    data_topic str
    Data topic name
    id str
    The provider-assigned unique ID for this managed resource.
    connectorStatus String
    Connector Status
    dataTopic String
    Data topic name
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Cdc Resource

    Get an existing Cdc 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?: CdcState, opts?: CustomResourceOptions): Cdc
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connector_status: Optional[str] = None,
            data_topic: Optional[str] = None,
            database_id: Optional[str] = None,
            database_name: Optional[str] = None,
            keyspace: Optional[str] = None,
            table: Optional[str] = None,
            tenant_name: Optional[str] = None,
            topic_partitions: Optional[int] = None) -> Cdc
    func GetCdc(ctx *Context, name string, id IDInput, state *CdcState, opts ...ResourceOption) (*Cdc, error)
    public static Cdc Get(string name, Input<string> id, CdcState? state, CustomResourceOptions? opts = null)
    public static Cdc get(String name, Output<String> id, CdcState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    ConnectorStatus string
    Connector Status
    DataTopic string
    Data topic name
    DatabaseId string
    Astra database to create the keyspace.
    DatabaseName string
    Astra database name.
    Keyspace string
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    Table string
    Astra database table.
    TenantName string
    Streaming tenant name
    TopicPartitions int
    Number of partitions in cdc topic.
    ConnectorStatus string
    Connector Status
    DataTopic string
    Data topic name
    DatabaseId string
    Astra database to create the keyspace.
    DatabaseName string
    Astra database name.
    Keyspace string
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    Table string
    Astra database table.
    TenantName string
    Streaming tenant name
    TopicPartitions int
    Number of partitions in cdc topic.
    connectorStatus String
    Connector Status
    dataTopic String
    Data topic name
    databaseId String
    Astra database to create the keyspace.
    databaseName String
    Astra database name.
    keyspace String
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    table String
    Astra database table.
    tenantName String
    Streaming tenant name
    topicPartitions Integer
    Number of partitions in cdc topic.
    connectorStatus string
    Connector Status
    dataTopic string
    Data topic name
    databaseId string
    Astra database to create the keyspace.
    databaseName string
    Astra database name.
    keyspace string
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    table string
    Astra database table.
    tenantName string
    Streaming tenant name
    topicPartitions number
    Number of partitions in cdc topic.
    connector_status str
    Connector Status
    data_topic str
    Data topic name
    database_id str
    Astra database to create the keyspace.
    database_name str
    Astra database name.
    keyspace str
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    table str
    Astra database table.
    tenant_name str
    Streaming tenant name
    topic_partitions int
    Number of partitions in cdc topic.
    connectorStatus String
    Connector Status
    dataTopic String
    Data topic name
    databaseId String
    Astra database to create the keyspace.
    databaseName String
    Astra database name.
    keyspace String
    Initial keyspace name. For additional keyspaces, use the astra.Keyspace resource.
    table String
    Astra database table.
    tenantName String
    Streaming tenant name
    topicPartitions Number
    Number of partitions in cdc topic.

    Import

     $ pulumi import astra:index/cdc:Cdc example databaseId/keyspace/table/tenantName
    

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

    Package Details

    Repository
    astra pulumiverse/pulumi-astra
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the astra Terraform Provider.
    astra logo
    Astra DB v1.0.42 published on Tuesday, Jun 6, 2023 by pulumiverse