1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. gpdb
  5. DbInstancePlan
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.gpdb.DbInstancePlan

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a AnalyticDB for PostgreSQL (GPDB) DB Instance Plan resource.

    For information about AnalyticDB for PostgreSQL (GPDB) DB Instance Plan and how to use it, see What is DB Instance Plan.

    NOTE: Available since v1.189.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") || "tf-example";
    const defaultZones = alicloud.gpdb.getZones({});
    const defaultNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
    });
    const defaultSwitches = Promise.all([defaultNetworks, defaultZones]).then(([defaultNetworks, defaultZones]) => alicloud.vpc.getSwitches({
        vpcId: defaultNetworks.ids?.[0],
        zoneId: defaultZones.ids?.[0],
    }));
    const defaultInstance = new alicloud.gpdb.Instance("defaultInstance", {
        dbInstanceCategory: "HighAvailability",
        dbInstanceClass: "gpdb.group.segsdx1",
        dbInstanceMode: "StorageElastic",
        description: name,
        engine: "gpdb",
        engineVersion: "6.0",
        zoneId: defaultZones.then(defaultZones => defaultZones.ids?.[0]),
        instanceNetworkType: "VPC",
        instanceSpec: "2C16G",
        masterNodeNum: 1,
        paymentType: "PayAsYouGo",
        privateIpAddress: "1.1.1.1",
        segStorageType: "cloud_essd",
        segNodeNum: 4,
        storageSize: 50,
        vpcId: defaultNetworks.then(defaultNetworks => defaultNetworks.ids?.[0]),
        vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.ids?.[0]),
        ipWhitelists: [{
            securityIpList: "127.0.0.1",
        }],
    });
    const defaultDbInstancePlan = new alicloud.gpdb.DbInstancePlan("defaultDbInstancePlan", {
        dbInstancePlanName: name,
        planDesc: name,
        planType: "PauseResume",
        planScheduleType: "Regular",
        planConfigs: [{
            resume: {
                planCronTime: "0 0 0 1/1 * ? ",
            },
            pause: {
                planCronTime: "0 0 10 1/1 * ? ",
            },
        }],
        dbInstanceId: defaultInstance.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default_zones = alicloud.gpdb.get_zones()
    default_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
    default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0],
        zone_id=default_zones.ids[0])
    default_instance = alicloud.gpdb.Instance("defaultInstance",
        db_instance_category="HighAvailability",
        db_instance_class="gpdb.group.segsdx1",
        db_instance_mode="StorageElastic",
        description=name,
        engine="gpdb",
        engine_version="6.0",
        zone_id=default_zones.ids[0],
        instance_network_type="VPC",
        instance_spec="2C16G",
        master_node_num=1,
        payment_type="PayAsYouGo",
        private_ip_address="1.1.1.1",
        seg_storage_type="cloud_essd",
        seg_node_num=4,
        storage_size=50,
        vpc_id=default_networks.ids[0],
        vswitch_id=default_switches.ids[0],
        ip_whitelists=[alicloud.gpdb.InstanceIpWhitelistArgs(
            security_ip_list="127.0.0.1",
        )])
    default_db_instance_plan = alicloud.gpdb.DbInstancePlan("defaultDbInstancePlan",
        db_instance_plan_name=name,
        plan_desc=name,
        plan_type="PauseResume",
        plan_schedule_type="Regular",
        plan_configs=[alicloud.gpdb.DbInstancePlanPlanConfigArgs(
            resume=alicloud.gpdb.DbInstancePlanPlanConfigResumeArgs(
                plan_cron_time="0 0 0 1/1 * ? ",
            ),
            pause=alicloud.gpdb.DbInstancePlanPlanConfigPauseArgs(
                plan_cron_time="0 0 10 1/1 * ? ",
            ),
        )],
        db_instance_id=default_instance.id)
    
    package main
    
    import (
    	"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 := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultZones, err := gpdb.GetZones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(defaultZones.Ids[0]),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := gpdb.NewInstance(ctx, "defaultInstance", &gpdb.InstanceArgs{
    			DbInstanceCategory:  pulumi.String("HighAvailability"),
    			DbInstanceClass:     pulumi.String("gpdb.group.segsdx1"),
    			DbInstanceMode:      pulumi.String("StorageElastic"),
    			Description:         pulumi.String(name),
    			Engine:              pulumi.String("gpdb"),
    			EngineVersion:       pulumi.String("6.0"),
    			ZoneId:              pulumi.String(defaultZones.Ids[0]),
    			InstanceNetworkType: pulumi.String("VPC"),
    			InstanceSpec:        pulumi.String("2C16G"),
    			MasterNodeNum:       pulumi.Int(1),
    			PaymentType:         pulumi.String("PayAsYouGo"),
    			PrivateIpAddress:    pulumi.String("1.1.1.1"),
    			SegStorageType:      pulumi.String("cloud_essd"),
    			SegNodeNum:          pulumi.Int(4),
    			StorageSize:         pulumi.Int(50),
    			VpcId:               pulumi.String(defaultNetworks.Ids[0]),
    			VswitchId:           pulumi.String(defaultSwitches.Ids[0]),
    			IpWhitelists: gpdb.InstanceIpWhitelistArray{
    				&gpdb.InstanceIpWhitelistArgs{
    					SecurityIpList: pulumi.String("127.0.0.1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gpdb.NewDbInstancePlan(ctx, "defaultDbInstancePlan", &gpdb.DbInstancePlanArgs{
    			DbInstancePlanName: pulumi.String(name),
    			PlanDesc:           pulumi.String(name),
    			PlanType:           pulumi.String("PauseResume"),
    			PlanScheduleType:   pulumi.String("Regular"),
    			PlanConfigs: gpdb.DbInstancePlanPlanConfigArray{
    				&gpdb.DbInstancePlanPlanConfigArgs{
    					Resume: &gpdb.DbInstancePlanPlanConfigResumeArgs{
    						PlanCronTime: pulumi.String("0 0 0 1/1 * ? "),
    					},
    					Pause: &gpdb.DbInstancePlanPlanConfigPauseArgs{
    						PlanCronTime: pulumi.String("0 0 10 1/1 * ? "),
    					},
    				},
    			},
    			DbInstanceId: defaultInstance.ID(),
    		})
    		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") ?? "tf-example";
        var defaultZones = AliCloud.Gpdb.GetZones.Invoke();
    
        var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
        });
    
        var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Ids[0]),
        });
    
        var defaultInstance = new AliCloud.Gpdb.Instance("defaultInstance", new()
        {
            DbInstanceCategory = "HighAvailability",
            DbInstanceClass = "gpdb.group.segsdx1",
            DbInstanceMode = "StorageElastic",
            Description = name,
            Engine = "gpdb",
            EngineVersion = "6.0",
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Ids[0]),
            InstanceNetworkType = "VPC",
            InstanceSpec = "2C16G",
            MasterNodeNum = 1,
            PaymentType = "PayAsYouGo",
            PrivateIpAddress = "1.1.1.1",
            SegStorageType = "cloud_essd",
            SegNodeNum = 4,
            StorageSize = 50,
            VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            VswitchId = defaultSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            IpWhitelists = new[]
            {
                new AliCloud.Gpdb.Inputs.InstanceIpWhitelistArgs
                {
                    SecurityIpList = "127.0.0.1",
                },
            },
        });
    
        var defaultDbInstancePlan = new AliCloud.Gpdb.DbInstancePlan("defaultDbInstancePlan", new()
        {
            DbInstancePlanName = name,
            PlanDesc = name,
            PlanType = "PauseResume",
            PlanScheduleType = "Regular",
            PlanConfigs = new[]
            {
                new AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigArgs
                {
                    Resume = new AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigResumeArgs
                    {
                        PlanCronTime = "0 0 0 1/1 * ? ",
                    },
                    Pause = new AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigPauseArgs
                    {
                        PlanCronTime = "0 0 10 1/1 * ? ",
                    },
                },
            },
            DbInstanceId = defaultInstance.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.gpdb.GpdbFunctions;
    import com.pulumi.alicloud.gpdb.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.gpdb.Instance;
    import com.pulumi.alicloud.gpdb.InstanceArgs;
    import com.pulumi.alicloud.gpdb.inputs.InstanceIpWhitelistArgs;
    import com.pulumi.alicloud.gpdb.DbInstancePlan;
    import com.pulumi.alicloud.gpdb.DbInstancePlanArgs;
    import com.pulumi.alicloud.gpdb.inputs.DbInstancePlanPlanConfigArgs;
    import com.pulumi.alicloud.gpdb.inputs.DbInstancePlanPlanConfigResumeArgs;
    import com.pulumi.alicloud.gpdb.inputs.DbInstancePlanPlanConfigPauseArgs;
    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("tf-example");
            final var defaultZones = GpdbFunctions.getZones();
    
            final var defaultNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .build());
    
            final var defaultSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.ids()[0]))
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .dbInstanceCategory("HighAvailability")
                .dbInstanceClass("gpdb.group.segsdx1")
                .dbInstanceMode("StorageElastic")
                .description(name)
                .engine("gpdb")
                .engineVersion("6.0")
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.ids()[0]))
                .instanceNetworkType("VPC")
                .instanceSpec("2C16G")
                .masterNodeNum(1)
                .paymentType("PayAsYouGo")
                .privateIpAddress("1.1.1.1")
                .segStorageType("cloud_essd")
                .segNodeNum(4)
                .storageSize(50)
                .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .vswitchId(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
                .ipWhitelists(InstanceIpWhitelistArgs.builder()
                    .securityIpList("127.0.0.1")
                    .build())
                .build());
    
            var defaultDbInstancePlan = new DbInstancePlan("defaultDbInstancePlan", DbInstancePlanArgs.builder()        
                .dbInstancePlanName(name)
                .planDesc(name)
                .planType("PauseResume")
                .planScheduleType("Regular")
                .planConfigs(DbInstancePlanPlanConfigArgs.builder()
                    .resume(DbInstancePlanPlanConfigResumeArgs.builder()
                        .planCronTime("0 0 0 1/1 * ? ")
                        .build())
                    .pause(DbInstancePlanPlanConfigPauseArgs.builder()
                        .planCronTime("0 0 10 1/1 * ? ")
                        .build())
                    .build())
                .dbInstanceId(defaultInstance.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultInstance:
        type: alicloud:gpdb:Instance
        properties:
          dbInstanceCategory: HighAvailability
          dbInstanceClass: gpdb.group.segsdx1
          dbInstanceMode: StorageElastic
          description: ${name}
          engine: gpdb
          engineVersion: '6.0'
          zoneId: ${defaultZones.ids[0]}
          instanceNetworkType: VPC
          instanceSpec: 2C16G
          masterNodeNum: 1
          paymentType: PayAsYouGo
          privateIpAddress: 1.1.1.1
          segStorageType: cloud_essd
          segNodeNum: 4
          storageSize: 50
          vpcId: ${defaultNetworks.ids[0]}
          vswitchId: ${defaultSwitches.ids[0]}
          ipWhitelists:
            - securityIpList: 127.0.0.1
      defaultDbInstancePlan:
        type: alicloud:gpdb:DbInstancePlan
        properties:
          dbInstancePlanName: ${name}
          planDesc: ${name}
          planType: PauseResume
          planScheduleType: Regular
          planConfigs:
            - resume:
                planCronTime: '0 0 0 1/1 * ? '
              pause:
                planCronTime: '0 0 10 1/1 * ? '
          dbInstanceId: ${defaultInstance.id}
    variables:
      defaultZones:
        fn::invoke:
          Function: alicloud:gpdb:getZones
          Arguments: {}
      defaultNetworks:
        fn::invoke:
          Function: alicloud:vpc:getNetworks
          Arguments:
            nameRegex: ^default-NODELETING$
      defaultSwitches:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            vpcId: ${defaultNetworks.ids[0]}
            zoneId: ${defaultZones.ids[0]}
    

    Create DbInstancePlan Resource

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

    Constructor syntax

    new DbInstancePlan(name: string, args: DbInstancePlanArgs, opts?: CustomResourceOptions);
    @overload
    def DbInstancePlan(resource_name: str,
                       args: DbInstancePlanArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def DbInstancePlan(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       db_instance_id: Optional[str] = None,
                       db_instance_plan_name: Optional[str] = None,
                       plan_configs: Optional[Sequence[DbInstancePlanPlanConfigArgs]] = None,
                       plan_schedule_type: Optional[str] = None,
                       plan_type: Optional[str] = None,
                       plan_desc: Optional[str] = None,
                       plan_end_date: Optional[str] = None,
                       plan_start_date: Optional[str] = None,
                       status: Optional[str] = None)
    func NewDbInstancePlan(ctx *Context, name string, args DbInstancePlanArgs, opts ...ResourceOption) (*DbInstancePlan, error)
    public DbInstancePlan(string name, DbInstancePlanArgs args, CustomResourceOptions? opts = null)
    public DbInstancePlan(String name, DbInstancePlanArgs args)
    public DbInstancePlan(String name, DbInstancePlanArgs args, CustomResourceOptions options)
    
    type: alicloud:gpdb:DbInstancePlan
    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 DbInstancePlanArgs
    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 DbInstancePlanArgs
    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 DbInstancePlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DbInstancePlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DbInstancePlanArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var dbInstancePlanResource = new AliCloud.Gpdb.DbInstancePlan("dbInstancePlanResource", new()
    {
        DbInstanceId = "string",
        DbInstancePlanName = "string",
        PlanConfigs = new[]
        {
            new AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigArgs
            {
                Pause = new AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigPauseArgs
                {
                    ExecuteTime = "string",
                    PlanCronTime = "string",
                },
                Resume = new AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigResumeArgs
                {
                    ExecuteTime = "string",
                    PlanCronTime = "string",
                },
                ScaleIn = new AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigScaleInArgs
                {
                    ExecuteTime = "string",
                    PlanCronTime = "string",
                    SegmentNodeNum = "string",
                },
                ScaleOut = new AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigScaleOutArgs
                {
                    ExecuteTime = "string",
                    PlanCronTime = "string",
                    SegmentNodeNum = "string",
                },
            },
        },
        PlanScheduleType = "string",
        PlanType = "string",
        PlanDesc = "string",
        PlanEndDate = "string",
        PlanStartDate = "string",
        Status = "string",
    });
    
    example, err := gpdb.NewDbInstancePlan(ctx, "dbInstancePlanResource", &gpdb.DbInstancePlanArgs{
    	DbInstanceId:       pulumi.String("string"),
    	DbInstancePlanName: pulumi.String("string"),
    	PlanConfigs: gpdb.DbInstancePlanPlanConfigArray{
    		&gpdb.DbInstancePlanPlanConfigArgs{
    			Pause: &gpdb.DbInstancePlanPlanConfigPauseArgs{
    				ExecuteTime:  pulumi.String("string"),
    				PlanCronTime: pulumi.String("string"),
    			},
    			Resume: &gpdb.DbInstancePlanPlanConfigResumeArgs{
    				ExecuteTime:  pulumi.String("string"),
    				PlanCronTime: pulumi.String("string"),
    			},
    			ScaleIn: &gpdb.DbInstancePlanPlanConfigScaleInArgs{
    				ExecuteTime:    pulumi.String("string"),
    				PlanCronTime:   pulumi.String("string"),
    				SegmentNodeNum: pulumi.String("string"),
    			},
    			ScaleOut: &gpdb.DbInstancePlanPlanConfigScaleOutArgs{
    				ExecuteTime:    pulumi.String("string"),
    				PlanCronTime:   pulumi.String("string"),
    				SegmentNodeNum: pulumi.String("string"),
    			},
    		},
    	},
    	PlanScheduleType: pulumi.String("string"),
    	PlanType:         pulumi.String("string"),
    	PlanDesc:         pulumi.String("string"),
    	PlanEndDate:      pulumi.String("string"),
    	PlanStartDate:    pulumi.String("string"),
    	Status:           pulumi.String("string"),
    })
    
    var dbInstancePlanResource = new DbInstancePlan("dbInstancePlanResource", DbInstancePlanArgs.builder()        
        .dbInstanceId("string")
        .dbInstancePlanName("string")
        .planConfigs(DbInstancePlanPlanConfigArgs.builder()
            .pause(DbInstancePlanPlanConfigPauseArgs.builder()
                .executeTime("string")
                .planCronTime("string")
                .build())
            .resume(DbInstancePlanPlanConfigResumeArgs.builder()
                .executeTime("string")
                .planCronTime("string")
                .build())
            .scaleIn(DbInstancePlanPlanConfigScaleInArgs.builder()
                .executeTime("string")
                .planCronTime("string")
                .segmentNodeNum("string")
                .build())
            .scaleOut(DbInstancePlanPlanConfigScaleOutArgs.builder()
                .executeTime("string")
                .planCronTime("string")
                .segmentNodeNum("string")
                .build())
            .build())
        .planScheduleType("string")
        .planType("string")
        .planDesc("string")
        .planEndDate("string")
        .planStartDate("string")
        .status("string")
        .build());
    
    db_instance_plan_resource = alicloud.gpdb.DbInstancePlan("dbInstancePlanResource",
        db_instance_id="string",
        db_instance_plan_name="string",
        plan_configs=[alicloud.gpdb.DbInstancePlanPlanConfigArgs(
            pause=alicloud.gpdb.DbInstancePlanPlanConfigPauseArgs(
                execute_time="string",
                plan_cron_time="string",
            ),
            resume=alicloud.gpdb.DbInstancePlanPlanConfigResumeArgs(
                execute_time="string",
                plan_cron_time="string",
            ),
            scale_in=alicloud.gpdb.DbInstancePlanPlanConfigScaleInArgs(
                execute_time="string",
                plan_cron_time="string",
                segment_node_num="string",
            ),
            scale_out=alicloud.gpdb.DbInstancePlanPlanConfigScaleOutArgs(
                execute_time="string",
                plan_cron_time="string",
                segment_node_num="string",
            ),
        )],
        plan_schedule_type="string",
        plan_type="string",
        plan_desc="string",
        plan_end_date="string",
        plan_start_date="string",
        status="string")
    
    const dbInstancePlanResource = new alicloud.gpdb.DbInstancePlan("dbInstancePlanResource", {
        dbInstanceId: "string",
        dbInstancePlanName: "string",
        planConfigs: [{
            pause: {
                executeTime: "string",
                planCronTime: "string",
            },
            resume: {
                executeTime: "string",
                planCronTime: "string",
            },
            scaleIn: {
                executeTime: "string",
                planCronTime: "string",
                segmentNodeNum: "string",
            },
            scaleOut: {
                executeTime: "string",
                planCronTime: "string",
                segmentNodeNum: "string",
            },
        }],
        planScheduleType: "string",
        planType: "string",
        planDesc: "string",
        planEndDate: "string",
        planStartDate: "string",
        status: "string",
    });
    
    type: alicloud:gpdb:DbInstancePlan
    properties:
        dbInstanceId: string
        dbInstancePlanName: string
        planConfigs:
            - pause:
                executeTime: string
                planCronTime: string
              resume:
                executeTime: string
                planCronTime: string
              scaleIn:
                executeTime: string
                planCronTime: string
                segmentNodeNum: string
              scaleOut:
                executeTime: string
                planCronTime: string
                segmentNodeNum: string
        planDesc: string
        planEndDate: string
        planScheduleType: string
        planStartDate: string
        planType: string
        status: string
    

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

    DbInstanceId string
    The ID of the GPDB instance.
    DbInstancePlanName string
    The name of the Plan.
    PlanConfigs List<Pulumi.AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfig>
    The execution information of the plan. See plan_config below.
    PlanScheduleType string
    The execution mode of the plan. Valid values: Postpone, Regular.
    PlanType string
    The type of the Plan. Valid values: PauseResume, Resize.
    PlanDesc string
    The description of the Plan.
    PlanEndDate string
    The end time of the Plan.
    PlanStartDate string
    The start time of the Plan.
    Status string
    The Status of the Plan. Valid values: active, cancel.
    DbInstanceId string
    The ID of the GPDB instance.
    DbInstancePlanName string
    The name of the Plan.
    PlanConfigs []DbInstancePlanPlanConfigArgs
    The execution information of the plan. See plan_config below.
    PlanScheduleType string
    The execution mode of the plan. Valid values: Postpone, Regular.
    PlanType string
    The type of the Plan. Valid values: PauseResume, Resize.
    PlanDesc string
    The description of the Plan.
    PlanEndDate string
    The end time of the Plan.
    PlanStartDate string
    The start time of the Plan.
    Status string
    The Status of the Plan. Valid values: active, cancel.
    dbInstanceId String
    The ID of the GPDB instance.
    dbInstancePlanName String
    The name of the Plan.
    planConfigs List<DbInstancePlanPlanConfig>
    The execution information of the plan. See plan_config below.
    planScheduleType String
    The execution mode of the plan. Valid values: Postpone, Regular.
    planType String
    The type of the Plan. Valid values: PauseResume, Resize.
    planDesc String
    The description of the Plan.
    planEndDate String
    The end time of the Plan.
    planStartDate String
    The start time of the Plan.
    status String
    The Status of the Plan. Valid values: active, cancel.
    dbInstanceId string
    The ID of the GPDB instance.
    dbInstancePlanName string
    The name of the Plan.
    planConfigs DbInstancePlanPlanConfig[]
    The execution information of the plan. See plan_config below.
    planScheduleType string
    The execution mode of the plan. Valid values: Postpone, Regular.
    planType string
    The type of the Plan. Valid values: PauseResume, Resize.
    planDesc string
    The description of the Plan.
    planEndDate string
    The end time of the Plan.
    planStartDate string
    The start time of the Plan.
    status string
    The Status of the Plan. Valid values: active, cancel.
    db_instance_id str
    The ID of the GPDB instance.
    db_instance_plan_name str
    The name of the Plan.
    plan_configs Sequence[DbInstancePlanPlanConfigArgs]
    The execution information of the plan. See plan_config below.
    plan_schedule_type str
    The execution mode of the plan. Valid values: Postpone, Regular.
    plan_type str
    The type of the Plan. Valid values: PauseResume, Resize.
    plan_desc str
    The description of the Plan.
    plan_end_date str
    The end time of the Plan.
    plan_start_date str
    The start time of the Plan.
    status str
    The Status of the Plan. Valid values: active, cancel.
    dbInstanceId String
    The ID of the GPDB instance.
    dbInstancePlanName String
    The name of the Plan.
    planConfigs List<Property Map>
    The execution information of the plan. See plan_config below.
    planScheduleType String
    The execution mode of the plan. Valid values: Postpone, Regular.
    planType String
    The type of the Plan. Valid values: PauseResume, Resize.
    planDesc String
    The description of the Plan.
    planEndDate String
    The end time of the Plan.
    planStartDate String
    The start time of the Plan.
    status String
    The Status of the Plan. Valid values: active, cancel.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    PlanId string
    The ID of the plan.
    Id string
    The provider-assigned unique ID for this managed resource.
    PlanId string
    The ID of the plan.
    id String
    The provider-assigned unique ID for this managed resource.
    planId String
    The ID of the plan.
    id string
    The provider-assigned unique ID for this managed resource.
    planId string
    The ID of the plan.
    id str
    The provider-assigned unique ID for this managed resource.
    plan_id str
    The ID of the plan.
    id String
    The provider-assigned unique ID for this managed resource.
    planId String
    The ID of the plan.

    Look up Existing DbInstancePlan Resource

    Get an existing DbInstancePlan 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?: DbInstancePlanState, opts?: CustomResourceOptions): DbInstancePlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_instance_id: Optional[str] = None,
            db_instance_plan_name: Optional[str] = None,
            plan_configs: Optional[Sequence[DbInstancePlanPlanConfigArgs]] = None,
            plan_desc: Optional[str] = None,
            plan_end_date: Optional[str] = None,
            plan_id: Optional[str] = None,
            plan_schedule_type: Optional[str] = None,
            plan_start_date: Optional[str] = None,
            plan_type: Optional[str] = None,
            status: Optional[str] = None) -> DbInstancePlan
    func GetDbInstancePlan(ctx *Context, name string, id IDInput, state *DbInstancePlanState, opts ...ResourceOption) (*DbInstancePlan, error)
    public static DbInstancePlan Get(string name, Input<string> id, DbInstancePlanState? state, CustomResourceOptions? opts = null)
    public static DbInstancePlan get(String name, Output<String> id, DbInstancePlanState 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:
    DbInstanceId string
    The ID of the GPDB instance.
    DbInstancePlanName string
    The name of the Plan.
    PlanConfigs List<Pulumi.AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfig>
    The execution information of the plan. See plan_config below.
    PlanDesc string
    The description of the Plan.
    PlanEndDate string
    The end time of the Plan.
    PlanId string
    The ID of the plan.
    PlanScheduleType string
    The execution mode of the plan. Valid values: Postpone, Regular.
    PlanStartDate string
    The start time of the Plan.
    PlanType string
    The type of the Plan. Valid values: PauseResume, Resize.
    Status string
    The Status of the Plan. Valid values: active, cancel.
    DbInstanceId string
    The ID of the GPDB instance.
    DbInstancePlanName string
    The name of the Plan.
    PlanConfigs []DbInstancePlanPlanConfigArgs
    The execution information of the plan. See plan_config below.
    PlanDesc string
    The description of the Plan.
    PlanEndDate string
    The end time of the Plan.
    PlanId string
    The ID of the plan.
    PlanScheduleType string
    The execution mode of the plan. Valid values: Postpone, Regular.
    PlanStartDate string
    The start time of the Plan.
    PlanType string
    The type of the Plan. Valid values: PauseResume, Resize.
    Status string
    The Status of the Plan. Valid values: active, cancel.
    dbInstanceId String
    The ID of the GPDB instance.
    dbInstancePlanName String
    The name of the Plan.
    planConfigs List<DbInstancePlanPlanConfig>
    The execution information of the plan. See plan_config below.
    planDesc String
    The description of the Plan.
    planEndDate String
    The end time of the Plan.
    planId String
    The ID of the plan.
    planScheduleType String
    The execution mode of the plan. Valid values: Postpone, Regular.
    planStartDate String
    The start time of the Plan.
    planType String
    The type of the Plan. Valid values: PauseResume, Resize.
    status String
    The Status of the Plan. Valid values: active, cancel.
    dbInstanceId string
    The ID of the GPDB instance.
    dbInstancePlanName string
    The name of the Plan.
    planConfigs DbInstancePlanPlanConfig[]
    The execution information of the plan. See plan_config below.
    planDesc string
    The description of the Plan.
    planEndDate string
    The end time of the Plan.
    planId string
    The ID of the plan.
    planScheduleType string
    The execution mode of the plan. Valid values: Postpone, Regular.
    planStartDate string
    The start time of the Plan.
    planType string
    The type of the Plan. Valid values: PauseResume, Resize.
    status string
    The Status of the Plan. Valid values: active, cancel.
    db_instance_id str
    The ID of the GPDB instance.
    db_instance_plan_name str
    The name of the Plan.
    plan_configs Sequence[DbInstancePlanPlanConfigArgs]
    The execution information of the plan. See plan_config below.
    plan_desc str
    The description of the Plan.
    plan_end_date str
    The end time of the Plan.
    plan_id str
    The ID of the plan.
    plan_schedule_type str
    The execution mode of the plan. Valid values: Postpone, Regular.
    plan_start_date str
    The start time of the Plan.
    plan_type str
    The type of the Plan. Valid values: PauseResume, Resize.
    status str
    The Status of the Plan. Valid values: active, cancel.
    dbInstanceId String
    The ID of the GPDB instance.
    dbInstancePlanName String
    The name of the Plan.
    planConfigs List<Property Map>
    The execution information of the plan. See plan_config below.
    planDesc String
    The description of the Plan.
    planEndDate String
    The end time of the Plan.
    planId String
    The ID of the plan.
    planScheduleType String
    The execution mode of the plan. Valid values: Postpone, Regular.
    planStartDate String
    The start time of the Plan.
    planType String
    The type of the Plan. Valid values: PauseResume, Resize.
    status String
    The Status of the Plan. Valid values: active, cancel.

    Supporting Types

    DbInstancePlanPlanConfig, DbInstancePlanPlanConfigArgs

    Pause Pulumi.AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigPause
    Pause instance plan config. See pause below.
    Resume Pulumi.AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigResume
    Resume instance plan config. See resume below.
    ScaleIn Pulumi.AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigScaleIn
    Scale In instance plan config. See scale_in below.
    ScaleOut Pulumi.AliCloud.Gpdb.Inputs.DbInstancePlanPlanConfigScaleOut
    Scale out instance plan config. See scale_out below.
    Pause DbInstancePlanPlanConfigPause
    Pause instance plan config. See pause below.
    Resume DbInstancePlanPlanConfigResume
    Resume instance plan config. See resume below.
    ScaleIn DbInstancePlanPlanConfigScaleIn
    Scale In instance plan config. See scale_in below.
    ScaleOut DbInstancePlanPlanConfigScaleOut
    Scale out instance plan config. See scale_out below.
    pause DbInstancePlanPlanConfigPause
    Pause instance plan config. See pause below.
    resume DbInstancePlanPlanConfigResume
    Resume instance plan config. See resume below.
    scaleIn DbInstancePlanPlanConfigScaleIn
    Scale In instance plan config. See scale_in below.
    scaleOut DbInstancePlanPlanConfigScaleOut
    Scale out instance plan config. See scale_out below.
    pause DbInstancePlanPlanConfigPause
    Pause instance plan config. See pause below.
    resume DbInstancePlanPlanConfigResume
    Resume instance plan config. See resume below.
    scaleIn DbInstancePlanPlanConfigScaleIn
    Scale In instance plan config. See scale_in below.
    scaleOut DbInstancePlanPlanConfigScaleOut
    Scale out instance plan config. See scale_out below.
    pause DbInstancePlanPlanConfigPause
    Pause instance plan config. See pause below.
    resume DbInstancePlanPlanConfigResume
    Resume instance plan config. See resume below.
    scale_in DbInstancePlanPlanConfigScaleIn
    Scale In instance plan config. See scale_in below.
    scale_out DbInstancePlanPlanConfigScaleOut
    Scale out instance plan config. See scale_out below.
    pause Property Map
    Pause instance plan config. See pause below.
    resume Property Map
    Resume instance plan config. See resume below.
    scaleIn Property Map
    Scale In instance plan config. See scale_in below.
    scaleOut Property Map
    Scale out instance plan config. See scale_out below.

    DbInstancePlanPlanConfigPause, DbInstancePlanPlanConfigPauseArgs

    ExecuteTime string
    The executed time of the Plan.
    PlanCronTime string
    The Cron Time of the plan.
    ExecuteTime string
    The executed time of the Plan.
    PlanCronTime string
    The Cron Time of the plan.
    executeTime String
    The executed time of the Plan.
    planCronTime String
    The Cron Time of the plan.
    executeTime string
    The executed time of the Plan.
    planCronTime string
    The Cron Time of the plan.
    execute_time str
    The executed time of the Plan.
    plan_cron_time str
    The Cron Time of the plan.
    executeTime String
    The executed time of the Plan.
    planCronTime String
    The Cron Time of the plan.

    DbInstancePlanPlanConfigResume, DbInstancePlanPlanConfigResumeArgs

    ExecuteTime string
    The executed time of the Plan.
    PlanCronTime string
    The Cron Time of the plan.
    ExecuteTime string
    The executed time of the Plan.
    PlanCronTime string
    The Cron Time of the plan.
    executeTime String
    The executed time of the Plan.
    planCronTime String
    The Cron Time of the plan.
    executeTime string
    The executed time of the Plan.
    planCronTime string
    The Cron Time of the plan.
    execute_time str
    The executed time of the Plan.
    plan_cron_time str
    The Cron Time of the plan.
    executeTime String
    The executed time of the Plan.
    planCronTime String
    The Cron Time of the plan.

    DbInstancePlanPlanConfigScaleIn, DbInstancePlanPlanConfigScaleInArgs

    ExecuteTime string
    The executed time of the Plan.
    PlanCronTime string
    The Cron Time of the plan.
    SegmentNodeNum string
    The segment Node Num of the Plan.
    ExecuteTime string
    The executed time of the Plan.
    PlanCronTime string
    The Cron Time of the plan.
    SegmentNodeNum string
    The segment Node Num of the Plan.
    executeTime String
    The executed time of the Plan.
    planCronTime String
    The Cron Time of the plan.
    segmentNodeNum String
    The segment Node Num of the Plan.
    executeTime string
    The executed time of the Plan.
    planCronTime string
    The Cron Time of the plan.
    segmentNodeNum string
    The segment Node Num of the Plan.
    execute_time str
    The executed time of the Plan.
    plan_cron_time str
    The Cron Time of the plan.
    segment_node_num str
    The segment Node Num of the Plan.
    executeTime String
    The executed time of the Plan.
    planCronTime String
    The Cron Time of the plan.
    segmentNodeNum String
    The segment Node Num of the Plan.

    DbInstancePlanPlanConfigScaleOut, DbInstancePlanPlanConfigScaleOutArgs

    ExecuteTime string
    The executed time of the Plan.
    PlanCronTime string
    The Cron Time of the plan.
    SegmentNodeNum string
    The segment Node Num of the Plan.
    ExecuteTime string
    The executed time of the Plan.
    PlanCronTime string
    The Cron Time of the plan.
    SegmentNodeNum string
    The segment Node Num of the Plan.
    executeTime String
    The executed time of the Plan.
    planCronTime String
    The Cron Time of the plan.
    segmentNodeNum String
    The segment Node Num of the Plan.
    executeTime string
    The executed time of the Plan.
    planCronTime string
    The Cron Time of the plan.
    segmentNodeNum string
    The segment Node Num of the Plan.
    execute_time str
    The executed time of the Plan.
    plan_cron_time str
    The Cron Time of the plan.
    segment_node_num str
    The segment Node Num of the Plan.
    executeTime String
    The executed time of the Plan.
    planCronTime String
    The Cron Time of the plan.
    segmentNodeNum String
    The segment Node Num of the Plan.

    Import

    GPDB DB Instance Plan can be imported using the id, e.g.

    $ pulumi import alicloud:gpdb/dbInstancePlan:DbInstancePlan example <db_instance_id>:<plan_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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi