alicloud.gpdb.StreamingDataService
Explore with Pulumi AI
Provides a GPDB Streaming Data Service resource.
For information about GPDB Streaming Data Service and how to use it, see What is Streaming Data Service.
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 default = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const defaultTXZPBL = new alicloud.vpc.Network("defaultTXZPBL", {cidrBlock: "192.168.0.0/16"});
const defaultrJ5mmz = new alicloud.vpc.Switch("defaultrJ5mmz", {
vpcId: defaultTXZPBL.id,
zoneId: "cn-beijing-h",
cidrBlock: "192.168.1.0/24",
});
const default1oSPzX = new alicloud.gpdb.Instance("default1oSPzX", {
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: defaultrJ5mmz.id,
storageSize: 50,
masterCu: 4,
vpcId: defaultTXZPBL.id,
dbInstanceMode: "StorageElastic",
engine: "gpdb",
});
const defaultStreamingDataService = new alicloud.gpdb.StreamingDataService("default", {
serviceName: "example",
dbInstanceId: default1oSPzX.id,
serviceDescription: "example",
serviceSpec: "8",
});
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_txzpbl = alicloud.vpc.Network("defaultTXZPBL", cidr_block="192.168.0.0/16")
defaultr_j5mmz = alicloud.vpc.Switch("defaultrJ5mmz",
vpc_id=default_txzpbl.id,
zone_id="cn-beijing-h",
cidr_block="192.168.1.0/24")
default1o_s_pz_x = alicloud.gpdb.Instance("default1oSPzX",
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=defaultr_j5mmz.id,
storage_size=50,
master_cu=4,
vpc_id=default_txzpbl.id,
db_instance_mode="StorageElastic",
engine="gpdb")
default_streaming_data_service = alicloud.gpdb.StreamingDataService("default",
service_name="example",
db_instance_id=default1o_s_pz_x.id,
service_description="example",
service_spec="8")
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
}
defaultTXZPBL, err := vpc.NewNetwork(ctx, "defaultTXZPBL", &vpc.NetworkArgs{
CidrBlock: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
defaultrJ5mmz, err := vpc.NewSwitch(ctx, "defaultrJ5mmz", &vpc.SwitchArgs{
VpcId: defaultTXZPBL.ID(),
ZoneId: pulumi.String("cn-beijing-h"),
CidrBlock: pulumi.String("192.168.1.0/24"),
})
if err != nil {
return err
}
default1oSPzX, err := gpdb.NewInstance(ctx, "default1oSPzX", &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: defaultrJ5mmz.ID(),
StorageSize: pulumi.Int(50),
MasterCu: pulumi.Int(4),
VpcId: defaultTXZPBL.ID(),
DbInstanceMode: pulumi.String("StorageElastic"),
Engine: pulumi.String("gpdb"),
})
if err != nil {
return err
}
_, err = gpdb.NewStreamingDataService(ctx, "default", &gpdb.StreamingDataServiceArgs{
ServiceName: pulumi.String("example"),
DbInstanceId: default1oSPzX.ID(),
ServiceDescription: pulumi.String("example"),
ServiceSpec: pulumi.String("8"),
})
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 defaultTXZPBL = new AliCloud.Vpc.Network("defaultTXZPBL", new()
{
CidrBlock = "192.168.0.0/16",
});
var defaultrJ5mmz = new AliCloud.Vpc.Switch("defaultrJ5mmz", new()
{
VpcId = defaultTXZPBL.Id,
ZoneId = "cn-beijing-h",
CidrBlock = "192.168.1.0/24",
});
var default1oSPzX = new AliCloud.Gpdb.Instance("default1oSPzX", 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 = defaultrJ5mmz.Id,
StorageSize = 50,
MasterCu = 4,
VpcId = defaultTXZPBL.Id,
DbInstanceMode = "StorageElastic",
Engine = "gpdb",
});
var defaultStreamingDataService = new AliCloud.Gpdb.StreamingDataService("default", new()
{
ServiceName = "example",
DbInstanceId = default1oSPzX.Id,
ServiceDescription = "example",
ServiceSpec = "8",
});
});
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 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());
var defaultTXZPBL = new Network("defaultTXZPBL", NetworkArgs.builder()
.cidrBlock("192.168.0.0/16")
.build());
var defaultrJ5mmz = new Switch("defaultrJ5mmz", SwitchArgs.builder()
.vpcId(defaultTXZPBL.id())
.zoneId("cn-beijing-h")
.cidrBlock("192.168.1.0/24")
.build());
var default1oSPzX = new Instance("default1oSPzX", 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(defaultrJ5mmz.id())
.storageSize("50")
.masterCu("4")
.vpcId(defaultTXZPBL.id())
.dbInstanceMode("StorageElastic")
.engine("gpdb")
.build());
var defaultStreamingDataService = new StreamingDataService("defaultStreamingDataService", StreamingDataServiceArgs.builder()
.serviceName("example")
.dbInstanceId(default1oSPzX.id())
.serviceDescription("example")
.serviceSpec("8")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultTXZPBL:
type: alicloud:vpc:Network
properties:
cidrBlock: 192.168.0.0/16
defaultrJ5mmz:
type: alicloud:vpc:Switch
properties:
vpcId: ${defaultTXZPBL.id}
zoneId: cn-beijing-h
cidrBlock: 192.168.1.0/24
default1oSPzX:
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: ${defaultrJ5mmz.id}
storageSize: '50'
masterCu: '4'
vpcId: ${defaultTXZPBL.id}
dbInstanceMode: StorageElastic
engine: gpdb
defaultStreamingDataService:
type: alicloud:gpdb:StreamingDataService
name: default
properties:
serviceName: example
dbInstanceId: ${default1oSPzX.id}
serviceDescription: example
serviceSpec: '8'
variables:
default:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: VSwitch
Create StreamingDataService Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StreamingDataService(name: string, args: StreamingDataServiceArgs, opts?: CustomResourceOptions);
@overload
def StreamingDataService(resource_name: str,
args: StreamingDataServiceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def StreamingDataService(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_instance_id: Optional[str] = None,
service_name: Optional[str] = None,
service_spec: Optional[str] = None,
service_description: Optional[str] = None)
func NewStreamingDataService(ctx *Context, name string, args StreamingDataServiceArgs, opts ...ResourceOption) (*StreamingDataService, error)
public StreamingDataService(string name, StreamingDataServiceArgs args, CustomResourceOptions? opts = null)
public StreamingDataService(String name, StreamingDataServiceArgs args)
public StreamingDataService(String name, StreamingDataServiceArgs args, CustomResourceOptions options)
type: alicloud:gpdb:StreamingDataService
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 StreamingDataServiceArgs
- 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 StreamingDataServiceArgs
- 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 StreamingDataServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StreamingDataServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StreamingDataServiceArgs
- 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 streamingDataServiceResource = new AliCloud.Gpdb.StreamingDataService("streamingDataServiceResource", new()
{
DbInstanceId = "string",
ServiceName = "string",
ServiceSpec = "string",
ServiceDescription = "string",
});
example, err := gpdb.NewStreamingDataService(ctx, "streamingDataServiceResource", &gpdb.StreamingDataServiceArgs{
DbInstanceId: pulumi.String("string"),
ServiceName: pulumi.String("string"),
ServiceSpec: pulumi.String("string"),
ServiceDescription: pulumi.String("string"),
})
var streamingDataServiceResource = new StreamingDataService("streamingDataServiceResource", StreamingDataServiceArgs.builder()
.dbInstanceId("string")
.serviceName("string")
.serviceSpec("string")
.serviceDescription("string")
.build());
streaming_data_service_resource = alicloud.gpdb.StreamingDataService("streamingDataServiceResource",
db_instance_id="string",
service_name="string",
service_spec="string",
service_description="string")
const streamingDataServiceResource = new alicloud.gpdb.StreamingDataService("streamingDataServiceResource", {
dbInstanceId: "string",
serviceName: "string",
serviceSpec: "string",
serviceDescription: "string",
});
type: alicloud:gpdb:StreamingDataService
properties:
dbInstanceId: string
serviceDescription: string
serviceName: string
serviceSpec: string
StreamingDataService 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 StreamingDataService resource accepts the following input properties:
- Db
Instance stringId - The ID of the associated instance.
- Service
Name string - Service Name
- Service
Spec string - Resource Specifications
- Service
Description string - The creation time of the resource
- Db
Instance stringId - The ID of the associated instance.
- Service
Name string - Service Name
- Service
Spec string - Resource Specifications
- Service
Description string - The creation time of the resource
- db
Instance StringId - The ID of the associated instance.
- service
Name String - Service Name
- service
Spec String - Resource Specifications
- service
Description String - The creation time of the resource
- db
Instance stringId - The ID of the associated instance.
- service
Name string - Service Name
- service
Spec string - Resource Specifications
- service
Description string - The creation time of the resource
- db_
instance_ strid - The ID of the associated instance.
- service_
name str - Service Name
- service_
spec str - Resource Specifications
- service_
description str - The creation time of the resource
- db
Instance StringId - The ID of the associated instance.
- service
Name String - Service Name
- service
Spec String - Resource Specifications
- service
Description String - The creation time of the resource
Outputs
All input properties are implicitly available as output properties. Additionally, the StreamingDataService resource produces the following output properties:
- Create
Time string - Create time
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Id string - Service ID
- Status string
- The status of the resource
- Create
Time string - Create time
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Id string - Service ID
- Status string
- The status of the resource
- create
Time String - Create time
- id String
- The provider-assigned unique ID for this managed resource.
- service
Id String - Service ID
- status String
- The status of the resource
- create
Time string - Create time
- id string
- The provider-assigned unique ID for this managed resource.
- service
Id string - Service ID
- status string
- The status of the resource
- create_
time str - Create time
- id str
- The provider-assigned unique ID for this managed resource.
- service_
id str - Service ID
- status str
- The status of the resource
- create
Time String - Create time
- id String
- The provider-assigned unique ID for this managed resource.
- service
Id String - Service ID
- status String
- The status of the resource
Look up Existing StreamingDataService Resource
Get an existing StreamingDataService 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?: StreamingDataServiceState, opts?: CustomResourceOptions): StreamingDataService
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
db_instance_id: Optional[str] = None,
service_description: Optional[str] = None,
service_id: Optional[str] = None,
service_name: Optional[str] = None,
service_spec: Optional[str] = None,
status: Optional[str] = None) -> StreamingDataService
func GetStreamingDataService(ctx *Context, name string, id IDInput, state *StreamingDataServiceState, opts ...ResourceOption) (*StreamingDataService, error)
public static StreamingDataService Get(string name, Input<string> id, StreamingDataServiceState? state, CustomResourceOptions? opts = null)
public static StreamingDataService get(String name, Output<String> id, StreamingDataServiceState 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.
- Create
Time string - Create time
- Db
Instance stringId - The ID of the associated instance.
- Service
Description string - The creation time of the resource
- Service
Id string - Service ID
- Service
Name string - Service Name
- Service
Spec string - Resource Specifications
- Status string
- The status of the resource
- Create
Time string - Create time
- Db
Instance stringId - The ID of the associated instance.
- Service
Description string - The creation time of the resource
- Service
Id string - Service ID
- Service
Name string - Service Name
- Service
Spec string - Resource Specifications
- Status string
- The status of the resource
- create
Time String - Create time
- db
Instance StringId - The ID of the associated instance.
- service
Description String - The creation time of the resource
- service
Id String - Service ID
- service
Name String - Service Name
- service
Spec String - Resource Specifications
- status String
- The status of the resource
- create
Time string - Create time
- db
Instance stringId - The ID of the associated instance.
- service
Description string - The creation time of the resource
- service
Id string - Service ID
- service
Name string - Service Name
- service
Spec string - Resource Specifications
- status string
- The status of the resource
- create_
time str - Create time
- db_
instance_ strid - The ID of the associated instance.
- service_
description str - The creation time of the resource
- service_
id str - Service ID
- service_
name str - Service Name
- service_
spec str - Resource Specifications
- status str
- The status of the resource
- create
Time String - Create time
- db
Instance StringId - The ID of the associated instance.
- service
Description String - The creation time of the resource
- service
Id String - Service ID
- service
Name String - Service Name
- service
Spec String - Resource Specifications
- status String
- The status of the resource
Import
GPDB Streaming Data Service can be imported using the id, e.g.
$ pulumi import alicloud:gpdb/streamingDataService:StreamingDataService example <db_instance_id>:<service_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.