1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. gpdb
  5. JdbcDataSource
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.gpdb.JdbcDataSource

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a GPDB Jdbc Data Source resource.

    For information about GPDB Jdbc Data Source and how to use it, see What is Jdbc Data Source.

    NOTE: Available since v1.230.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const default = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
    });
    const defaultGetSwitches = defaultGetNetworks.then(defaultGetNetworks => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: "cn-beijing-h",
    }));
    const defaulttuqTmM = new alicloud.gpdb.Instance("defaulttuqTmM", {
        instanceSpec: "2C8G",
        description: name,
        segNodeNum: 2,
        segStorageType: "cloud_essd",
        instanceNetworkType: "VPC",
        paymentType: "PayAsYouGo",
        sslEnabled: 0,
        engineVersion: "6.0",
        zoneId: "cn-beijing-h",
        vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
        storageSize: 50,
        masterCu: 4,
        vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0]),
        dbInstanceMode: "StorageElastic",
        engine: "gpdb",
        dbInstanceCategory: "Basic",
    });
    const defaultsk1eaS = new alicloud.gpdb.Account("defaultsk1eaS", {
        accountDescription: "example_001",
        dbInstanceId: defaulttuqTmM.id,
        accountName: "example_001",
        accountPassword: "example_001",
    });
    const defaultRXkfKL = new alicloud.gpdb.ExternalDataService("defaultRXkfKL", {
        serviceName: name,
        dbInstanceId: defaulttuqTmM.id,
        serviceDescription: "myexample",
        serviceSpec: "8",
    });
    const defaultJdbcDataSource = new alicloud.gpdb.JdbcDataSource("default", {
        jdbcConnectionString: "jdbc:mysql://rm-2ze327yr44c61183c.mysql.rds.aliyuncs.com:3306/example_001",
        dataSourceDescription: "myexample",
        dbInstanceId: defaulttuqTmM.id,
        jdbcPassword: "example_001",
        dataSourceName: defaultRXkfKL.serviceName,
        dataSourceType: "mysql",
        jdbcUserName: "example_001",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
        zone_id="cn-beijing-h")
    defaulttuq_tm_m = alicloud.gpdb.Instance("defaulttuqTmM",
        instance_spec="2C8G",
        description=name,
        seg_node_num=2,
        seg_storage_type="cloud_essd",
        instance_network_type="VPC",
        payment_type="PayAsYouGo",
        ssl_enabled=0,
        engine_version="6.0",
        zone_id="cn-beijing-h",
        vswitch_id=default_get_switches.ids[0],
        storage_size=50,
        master_cu=4,
        vpc_id=default_get_networks.ids[0],
        db_instance_mode="StorageElastic",
        engine="gpdb",
        db_instance_category="Basic")
    defaultsk1ea_s = alicloud.gpdb.Account("defaultsk1eaS",
        account_description="example_001",
        db_instance_id=defaulttuq_tm_m.id,
        account_name="example_001",
        account_password="example_001")
    default_r_xkf_kl = alicloud.gpdb.ExternalDataService("defaultRXkfKL",
        service_name=name,
        db_instance_id=defaulttuq_tm_m.id,
        service_description="myexample",
        service_spec="8")
    default_jdbc_data_source = alicloud.gpdb.JdbcDataSource("default",
        jdbc_connection_string="jdbc:mysql://rm-2ze327yr44c61183c.mysql.rds.aliyuncs.com:3306/example_001",
        data_source_description="myexample",
        db_instance_id=defaulttuq_tm_m.id,
        jdbc_password="example_001",
        data_source_name=default_r_xkf_kl.service_name,
        data_source_type="mysql",
        jdbc_user_name="example_001")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/gpdb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"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 {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef("cn-beijing-h"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaulttuqTmM, err := gpdb.NewInstance(ctx, "defaulttuqTmM", &gpdb.InstanceArgs{
    			InstanceSpec:        pulumi.String("2C8G"),
    			Description:         pulumi.String(name),
    			SegNodeNum:          pulumi.Int(2),
    			SegStorageType:      pulumi.String("cloud_essd"),
    			InstanceNetworkType: pulumi.String("VPC"),
    			PaymentType:         pulumi.String("PayAsYouGo"),
    			SslEnabled:          pulumi.Int(0),
    			EngineVersion:       pulumi.String("6.0"),
    			ZoneId:              pulumi.String("cn-beijing-h"),
    			VswitchId:           pulumi.String(defaultGetSwitches.Ids[0]),
    			StorageSize:         pulumi.Int(50),
    			MasterCu:            pulumi.Int(4),
    			VpcId:               pulumi.String(defaultGetNetworks.Ids[0]),
    			DbInstanceMode:      pulumi.String("StorageElastic"),
    			Engine:              pulumi.String("gpdb"),
    			DbInstanceCategory:  pulumi.String("Basic"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gpdb.NewAccount(ctx, "defaultsk1eaS", &gpdb.AccountArgs{
    			AccountDescription: pulumi.String("example_001"),
    			DbInstanceId:       defaulttuqTmM.ID(),
    			AccountName:        pulumi.String("example_001"),
    			AccountPassword:    pulumi.String("example_001"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRXkfKL, err := gpdb.NewExternalDataService(ctx, "defaultRXkfKL", &gpdb.ExternalDataServiceArgs{
    			ServiceName:        pulumi.String(name),
    			DbInstanceId:       defaulttuqTmM.ID(),
    			ServiceDescription: pulumi.String("myexample"),
    			ServiceSpec:        pulumi.String("8"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gpdb.NewJdbcDataSource(ctx, "default", &gpdb.JdbcDataSourceArgs{
    			JdbcConnectionString:  pulumi.String("jdbc:mysql://rm-2ze327yr44c61183c.mysql.rds.aliyuncs.com:3306/example_001"),
    			DataSourceDescription: pulumi.String("myexample"),
    			DbInstanceId:          defaulttuqTmM.ID(),
    			JdbcPassword:          pulumi.String("example_001"),
    			DataSourceName:        defaultRXkfKL.ServiceName,
    			DataSourceType:        pulumi.String("mysql"),
    			JdbcUserName:          pulumi.String("example_001"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = "cn-beijing-h",
        });
    
        var defaulttuqTmM = new AliCloud.Gpdb.Instance("defaulttuqTmM", new()
        {
            InstanceSpec = "2C8G",
            Description = name,
            SegNodeNum = 2,
            SegStorageType = "cloud_essd",
            InstanceNetworkType = "VPC",
            PaymentType = "PayAsYouGo",
            SslEnabled = 0,
            EngineVersion = "6.0",
            ZoneId = "cn-beijing-h",
            VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            StorageSize = 50,
            MasterCu = 4,
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            DbInstanceMode = "StorageElastic",
            Engine = "gpdb",
            DbInstanceCategory = "Basic",
        });
    
        var defaultsk1eaS = new AliCloud.Gpdb.Account("defaultsk1eaS", new()
        {
            AccountDescription = "example_001",
            DbInstanceId = defaulttuqTmM.Id,
            AccountName = "example_001",
            AccountPassword = "example_001",
        });
    
        var defaultRXkfKL = new AliCloud.Gpdb.ExternalDataService("defaultRXkfKL", new()
        {
            ServiceName = name,
            DbInstanceId = defaulttuqTmM.Id,
            ServiceDescription = "myexample",
            ServiceSpec = "8",
        });
    
        var defaultJdbcDataSource = new AliCloud.Gpdb.JdbcDataSource("default", new()
        {
            JdbcConnectionString = "jdbc:mysql://rm-2ze327yr44c61183c.mysql.rds.aliyuncs.com:3306/example_001",
            DataSourceDescription = "myexample",
            DbInstanceId = defaulttuqTmM.Id,
            JdbcPassword = "example_001",
            DataSourceName = defaultRXkfKL.ServiceName,
            DataSourceType = "mysql",
            JdbcUserName = "example_001",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.gpdb.Instance;
    import com.pulumi.alicloud.gpdb.InstanceArgs;
    import com.pulumi.alicloud.gpdb.Account;
    import com.pulumi.alicloud.gpdb.AccountArgs;
    import com.pulumi.alicloud.gpdb.ExternalDataService;
    import com.pulumi.alicloud.gpdb.ExternalDataServiceArgs;
    import com.pulumi.alicloud.gpdb.JdbcDataSource;
    import com.pulumi.alicloud.gpdb.JdbcDataSourceArgs;
    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 name = config.get("name").orElse("terraform-example");
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId("cn-beijing-h")
                .build());
    
            var defaulttuqTmM = new Instance("defaulttuqTmM", InstanceArgs.builder()
                .instanceSpec("2C8G")
                .description(name)
                .segNodeNum("2")
                .segStorageType("cloud_essd")
                .instanceNetworkType("VPC")
                .paymentType("PayAsYouGo")
                .sslEnabled("0")
                .engineVersion("6.0")
                .zoneId("cn-beijing-h")
                .vswitchId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
                .storageSize("50")
                .masterCu("4")
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .dbInstanceMode("StorageElastic")
                .engine("gpdb")
                .dbInstanceCategory("Basic")
                .build());
    
            var defaultsk1eaS = new Account("defaultsk1eaS", AccountArgs.builder()
                .accountDescription("example_001")
                .dbInstanceId(defaulttuqTmM.id())
                .accountName("example_001")
                .accountPassword("example_001")
                .build());
    
            var defaultRXkfKL = new ExternalDataService("defaultRXkfKL", ExternalDataServiceArgs.builder()
                .serviceName(name)
                .dbInstanceId(defaulttuqTmM.id())
                .serviceDescription("myexample")
                .serviceSpec("8")
                .build());
    
            var defaultJdbcDataSource = new JdbcDataSource("defaultJdbcDataSource", JdbcDataSourceArgs.builder()
                .jdbcConnectionString("jdbc:mysql://rm-2ze327yr44c61183c.mysql.rds.aliyuncs.com:3306/example_001")
                .dataSourceDescription("myexample")
                .dbInstanceId(defaulttuqTmM.id())
                .jdbcPassword("example_001")
                .dataSourceName(defaultRXkfKL.serviceName())
                .dataSourceType("mysql")
                .jdbcUserName("example_001")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaulttuqTmM:
        type: alicloud:gpdb:Instance
        properties:
          instanceSpec: 2C8G
          description: ${name}
          segNodeNum: '2'
          segStorageType: cloud_essd
          instanceNetworkType: VPC
          paymentType: PayAsYouGo
          sslEnabled: '0'
          engineVersion: '6.0'
          zoneId: cn-beijing-h
          vswitchId: ${defaultGetSwitches.ids[0]}
          storageSize: '50'
          masterCu: '4'
          vpcId: ${defaultGetNetworks.ids[0]}
          dbInstanceMode: StorageElastic
          engine: gpdb
          dbInstanceCategory: Basic
      defaultsk1eaS:
        type: alicloud:gpdb:Account
        properties:
          accountDescription: example_001
          dbInstanceId: ${defaulttuqTmM.id}
          accountName: example_001
          accountPassword: example_001
      defaultRXkfKL:
        type: alicloud:gpdb:ExternalDataService
        properties:
          serviceName: ${name}
          dbInstanceId: ${defaulttuqTmM.id}
          serviceDescription: myexample
          serviceSpec: '8'
      defaultJdbcDataSource:
        type: alicloud:gpdb:JdbcDataSource
        name: default
        properties:
          jdbcConnectionString: jdbc:mysql://rm-2ze327yr44c61183c.mysql.rds.aliyuncs.com:3306/example_001
          dataSourceDescription: myexample
          dbInstanceId: ${defaulttuqTmM.id}
          jdbcPassword: example_001
          dataSourceName: ${defaultRXkfKL.serviceName}
          dataSourceType: mysql
          jdbcUserName: example_001
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
      defaultGetNetworks:
        fn::invoke:
          Function: alicloud:vpc:getNetworks
          Arguments:
            nameRegex: ^default-NODELETING$
      defaultGetSwitches:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: cn-beijing-h
    

    Create JdbcDataSource Resource

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

    Constructor syntax

    new JdbcDataSource(name: string, args: JdbcDataSourceArgs, opts?: CustomResourceOptions);
    @overload
    def JdbcDataSource(resource_name: str,
                       args: JdbcDataSourceArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def JdbcDataSource(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       db_instance_id: Optional[str] = None,
                       jdbc_user_name: Optional[str] = None,
                       data_source_description: Optional[str] = None,
                       data_source_name: Optional[str] = None,
                       data_source_type: Optional[str] = None,
                       jdbc_connection_string: Optional[str] = None,
                       jdbc_password: Optional[str] = None)
    func NewJdbcDataSource(ctx *Context, name string, args JdbcDataSourceArgs, opts ...ResourceOption) (*JdbcDataSource, error)
    public JdbcDataSource(string name, JdbcDataSourceArgs args, CustomResourceOptions? opts = null)
    public JdbcDataSource(String name, JdbcDataSourceArgs args)
    public JdbcDataSource(String name, JdbcDataSourceArgs args, CustomResourceOptions options)
    
    type: alicloud:gpdb:JdbcDataSource
    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 JdbcDataSourceArgs
    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 JdbcDataSourceArgs
    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 JdbcDataSourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args JdbcDataSourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args JdbcDataSourceArgs
    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 jdbcDataSourceResource = new AliCloud.Gpdb.JdbcDataSource("jdbcDataSourceResource", new()
    {
        DbInstanceId = "string",
        JdbcUserName = "string",
        DataSourceDescription = "string",
        DataSourceName = "string",
        DataSourceType = "string",
        JdbcConnectionString = "string",
        JdbcPassword = "string",
    });
    
    example, err := gpdb.NewJdbcDataSource(ctx, "jdbcDataSourceResource", &gpdb.JdbcDataSourceArgs{
    	DbInstanceId:          pulumi.String("string"),
    	JdbcUserName:          pulumi.String("string"),
    	DataSourceDescription: pulumi.String("string"),
    	DataSourceName:        pulumi.String("string"),
    	DataSourceType:        pulumi.String("string"),
    	JdbcConnectionString:  pulumi.String("string"),
    	JdbcPassword:          pulumi.String("string"),
    })
    
    var jdbcDataSourceResource = new JdbcDataSource("jdbcDataSourceResource", JdbcDataSourceArgs.builder()
        .dbInstanceId("string")
        .jdbcUserName("string")
        .dataSourceDescription("string")
        .dataSourceName("string")
        .dataSourceType("string")
        .jdbcConnectionString("string")
        .jdbcPassword("string")
        .build());
    
    jdbc_data_source_resource = alicloud.gpdb.JdbcDataSource("jdbcDataSourceResource",
        db_instance_id="string",
        jdbc_user_name="string",
        data_source_description="string",
        data_source_name="string",
        data_source_type="string",
        jdbc_connection_string="string",
        jdbc_password="string")
    
    const jdbcDataSourceResource = new alicloud.gpdb.JdbcDataSource("jdbcDataSourceResource", {
        dbInstanceId: "string",
        jdbcUserName: "string",
        dataSourceDescription: "string",
        dataSourceName: "string",
        dataSourceType: "string",
        jdbcConnectionString: "string",
        jdbcPassword: "string",
    });
    
    type: alicloud:gpdb:JdbcDataSource
    properties:
        dataSourceDescription: string
        dataSourceName: string
        dataSourceType: string
        dbInstanceId: string
        jdbcConnectionString: string
        jdbcPassword: string
        jdbcUserName: string
    

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

    DbInstanceId string
    The instance ID.
    JdbcUserName string
    The name of the database account.
    DataSourceDescription string
    Data Source Description
    DataSourceName string
    Data Source Name
    DataSourceType string
    Data Source Type
    JdbcConnectionString string
    The JDBC connection string.
    JdbcPassword string
    The password of the database account.
    DbInstanceId string
    The instance ID.
    JdbcUserName string
    The name of the database account.
    DataSourceDescription string
    Data Source Description
    DataSourceName string
    Data Source Name
    DataSourceType string
    Data Source Type
    JdbcConnectionString string
    The JDBC connection string.
    JdbcPassword string
    The password of the database account.
    dbInstanceId String
    The instance ID.
    jdbcUserName String
    The name of the database account.
    dataSourceDescription String
    Data Source Description
    dataSourceName String
    Data Source Name
    dataSourceType String
    Data Source Type
    jdbcConnectionString String
    The JDBC connection string.
    jdbcPassword String
    The password of the database account.
    dbInstanceId string
    The instance ID.
    jdbcUserName string
    The name of the database account.
    dataSourceDescription string
    Data Source Description
    dataSourceName string
    Data Source Name
    dataSourceType string
    Data Source Type
    jdbcConnectionString string
    The JDBC connection string.
    jdbcPassword string
    The password of the database account.
    db_instance_id str
    The instance ID.
    jdbc_user_name str
    The name of the database account.
    data_source_description str
    Data Source Description
    data_source_name str
    Data Source Name
    data_source_type str
    Data Source Type
    jdbc_connection_string str
    The JDBC connection string.
    jdbc_password str
    The password of the database account.
    dbInstanceId String
    The instance ID.
    jdbcUserName String
    The name of the database account.
    dataSourceDescription String
    Data Source Description
    dataSourceName String
    Data Source Name
    dataSourceType String
    Data Source Type
    jdbcConnectionString String
    The JDBC connection string.
    jdbcPassword String
    The password of the database account.

    Outputs

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

    CreateTime string
    The creation time of the resource
    DataSourceId string
    The data source ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Data Source Status
    CreateTime string
    The creation time of the resource
    DataSourceId string
    The data source ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Data Source Status
    createTime String
    The creation time of the resource
    dataSourceId String
    The data source ID.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Data Source Status
    createTime string
    The creation time of the resource
    dataSourceId string
    The data source ID.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Data Source Status
    create_time str
    The creation time of the resource
    data_source_id str
    The data source ID.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Data Source Status
    createTime String
    The creation time of the resource
    dataSourceId String
    The data source ID.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Data Source Status

    Look up Existing JdbcDataSource Resource

    Get an existing JdbcDataSource 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?: JdbcDataSourceState, opts?: CustomResourceOptions): JdbcDataSource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            data_source_description: Optional[str] = None,
            data_source_id: Optional[str] = None,
            data_source_name: Optional[str] = None,
            data_source_type: Optional[str] = None,
            db_instance_id: Optional[str] = None,
            jdbc_connection_string: Optional[str] = None,
            jdbc_password: Optional[str] = None,
            jdbc_user_name: Optional[str] = None,
            status: Optional[str] = None) -> JdbcDataSource
    func GetJdbcDataSource(ctx *Context, name string, id IDInput, state *JdbcDataSourceState, opts ...ResourceOption) (*JdbcDataSource, error)
    public static JdbcDataSource Get(string name, Input<string> id, JdbcDataSourceState? state, CustomResourceOptions? opts = null)
    public static JdbcDataSource get(String name, Output<String> id, JdbcDataSourceState 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:
    CreateTime string
    The creation time of the resource
    DataSourceDescription string
    Data Source Description
    DataSourceId string
    The data source ID.
    DataSourceName string
    Data Source Name
    DataSourceType string
    Data Source Type
    DbInstanceId string
    The instance ID.
    JdbcConnectionString string
    The JDBC connection string.
    JdbcPassword string
    The password of the database account.
    JdbcUserName string
    The name of the database account.
    Status string
    Data Source Status
    CreateTime string
    The creation time of the resource
    DataSourceDescription string
    Data Source Description
    DataSourceId string
    The data source ID.
    DataSourceName string
    Data Source Name
    DataSourceType string
    Data Source Type
    DbInstanceId string
    The instance ID.
    JdbcConnectionString string
    The JDBC connection string.
    JdbcPassword string
    The password of the database account.
    JdbcUserName string
    The name of the database account.
    Status string
    Data Source Status
    createTime String
    The creation time of the resource
    dataSourceDescription String
    Data Source Description
    dataSourceId String
    The data source ID.
    dataSourceName String
    Data Source Name
    dataSourceType String
    Data Source Type
    dbInstanceId String
    The instance ID.
    jdbcConnectionString String
    The JDBC connection string.
    jdbcPassword String
    The password of the database account.
    jdbcUserName String
    The name of the database account.
    status String
    Data Source Status
    createTime string
    The creation time of the resource
    dataSourceDescription string
    Data Source Description
    dataSourceId string
    The data source ID.
    dataSourceName string
    Data Source Name
    dataSourceType string
    Data Source Type
    dbInstanceId string
    The instance ID.
    jdbcConnectionString string
    The JDBC connection string.
    jdbcPassword string
    The password of the database account.
    jdbcUserName string
    The name of the database account.
    status string
    Data Source Status
    create_time str
    The creation time of the resource
    data_source_description str
    Data Source Description
    data_source_id str
    The data source ID.
    data_source_name str
    Data Source Name
    data_source_type str
    Data Source Type
    db_instance_id str
    The instance ID.
    jdbc_connection_string str
    The JDBC connection string.
    jdbc_password str
    The password of the database account.
    jdbc_user_name str
    The name of the database account.
    status str
    Data Source Status
    createTime String
    The creation time of the resource
    dataSourceDescription String
    Data Source Description
    dataSourceId String
    The data source ID.
    dataSourceName String
    Data Source Name
    dataSourceType String
    Data Source Type
    dbInstanceId String
    The instance ID.
    jdbcConnectionString String
    The JDBC connection string.
    jdbcPassword String
    The password of the database account.
    jdbcUserName String
    The name of the database account.
    status String
    Data Source Status

    Import

    GPDB Jdbc Data Source can be imported using the id, e.g.

    $ pulumi import alicloud:gpdb/jdbcDataSource:JdbcDataSource example <db_instance_id>:<data_source_id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi