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

tencentcloud.getMysqlSwitchRecord

Explore with Pulumi AI

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

    Use this data source to query detailed information of mysql switch_record

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const switchRecord = tencentcloud.getMysqlSwitchRecord({
        instanceId: "cdb-fitq5t9h",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    switch_record = tencentcloud.get_mysql_switch_record(instance_id="cdb-fitq5t9h")
    
    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 {
    		_, err := tencentcloud.GetMysqlSwitchRecord(ctx, &tencentcloud.GetMysqlSwitchRecordArgs{
    			InstanceId: "cdb-fitq5t9h",
    		}, nil)
    		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 switchRecord = Tencentcloud.GetMysqlSwitchRecord.Invoke(new()
        {
            InstanceId = "cdb-fitq5t9h",
        });
    
    });
    
    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.GetMysqlSwitchRecordArgs;
    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 switchRecord = TencentcloudFunctions.getMysqlSwitchRecord(GetMysqlSwitchRecordArgs.builder()
                .instanceId("cdb-fitq5t9h")
                .build());
    
        }
    }
    
    variables:
      switchRecord:
        fn::invoke:
          function: tencentcloud:getMysqlSwitchRecord
          arguments:
            instanceId: cdb-fitq5t9h
    

    Using getMysqlSwitchRecord

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getMysqlSwitchRecord(args: GetMysqlSwitchRecordArgs, opts?: InvokeOptions): Promise<GetMysqlSwitchRecordResult>
    function getMysqlSwitchRecordOutput(args: GetMysqlSwitchRecordOutputArgs, opts?: InvokeOptions): Output<GetMysqlSwitchRecordResult>
    def get_mysql_switch_record(id: Optional[str] = None,
                                instance_id: Optional[str] = None,
                                result_output_file: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetMysqlSwitchRecordResult
    def get_mysql_switch_record_output(id: Optional[pulumi.Input[str]] = None,
                                instance_id: Optional[pulumi.Input[str]] = None,
                                result_output_file: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetMysqlSwitchRecordResult]
    func GetMysqlSwitchRecord(ctx *Context, args *GetMysqlSwitchRecordArgs, opts ...InvokeOption) (*GetMysqlSwitchRecordResult, error)
    func GetMysqlSwitchRecordOutput(ctx *Context, args *GetMysqlSwitchRecordOutputArgs, opts ...InvokeOption) GetMysqlSwitchRecordResultOutput

    > Note: This function is named GetMysqlSwitchRecord in the Go SDK.

    public static class GetMysqlSwitchRecord 
    {
        public static Task<GetMysqlSwitchRecordResult> InvokeAsync(GetMysqlSwitchRecordArgs args, InvokeOptions? opts = null)
        public static Output<GetMysqlSwitchRecordResult> Invoke(GetMysqlSwitchRecordInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMysqlSwitchRecordResult> getMysqlSwitchRecord(GetMysqlSwitchRecordArgs args, InvokeOptions options)
    public static Output<GetMysqlSwitchRecordResult> getMysqlSwitchRecord(GetMysqlSwitchRecordArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getMysqlSwitchRecord:getMysqlSwitchRecord
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    Instance ID, the format is: cdb-c1nl9rpv or cdbro-c1nl9rpv, which is the same as the instance ID displayed on the cloud database console page.
    Id string
    ResultOutputFile string
    Used to save results.
    InstanceId string
    Instance ID, the format is: cdb-c1nl9rpv or cdbro-c1nl9rpv, which is the same as the instance ID displayed on the cloud database console page.
    Id string
    ResultOutputFile string
    Used to save results.
    instanceId String
    Instance ID, the format is: cdb-c1nl9rpv or cdbro-c1nl9rpv, which is the same as the instance ID displayed on the cloud database console page.
    id String
    resultOutputFile String
    Used to save results.
    instanceId string
    Instance ID, the format is: cdb-c1nl9rpv or cdbro-c1nl9rpv, which is the same as the instance ID displayed on the cloud database console page.
    id string
    resultOutputFile string
    Used to save results.
    instance_id str
    Instance ID, the format is: cdb-c1nl9rpv or cdbro-c1nl9rpv, which is the same as the instance ID displayed on the cloud database console page.
    id str
    result_output_file str
    Used to save results.
    instanceId String
    Instance ID, the format is: cdb-c1nl9rpv or cdbro-c1nl9rpv, which is the same as the instance ID displayed on the cloud database console page.
    id String
    resultOutputFile String
    Used to save results.

    getMysqlSwitchRecord Result

    The following output properties are available:

    Id string
    InstanceId string
    Items List<GetMysqlSwitchRecordItem>
    Instance switching record details.
    ResultOutputFile string
    Id string
    InstanceId string
    Items []GetMysqlSwitchRecordItem
    Instance switching record details.
    ResultOutputFile string
    id String
    instanceId String
    items List<GetMysqlSwitchRecordItem>
    Instance switching record details.
    resultOutputFile String
    id string
    instanceId string
    items GetMysqlSwitchRecordItem[]
    Instance switching record details.
    resultOutputFile string
    id str
    instance_id str
    items Sequence[GetMysqlSwitchRecordItem]
    Instance switching record details.
    result_output_file str
    id String
    instanceId String
    items List<Property Map>
    Instance switching record details.
    resultOutputFile String

    Supporting Types

    GetMysqlSwitchRecordItem

    SwitchTime string
    Switching time, the format is: 2017-09-03 01:34:31.
    SwitchType string
    Switch type, possible return values: TRANSFER - data migration; MASTER2SLAVE - master-standby switch; RECOVERY - master-slave recovery.
    SwitchTime string
    Switching time, the format is: 2017-09-03 01:34:31.
    SwitchType string
    Switch type, possible return values: TRANSFER - data migration; MASTER2SLAVE - master-standby switch; RECOVERY - master-slave recovery.
    switchTime String
    Switching time, the format is: 2017-09-03 01:34:31.
    switchType String
    Switch type, possible return values: TRANSFER - data migration; MASTER2SLAVE - master-standby switch; RECOVERY - master-slave recovery.
    switchTime string
    Switching time, the format is: 2017-09-03 01:34:31.
    switchType string
    Switch type, possible return values: TRANSFER - data migration; MASTER2SLAVE - master-standby switch; RECOVERY - master-slave recovery.
    switch_time str
    Switching time, the format is: 2017-09-03 01:34:31.
    switch_type str
    Switch type, possible return values: TRANSFER - data migration; MASTER2SLAVE - master-standby switch; RECOVERY - master-slave recovery.
    switchTime String
    Switching time, the format is: 2017-09-03 01:34:31.
    switchType String
    Switch type, possible return values: TRANSFER - data migration; MASTER2SLAVE - master-standby switch; RECOVERY - master-slave recovery.

    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