1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. gpdb
  5. ElasticInstance
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

alicloud.gpdb.ElasticInstance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

    Provides a AnalyticDB for PostgreSQL instance resource which storage type is flexible. Compared to the reserved storage ADB PG instance, you can scale up each disk and smoothly scale out nodes online.
    For more detail product introduction, see here.

    DEPRECATED: This resource has been deprecated from version 1.147.0. Please use new resource alicloud_gpdb_instance.

    NOTE: Available in 1.127.0+

    Example Usage

    Create a AnalyticDB for PostgreSQL instance

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "Gpdb",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
        {
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
        {
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            VswitchName = "vpc-123456",
        });
    
        var adbPgInstance = new AliCloud.Gpdb.ElasticInstance("adbPgInstance", new()
        {
            Engine = "gpdb",
            EngineVersion = "6.0",
            SegStorageType = "cloud_essd",
            SegNodeNum = 4,
            StorageSize = 50,
            InstanceSpec = "2C16G",
            DbInstanceDescription = "Created by terraform",
            InstanceNetworkType = "VPC",
            PaymentType = "PayAsYouGo",
            VswitchId = defaultSwitch.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"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("Gpdb"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
    			ZoneId:      *pulumi.String(defaultZones.Zones[0].Id),
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			VswitchName: pulumi.String("vpc-123456"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gpdb.NewElasticInstance(ctx, "adbPgInstance", &gpdb.ElasticInstanceArgs{
    			Engine:                pulumi.String("gpdb"),
    			EngineVersion:         pulumi.String("6.0"),
    			SegStorageType:        pulumi.String("cloud_essd"),
    			SegNodeNum:            pulumi.Int(4),
    			StorageSize:           pulumi.Int(50),
    			InstanceSpec:          pulumi.String("2C16G"),
    			DbInstanceDescription: pulumi.String("Created by terraform"),
    			InstanceNetworkType:   pulumi.String("VPC"),
    			PaymentType:           pulumi.String("PayAsYouGo"),
    			VswitchId:             defaultSwitch.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.ElasticInstance;
    import com.pulumi.alicloud.gpdb.ElasticInstanceArgs;
    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 defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("Gpdb")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()        
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()        
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .vswitchName("vpc-123456")
                .build());
    
            var adbPgInstance = new ElasticInstance("adbPgInstance", ElasticInstanceArgs.builder()        
                .engine("gpdb")
                .engineVersion("6.0")
                .segStorageType("cloud_essd")
                .segNodeNum(4)
                .storageSize(50)
                .instanceSpec("2C16G")
                .dbInstanceDescription("Created by terraform")
                .instanceNetworkType("VPC")
                .paymentType("PayAsYouGo")
                .vswitchId(defaultSwitch.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_zones = alicloud.get_zones(available_resource_creation="Gpdb")
    default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("defaultSwitch",
        zone_id=default_zones.zones[0].id,
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        vswitch_name="vpc-123456")
    adb_pg_instance = alicloud.gpdb.ElasticInstance("adbPgInstance",
        engine="gpdb",
        engine_version="6.0",
        seg_storage_type="cloud_essd",
        seg_node_num=4,
        storage_size=50,
        instance_spec="2C16G",
        db_instance_description="Created by terraform",
        instance_network_type="VPC",
        payment_type="PayAsYouGo",
        vswitch_id=default_switch.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultZones = alicloud.getZones({
        availableResourceCreation: "Gpdb",
    });
    const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {cidrBlock: "172.16.0.0/16"});
    const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        vswitchName: "vpc-123456",
    });
    const adbPgInstance = new alicloud.gpdb.ElasticInstance("adbPgInstance", {
        engine: "gpdb",
        engineVersion: "6.0",
        segStorageType: "cloud_essd",
        segNodeNum: 4,
        storageSize: 50,
        instanceSpec: "2C16G",
        dbInstanceDescription: "Created by terraform",
        instanceNetworkType: "VPC",
        paymentType: "PayAsYouGo",
        vswitchId: defaultSwitch.id,
    });
    
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        properties:
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        properties:
          zoneId: ${defaultZones.zones[0].id}
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          vswitchName: vpc-123456
      adbPgInstance:
        type: alicloud:gpdb:ElasticInstance
        properties:
          engine: gpdb
          engineVersion: '6.0'
          segStorageType: cloud_essd
          segNodeNum: 4
          storageSize: 50
          instanceSpec: 2C16G
          dbInstanceDescription: Created by terraform
          instanceNetworkType: VPC
          paymentType: PayAsYouGo
          vswitchId: ${defaultSwitch.id}
    variables:
      defaultZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: Gpdb
    

    Create ElasticInstance Resource

    new ElasticInstance(name: string, args: ElasticInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def ElasticInstance(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        db_instance_category: Optional[str] = None,
                        db_instance_description: Optional[str] = None,
                        encryption_key: Optional[str] = None,
                        encryption_type: Optional[str] = None,
                        engine: Optional[str] = None,
                        engine_version: Optional[str] = None,
                        instance_network_type: Optional[str] = None,
                        instance_spec: Optional[str] = None,
                        payment_duration: Optional[int] = None,
                        payment_duration_unit: Optional[str] = None,
                        payment_type: Optional[str] = None,
                        security_ip_lists: Optional[Sequence[str]] = None,
                        seg_node_num: Optional[int] = None,
                        seg_storage_type: Optional[str] = None,
                        storage_size: Optional[int] = None,
                        tags: Optional[Mapping[str, Any]] = None,
                        vswitch_id: Optional[str] = None,
                        zone_id: Optional[str] = None)
    @overload
    def ElasticInstance(resource_name: str,
                        args: ElasticInstanceArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewElasticInstance(ctx *Context, name string, args ElasticInstanceArgs, opts ...ResourceOption) (*ElasticInstance, error)
    public ElasticInstance(string name, ElasticInstanceArgs args, CustomResourceOptions? opts = null)
    public ElasticInstance(String name, ElasticInstanceArgs args)
    public ElasticInstance(String name, ElasticInstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:gpdb:ElasticInstance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ElasticInstanceArgs
    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 ElasticInstanceArgs
    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 ElasticInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ElasticInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ElasticInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Engine string

    Database engine: gpdb.

    EngineVersion string

    Database version. Valid value is 6.0.

    InstanceSpec string

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    SegNodeNum int

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    SegStorageType string

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    StorageSize int

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    VswitchId string

    The virtual switch ID to launch ADB PG instances in one VPC.

    DbInstanceCategory string

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    DbInstanceDescription string

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    EncryptionKey string

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    EncryptionType string

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    InstanceNetworkType string

    The network type of ADB PG instance. Only VPC supported now.

    PaymentDuration int

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    PaymentDurationUnit string

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    PaymentType string

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    SecurityIpLists List<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]).

    Tags Dictionary<string, object>

    A mapping of tags to assign to the resource.

    ZoneId string

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    Engine string

    Database engine: gpdb.

    EngineVersion string

    Database version. Valid value is 6.0.

    InstanceSpec string

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    SegNodeNum int

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    SegStorageType string

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    StorageSize int

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    VswitchId string

    The virtual switch ID to launch ADB PG instances in one VPC.

    DbInstanceCategory string

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    DbInstanceDescription string

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    EncryptionKey string

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    EncryptionType string

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    InstanceNetworkType string

    The network type of ADB PG instance. Only VPC supported now.

    PaymentDuration int

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    PaymentDurationUnit string

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    PaymentType string

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    SecurityIpLists []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]).

    Tags map[string]interface{}

    A mapping of tags to assign to the resource.

    ZoneId string

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    engine String

    Database engine: gpdb.

    engineVersion String

    Database version. Valid value is 6.0.

    instanceSpec String

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    segNodeNum Integer

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    segStorageType String

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    storageSize Integer

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    vswitchId String

    The virtual switch ID to launch ADB PG instances in one VPC.

    dbInstanceCategory String

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    dbInstanceDescription String

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    encryptionKey String

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    encryptionType String

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    instanceNetworkType String

    The network type of ADB PG instance. Only VPC supported now.

    paymentDuration Integer

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentDurationUnit String

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentType String

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    securityIpLists List<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]).

    tags Map<String,Object>

    A mapping of tags to assign to the resource.

    zoneId String

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    engine string

    Database engine: gpdb.

    engineVersion string

    Database version. Valid value is 6.0.

    instanceSpec string

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    segNodeNum number

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    segStorageType string

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    storageSize number

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    vswitchId string

    The virtual switch ID to launch ADB PG instances in one VPC.

    dbInstanceCategory string

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    dbInstanceDescription string

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    encryptionKey string

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    encryptionType string

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    instanceNetworkType string

    The network type of ADB PG instance. Only VPC supported now.

    paymentDuration number

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentDurationUnit string

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentType string

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    securityIpLists 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]).

    tags {[key: string]: any}

    A mapping of tags to assign to the resource.

    zoneId string

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    engine str

    Database engine: gpdb.

    engine_version str

    Database version. Valid value is 6.0.

    instance_spec str

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    seg_node_num int

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    seg_storage_type str

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    storage_size int

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    vswitch_id str

    The virtual switch ID to launch ADB PG instances in one VPC.

    db_instance_category str

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    db_instance_description str

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    encryption_key str

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    encryption_type str

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    instance_network_type str

    The network type of ADB PG instance. Only VPC supported now.

    payment_duration int

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    payment_duration_unit str

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    payment_type str

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    security_ip_lists Sequence[str]

    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]).

    tags Mapping[str, Any]

    A mapping of tags to assign to the resource.

    zone_id str

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    engine String

    Database engine: gpdb.

    engineVersion String

    Database version. Valid value is 6.0.

    instanceSpec String

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    segNodeNum Number

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    segStorageType String

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    storageSize Number

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    vswitchId String

    The virtual switch ID to launch ADB PG instances in one VPC.

    dbInstanceCategory String

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    dbInstanceDescription String

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    encryptionKey String

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    encryptionType String

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    instanceNetworkType String

    The network type of ADB PG instance. Only VPC supported now.

    paymentDuration Number

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentDurationUnit String

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentType String

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    securityIpLists List<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]).

    tags Map<Any>

    A mapping of tags to assign to the resource.

    zoneId String

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    Outputs

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

    ConnectionString string

    ADB PG instance connection string.

    Id string

    The provider-assigned unique ID for this managed resource.

    Port string

    (Available in 1.196.0+) The connection port of the instance.

    Status string

    Instance status.

    ConnectionString string

    ADB PG instance connection string.

    Id string

    The provider-assigned unique ID for this managed resource.

    Port string

    (Available in 1.196.0+) The connection port of the instance.

    Status string

    Instance status.

    connectionString String

    ADB PG instance connection string.

    id String

    The provider-assigned unique ID for this managed resource.

    port String

    (Available in 1.196.0+) The connection port of the instance.

    status String

    Instance status.

    connectionString string

    ADB PG instance connection string.

    id string

    The provider-assigned unique ID for this managed resource.

    port string

    (Available in 1.196.0+) The connection port of the instance.

    status string

    Instance status.

    connection_string str

    ADB PG instance connection string.

    id str

    The provider-assigned unique ID for this managed resource.

    port str

    (Available in 1.196.0+) The connection port of the instance.

    status str

    Instance status.

    connectionString String

    ADB PG instance connection string.

    id String

    The provider-assigned unique ID for this managed resource.

    port String

    (Available in 1.196.0+) The connection port of the instance.

    status String

    Instance status.

    Look up Existing ElasticInstance Resource

    Get an existing ElasticInstance 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?: ElasticInstanceState, opts?: CustomResourceOptions): ElasticInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_string: Optional[str] = None,
            db_instance_category: Optional[str] = None,
            db_instance_description: Optional[str] = None,
            encryption_key: Optional[str] = None,
            encryption_type: Optional[str] = None,
            engine: Optional[str] = None,
            engine_version: Optional[str] = None,
            instance_network_type: Optional[str] = None,
            instance_spec: Optional[str] = None,
            payment_duration: Optional[int] = None,
            payment_duration_unit: Optional[str] = None,
            payment_type: Optional[str] = None,
            port: Optional[str] = None,
            security_ip_lists: Optional[Sequence[str]] = None,
            seg_node_num: Optional[int] = None,
            seg_storage_type: Optional[str] = None,
            status: Optional[str] = None,
            storage_size: Optional[int] = None,
            tags: Optional[Mapping[str, Any]] = None,
            vswitch_id: Optional[str] = None,
            zone_id: Optional[str] = None) -> ElasticInstance
    func GetElasticInstance(ctx *Context, name string, id IDInput, state *ElasticInstanceState, opts ...ResourceOption) (*ElasticInstance, error)
    public static ElasticInstance Get(string name, Input<string> id, ElasticInstanceState? state, CustomResourceOptions? opts = null)
    public static ElasticInstance get(String name, Output<String> id, ElasticInstanceState 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:
    ConnectionString string

    ADB PG instance connection string.

    DbInstanceCategory string

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    DbInstanceDescription string

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    EncryptionKey string

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    EncryptionType string

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    Engine string

    Database engine: gpdb.

    EngineVersion string

    Database version. Valid value is 6.0.

    InstanceNetworkType string

    The network type of ADB PG instance. Only VPC supported now.

    InstanceSpec string

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    PaymentDuration int

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    PaymentDurationUnit string

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    PaymentType string

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    Port string

    (Available in 1.196.0+) The connection port of the instance.

    SecurityIpLists List<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]).

    SegNodeNum int

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    SegStorageType string

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    Status string

    Instance status.

    StorageSize int

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    Tags Dictionary<string, object>

    A mapping of tags to assign to the resource.

    VswitchId string

    The virtual switch ID to launch ADB PG instances in one VPC.

    ZoneId string

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    ConnectionString string

    ADB PG instance connection string.

    DbInstanceCategory string

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    DbInstanceDescription string

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    EncryptionKey string

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    EncryptionType string

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    Engine string

    Database engine: gpdb.

    EngineVersion string

    Database version. Valid value is 6.0.

    InstanceNetworkType string

    The network type of ADB PG instance. Only VPC supported now.

    InstanceSpec string

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    PaymentDuration int

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    PaymentDurationUnit string

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    PaymentType string

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    Port string

    (Available in 1.196.0+) The connection port of the instance.

    SecurityIpLists []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]).

    SegNodeNum int

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    SegStorageType string

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    Status string

    Instance status.

    StorageSize int

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    Tags map[string]interface{}

    A mapping of tags to assign to the resource.

    VswitchId string

    The virtual switch ID to launch ADB PG instances in one VPC.

    ZoneId string

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    connectionString String

    ADB PG instance connection string.

    dbInstanceCategory String

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    dbInstanceDescription String

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    encryptionKey String

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    encryptionType String

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    engine String

    Database engine: gpdb.

    engineVersion String

    Database version. Valid value is 6.0.

    instanceNetworkType String

    The network type of ADB PG instance. Only VPC supported now.

    instanceSpec String

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    paymentDuration Integer

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentDurationUnit String

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentType String

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    port String

    (Available in 1.196.0+) The connection port of the instance.

    securityIpLists List<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]).

    segNodeNum Integer

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    segStorageType String

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    status String

    Instance status.

    storageSize Integer

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    tags Map<String,Object>

    A mapping of tags to assign to the resource.

    vswitchId String

    The virtual switch ID to launch ADB PG instances in one VPC.

    zoneId String

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    connectionString string

    ADB PG instance connection string.

    dbInstanceCategory string

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    dbInstanceDescription string

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    encryptionKey string

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    encryptionType string

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    engine string

    Database engine: gpdb.

    engineVersion string

    Database version. Valid value is 6.0.

    instanceNetworkType string

    The network type of ADB PG instance. Only VPC supported now.

    instanceSpec string

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    paymentDuration number

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentDurationUnit string

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentType string

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    port string

    (Available in 1.196.0+) The connection port of the instance.

    securityIpLists 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]).

    segNodeNum number

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    segStorageType string

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    status string

    Instance status.

    storageSize number

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    tags {[key: string]: any}

    A mapping of tags to assign to the resource.

    vswitchId string

    The virtual switch ID to launch ADB PG instances in one VPC.

    zoneId string

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    connection_string str

    ADB PG instance connection string.

    db_instance_category str

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    db_instance_description str

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    encryption_key str

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    encryption_type str

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    engine str

    Database engine: gpdb.

    engine_version str

    Database version. Valid value is 6.0.

    instance_network_type str

    The network type of ADB PG instance. Only VPC supported now.

    instance_spec str

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    payment_duration int

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    payment_duration_unit str

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    payment_type str

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    port str

    (Available in 1.196.0+) The connection port of the instance.

    security_ip_lists Sequence[str]

    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]).

    seg_node_num int

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    seg_storage_type str

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    status str

    Instance status.

    storage_size int

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    tags Mapping[str, Any]

    A mapping of tags to assign to the resource.

    vswitch_id str

    The virtual switch ID to launch ADB PG instances in one VPC.

    zone_id str

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    connectionString String

    ADB PG instance connection string.

    dbInstanceCategory String

    The edition of the instance. Valid values: Basic, HighAvailability. Default value: HighAvailability.

    dbInstanceDescription String

    The description of ADB PG instance. It is a string of 2 to 256 characters.

    encryptionKey String

    The ID of the encryption key. Note: If the encryption_type parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region as the disk that is specified by the EncryptionType parameter. Otherwise, leave this parameter empty.

    encryptionType String

    The type of the encryption. Valid values: CloudDisk. Note: Disk encryption cannot be disabled after it is enabled.

    engine String

    Database engine: gpdb.

    engineVersion String

    Database version. Valid value is 6.0.

    instanceNetworkType String

    The network type of ADB PG instance. Only VPC supported now.

    instanceSpec String

    The specification of segment nodes.

    • When db_instance_category is HighAvailability, Valid values: 2C16G, 4C32G, 16C128G.
    • When db_instance_category is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
    paymentDuration Number

    The subscription period. Valid values: [1~12]. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentDurationUnit String

    The unit of the subscription period. Valid values: Month, Year. It is valid when payment_type is Subscription.
    NOTE: Will not take effect after modifying payment_duration_unit for now, if you want to renew a PayAsYouGo instance, need to do in on aliyun console.

    paymentType String

    Valid values are PayAsYouGo, Subscription. Default to PayAsYouGo.

    port String

    (Available in 1.196.0+) The connection port of the instance.

    securityIpLists List<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]).

    segNodeNum Number

    The number of segment nodes. Minimum is 4, max is 256, step is 4.

    segStorageType String

    The disk type of segment nodes. Valid values: cloud_essd, cloud_efficiency.

    status String

    Instance status.

    storageSize Number

    The storage capacity of per segment node. Unit: GB. Minimum is 50, max is 4000, step is 50.

    tags Map<Any>

    A mapping of tags to assign to the resource.

    vswitchId String

    The virtual switch ID to launch ADB PG instances in one VPC.

    zoneId String

    The Zone to launch the ADB PG instance. If specified, must be consistent with the zone where the vswitch is located.

    Import

    AnalyticDB for PostgreSQL can be imported using the id, e.g.

     $ pulumi import alicloud:gpdb/elasticInstance:ElasticInstance adb_pg_instance gp-bpxxxxxxxxxxxxxx
    

    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.43.1 published on Monday, Sep 11, 2023 by Pulumi