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

tencentcloud.MysqlProxy

Explore with Pulumi AI

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

    Provides a resource to create a mysql proxy

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const zones = tencentcloud.getAvailabilityZonesByProduct({
        product: "cdb",
    });
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const subnet = new tencentcloud.Subnet("subnet", {
        availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
        vpcId: vpc.vpcId,
        cidrBlock: "10.0.0.0/16",
        isMulticast: false,
    });
    const securityGroup = new tencentcloud.SecurityGroup("securityGroup", {description: "mysql test"});
    const exampleMysqlInstance = new tencentcloud.MysqlInstance("exampleMysqlInstance", {
        internetService: 1,
        engineVersion: "5.7",
        chargeType: "POSTPAID",
        rootPassword: "PassWord123",
        slaveDeployMode: 1,
        availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
        firstSlaveZone: zones.then(zones => zones.zones?.[1]?.name),
        slaveSyncMode: 1,
        instanceName: "tf-example-mysql",
        memSize: 4000,
        volumeSize: 200,
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        intranetPort: 3306,
        securityGroups: [securityGroup.securityGroupId],
        tags: {
            name: "test",
        },
        parameters: {
            character_set_server: "utf8",
            max_connections: "1000",
        },
    });
    const exampleMysqlProxy = new tencentcloud.MysqlProxy("exampleMysqlProxy", {
        instanceId: exampleMysqlInstance.mysqlInstanceId,
        uniqVpcId: vpc.vpcId,
        uniqSubnetId: subnet.subnetId,
        proxyNodeCustoms: [{
            nodeCount: 1,
            cpu: 2,
            mem: 4000,
            region: "ap-guangzhou",
            zone: "ap-guangzhou-3",
        }],
        securityGroups: [securityGroup.securityGroupId],
        desc: "desc.",
        connectionPoolLimit: 2,
        vip: "10.0.0.120",
        vport: 3306,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    zones = tencentcloud.get_availability_zones_by_product(product="cdb")
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    subnet = tencentcloud.Subnet("subnet",
        availability_zone=zones.zones[0].name,
        vpc_id=vpc.vpc_id,
        cidr_block="10.0.0.0/16",
        is_multicast=False)
    security_group = tencentcloud.SecurityGroup("securityGroup", description="mysql test")
    example_mysql_instance = tencentcloud.MysqlInstance("exampleMysqlInstance",
        internet_service=1,
        engine_version="5.7",
        charge_type="POSTPAID",
        root_password="PassWord123",
        slave_deploy_mode=1,
        availability_zone=zones.zones[0].name,
        first_slave_zone=zones.zones[1].name,
        slave_sync_mode=1,
        instance_name="tf-example-mysql",
        mem_size=4000,
        volume_size=200,
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        intranet_port=3306,
        security_groups=[security_group.security_group_id],
        tags={
            "name": "test",
        },
        parameters={
            "character_set_server": "utf8",
            "max_connections": "1000",
        })
    example_mysql_proxy = tencentcloud.MysqlProxy("exampleMysqlProxy",
        instance_id=example_mysql_instance.mysql_instance_id,
        uniq_vpc_id=vpc.vpc_id,
        uniq_subnet_id=subnet.subnet_id,
        proxy_node_customs=[{
            "node_count": 1,
            "cpu": 2,
            "mem": 4000,
            "region": "ap-guangzhou",
            "zone": "ap-guangzhou-3",
        }],
        security_groups=[security_group.security_group_id],
        desc="desc.",
        connection_pool_limit=2,
        vip="10.0.0.120",
        vport=3306)
    
    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 {
    		zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
    			Product: "cdb",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("10.0.0.0/16"),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		securityGroup, err := tencentcloud.NewSecurityGroup(ctx, "securityGroup", &tencentcloud.SecurityGroupArgs{
    			Description: pulumi.String("mysql test"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMysqlInstance, err := tencentcloud.NewMysqlInstance(ctx, "exampleMysqlInstance", &tencentcloud.MysqlInstanceArgs{
    			InternetService:  pulumi.Float64(1),
    			EngineVersion:    pulumi.String("5.7"),
    			ChargeType:       pulumi.String("POSTPAID"),
    			RootPassword:     pulumi.String("PassWord123"),
    			SlaveDeployMode:  pulumi.Float64(1),
    			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
    			FirstSlaveZone:   pulumi.String(zones.Zones[1].Name),
    			SlaveSyncMode:    pulumi.Float64(1),
    			InstanceName:     pulumi.String("tf-example-mysql"),
    			MemSize:          pulumi.Float64(4000),
    			VolumeSize:       pulumi.Float64(200),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			IntranetPort:     pulumi.Float64(3306),
    			SecurityGroups: pulumi.StringArray{
    				securityGroup.SecurityGroupId,
    			},
    			Tags: pulumi.StringMap{
    				"name": pulumi.String("test"),
    			},
    			Parameters: pulumi.StringMap{
    				"character_set_server": pulumi.String("utf8"),
    				"max_connections":      pulumi.String("1000"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewMysqlProxy(ctx, "exampleMysqlProxy", &tencentcloud.MysqlProxyArgs{
    			InstanceId:   exampleMysqlInstance.MysqlInstanceId,
    			UniqVpcId:    vpc.VpcId,
    			UniqSubnetId: subnet.SubnetId,
    			ProxyNodeCustoms: tencentcloud.MysqlProxyProxyNodeCustomArray{
    				&tencentcloud.MysqlProxyProxyNodeCustomArgs{
    					NodeCount: pulumi.Float64(1),
    					Cpu:       pulumi.Float64(2),
    					Mem:       pulumi.Float64(4000),
    					Region:    pulumi.String("ap-guangzhou"),
    					Zone:      pulumi.String("ap-guangzhou-3"),
    				},
    			},
    			SecurityGroups: pulumi.StringArray{
    				securityGroup.SecurityGroupId,
    			},
    			Desc:                pulumi.String("desc."),
    			ConnectionPoolLimit: pulumi.Float64(2),
    			Vip:                 pulumi.String("10.0.0.120"),
    			Vport:               pulumi.Float64(3306),
    		})
    		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 zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
        {
            Product = "cdb",
        });
    
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.0.0/16",
            IsMulticast = false,
        });
    
        var securityGroup = new Tencentcloud.SecurityGroup("securityGroup", new()
        {
            Description = "mysql test",
        });
    
        var exampleMysqlInstance = new Tencentcloud.MysqlInstance("exampleMysqlInstance", new()
        {
            InternetService = 1,
            EngineVersion = "5.7",
            ChargeType = "POSTPAID",
            RootPassword = "PassWord123",
            SlaveDeployMode = 1,
            AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
            FirstSlaveZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[1]?.Name),
            SlaveSyncMode = 1,
            InstanceName = "tf-example-mysql",
            MemSize = 4000,
            VolumeSize = 200,
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            IntranetPort = 3306,
            SecurityGroups = new[]
            {
                securityGroup.SecurityGroupId,
            },
            Tags = 
            {
                { "name", "test" },
            },
            Parameters = 
            {
                { "character_set_server", "utf8" },
                { "max_connections", "1000" },
            },
        });
    
        var exampleMysqlProxy = new Tencentcloud.MysqlProxy("exampleMysqlProxy", new()
        {
            InstanceId = exampleMysqlInstance.MysqlInstanceId,
            UniqVpcId = vpc.VpcId,
            UniqSubnetId = subnet.SubnetId,
            ProxyNodeCustoms = new[]
            {
                new Tencentcloud.Inputs.MysqlProxyProxyNodeCustomArgs
                {
                    NodeCount = 1,
                    Cpu = 2,
                    Mem = 4000,
                    Region = "ap-guangzhou",
                    Zone = "ap-guangzhou-3",
                },
            },
            SecurityGroups = new[]
            {
                securityGroup.SecurityGroupId,
            },
            Desc = "desc.",
            ConnectionPoolLimit = 2,
            Vip = "10.0.0.120",
            Vport = 3306,
        });
    
    });
    
    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.GetAvailabilityZonesByProductArgs;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.SecurityGroup;
    import com.pulumi.tencentcloud.SecurityGroupArgs;
    import com.pulumi.tencentcloud.MysqlInstance;
    import com.pulumi.tencentcloud.MysqlInstanceArgs;
    import com.pulumi.tencentcloud.MysqlProxy;
    import com.pulumi.tencentcloud.MysqlProxyArgs;
    import com.pulumi.tencentcloud.inputs.MysqlProxyProxyNodeCustomArgs;
    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 zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
                .product("cdb")
                .build());
    
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.0.0/16")
                .isMulticast(false)
                .build());
    
            var securityGroup = new SecurityGroup("securityGroup", SecurityGroupArgs.builder()
                .description("mysql test")
                .build());
    
            var exampleMysqlInstance = new MysqlInstance("exampleMysqlInstance", MysqlInstanceArgs.builder()
                .internetService(1)
                .engineVersion("5.7")
                .chargeType("POSTPAID")
                .rootPassword("PassWord123")
                .slaveDeployMode(1)
                .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
                .firstSlaveZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[1].name()))
                .slaveSyncMode(1)
                .instanceName("tf-example-mysql")
                .memSize(4000)
                .volumeSize(200)
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .intranetPort(3306)
                .securityGroups(securityGroup.securityGroupId())
                .tags(Map.of("name", "test"))
                .parameters(Map.ofEntries(
                    Map.entry("character_set_server", "utf8"),
                    Map.entry("max_connections", "1000")
                ))
                .build());
    
            var exampleMysqlProxy = new MysqlProxy("exampleMysqlProxy", MysqlProxyArgs.builder()
                .instanceId(exampleMysqlInstance.mysqlInstanceId())
                .uniqVpcId(vpc.vpcId())
                .uniqSubnetId(subnet.subnetId())
                .proxyNodeCustoms(MysqlProxyProxyNodeCustomArgs.builder()
                    .nodeCount(1)
                    .cpu(2)
                    .mem(4000)
                    .region("ap-guangzhou")
                    .zone("ap-guangzhou-3")
                    .build())
                .securityGroups(securityGroup.securityGroupId())
                .desc("desc.")
                .connectionPoolLimit(2)
                .vip("10.0.0.120")
                .vport(3306)
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      subnet:
        type: tencentcloud:Subnet
        properties:
          availabilityZone: ${zones.zones[0].name}
          vpcId: ${vpc.vpcId}
          cidrBlock: 10.0.0.0/16
          isMulticast: false
      securityGroup:
        type: tencentcloud:SecurityGroup
        properties:
          description: mysql test
      exampleMysqlInstance:
        type: tencentcloud:MysqlInstance
        properties:
          internetService: 1
          engineVersion: '5.7'
          chargeType: POSTPAID
          rootPassword: PassWord123
          slaveDeployMode: 1
          availabilityZone: ${zones.zones[0].name}
          firstSlaveZone: ${zones.zones[1].name}
          slaveSyncMode: 1
          instanceName: tf-example-mysql
          memSize: 4000
          volumeSize: 200
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          intranetPort: 3306
          securityGroups:
            - ${securityGroup.securityGroupId}
          tags:
            name: test
          parameters:
            character_set_server: utf8
            max_connections: '1000'
      exampleMysqlProxy:
        type: tencentcloud:MysqlProxy
        properties:
          instanceId: ${exampleMysqlInstance.mysqlInstanceId}
          uniqVpcId: ${vpc.vpcId}
          uniqSubnetId: ${subnet.subnetId}
          proxyNodeCustoms:
            - nodeCount: 1
              cpu: 2
              mem: 4000
              region: ap-guangzhou
              zone: ap-guangzhou-3
          securityGroups:
            - ${securityGroup.securityGroupId}
          desc: desc.
          connectionPoolLimit: 2
          vip: 10.0.0.120
          vport: 3306
    variables:
      zones:
        fn::invoke:
          function: tencentcloud:getAvailabilityZonesByProduct
          arguments:
            product: cdb
    

    Create MysqlProxy Resource

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

    Constructor syntax

    new MysqlProxy(name: string, args: MysqlProxyArgs, opts?: CustomResourceOptions);
    @overload
    def MysqlProxy(resource_name: str,
                   args: MysqlProxyArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def MysqlProxy(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   instance_id: Optional[str] = None,
                   proxy_node_customs: Optional[Sequence[MysqlProxyProxyNodeCustomArgs]] = None,
                   uniq_subnet_id: Optional[str] = None,
                   uniq_vpc_id: Optional[str] = None,
                   connection_pool_limit: Optional[float] = None,
                   desc: Optional[str] = None,
                   mysql_proxy_id: Optional[str] = None,
                   proxy_version: Optional[str] = None,
                   security_groups: Optional[Sequence[str]] = None,
                   upgrade_time: Optional[str] = None,
                   vip: Optional[str] = None,
                   vport: Optional[float] = None)
    func NewMysqlProxy(ctx *Context, name string, args MysqlProxyArgs, opts ...ResourceOption) (*MysqlProxy, error)
    public MysqlProxy(string name, MysqlProxyArgs args, CustomResourceOptions? opts = null)
    public MysqlProxy(String name, MysqlProxyArgs args)
    public MysqlProxy(String name, MysqlProxyArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MysqlProxy
    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 MysqlProxyArgs
    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 MysqlProxyArgs
    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 MysqlProxyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MysqlProxyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MysqlProxyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    InstanceId string
    Instance id.
    ProxyNodeCustoms List<MysqlProxyProxyNodeCustom>
    Node specification configuration.
    UniqSubnetId string
    Subnet id.
    UniqVpcId string
    Vpc id.
    ConnectionPoolLimit double
    Connection Pool Threshold.
    Desc string
    Describe.
    MysqlProxyId string
    ID of the resource.
    ProxyVersion string
    The current version of the database agent. No need to fill in when creating.
    SecurityGroups List<string>
    Security group.
    UpgradeTime string
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    Vip string
    IP address.
    Vport double
    Port.
    InstanceId string
    Instance id.
    ProxyNodeCustoms []MysqlProxyProxyNodeCustomArgs
    Node specification configuration.
    UniqSubnetId string
    Subnet id.
    UniqVpcId string
    Vpc id.
    ConnectionPoolLimit float64
    Connection Pool Threshold.
    Desc string
    Describe.
    MysqlProxyId string
    ID of the resource.
    ProxyVersion string
    The current version of the database agent. No need to fill in when creating.
    SecurityGroups []string
    Security group.
    UpgradeTime string
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    Vip string
    IP address.
    Vport float64
    Port.
    instanceId String
    Instance id.
    proxyNodeCustoms List<MysqlProxyProxyNodeCustom>
    Node specification configuration.
    uniqSubnetId String
    Subnet id.
    uniqVpcId String
    Vpc id.
    connectionPoolLimit Double
    Connection Pool Threshold.
    desc String
    Describe.
    mysqlProxyId String
    ID of the resource.
    proxyVersion String
    The current version of the database agent. No need to fill in when creating.
    securityGroups List<String>
    Security group.
    upgradeTime String
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    vip String
    IP address.
    vport Double
    Port.
    instanceId string
    Instance id.
    proxyNodeCustoms MysqlProxyProxyNodeCustom[]
    Node specification configuration.
    uniqSubnetId string
    Subnet id.
    uniqVpcId string
    Vpc id.
    connectionPoolLimit number
    Connection Pool Threshold.
    desc string
    Describe.
    mysqlProxyId string
    ID of the resource.
    proxyVersion string
    The current version of the database agent. No need to fill in when creating.
    securityGroups string[]
    Security group.
    upgradeTime string
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    vip string
    IP address.
    vport number
    Port.
    instance_id str
    Instance id.
    proxy_node_customs Sequence[MysqlProxyProxyNodeCustomArgs]
    Node specification configuration.
    uniq_subnet_id str
    Subnet id.
    uniq_vpc_id str
    Vpc id.
    connection_pool_limit float
    Connection Pool Threshold.
    desc str
    Describe.
    mysql_proxy_id str
    ID of the resource.
    proxy_version str
    The current version of the database agent. No need to fill in when creating.
    security_groups Sequence[str]
    Security group.
    upgrade_time str
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    vip str
    IP address.
    vport float
    Port.
    instanceId String
    Instance id.
    proxyNodeCustoms List<Property Map>
    Node specification configuration.
    uniqSubnetId String
    Subnet id.
    uniqVpcId String
    Vpc id.
    connectionPoolLimit Number
    Connection Pool Threshold.
    desc String
    Describe.
    mysqlProxyId String
    ID of the resource.
    proxyVersion String
    The current version of the database agent. No need to fill in when creating.
    securityGroups List<String>
    Security group.
    upgradeTime String
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    vip String
    IP address.
    vport Number
    Port.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ProxyAddressId string
    Proxy address id.
    ProxyGroupId string
    Proxy group id.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProxyAddressId string
    Proxy address id.
    ProxyGroupId string
    Proxy group id.
    id String
    The provider-assigned unique ID for this managed resource.
    proxyAddressId String
    Proxy address id.
    proxyGroupId String
    Proxy group id.
    id string
    The provider-assigned unique ID for this managed resource.
    proxyAddressId string
    Proxy address id.
    proxyGroupId string
    Proxy group id.
    id str
    The provider-assigned unique ID for this managed resource.
    proxy_address_id str
    Proxy address id.
    proxy_group_id str
    Proxy group id.
    id String
    The provider-assigned unique ID for this managed resource.
    proxyAddressId String
    Proxy address id.
    proxyGroupId String
    Proxy group id.

    Look up Existing MysqlProxy Resource

    Get an existing MysqlProxy 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?: MysqlProxyState, opts?: CustomResourceOptions): MysqlProxy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_pool_limit: Optional[float] = None,
            desc: Optional[str] = None,
            instance_id: Optional[str] = None,
            mysql_proxy_id: Optional[str] = None,
            proxy_address_id: Optional[str] = None,
            proxy_group_id: Optional[str] = None,
            proxy_node_customs: Optional[Sequence[MysqlProxyProxyNodeCustomArgs]] = None,
            proxy_version: Optional[str] = None,
            security_groups: Optional[Sequence[str]] = None,
            uniq_subnet_id: Optional[str] = None,
            uniq_vpc_id: Optional[str] = None,
            upgrade_time: Optional[str] = None,
            vip: Optional[str] = None,
            vport: Optional[float] = None) -> MysqlProxy
    func GetMysqlProxy(ctx *Context, name string, id IDInput, state *MysqlProxyState, opts ...ResourceOption) (*MysqlProxy, error)
    public static MysqlProxy Get(string name, Input<string> id, MysqlProxyState? state, CustomResourceOptions? opts = null)
    public static MysqlProxy get(String name, Output<String> id, MysqlProxyState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MysqlProxy    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:
    ConnectionPoolLimit double
    Connection Pool Threshold.
    Desc string
    Describe.
    InstanceId string
    Instance id.
    MysqlProxyId string
    ID of the resource.
    ProxyAddressId string
    Proxy address id.
    ProxyGroupId string
    Proxy group id.
    ProxyNodeCustoms List<MysqlProxyProxyNodeCustom>
    Node specification configuration.
    ProxyVersion string
    The current version of the database agent. No need to fill in when creating.
    SecurityGroups List<string>
    Security group.
    UniqSubnetId string
    Subnet id.
    UniqVpcId string
    Vpc id.
    UpgradeTime string
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    Vip string
    IP address.
    Vport double
    Port.
    ConnectionPoolLimit float64
    Connection Pool Threshold.
    Desc string
    Describe.
    InstanceId string
    Instance id.
    MysqlProxyId string
    ID of the resource.
    ProxyAddressId string
    Proxy address id.
    ProxyGroupId string
    Proxy group id.
    ProxyNodeCustoms []MysqlProxyProxyNodeCustomArgs
    Node specification configuration.
    ProxyVersion string
    The current version of the database agent. No need to fill in when creating.
    SecurityGroups []string
    Security group.
    UniqSubnetId string
    Subnet id.
    UniqVpcId string
    Vpc id.
    UpgradeTime string
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    Vip string
    IP address.
    Vport float64
    Port.
    connectionPoolLimit Double
    Connection Pool Threshold.
    desc String
    Describe.
    instanceId String
    Instance id.
    mysqlProxyId String
    ID of the resource.
    proxyAddressId String
    Proxy address id.
    proxyGroupId String
    Proxy group id.
    proxyNodeCustoms List<MysqlProxyProxyNodeCustom>
    Node specification configuration.
    proxyVersion String
    The current version of the database agent. No need to fill in when creating.
    securityGroups List<String>
    Security group.
    uniqSubnetId String
    Subnet id.
    uniqVpcId String
    Vpc id.
    upgradeTime String
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    vip String
    IP address.
    vport Double
    Port.
    connectionPoolLimit number
    Connection Pool Threshold.
    desc string
    Describe.
    instanceId string
    Instance id.
    mysqlProxyId string
    ID of the resource.
    proxyAddressId string
    Proxy address id.
    proxyGroupId string
    Proxy group id.
    proxyNodeCustoms MysqlProxyProxyNodeCustom[]
    Node specification configuration.
    proxyVersion string
    The current version of the database agent. No need to fill in when creating.
    securityGroups string[]
    Security group.
    uniqSubnetId string
    Subnet id.
    uniqVpcId string
    Vpc id.
    upgradeTime string
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    vip string
    IP address.
    vport number
    Port.
    connection_pool_limit float
    Connection Pool Threshold.
    desc str
    Describe.
    instance_id str
    Instance id.
    mysql_proxy_id str
    ID of the resource.
    proxy_address_id str
    Proxy address id.
    proxy_group_id str
    Proxy group id.
    proxy_node_customs Sequence[MysqlProxyProxyNodeCustomArgs]
    Node specification configuration.
    proxy_version str
    The current version of the database agent. No need to fill in when creating.
    security_groups Sequence[str]
    Security group.
    uniq_subnet_id str
    Subnet id.
    uniq_vpc_id str
    Vpc id.
    upgrade_time str
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    vip str
    IP address.
    vport float
    Port.
    connectionPoolLimit Number
    Connection Pool Threshold.
    desc String
    Describe.
    instanceId String
    Instance id.
    mysqlProxyId String
    ID of the resource.
    proxyAddressId String
    Proxy address id.
    proxyGroupId String
    Proxy group id.
    proxyNodeCustoms List<Property Map>
    Node specification configuration.
    proxyVersion String
    The current version of the database agent. No need to fill in when creating.
    securityGroups List<String>
    Security group.
    uniqSubnetId String
    Subnet id.
    uniqVpcId String
    Vpc id.
    upgradeTime String
    Upgrade time: nowTime (upgrade completed) timeWindow (instance maintenance time), Required when modifying the agent version, No need to fill in when creating.
    vip String
    IP address.
    vport Number
    Port.

    Supporting Types

    MysqlProxyProxyNodeCustom, MysqlProxyProxyNodeCustomArgs

    Cpu double
    Number of CPU cores.
    Mem double
    Memory size.
    NodeCount double
    Number of nodes.
    Region string
    Region.
    Zone string
    Zone.
    Cpu float64
    Number of CPU cores.
    Mem float64
    Memory size.
    NodeCount float64
    Number of nodes.
    Region string
    Region.
    Zone string
    Zone.
    cpu Double
    Number of CPU cores.
    mem Double
    Memory size.
    nodeCount Double
    Number of nodes.
    region String
    Region.
    zone String
    Zone.
    cpu number
    Number of CPU cores.
    mem number
    Memory size.
    nodeCount number
    Number of nodes.
    region string
    Region.
    zone string
    Zone.
    cpu float
    Number of CPU cores.
    mem float
    Memory size.
    node_count float
    Number of nodes.
    region str
    Region.
    zone str
    Zone.
    cpu Number
    Number of CPU cores.
    mem Number
    Memory size.
    nodeCount Number
    Number of nodes.
    region String
    Region.
    zone String
    Zone.

    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