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

tencentcloud.CynosdbClusterSlaveZone

Explore with Pulumi AI

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

    Provides a resource to create a cynosdb cluster slave zone.

    Example Usage

    Set a new slave zone for a cynosdb cluster.

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const gz3 = tencentcloud.getVpcSubnets({
        availabilityZone: _var.default_az,
        isDefault: true,
    });
    const vpcId = gz3.then(gz3 => gz3.instanceLists?.[0]?.vpcId);
    const subnetId = gz3.then(gz3 => gz3.instanceLists?.[0]?.subnetId);
    const config = new pulumi.Config();
    const fixedTags = config.getObject<{fixed_resource?: string}>("fixedTags") || {
        fixed_resource: "do_not_remove",
    };
    const internal = tencentcloud.getSecurityGroups({
        name: "default",
        tags: fixedTags,
    });
    const sgId = internal.then(internal => internal.securityGroups?.[0]?.securityGroupId);
    const exclusive = tencentcloud.getSecurityGroups({
        name: "test_preset_sg",
    });
    const sgId2 = exclusive.then(exclusive => exclusive.securityGroups?.[0]?.securityGroupId);
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
    const newAvailabilityZone = config.get("newAvailabilityZone") || "ap-guangzhou-6";
    const myParamTemplate = config.get("myParamTemplate") || "15765";
    const instance = new tencentcloud.CynosdbCluster("instance", {
        availableZone: availabilityZone,
        vpcId: vpcId,
        subnetId: subnetId,
        dbType: "MYSQL",
        dbVersion: "5.7",
        storageLimit: 1000,
        clusterName: "tf_test_cynosdb_cluster_slave_zone",
        password: "cynos@123",
        instanceMaintainDuration: 3600,
        instanceMaintainStartTime: 10800,
        instanceMaintainWeekdays: [
            "Fri",
            "Mon",
            "Sat",
            "Sun",
            "Thu",
            "Wed",
            "Tue",
        ],
        instanceCpuCore: 1,
        instanceMemorySize: 2,
        paramItems: [
            {
                name: "character_set_server",
                currentValue: "utf8",
            },
            {
                name: "time_zone",
                currentValue: "+09:00",
            },
        ],
        forceDelete: true,
        rwGroupSgs: [sgId],
        roGroupSgs: [sgId],
        prarmTemplateId: myParamTemplate,
    });
    const clusterSlaveZone = new tencentcloud.CynosdbClusterSlaveZone("clusterSlaveZone", {
        clusterId: instance.cynosdbClusterId,
        slaveZone: newAvailabilityZone,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    gz3 = tencentcloud.get_vpc_subnets(availability_zone=var["default_az"],
        is_default=True)
    vpc_id = gz3.instance_lists[0].vpc_id
    subnet_id = gz3.instance_lists[0].subnet_id
    config = pulumi.Config()
    fixed_tags = config.get_object("fixedTags")
    if fixed_tags is None:
        fixed_tags = {
            "fixed_resource": "do_not_remove",
        }
    internal = tencentcloud.get_security_groups(name="default",
        tags=fixed_tags)
    sg_id = internal.security_groups[0].security_group_id
    exclusive = tencentcloud.get_security_groups(name="test_preset_sg")
    sg_id2 = exclusive.security_groups[0].security_group_id
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-4"
    new_availability_zone = config.get("newAvailabilityZone")
    if new_availability_zone is None:
        new_availability_zone = "ap-guangzhou-6"
    my_param_template = config.get("myParamTemplate")
    if my_param_template is None:
        my_param_template = "15765"
    instance = tencentcloud.CynosdbCluster("instance",
        available_zone=availability_zone,
        vpc_id=vpc_id,
        subnet_id=subnet_id,
        db_type="MYSQL",
        db_version="5.7",
        storage_limit=1000,
        cluster_name="tf_test_cynosdb_cluster_slave_zone",
        password="cynos@123",
        instance_maintain_duration=3600,
        instance_maintain_start_time=10800,
        instance_maintain_weekdays=[
            "Fri",
            "Mon",
            "Sat",
            "Sun",
            "Thu",
            "Wed",
            "Tue",
        ],
        instance_cpu_core=1,
        instance_memory_size=2,
        param_items=[
            {
                "name": "character_set_server",
                "current_value": "utf8",
            },
            {
                "name": "time_zone",
                "current_value": "+09:00",
            },
        ],
        force_delete=True,
        rw_group_sgs=[sg_id],
        ro_group_sgs=[sg_id],
        prarm_template_id=my_param_template)
    cluster_slave_zone = tencentcloud.CynosdbClusterSlaveZone("clusterSlaveZone",
        cluster_id=instance.cynosdb_cluster_id,
        slave_zone=new_availability_zone)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"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 {
    		gz3, err := tencentcloud.GetVpcSubnets(ctx, &tencentcloud.GetVpcSubnetsArgs{
    			AvailabilityZone: pulumi.StringRef(_var.Default_az),
    			IsDefault:        pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vpcId := gz3.InstanceLists[0].VpcId
    		subnetId := gz3.InstanceLists[0].SubnetId
    		cfg := config.New(ctx, "")
    		fixedTags := map[string]interface{}{
    			"fixed_resource": "do_not_remove",
    		}
    		if param := cfg.GetObject("fixedTags"); param != nil {
    			fixedTags = param
    		}
    		internal, err := tencentcloud.GetSecurityGroups(ctx, &tencentcloud.GetSecurityGroupsArgs{
    			Name: pulumi.StringRef("default"),
    			Tags: fixedTags,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		sgId := internal.SecurityGroups[0].SecurityGroupId
    		exclusive, err := tencentcloud.GetSecurityGroups(ctx, &tencentcloud.GetSecurityGroupsArgs{
    			Name: pulumi.StringRef("test_preset_sg"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_ := exclusive.SecurityGroups[0].SecurityGroupId
    		availabilityZone := "ap-guangzhou-4"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		newAvailabilityZone := "ap-guangzhou-6"
    		if param := cfg.Get("newAvailabilityZone"); param != "" {
    			newAvailabilityZone = param
    		}
    		myParamTemplate := "15765"
    		if param := cfg.Get("myParamTemplate"); param != "" {
    			myParamTemplate = param
    		}
    		instance, err := tencentcloud.NewCynosdbCluster(ctx, "instance", &tencentcloud.CynosdbClusterArgs{
    			AvailableZone:             pulumi.String(availabilityZone),
    			VpcId:                     pulumi.String(vpcId),
    			SubnetId:                  pulumi.String(subnetId),
    			DbType:                    pulumi.String("MYSQL"),
    			DbVersion:                 pulumi.String("5.7"),
    			StorageLimit:              pulumi.Float64(1000),
    			ClusterName:               pulumi.String("tf_test_cynosdb_cluster_slave_zone"),
    			Password:                  pulumi.String("cynos@123"),
    			InstanceMaintainDuration:  pulumi.Float64(3600),
    			InstanceMaintainStartTime: pulumi.Float64(10800),
    			InstanceMaintainWeekdays: pulumi.StringArray{
    				pulumi.String("Fri"),
    				pulumi.String("Mon"),
    				pulumi.String("Sat"),
    				pulumi.String("Sun"),
    				pulumi.String("Thu"),
    				pulumi.String("Wed"),
    				pulumi.String("Tue"),
    			},
    			InstanceCpuCore:    pulumi.Float64(1),
    			InstanceMemorySize: pulumi.Float64(2),
    			ParamItems: tencentcloud.CynosdbClusterParamItemArray{
    				&tencentcloud.CynosdbClusterParamItemArgs{
    					Name:         pulumi.String("character_set_server"),
    					CurrentValue: pulumi.String("utf8"),
    				},
    				&tencentcloud.CynosdbClusterParamItemArgs{
    					Name:         pulumi.String("time_zone"),
    					CurrentValue: pulumi.String("+09:00"),
    				},
    			},
    			ForceDelete: pulumi.Bool(true),
    			RwGroupSgs: pulumi.StringArray{
    				pulumi.String(sgId),
    			},
    			RoGroupSgs: pulumi.StringArray{
    				pulumi.String(sgId),
    			},
    			PrarmTemplateId: pulumi.String(myParamTemplate),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewCynosdbClusterSlaveZone(ctx, "clusterSlaveZone", &tencentcloud.CynosdbClusterSlaveZoneArgs{
    			ClusterId: instance.CynosdbClusterId,
    			SlaveZone: pulumi.String(newAvailabilityZone),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var gz3 = Tencentcloud.GetVpcSubnets.Invoke(new()
        {
            AvailabilityZone = @var.Default_az,
            IsDefault = true,
        });
    
        var vpcId = gz3.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.VpcId);
    
        var subnetId = gz3.Apply(getVpcSubnetsResult => getVpcSubnetsResult.InstanceLists[0]?.SubnetId);
    
        var config = new Config();
        var fixedTags = config.GetObject<FixedTags>("fixedTags") ?? 
        {
            { "fixed_resource", "do_not_remove" },
        };
        var @internal = Tencentcloud.GetSecurityGroups.Invoke(new()
        {
            Name = "default",
            Tags = fixedTags,
        });
    
        var sgId = @internal.Apply(@internal => @internal.Apply(getSecurityGroupsResult => getSecurityGroupsResult.SecurityGroups[0]?.SecurityGroupId));
    
        var exclusive = Tencentcloud.GetSecurityGroups.Invoke(new()
        {
            Name = "test_preset_sg",
        });
    
        var sgId2 = exclusive.Apply(getSecurityGroupsResult => getSecurityGroupsResult.SecurityGroups[0]?.SecurityGroupId);
    
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
        var newAvailabilityZone = config.Get("newAvailabilityZone") ?? "ap-guangzhou-6";
        var myParamTemplate = config.Get("myParamTemplate") ?? "15765";
        var instance = new Tencentcloud.CynosdbCluster("instance", new()
        {
            AvailableZone = availabilityZone,
            VpcId = vpcId,
            SubnetId = subnetId,
            DbType = "MYSQL",
            DbVersion = "5.7",
            StorageLimit = 1000,
            ClusterName = "tf_test_cynosdb_cluster_slave_zone",
            Password = "cynos@123",
            InstanceMaintainDuration = 3600,
            InstanceMaintainStartTime = 10800,
            InstanceMaintainWeekdays = new[]
            {
                "Fri",
                "Mon",
                "Sat",
                "Sun",
                "Thu",
                "Wed",
                "Tue",
            },
            InstanceCpuCore = 1,
            InstanceMemorySize = 2,
            ParamItems = new[]
            {
                new Tencentcloud.Inputs.CynosdbClusterParamItemArgs
                {
                    Name = "character_set_server",
                    CurrentValue = "utf8",
                },
                new Tencentcloud.Inputs.CynosdbClusterParamItemArgs
                {
                    Name = "time_zone",
                    CurrentValue = "+09:00",
                },
            },
            ForceDelete = true,
            RwGroupSgs = new[]
            {
                sgId,
            },
            RoGroupSgs = new[]
            {
                sgId,
            },
            PrarmTemplateId = myParamTemplate,
        });
    
        var clusterSlaveZone = new Tencentcloud.CynosdbClusterSlaveZone("clusterSlaveZone", new()
        {
            ClusterId = instance.CynosdbClusterId,
            SlaveZone = newAvailabilityZone,
        });
    
    });
    
    public class FixedTags
    {
        public string fixed_resource { get; set; }
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetVpcSubnetsArgs;
    import com.pulumi.tencentcloud.inputs.GetSecurityGroupsArgs;
    import com.pulumi.tencentcloud.CynosdbCluster;
    import com.pulumi.tencentcloud.CynosdbClusterArgs;
    import com.pulumi.tencentcloud.inputs.CynosdbClusterParamItemArgs;
    import com.pulumi.tencentcloud.CynosdbClusterSlaveZone;
    import com.pulumi.tencentcloud.CynosdbClusterSlaveZoneArgs;
    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 gz3 = TencentcloudFunctions.getVpcSubnets(GetVpcSubnetsArgs.builder()
                .availabilityZone(var_.default_az())
                .isDefault(true)
                .build());
    
            final var vpcId = gz3.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].vpcId());
    
            final var subnetId = gz3.applyValue(getVpcSubnetsResult -> getVpcSubnetsResult.instanceLists()[0].subnetId());
    
            final var fixedTags = config.get("fixedTags").orElse(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
            final var internal = TencentcloudFunctions.getSecurityGroups(GetSecurityGroupsArgs.builder()
                .name("default")
                .tags(fixedTags)
                .build());
    
            final var sgId = internal.applyValue(getSecurityGroupsResult -> getSecurityGroupsResult.securityGroups()[0].securityGroupId());
    
            final var exclusive = TencentcloudFunctions.getSecurityGroups(GetSecurityGroupsArgs.builder()
                .name("test_preset_sg")
                .build());
    
            final var sgId2 = exclusive.applyValue(getSecurityGroupsResult -> getSecurityGroupsResult.securityGroups()[0].securityGroupId());
    
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
            final var newAvailabilityZone = config.get("newAvailabilityZone").orElse("ap-guangzhou-6");
            final var myParamTemplate = config.get("myParamTemplate").orElse("15765");
            var instance = new CynosdbCluster("instance", CynosdbClusterArgs.builder()
                .availableZone(availabilityZone)
                .vpcId(vpcId)
                .subnetId(subnetId)
                .dbType("MYSQL")
                .dbVersion("5.7")
                .storageLimit(1000)
                .clusterName("tf_test_cynosdb_cluster_slave_zone")
                .password("cynos@123")
                .instanceMaintainDuration(3600)
                .instanceMaintainStartTime(10800)
                .instanceMaintainWeekdays(            
                    "Fri",
                    "Mon",
                    "Sat",
                    "Sun",
                    "Thu",
                    "Wed",
                    "Tue")
                .instanceCpuCore(1)
                .instanceMemorySize(2)
                .paramItems(            
                    CynosdbClusterParamItemArgs.builder()
                        .name("character_set_server")
                        .currentValue("utf8")
                        .build(),
                    CynosdbClusterParamItemArgs.builder()
                        .name("time_zone")
                        .currentValue("+09:00")
                        .build())
                .forceDelete(true)
                .rwGroupSgs(sgId)
                .roGroupSgs(sgId)
                .prarmTemplateId(myParamTemplate)
                .build());
    
            var clusterSlaveZone = new CynosdbClusterSlaveZone("clusterSlaveZone", CynosdbClusterSlaveZoneArgs.builder()
                .clusterId(instance.cynosdbClusterId())
                .slaveZone(newAvailabilityZone)
                .build());
    
        }
    }
    
    configuration:
      fixedTags:
        type: object({fixed_resource = union(none, string)})
        default:
          fixed_resource: do_not_remove
      availabilityZone:
        type: string
        default: ap-guangzhou-4
      newAvailabilityZone:
        type: string
        default: ap-guangzhou-6
      myParamTemplate:
        type: string
        default: '15765'
    resources:
      instance:
        type: tencentcloud:CynosdbCluster
        properties:
          availableZone: ${availabilityZone}
          vpcId: ${vpcId}
          subnetId: ${subnetId}
          dbType: MYSQL
          dbVersion: '5.7'
          storageLimit: 1000
          clusterName: tf_test_cynosdb_cluster_slave_zone
          password: cynos@123
          instanceMaintainDuration: 3600
          instanceMaintainStartTime: 10800
          instanceMaintainWeekdays:
            - Fri
            - Mon
            - Sat
            - Sun
            - Thu
            - Wed
            - Tue
          instanceCpuCore: 1
          instanceMemorySize: 2
          paramItems:
            - name: character_set_server
              currentValue: utf8
            - name: time_zone
              currentValue: +09:00
          forceDelete: true
          rwGroupSgs:
            - ${sgId}
          roGroupSgs:
            - ${sgId}
          prarmTemplateId: ${myParamTemplate}
      clusterSlaveZone:
        type: tencentcloud:CynosdbClusterSlaveZone
        properties:
          clusterId: ${instance.cynosdbClusterId}
          slaveZone: ${newAvailabilityZone}
    variables:
      vpcId: ${gz3.instanceLists[0].vpcId}
      subnetId: ${gz3.instanceLists[0].subnetId}
      sgId: ${internal.securityGroups[0].securityGroupId}
      sgId2: ${exclusive.securityGroups[0].securityGroupId}
      internal:
        fn::invoke:
          function: tencentcloud:getSecurityGroups
          arguments:
            name: default
            tags: ${fixedTags}
      exclusive:
        fn::invoke:
          function: tencentcloud:getSecurityGroups
          arguments:
            name: test_preset_sg
      gz3:
        fn::invoke:
          function: tencentcloud:getVpcSubnets
          arguments:
            availabilityZone: ${var.default_az}
            isDefault: true
    

    Update the slave zone with specified value.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CynosdbClusterSlaveZone;
    import com.pulumi.tencentcloud.CynosdbClusterSlaveZoneArgs;
    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 clusterSlaveZone = new CynosdbClusterSlaveZone("clusterSlaveZone", CynosdbClusterSlaveZoneArgs.builder()
                .clusterId(tencentcloud_cynosdb_cluster.instance().id())
                .slaveZone(var_.availability_zone())
                .timeouts(CynosdbClusterSlaveZoneTimeoutsArgs.builder()
                    .create("500s")
                    .build())
                .build());
    
        }
    }
    
    resources:
      clusterSlaveZone:
        type: tencentcloud:CynosdbClusterSlaveZone
        properties:
          clusterId: ${tencentcloud_cynosdb_cluster.instance.id}
          slaveZone: ${var.availability_zone}
          timeouts:
            - create: 500s
    

    Create CynosdbClusterSlaveZone Resource

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

    Constructor syntax

    new CynosdbClusterSlaveZone(name: string, args: CynosdbClusterSlaveZoneArgs, opts?: CustomResourceOptions);
    @overload
    def CynosdbClusterSlaveZone(resource_name: str,
                                args: CynosdbClusterSlaveZoneArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def CynosdbClusterSlaveZone(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                cluster_id: Optional[str] = None,
                                slave_zone: Optional[str] = None,
                                cynosdb_cluster_slave_zone_id: Optional[str] = None,
                                timeouts: Optional[CynosdbClusterSlaveZoneTimeoutsArgs] = None)
    func NewCynosdbClusterSlaveZone(ctx *Context, name string, args CynosdbClusterSlaveZoneArgs, opts ...ResourceOption) (*CynosdbClusterSlaveZone, error)
    public CynosdbClusterSlaveZone(string name, CynosdbClusterSlaveZoneArgs args, CustomResourceOptions? opts = null)
    public CynosdbClusterSlaveZone(String name, CynosdbClusterSlaveZoneArgs args)
    public CynosdbClusterSlaveZone(String name, CynosdbClusterSlaveZoneArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CynosdbClusterSlaveZone
    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 CynosdbClusterSlaveZoneArgs
    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 CynosdbClusterSlaveZoneArgs
    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 CynosdbClusterSlaveZoneArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CynosdbClusterSlaveZoneArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CynosdbClusterSlaveZoneArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ClusterId string
    The ID of cluster.
    SlaveZone string
    Slave zone.
    CynosdbClusterSlaveZoneId string
    ID of the resource.
    Timeouts CynosdbClusterSlaveZoneTimeouts
    ClusterId string
    The ID of cluster.
    SlaveZone string
    Slave zone.
    CynosdbClusterSlaveZoneId string
    ID of the resource.
    Timeouts CynosdbClusterSlaveZoneTimeoutsArgs
    clusterId String
    The ID of cluster.
    slaveZone String
    Slave zone.
    cynosdbClusterSlaveZoneId String
    ID of the resource.
    timeouts CynosdbClusterSlaveZoneTimeouts
    clusterId string
    The ID of cluster.
    slaveZone string
    Slave zone.
    cynosdbClusterSlaveZoneId string
    ID of the resource.
    timeouts CynosdbClusterSlaveZoneTimeouts
    clusterId String
    The ID of cluster.
    slaveZone String
    Slave zone.
    cynosdbClusterSlaveZoneId String
    ID of the resource.
    timeouts Property Map

    Outputs

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

    Get an existing CynosdbClusterSlaveZone 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?: CynosdbClusterSlaveZoneState, opts?: CustomResourceOptions): CynosdbClusterSlaveZone
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            cynosdb_cluster_slave_zone_id: Optional[str] = None,
            slave_zone: Optional[str] = None,
            timeouts: Optional[CynosdbClusterSlaveZoneTimeoutsArgs] = None) -> CynosdbClusterSlaveZone
    func GetCynosdbClusterSlaveZone(ctx *Context, name string, id IDInput, state *CynosdbClusterSlaveZoneState, opts ...ResourceOption) (*CynosdbClusterSlaveZone, error)
    public static CynosdbClusterSlaveZone Get(string name, Input<string> id, CynosdbClusterSlaveZoneState? state, CustomResourceOptions? opts = null)
    public static CynosdbClusterSlaveZone get(String name, Output<String> id, CynosdbClusterSlaveZoneState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CynosdbClusterSlaveZone    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:
    ClusterId string
    The ID of cluster.
    CynosdbClusterSlaveZoneId string
    ID of the resource.
    SlaveZone string
    Slave zone.
    Timeouts CynosdbClusterSlaveZoneTimeouts
    ClusterId string
    The ID of cluster.
    CynosdbClusterSlaveZoneId string
    ID of the resource.
    SlaveZone string
    Slave zone.
    Timeouts CynosdbClusterSlaveZoneTimeoutsArgs
    clusterId String
    The ID of cluster.
    cynosdbClusterSlaveZoneId String
    ID of the resource.
    slaveZone String
    Slave zone.
    timeouts CynosdbClusterSlaveZoneTimeouts
    clusterId string
    The ID of cluster.
    cynosdbClusterSlaveZoneId string
    ID of the resource.
    slaveZone string
    Slave zone.
    timeouts CynosdbClusterSlaveZoneTimeouts
    clusterId String
    The ID of cluster.
    cynosdbClusterSlaveZoneId String
    ID of the resource.
    slaveZone String
    Slave zone.
    timeouts Property Map

    Supporting Types

    CynosdbClusterSlaveZoneTimeouts, CynosdbClusterSlaveZoneTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    cynosdb cluster_slave_zone can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/cynosdbClusterSlaveZone:CynosdbClusterSlaveZone cluster_slave_zone cluster_id#slave_zone
    

    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