Module gpdb
This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-alicloudrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-alicloudrepo.
Resources
Functions
Others
- ConnectionArgs
- ConnectionState
- GetInstancesArgs
- GetInstancesResult
- GetZonesArgs
- GetZonesResult
- InstanceArgs
- InstanceState
Resources
Resource Connection
class Connection extends CustomResourceProvides a connection resource to allocate an Internet connection string for instance.
NOTE: Available in 1.48.0+
NOTE: Each instance will allocate a intranet connection string automatically and its prefix is instance ID. To avoid unnecessary conflict, please specified a internet connection prefix before applying the resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const creation = config.get("creation") || "Gpdb";
const name = config.get("name") || "gpdbConnectionBasic";
const defaultZones = pulumi.output(alicloud.getZones({
availableResourceCreation: creation,
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/24",
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.gpdb.Instance("default", {
description: name,
engine: "gpdb",
engineVersion: "4.3",
instanceClass: "gpdb.group.segsdx2",
instanceGroupCount: "2",
vswitchId: defaultSwitch.id,
});
const defaultConnection = new alicloud.gpdb.Connection("default", {
connectionPrefix: "testAbc",
instanceId: defaultInstance.id,
});constructor
new Connection(name: string, args: ConnectionArgs, opts?: pulumi.CustomResourceOptions)Create a Connection resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ConnectionState, opts?: pulumi.CustomResourceOptions): ConnectionGet an existing Connection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ConnectionReturns true if the given object is an instance of Connection. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property connectionPrefix
public connectionPrefix: pulumi.Output<string>;Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
property connectionString
public connectionString: pulumi.Output<string>;Connection instance string.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property instanceId
public instanceId: pulumi.Output<string>;The Id of instance that can run database.
property ipAddress
public ipAddress: pulumi.Output<string>;The ip address of connection string.
property port
public port: pulumi.Output<string | undefined>;Internet connection port. Valid value: [3200-3999]. Default to 3306.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Instance
class Instance extends CustomResourceProvides a AnalyticDB for PostgreSQL instance resource supports replica set instances only. the AnalyticDB for PostgreSQL provides stable, reliable, and automatic scalable database services. You can see detail product introduction here
NOTE: Available in 1.47.0+
NOTE: The following regions don’t support create Classic network Gpdb instance. [
ap-southeast-2,ap-southeast-3,ap-southeast-5,ap-south-1,me-east-1,ap-northeast-1,eu-west-1,us-east-1,eu-central-1,cn-shanghai-finance-1,cn-shenzhen-finance-1,cn-hangzhou-finance]NOTE: Create instance or change instance would cost 10~15 minutes. Please make full preparation.
constructor
new Instance(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions)Create a Instance resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceState, opts?: pulumi.CustomResourceOptions): InstanceGet an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is InstanceReturns true if the given object is an instance of Instance. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property availabilityZone
public availabilityZone: pulumi.Output<string>;property description
public description: pulumi.Output<string | undefined>;The name of DB instance. It a string of 2 to 256 characters.
property engine
public engine: pulumi.Output<string>;Database engine: gpdb. System Default value: gpdb.
property engineVersion
public engineVersion: pulumi.Output<string>;Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property instanceChargeType
public instanceChargeType: pulumi.Output<string>;Valid values are PrePaid, PostPaid,System default to PostPaid.
property instanceClass
public instanceClass: pulumi.Output<string>;Instance specification. see Instance specifications.
property instanceGroupCount
public instanceGroupCount: pulumi.Output<string>;The number of groups. Valid values: [2,4,8,16,32]
property securityIpLists
public securityIpLists: pulumi.Output<string[]>;List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property vswitchId
public vswitchId: pulumi.Output<string>;The virtual switch ID to launch DB instances in one VPC.
Functions
Function getInstances
getInstances(args?: GetInstancesArgs, opts?: pulumi.InvokeOptions): Promise<GetInstancesResult>The alicloud.gpdb.getInstances data source provides a collection of AnalyticDB for PostgreSQL instances available in Alicloud account.
Filters support regular expression for the instance name or availability_zone.
NOTE: Available in 1.47.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const gpdb = pulumi.output(alicloud.gpdb.getInstances({
availabilityZone: "cn-beijing-c",
nameRegex: "gp-.+\\d+",
outputFile: "instances.txt",
}, { async: true }));
export const instanceId = gpdb.instances[0].id;Function getZones
getZones(args?: GetZonesArgs, opts?: pulumi.InvokeOptions): Promise<GetZonesResult>This data source provides availability zones for Gpdb that can be accessed by an Alibaba Cloud account within the region configured in the provider.
NOTE: Available in v1.73.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const zonesIds = alicloud.gpdb.getZones({});
// Create an Gpdb instance with the first matched zone
const hbase = new alicloud.hbase.Instance("hbase", {availabilityZone: zonesIds.then(zonesIds => zonesIds.zones[0].id)});
// Other properties...Others
interface ConnectionArgs
interface ConnectionArgsThe set of arguments for constructing a Connection resource.
property connectionPrefix
connectionPrefix?: pulumi.Input<string>;Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
property instanceId
instanceId: pulumi.Input<string>;The Id of instance that can run database.
property port
port?: pulumi.Input<string>;Internet connection port. Valid value: [3200-3999]. Default to 3306.
interface ConnectionState
interface ConnectionStateInput properties used for looking up and filtering Connection resources.
property connectionPrefix
connectionPrefix?: pulumi.Input<string>;Prefix of an Internet connection string. It must be checked for uniqueness. It may consist of lowercase letters, numbers, and underlines, and must start with a letter and have no more than 30 characters. Default to
property connectionString
connectionString?: pulumi.Input<string>;Connection instance string.
property instanceId
instanceId?: pulumi.Input<string>;The Id of instance that can run database.
property ipAddress
ipAddress?: pulumi.Input<string>;The ip address of connection string.
property port
port?: pulumi.Input<string>;Internet connection port. Valid value: [3200-3999]. Default to 3306.
interface GetInstancesArgs
interface GetInstancesArgsA collection of arguments for invoking getInstances.
property availabilityZone
availabilityZone?: undefined | string;Instance availability zone.
property ids
ids?: string[];A list of instance IDs.
property nameRegex
nameRegex?: undefined | string;A regex string to apply to the instance name.
property outputFile
outputFile?: undefined | string;property tags
tags?: undefined | {[key: string]: any};A mapping of tags to assign to the resource.
property vswitchId
vswitchId?: undefined | string;Used to retrieve instances belong to specified vswitch resources.
interface GetInstancesResult
interface GetInstancesResultA collection of values returned by getInstances.
property availabilityZone
availabilityZone?: undefined | string;Instance availability zone.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];The ids list of AnalyticDB for PostgreSQL instances.
property instances
instances: GetInstancesInstance[];A list of AnalyticDB for PostgreSQL instances. Its every element contains the following attributes:
property nameRegex
nameRegex?: undefined | string;property names
names: string[];The names list of AnalyticDB for PostgreSQL instance.
property outputFile
outputFile?: undefined | string;property tags
tags?: undefined | {[key: string]: any};property vswitchId
vswitchId?: undefined | string;interface GetZonesArgs
interface GetZonesArgsA collection of arguments for invoking getZones.
property multi
multi?: undefined | false | true;Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch Gpdb instances.
property outputFile
outputFile?: undefined | string;interface GetZonesResult
interface GetZonesResultA collection of values returned by getZones.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of zone IDs.
property multi
multi?: undefined | false | true;property outputFile
outputFile?: undefined | string;property zones
zones: GetZonesZone[];A list of availability zones. Each element contains the following attributes:
interface InstanceArgs
interface InstanceArgsThe set of arguments for constructing a Instance resource.
property availabilityZone
availabilityZone?: pulumi.Input<string>;property description
description?: pulumi.Input<string>;The name of DB instance. It a string of 2 to 256 characters.
property engine
engine?: pulumi.Input<string>;Database engine: gpdb. System Default value: gpdb.
property engineVersion
engineVersion?: pulumi.Input<string>;Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
property instanceChargeType
instanceChargeType?: pulumi.Input<string>;Valid values are PrePaid, PostPaid,System default to PostPaid.
property instanceClass
instanceClass: pulumi.Input<string>;Instance specification. see Instance specifications.
property instanceGroupCount
instanceGroupCount: pulumi.Input<string>;The number of groups. Valid values: [2,4,8,16,32]
property securityIpLists
securityIpLists?: pulumi.Input<pulumi.Input<string>[]>;List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
property vswitchId
vswitchId?: pulumi.Input<string>;The virtual switch ID to launch DB instances in one VPC.
interface InstanceState
interface InstanceStateInput properties used for looking up and filtering Instance resources.
property availabilityZone
availabilityZone?: pulumi.Input<string>;property description
description?: pulumi.Input<string>;The name of DB instance. It a string of 2 to 256 characters.
property engine
engine?: pulumi.Input<string>;Database engine: gpdb. System Default value: gpdb.
property engineVersion
engineVersion?: pulumi.Input<string>;Database version. Value options can refer to the latest docs CreateDBInstance EngineVersion.
property instanceChargeType
instanceChargeType?: pulumi.Input<string>;Valid values are PrePaid, PostPaid,System default to PostPaid.
property instanceClass
instanceClass?: pulumi.Input<string>;Instance specification. see Instance specifications.
property instanceGroupCount
instanceGroupCount?: pulumi.Input<string>;The number of groups. Valid values: [2,4,8,16,32]
property securityIpLists
securityIpLists?: pulumi.Input<pulumi.Input<string>[]>;List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
property vswitchId
vswitchId?: pulumi.Input<string>;The virtual switch ID to launch DB instances in one VPC.