1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CdcDedicatedCluster
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CdcDedicatedCluster

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a CDC dedicated cluster

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    // create cdc site
    const exampleCdcSite = new tencentcloud.CdcSite("exampleCdcSite", {
        country: "China",
        province: "Guangdong Province",
        city: "Guangzhou",
        addressLine: "Tencent Building",
        description: "desc.",
    });
    // create cdc dedicated cluster
    const exampleCdcDedicatedCluster = new tencentcloud.CdcDedicatedCluster("exampleCdcDedicatedCluster", {
        siteId: exampleCdcSite.cdcSiteId,
        zone: "ap-guangzhou-6",
        description: "desc.",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    # create cdc site
    example_cdc_site = tencentcloud.CdcSite("exampleCdcSite",
        country="China",
        province="Guangdong Province",
        city="Guangzhou",
        address_line="Tencent Building",
        description="desc.")
    # create cdc dedicated cluster
    example_cdc_dedicated_cluster = tencentcloud.CdcDedicatedCluster("exampleCdcDedicatedCluster",
        site_id=example_cdc_site.cdc_site_id,
        zone="ap-guangzhou-6",
        description="desc.")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// create cdc site
    		exampleCdcSite, err := tencentcloud.NewCdcSite(ctx, "exampleCdcSite", &tencentcloud.CdcSiteArgs{
    			Country:     pulumi.String("China"),
    			Province:    pulumi.String("Guangdong Province"),
    			City:        pulumi.String("Guangzhou"),
    			AddressLine: pulumi.String("Tencent Building"),
    			Description: pulumi.String("desc."),
    		})
    		if err != nil {
    			return err
    		}
    		// create cdc dedicated cluster
    		_, err = tencentcloud.NewCdcDedicatedCluster(ctx, "exampleCdcDedicatedCluster", &tencentcloud.CdcDedicatedClusterArgs{
    			SiteId:      exampleCdcSite.CdcSiteId,
    			Zone:        pulumi.String("ap-guangzhou-6"),
    			Description: pulumi.String("desc."),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        // create cdc site
        var exampleCdcSite = new Tencentcloud.CdcSite("exampleCdcSite", new()
        {
            Country = "China",
            Province = "Guangdong Province",
            City = "Guangzhou",
            AddressLine = "Tencent Building",
            Description = "desc.",
        });
    
        // create cdc dedicated cluster
        var exampleCdcDedicatedCluster = new Tencentcloud.CdcDedicatedCluster("exampleCdcDedicatedCluster", new()
        {
            SiteId = exampleCdcSite.CdcSiteId,
            Zone = "ap-guangzhou-6",
            Description = "desc.",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CdcSite;
    import com.pulumi.tencentcloud.CdcSiteArgs;
    import com.pulumi.tencentcloud.CdcDedicatedCluster;
    import com.pulumi.tencentcloud.CdcDedicatedClusterArgs;
    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) {
            // create cdc site
            var exampleCdcSite = new CdcSite("exampleCdcSite", CdcSiteArgs.builder()
                .country("China")
                .province("Guangdong Province")
                .city("Guangzhou")
                .addressLine("Tencent Building")
                .description("desc.")
                .build());
    
            // create cdc dedicated cluster
            var exampleCdcDedicatedCluster = new CdcDedicatedCluster("exampleCdcDedicatedCluster", CdcDedicatedClusterArgs.builder()
                .siteId(exampleCdcSite.cdcSiteId())
                .zone("ap-guangzhou-6")
                .description("desc.")
                .build());
    
        }
    }
    
    resources:
      # create cdc site
      exampleCdcSite:
        type: tencentcloud:CdcSite
        properties:
          country: China
          province: Guangdong Province
          city: Guangzhou
          addressLine: Tencent Building
          description: desc.
      # create cdc dedicated cluster
      exampleCdcDedicatedCluster:
        type: tencentcloud:CdcDedicatedCluster
        properties:
          siteId: ${exampleCdcSite.cdcSiteId}
          zone: ap-guangzhou-6
          description: desc.
    

    Create CdcDedicatedCluster Resource

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

    Constructor syntax

    new CdcDedicatedCluster(name: string, args: CdcDedicatedClusterArgs, opts?: CustomResourceOptions);
    @overload
    def CdcDedicatedCluster(resource_name: str,
                            args: CdcDedicatedClusterArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def CdcDedicatedCluster(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            site_id: Optional[str] = None,
                            zone: Optional[str] = None,
                            cdc_dedicated_cluster_id: Optional[str] = None,
                            description: Optional[str] = None,
                            name: Optional[str] = None)
    func NewCdcDedicatedCluster(ctx *Context, name string, args CdcDedicatedClusterArgs, opts ...ResourceOption) (*CdcDedicatedCluster, error)
    public CdcDedicatedCluster(string name, CdcDedicatedClusterArgs args, CustomResourceOptions? opts = null)
    public CdcDedicatedCluster(String name, CdcDedicatedClusterArgs args)
    public CdcDedicatedCluster(String name, CdcDedicatedClusterArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CdcDedicatedCluster
    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 CdcDedicatedClusterArgs
    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 CdcDedicatedClusterArgs
    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 CdcDedicatedClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CdcDedicatedClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CdcDedicatedClusterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    SiteId string
    Dedicated Cluster Site ID.
    Zone string
    Dedicated Cluster Zone.
    CdcDedicatedClusterId string
    ID of the resource.
    Description string
    Dedicated Cluster Description.
    Name string
    Dedicated Cluster Name.
    SiteId string
    Dedicated Cluster Site ID.
    Zone string
    Dedicated Cluster Zone.
    CdcDedicatedClusterId string
    ID of the resource.
    Description string
    Dedicated Cluster Description.
    Name string
    Dedicated Cluster Name.
    siteId String
    Dedicated Cluster Site ID.
    zone String
    Dedicated Cluster Zone.
    cdcDedicatedClusterId String
    ID of the resource.
    description String
    Dedicated Cluster Description.
    name String
    Dedicated Cluster Name.
    siteId string
    Dedicated Cluster Site ID.
    zone string
    Dedicated Cluster Zone.
    cdcDedicatedClusterId string
    ID of the resource.
    description string
    Dedicated Cluster Description.
    name string
    Dedicated Cluster Name.
    site_id str
    Dedicated Cluster Site ID.
    zone str
    Dedicated Cluster Zone.
    cdc_dedicated_cluster_id str
    ID of the resource.
    description str
    Dedicated Cluster Description.
    name str
    Dedicated Cluster Name.
    siteId String
    Dedicated Cluster Site ID.
    zone String
    Dedicated Cluster Zone.
    cdcDedicatedClusterId String
    ID of the resource.
    description String
    Dedicated Cluster Description.
    name String
    Dedicated Cluster Name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CdcDedicatedCluster 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 CdcDedicatedCluster Resource

    Get an existing CdcDedicatedCluster 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?: CdcDedicatedClusterState, opts?: CustomResourceOptions): CdcDedicatedCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cdc_dedicated_cluster_id: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            site_id: Optional[str] = None,
            zone: Optional[str] = None) -> CdcDedicatedCluster
    func GetCdcDedicatedCluster(ctx *Context, name string, id IDInput, state *CdcDedicatedClusterState, opts ...ResourceOption) (*CdcDedicatedCluster, error)
    public static CdcDedicatedCluster Get(string name, Input<string> id, CdcDedicatedClusterState? state, CustomResourceOptions? opts = null)
    public static CdcDedicatedCluster get(String name, Output<String> id, CdcDedicatedClusterState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CdcDedicatedCluster    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.
    The following state arguments are supported:
    CdcDedicatedClusterId string
    ID of the resource.
    Description string
    Dedicated Cluster Description.
    Name string
    Dedicated Cluster Name.
    SiteId string
    Dedicated Cluster Site ID.
    Zone string
    Dedicated Cluster Zone.
    CdcDedicatedClusterId string
    ID of the resource.
    Description string
    Dedicated Cluster Description.
    Name string
    Dedicated Cluster Name.
    SiteId string
    Dedicated Cluster Site ID.
    Zone string
    Dedicated Cluster Zone.
    cdcDedicatedClusterId String
    ID of the resource.
    description String
    Dedicated Cluster Description.
    name String
    Dedicated Cluster Name.
    siteId String
    Dedicated Cluster Site ID.
    zone String
    Dedicated Cluster Zone.
    cdcDedicatedClusterId string
    ID of the resource.
    description string
    Dedicated Cluster Description.
    name string
    Dedicated Cluster Name.
    siteId string
    Dedicated Cluster Site ID.
    zone string
    Dedicated Cluster Zone.
    cdc_dedicated_cluster_id str
    ID of the resource.
    description str
    Dedicated Cluster Description.
    name str
    Dedicated Cluster Name.
    site_id str
    Dedicated Cluster Site ID.
    zone str
    Dedicated Cluster Zone.
    cdcDedicatedClusterId String
    ID of the resource.
    description String
    Dedicated Cluster Description.
    name String
    Dedicated Cluster Name.
    siteId String
    Dedicated Cluster Site ID.
    zone String
    Dedicated Cluster Zone.

    Import

    CDC dedicated cluster can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/cdcDedicatedCluster:CdcDedicatedCluster example cluster-d574omhk
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack