1. Packages
  2. Alicloud Provider
  3. API Docs
  4. gpdb
  5. StreamingDataSource
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.gpdb.StreamingDataSource

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a GPDB Streaming Data Source resource.

    Real-time data source.

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

    NOTE: Available since v1.227.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 kafka_config_modify = config.get("kafka-config-modify") || `{
        "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
        "delimiter": "#",
        "format": "delimited",
        "topic": "ziyuan_example"
    }
    `;
    const kafka_config = config.get("kafka-config") || `{
        "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
        "delimiter": "|",
        "format": "delimited",
        "topic": "ziyuan_example"
    }
    `;
    const default = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultDfkYOR = new alicloud.vpc.Network("defaultDfkYOR", {cidrBlock: "192.168.0.0/16"});
    const default59ZqyD = new alicloud.vpc.Switch("default59ZqyD", {
        vpcId: defaultDfkYOR.id,
        zoneId: "cn-beijing-h",
        cidrBlock: "192.168.1.0/24",
    });
    const default7mX6ld = new alicloud.gpdb.Instance("default7mX6ld", {
        instanceSpec: "2C8G",
        description: name,
        segNodeNum: 2,
        segStorageType: "cloud_essd",
        instanceNetworkType: "VPC",
        dbInstanceCategory: "Basic",
        paymentType: "PayAsYouGo",
        sslEnabled: 0,
        engineVersion: "6.0",
        zoneId: "cn-beijing-h",
        vswitchId: default59ZqyD.id,
        storageSize: 50,
        masterCu: 4,
        vpcId: defaultDfkYOR.id,
        dbInstanceMode: "StorageElastic",
        engine: "gpdb",
    });
    const defaultwruvdv = new alicloud.gpdb.StreamingDataService("defaultwruvdv", {
        serviceName: "example",
        dbInstanceId: default7mX6ld.id,
        serviceDescription: "example",
        serviceSpec: "8",
    });
    const defaultStreamingDataSource = new alicloud.gpdb.StreamingDataSource("default", {
        dbInstanceId: default7mX6ld.id,
        dataSourceName: "example-kafka3",
        dataSourceConfig: kafka_config,
        dataSourceType: "kafka",
        dataSourceDescription: "example-kafka",
        serviceId: defaultwruvdv.serviceId,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    kafka_config_modify = config.get("kafka-config-modify")
    if kafka_config_modify is None:
        kafka_config_modify = """{
        "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
        "delimiter": "#",
        "format": "delimited",
        "topic": "ziyuan_example"
    }
    """
    kafka_config = config.get("kafka-config")
    if kafka_config is None:
        kafka_config = """{
        "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
        "delimiter": "|",
        "format": "delimited",
        "topic": "ziyuan_example"
    }
    """
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    default_dfk_yor = alicloud.vpc.Network("defaultDfkYOR", cidr_block="192.168.0.0/16")
    default59_zqy_d = alicloud.vpc.Switch("default59ZqyD",
        vpc_id=default_dfk_yor.id,
        zone_id="cn-beijing-h",
        cidr_block="192.168.1.0/24")
    default7m_x6ld = alicloud.gpdb.Instance("default7mX6ld",
        instance_spec="2C8G",
        description=name,
        seg_node_num=2,
        seg_storage_type="cloud_essd",
        instance_network_type="VPC",
        db_instance_category="Basic",
        payment_type="PayAsYouGo",
        ssl_enabled=0,
        engine_version="6.0",
        zone_id="cn-beijing-h",
        vswitch_id=default59_zqy_d.id,
        storage_size=50,
        master_cu=4,
        vpc_id=default_dfk_yor.id,
        db_instance_mode="StorageElastic",
        engine="gpdb")
    defaultwruvdv = alicloud.gpdb.StreamingDataService("defaultwruvdv",
        service_name="example",
        db_instance_id=default7m_x6ld.id,
        service_description="example",
        service_spec="8")
    default_streaming_data_source = alicloud.gpdb.StreamingDataSource("default",
        db_instance_id=default7m_x6ld.id,
        data_source_name="example-kafka3",
        data_source_config=kafka_config,
        data_source_type="kafka",
        data_source_description="example-kafka",
        service_id=defaultwruvdv.service_id)
    
    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
    		}
    		kafka_config_modify := `{
        "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
        "delimiter": "#",
        "format": "delimited",
        "topic": "ziyuan_example"
    }
    `
    		if param := cfg.Get("kafka-config-modify"); param != "" {
    			kafka_config_modify = param
    		}
    		kafka_config := `{
        "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
        "delimiter": "|",
        "format": "delimited",
        "topic": "ziyuan_example"
    }
    `
    		if param := cfg.Get("kafka-config"); param != "" {
    			kafka_config = param
    		}
    		_, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultDfkYOR, err := vpc.NewNetwork(ctx, "defaultDfkYOR", &vpc.NetworkArgs{
    			CidrBlock: pulumi.String("192.168.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		default59ZqyD, err := vpc.NewSwitch(ctx, "default59ZqyD", &vpc.SwitchArgs{
    			VpcId:     defaultDfkYOR.ID(),
    			ZoneId:    pulumi.String("cn-beijing-h"),
    			CidrBlock: pulumi.String("192.168.1.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		default7mX6ld, err := gpdb.NewInstance(ctx, "default7mX6ld", &gpdb.InstanceArgs{
    			InstanceSpec:        pulumi.String("2C8G"),
    			Description:         pulumi.String(name),
    			SegNodeNum:          pulumi.Int(2),
    			SegStorageType:      pulumi.String("cloud_essd"),
    			InstanceNetworkType: pulumi.String("VPC"),
    			DbInstanceCategory:  pulumi.String("Basic"),
    			PaymentType:         pulumi.String("PayAsYouGo"),
    			SslEnabled:          pulumi.Int(0),
    			EngineVersion:       pulumi.String("6.0"),
    			ZoneId:              pulumi.String("cn-beijing-h"),
    			VswitchId:           default59ZqyD.ID(),
    			StorageSize:         pulumi.Int(50),
    			MasterCu:            pulumi.Int(4),
    			VpcId:               defaultDfkYOR.ID(),
    			DbInstanceMode:      pulumi.String("StorageElastic"),
    			Engine:              pulumi.String("gpdb"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultwruvdv, err := gpdb.NewStreamingDataService(ctx, "defaultwruvdv", &gpdb.StreamingDataServiceArgs{
    			ServiceName:        pulumi.String("example"),
    			DbInstanceId:       default7mX6ld.ID(),
    			ServiceDescription: pulumi.String("example"),
    			ServiceSpec:        pulumi.String("8"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gpdb.NewStreamingDataSource(ctx, "default", &gpdb.StreamingDataSourceArgs{
    			DbInstanceId:          default7mX6ld.ID(),
    			DataSourceName:        pulumi.String("example-kafka3"),
    			DataSourceConfig:      pulumi.String(kafka_config),
    			DataSourceType:        pulumi.String("kafka"),
    			DataSourceDescription: pulumi.String("example-kafka"),
    			ServiceId:             defaultwruvdv.ServiceId,
    		})
    		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 kafka_config_modify = config.Get("kafka-config-modify") ?? @"{
        ""brokers"": ""alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092"",
        ""delimiter"": ""#"",
        ""format"": ""delimited"",
        ""topic"": ""ziyuan_example""
    }
    ";
        var kafka_config = config.Get("kafka-config") ?? @"{
        ""brokers"": ""alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092"",
        ""delimiter"": ""|"",
        ""format"": ""delimited"",
        ""topic"": ""ziyuan_example""
    }
    ";
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultDfkYOR = new AliCloud.Vpc.Network("defaultDfkYOR", new()
        {
            CidrBlock = "192.168.0.0/16",
        });
    
        var default59ZqyD = new AliCloud.Vpc.Switch("default59ZqyD", new()
        {
            VpcId = defaultDfkYOR.Id,
            ZoneId = "cn-beijing-h",
            CidrBlock = "192.168.1.0/24",
        });
    
        var default7mX6ld = new AliCloud.Gpdb.Instance("default7mX6ld", new()
        {
            InstanceSpec = "2C8G",
            Description = name,
            SegNodeNum = 2,
            SegStorageType = "cloud_essd",
            InstanceNetworkType = "VPC",
            DbInstanceCategory = "Basic",
            PaymentType = "PayAsYouGo",
            SslEnabled = 0,
            EngineVersion = "6.0",
            ZoneId = "cn-beijing-h",
            VswitchId = default59ZqyD.Id,
            StorageSize = 50,
            MasterCu = 4,
            VpcId = defaultDfkYOR.Id,
            DbInstanceMode = "StorageElastic",
            Engine = "gpdb",
        });
    
        var defaultwruvdv = new AliCloud.Gpdb.StreamingDataService("defaultwruvdv", new()
        {
            ServiceName = "example",
            DbInstanceId = default7mX6ld.Id,
            ServiceDescription = "example",
            ServiceSpec = "8",
        });
    
        var defaultStreamingDataSource = new AliCloud.Gpdb.StreamingDataSource("default", new()
        {
            DbInstanceId = default7mX6ld.Id,
            DataSourceName = "example-kafka3",
            DataSourceConfig = kafka_config,
            DataSourceType = "kafka",
            DataSourceDescription = "example-kafka",
            ServiceId = defaultwruvdv.ServiceId,
        });
    
    });
    
    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.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.gpdb.Instance;
    import com.pulumi.alicloud.gpdb.InstanceArgs;
    import com.pulumi.alicloud.gpdb.StreamingDataService;
    import com.pulumi.alicloud.gpdb.StreamingDataServiceArgs;
    import com.pulumi.alicloud.gpdb.StreamingDataSource;
    import com.pulumi.alicloud.gpdb.StreamingDataSourceArgs;
    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 kafka_config_modify = config.get("kafka-config-modify").orElse("""
    {
        "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
        "delimiter": "#",
        "format": "delimited",
        "topic": "ziyuan_example"
    }
            """);
            final var kafka_config = config.get("kafka-config").orElse("""
    {
        "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
        "delimiter": "|",
        "format": "delimited",
        "topic": "ziyuan_example"
    }
            """);
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            var defaultDfkYOR = new Network("defaultDfkYOR", NetworkArgs.builder()
                .cidrBlock("192.168.0.0/16")
                .build());
    
            var default59ZqyD = new Switch("default59ZqyD", SwitchArgs.builder()
                .vpcId(defaultDfkYOR.id())
                .zoneId("cn-beijing-h")
                .cidrBlock("192.168.1.0/24")
                .build());
    
            var default7mX6ld = new Instance("default7mX6ld", InstanceArgs.builder()
                .instanceSpec("2C8G")
                .description(name)
                .segNodeNum("2")
                .segStorageType("cloud_essd")
                .instanceNetworkType("VPC")
                .dbInstanceCategory("Basic")
                .paymentType("PayAsYouGo")
                .sslEnabled("0")
                .engineVersion("6.0")
                .zoneId("cn-beijing-h")
                .vswitchId(default59ZqyD.id())
                .storageSize("50")
                .masterCu("4")
                .vpcId(defaultDfkYOR.id())
                .dbInstanceMode("StorageElastic")
                .engine("gpdb")
                .build());
    
            var defaultwruvdv = new StreamingDataService("defaultwruvdv", StreamingDataServiceArgs.builder()
                .serviceName("example")
                .dbInstanceId(default7mX6ld.id())
                .serviceDescription("example")
                .serviceSpec("8")
                .build());
    
            var defaultStreamingDataSource = new StreamingDataSource("defaultStreamingDataSource", StreamingDataSourceArgs.builder()
                .dbInstanceId(default7mX6ld.id())
                .dataSourceName("example-kafka3")
                .dataSourceConfig(kafka_config)
                .dataSourceType("kafka")
                .dataSourceDescription("example-kafka")
                .serviceId(defaultwruvdv.serviceId())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
      kafka-config-modify:
        type: string
        default: |
          {
              "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
              "delimiter": "#",
              "format": "delimited",
              "topic": "ziyuan_example"
          }      
      kafka-config:
        type: string
        default: |
          {
              "brokers": "alikafka-post-cn-g4t3t4eod004-1-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-2-vpc.alikafka.aliyuncs.com:9092,alikafka-post-cn-g4t3t4eod004-3-vpc.alikafka.aliyuncs.com:9092",
              "delimiter": "|",
              "format": "delimited",
              "topic": "ziyuan_example"
          }      
    resources:
      defaultDfkYOR:
        type: alicloud:vpc:Network
        properties:
          cidrBlock: 192.168.0.0/16
      default59ZqyD:
        type: alicloud:vpc:Switch
        properties:
          vpcId: ${defaultDfkYOR.id}
          zoneId: cn-beijing-h
          cidrBlock: 192.168.1.0/24
      default7mX6ld:
        type: alicloud:gpdb:Instance
        properties:
          instanceSpec: 2C8G
          description: ${name}
          segNodeNum: '2'
          segStorageType: cloud_essd
          instanceNetworkType: VPC
          dbInstanceCategory: Basic
          paymentType: PayAsYouGo
          sslEnabled: '0'
          engineVersion: '6.0'
          zoneId: cn-beijing-h
          vswitchId: ${default59ZqyD.id}
          storageSize: '50'
          masterCu: '4'
          vpcId: ${defaultDfkYOR.id}
          dbInstanceMode: StorageElastic
          engine: gpdb
      defaultwruvdv:
        type: alicloud:gpdb:StreamingDataService
        properties:
          serviceName: example
          dbInstanceId: ${default7mX6ld.id}
          serviceDescription: example
          serviceSpec: '8'
      defaultStreamingDataSource:
        type: alicloud:gpdb:StreamingDataSource
        name: default
        properties:
          dbInstanceId: ${default7mX6ld.id}
          dataSourceName: example-kafka3
          dataSourceConfig: ${["kafka-config"]}
          dataSourceType: kafka
          dataSourceDescription: example-kafka
          serviceId: ${defaultwruvdv.serviceId}
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
    

    Create StreamingDataSource Resource

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

    Constructor syntax

    new StreamingDataSource(name: string, args: StreamingDataSourceArgs, opts?: CustomResourceOptions);
    @overload
    def StreamingDataSource(resource_name: str,
                            args: StreamingDataSourceArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def StreamingDataSource(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            data_source_config: Optional[str] = None,
                            data_source_name: Optional[str] = None,
                            data_source_type: Optional[str] = None,
                            db_instance_id: Optional[str] = None,
                            service_id: Optional[int] = None,
                            data_source_description: Optional[str] = None)
    func NewStreamingDataSource(ctx *Context, name string, args StreamingDataSourceArgs, opts ...ResourceOption) (*StreamingDataSource, error)
    public StreamingDataSource(string name, StreamingDataSourceArgs args, CustomResourceOptions? opts = null)
    public StreamingDataSource(String name, StreamingDataSourceArgs args)
    public StreamingDataSource(String name, StreamingDataSourceArgs args, CustomResourceOptions options)
    
    type: alicloud:gpdb:StreamingDataSource
    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 StreamingDataSourceArgs
    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 StreamingDataSourceArgs
    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 StreamingDataSourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StreamingDataSourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StreamingDataSourceArgs
    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 streamingDataSourceResource = new AliCloud.Gpdb.StreamingDataSource("streamingDataSourceResource", new()
    {
        DataSourceConfig = "string",
        DataSourceName = "string",
        DataSourceType = "string",
        DbInstanceId = "string",
        ServiceId = 0,
        DataSourceDescription = "string",
    });
    
    example, err := gpdb.NewStreamingDataSource(ctx, "streamingDataSourceResource", &gpdb.StreamingDataSourceArgs{
    	DataSourceConfig:      pulumi.String("string"),
    	DataSourceName:        pulumi.String("string"),
    	DataSourceType:        pulumi.String("string"),
    	DbInstanceId:          pulumi.String("string"),
    	ServiceId:             pulumi.Int(0),
    	DataSourceDescription: pulumi.String("string"),
    })
    
    var streamingDataSourceResource = new StreamingDataSource("streamingDataSourceResource", StreamingDataSourceArgs.builder()
        .dataSourceConfig("string")
        .dataSourceName("string")
        .dataSourceType("string")
        .dbInstanceId("string")
        .serviceId(0)
        .dataSourceDescription("string")
        .build());
    
    streaming_data_source_resource = alicloud.gpdb.StreamingDataSource("streamingDataSourceResource",
        data_source_config="string",
        data_source_name="string",
        data_source_type="string",
        db_instance_id="string",
        service_id=0,
        data_source_description="string")
    
    const streamingDataSourceResource = new alicloud.gpdb.StreamingDataSource("streamingDataSourceResource", {
        dataSourceConfig: "string",
        dataSourceName: "string",
        dataSourceType: "string",
        dbInstanceId: "string",
        serviceId: 0,
        dataSourceDescription: "string",
    });
    
    type: alicloud:gpdb:StreamingDataSource
    properties:
        dataSourceConfig: string
        dataSourceDescription: string
        dataSourceName: string
        dataSourceType: string
        dbInstanceId: string
        serviceId: 0
    

    StreamingDataSource Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The StreamingDataSource resource accepts the following input properties:

    DataSourceConfig string
    The configurations of the data source.
    DataSourceName string
    Data Source Name
    DataSourceType string
    Data Source Type
    DbInstanceId string

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    ServiceId int
    The real-time data service ID.
    DataSourceDescription string
    The description of the data source.
    DataSourceConfig string
    The configurations of the data source.
    DataSourceName string
    Data Source Name
    DataSourceType string
    Data Source Type
    DbInstanceId string

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    ServiceId int
    The real-time data service ID.
    DataSourceDescription string
    The description of the data source.
    dataSourceConfig String
    The configurations of the data source.
    dataSourceName String
    Data Source Name
    dataSourceType String
    Data Source Type
    dbInstanceId String

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    serviceId Integer
    The real-time data service ID.
    dataSourceDescription String
    The description of the data source.
    dataSourceConfig string
    The configurations of the data source.
    dataSourceName string
    Data Source Name
    dataSourceType string
    Data Source Type
    dbInstanceId string

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    serviceId number
    The real-time data service ID.
    dataSourceDescription string
    The description of the data source.
    data_source_config str
    The configurations of the data source.
    data_source_name str
    Data Source Name
    data_source_type str
    Data Source Type
    db_instance_id str

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    service_id int
    The real-time data service ID.
    data_source_description str
    The description of the data source.
    dataSourceConfig String
    The configurations of the data source.
    dataSourceName String
    Data Source Name
    dataSourceType String
    Data Source Type
    dbInstanceId String

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    serviceId Number
    The real-time data service ID.
    dataSourceDescription String
    The description of the data source.

    Outputs

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

    CreateTime string
    Creation time
    DataSourceId string
    The data source ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Service Status:
    CreateTime string
    Creation time
    DataSourceId string
    The data source ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Service Status:
    createTime String
    Creation time
    dataSourceId String
    The data source ID.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Service Status:
    createTime string
    Creation time
    dataSourceId string
    The data source ID.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Service Status:
    create_time str
    Creation time
    data_source_id str
    The data source ID.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Service Status:
    createTime String
    Creation time
    dataSourceId String
    The data source ID.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Service Status:

    Look up Existing StreamingDataSource Resource

    Get an existing StreamingDataSource 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?: StreamingDataSourceState, opts?: CustomResourceOptions): StreamingDataSource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            data_source_config: 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,
            service_id: Optional[int] = None,
            status: Optional[str] = None) -> StreamingDataSource
    func GetStreamingDataSource(ctx *Context, name string, id IDInput, state *StreamingDataSourceState, opts ...ResourceOption) (*StreamingDataSource, error)
    public static StreamingDataSource Get(string name, Input<string> id, StreamingDataSourceState? state, CustomResourceOptions? opts = null)
    public static StreamingDataSource get(String name, Output<String> id, StreamingDataSourceState 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
    Creation time
    DataSourceConfig string
    The configurations of the data source.
    DataSourceDescription string
    The description of the data source.
    DataSourceId string
    The data source ID.
    DataSourceName string
    Data Source Name
    DataSourceType string
    Data Source Type
    DbInstanceId string

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    ServiceId int
    The real-time data service ID.
    Status string
    Service Status:
    CreateTime string
    Creation time
    DataSourceConfig string
    The configurations of the data source.
    DataSourceDescription string
    The description of the data source.
    DataSourceId string
    The data source ID.
    DataSourceName string
    Data Source Name
    DataSourceType string
    Data Source Type
    DbInstanceId string

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    ServiceId int
    The real-time data service ID.
    Status string
    Service Status:
    createTime String
    Creation time
    dataSourceConfig String
    The configurations of the data source.
    dataSourceDescription String
    The description of the data source.
    dataSourceId String
    The data source ID.
    dataSourceName String
    Data Source Name
    dataSourceType String
    Data Source Type
    dbInstanceId String

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    serviceId Integer
    The real-time data service ID.
    status String
    Service Status:
    createTime string
    Creation time
    dataSourceConfig string
    The configurations of the data source.
    dataSourceDescription string
    The description of the data source.
    dataSourceId string
    The data source ID.
    dataSourceName string
    Data Source Name
    dataSourceType string
    Data Source Type
    dbInstanceId string

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    serviceId number
    The real-time data service ID.
    status string
    Service Status:
    create_time str
    Creation time
    data_source_config str
    The configurations of the data source.
    data_source_description str
    The description of the data source.
    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.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    service_id int
    The real-time data service ID.
    status str
    Service Status:
    createTime String
    Creation time
    dataSourceConfig String
    The configurations of the data source.
    dataSourceDescription String
    The description of the data source.
    dataSourceId String
    The data source ID.
    dataSourceName String
    Data Source Name
    dataSourceType String
    Data Source Type
    dbInstanceId String

    The instance ID.

    NOTE: You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.

    serviceId Number
    The real-time data service ID.
    status String
    Service Status:

    Import

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

    $ pulumi import alicloud:gpdb/streamingDataSource:StreamingDataSource 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.62.1 published on Monday, Sep 16, 2024 by Pulumi