Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.gpdb.getDbInstancePlans
Explore with Pulumi AI
This data source provides the Gpdb Db Instance Plans of the current Alibaba Cloud user.
NOTE: Available in v1.189.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.gpdb.getDbInstancePlans({
    dbInstanceId: "example_value",
    ids: ["example_value"],
});
export const gpdbDbInstancePlanId1 = ids.then(ids => ids.plans?.[0]?.id);
const nameRegex = alicloud.gpdb.getDbInstancePlans({
    dbInstanceId: "example_value",
    nameRegex: "^my-DBInstancePlan",
});
export const gpdbDbInstancePlanId2 = nameRegex.then(nameRegex => nameRegex.plans?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.gpdb.get_db_instance_plans(db_instance_id="example_value",
    ids=["example_value"])
pulumi.export("gpdbDbInstancePlanId1", ids.plans[0].id)
name_regex = alicloud.gpdb.get_db_instance_plans(db_instance_id="example_value",
    name_regex="^my-DBInstancePlan")
pulumi.export("gpdbDbInstancePlanId2", name_regex.plans[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/gpdb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := gpdb.GetDbInstancePlans(ctx, &gpdb.GetDbInstancePlansArgs{
			DbInstanceId: "example_value",
			Ids: []string{
				"example_value",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("gpdbDbInstancePlanId1", ids.Plans[0].Id)
		nameRegex, err := gpdb.GetDbInstancePlans(ctx, &gpdb.GetDbInstancePlansArgs{
			DbInstanceId: "example_value",
			NameRegex:    pulumi.StringRef("^my-DBInstancePlan"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("gpdbDbInstancePlanId2", nameRegex.Plans[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Gpdb.GetDbInstancePlans.Invoke(new()
    {
        DbInstanceId = "example_value",
        Ids = new[]
        {
            "example_value",
        },
    });
    var nameRegex = AliCloud.Gpdb.GetDbInstancePlans.Invoke(new()
    {
        DbInstanceId = "example_value",
        NameRegex = "^my-DBInstancePlan",
    });
    return new Dictionary<string, object?>
    {
        ["gpdbDbInstancePlanId1"] = ids.Apply(getDbInstancePlansResult => getDbInstancePlansResult.Plans[0]?.Id),
        ["gpdbDbInstancePlanId2"] = nameRegex.Apply(getDbInstancePlansResult => getDbInstancePlansResult.Plans[0]?.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.GetDbInstancePlansArgs;
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 ids = GpdbFunctions.getDbInstancePlans(GetDbInstancePlansArgs.builder()
            .dbInstanceId("example_value")
            .ids("example_value")
            .build());
        ctx.export("gpdbDbInstancePlanId1", ids.applyValue(getDbInstancePlansResult -> getDbInstancePlansResult.plans()[0].id()));
        final var nameRegex = GpdbFunctions.getDbInstancePlans(GetDbInstancePlansArgs.builder()
            .dbInstanceId("example_value")
            .nameRegex("^my-DBInstancePlan")
            .build());
        ctx.export("gpdbDbInstancePlanId2", nameRegex.applyValue(getDbInstancePlansResult -> getDbInstancePlansResult.plans()[0].id()));
    }
}
variables:
  ids:
    fn::invoke:
      function: alicloud:gpdb:getDbInstancePlans
      arguments:
        dbInstanceId: example_value
        ids:
          - example_value
  nameRegex:
    fn::invoke:
      function: alicloud:gpdb:getDbInstancePlans
      arguments:
        dbInstanceId: example_value
        nameRegex: ^my-DBInstancePlan
outputs:
  gpdbDbInstancePlanId1: ${ids.plans[0].id}
  gpdbDbInstancePlanId2: ${nameRegex.plans[0].id}
Using getDbInstancePlans
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDbInstancePlans(args: GetDbInstancePlansArgs, opts?: InvokeOptions): Promise<GetDbInstancePlansResult>
function getDbInstancePlansOutput(args: GetDbInstancePlansOutputArgs, opts?: InvokeOptions): Output<GetDbInstancePlansResult>def get_db_instance_plans(db_instance_id: Optional[str] = None,
                          ids: Optional[Sequence[str]] = None,
                          name_regex: Optional[str] = None,
                          output_file: Optional[str] = None,
                          plan_schedule_type: Optional[str] = None,
                          plan_type: Optional[str] = None,
                          status: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDbInstancePlansResult
def get_db_instance_plans_output(db_instance_id: Optional[pulumi.Input[str]] = None,
                          ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          name_regex: Optional[pulumi.Input[str]] = None,
                          output_file: Optional[pulumi.Input[str]] = None,
                          plan_schedule_type: Optional[pulumi.Input[str]] = None,
                          plan_type: Optional[pulumi.Input[str]] = None,
                          status: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetDbInstancePlansResult]func GetDbInstancePlans(ctx *Context, args *GetDbInstancePlansArgs, opts ...InvokeOption) (*GetDbInstancePlansResult, error)
func GetDbInstancePlansOutput(ctx *Context, args *GetDbInstancePlansOutputArgs, opts ...InvokeOption) GetDbInstancePlansResultOutput> Note: This function is named GetDbInstancePlans in the Go SDK.
public static class GetDbInstancePlans 
{
    public static Task<GetDbInstancePlansResult> InvokeAsync(GetDbInstancePlansArgs args, InvokeOptions? opts = null)
    public static Output<GetDbInstancePlansResult> Invoke(GetDbInstancePlansInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDbInstancePlansResult> getDbInstancePlans(GetDbInstancePlansArgs args, InvokeOptions options)
public static Output<GetDbInstancePlansResult> getDbInstancePlans(GetDbInstancePlansArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:gpdb/getDbInstancePlans:getDbInstancePlans
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DbInstance stringId 
- The ID of the Database instance.
- Ids List<string>
- A list of DB Instance Plan IDs.
- NameRegex string
- A regex string to filter results by DB Instance Plan name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- PlanSchedule stringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- PlanType string
- The type of the Plan. Valid values: PauseResume,Resize.
- Status string
- Planning Status. Valid values: active,cancel,deleted,finished.
- DbInstance stringId 
- The ID of the Database instance.
- Ids []string
- A list of DB Instance Plan IDs.
- NameRegex string
- A regex string to filter results by DB Instance Plan name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- PlanSchedule stringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- PlanType string
- The type of the Plan. Valid values: PauseResume,Resize.
- Status string
- Planning Status. Valid values: active,cancel,deleted,finished.
- dbInstance StringId 
- The ID of the Database instance.
- ids List<String>
- A list of DB Instance Plan IDs.
- nameRegex String
- A regex string to filter results by DB Instance Plan name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- planSchedule StringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- planType String
- The type of the Plan. Valid values: PauseResume,Resize.
- status String
- Planning Status. Valid values: active,cancel,deleted,finished.
- dbInstance stringId 
- The ID of the Database instance.
- ids string[]
- A list of DB Instance Plan IDs.
- nameRegex string
- A regex string to filter results by DB Instance Plan name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- planSchedule stringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- planType string
- The type of the Plan. Valid values: PauseResume,Resize.
- status string
- Planning Status. Valid values: active,cancel,deleted,finished.
- db_instance_ strid 
- The ID of the Database instance.
- ids Sequence[str]
- A list of DB Instance Plan IDs.
- name_regex str
- A regex string to filter results by DB Instance Plan name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- plan_schedule_ strtype 
- Plan scheduling type. Valid values: Postpone,Regular.
- plan_type str
- The type of the Plan. Valid values: PauseResume,Resize.
- status str
- Planning Status. Valid values: active,cancel,deleted,finished.
- dbInstance StringId 
- The ID of the Database instance.
- ids List<String>
- A list of DB Instance Plan IDs.
- nameRegex String
- A regex string to filter results by DB Instance Plan name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- planSchedule StringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- planType String
- The type of the Plan. Valid values: PauseResume,Resize.
- status String
- Planning Status. Valid values: active,cancel,deleted,finished.
getDbInstancePlans Result
The following output properties are available:
- DbInstance stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Plans
List<Pulumi.Ali Cloud. Gpdb. Outputs. Get Db Instance Plans Plan> 
- NameRegex string
- OutputFile string
- PlanSchedule stringType 
- PlanType string
- Status string
- DbInstance stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Plans
[]GetDb Instance Plans Plan 
- NameRegex string
- OutputFile string
- PlanSchedule stringType 
- PlanType string
- Status string
- dbInstance StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- plans
List<GetDb Instance Plans Plan> 
- nameRegex String
- outputFile String
- planSchedule StringType 
- planType String
- status String
- dbInstance stringId 
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- plans
GetDb Instance Plans Plan[] 
- nameRegex string
- outputFile string
- planSchedule stringType 
- planType string
- status string
- db_instance_ strid 
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- plans
Sequence[GetDb Instance Plans Plan] 
- name_regex str
- output_file str
- plan_schedule_ strtype 
- plan_type str
- status str
- dbInstance StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- plans List<Property Map>
- nameRegex String
- outputFile String
- planSchedule StringType 
- planType String
- status String
Supporting Types
GetDbInstancePlansPlan    
- DbInstance stringPlan Name 
- The name of the Plan.
- Id string
- The ID of the resource. The value formats as <db_instance_id>:<plan_id>.
- PlanConfigs List<Pulumi.Ali Cloud. Gpdb. Inputs. Get Db Instance Plans Plan Plan Config> 
- Plan configuration information.
- PlanDesc string
- PlanEnd stringDate 
- The end time of the Plan.
- PlanId string
- The ID of DB Instance Plan.
- PlanSchedule stringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- PlanStart stringDate 
- The start time of the Plan.
- PlanType string
- The type of the Plan. Valid values: PauseResume,Resize.
- Status string
- The Status of the Plan.
- DbInstance stringPlan Name 
- The name of the Plan.
- Id string
- The ID of the resource. The value formats as <db_instance_id>:<plan_id>.
- PlanConfigs []GetDb Instance Plans Plan Plan Config 
- Plan configuration information.
- PlanDesc string
- PlanEnd stringDate 
- The end time of the Plan.
- PlanId string
- The ID of DB Instance Plan.
- PlanSchedule stringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- PlanStart stringDate 
- The start time of the Plan.
- PlanType string
- The type of the Plan. Valid values: PauseResume,Resize.
- Status string
- The Status of the Plan.
- dbInstance StringPlan Name 
- The name of the Plan.
- id String
- The ID of the resource. The value formats as <db_instance_id>:<plan_id>.
- planConfigs List<GetDb Instance Plans Plan Plan Config> 
- Plan configuration information.
- planDesc String
- planEnd StringDate 
- The end time of the Plan.
- planId String
- The ID of DB Instance Plan.
- planSchedule StringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- planStart StringDate 
- The start time of the Plan.
- planType String
- The type of the Plan. Valid values: PauseResume,Resize.
- status String
- The Status of the Plan.
- dbInstance stringPlan Name 
- The name of the Plan.
- id string
- The ID of the resource. The value formats as <db_instance_id>:<plan_id>.
- planConfigs GetDb Instance Plans Plan Plan Config[] 
- Plan configuration information.
- planDesc string
- planEnd stringDate 
- The end time of the Plan.
- planId string
- The ID of DB Instance Plan.
- planSchedule stringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- planStart stringDate 
- The start time of the Plan.
- planType string
- The type of the Plan. Valid values: PauseResume,Resize.
- status string
- The Status of the Plan.
- db_instance_ strplan_ name 
- The name of the Plan.
- id str
- The ID of the resource. The value formats as <db_instance_id>:<plan_id>.
- plan_configs Sequence[GetDb Instance Plans Plan Plan Config] 
- Plan configuration information.
- plan_desc str
- plan_end_ strdate 
- The end time of the Plan.
- plan_id str
- The ID of DB Instance Plan.
- plan_schedule_ strtype 
- Plan scheduling type. Valid values: Postpone,Regular.
- plan_start_ strdate 
- 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.
- dbInstance StringPlan Name 
- The name of the Plan.
- id String
- The ID of the resource. The value formats as <db_instance_id>:<plan_id>.
- planConfigs List<Property Map>
- Plan configuration information.
- planDesc String
- planEnd StringDate 
- The end time of the Plan.
- planId String
- The ID of DB Instance Plan.
- planSchedule StringType 
- Plan scheduling type. Valid values: Postpone,Regular.
- planStart StringDate 
- The start time of the Plan.
- planType String
- The type of the Plan. Valid values: PauseResume,Resize.
- status String
- The Status of the Plan.
GetDbInstancePlansPlanPlanConfig      
- Pauses
List<Pulumi.Ali Cloud. Gpdb. Inputs. Get Db Instance Plans Plan Plan Config Pause> 
- Pause instance plan config.
- Resumes
List<Pulumi.Ali Cloud. Gpdb. Inputs. Get Db Instance Plans Plan Plan Config Resume> 
- Resume instance plan config.
- ScaleIns List<Pulumi.Ali Cloud. Gpdb. Inputs. Get Db Instance Plans Plan Plan Config Scale In> 
- Scale In instance plan config.
- ScaleOuts List<Pulumi.Ali Cloud. Gpdb. Inputs. Get Db Instance Plans Plan Plan Config Scale Out> 
- Scale out instance plan config.
- Pauses
[]GetDb Instance Plans Plan Plan Config Pause 
- Pause instance plan config.
- Resumes
[]GetDb Instance Plans Plan Plan Config Resume 
- Resume instance plan config.
- ScaleIns []GetDb Instance Plans Plan Plan Config Scale In 
- Scale In instance plan config.
- ScaleOuts []GetDb Instance Plans Plan Plan Config Scale Out 
- Scale out instance plan config.
- pauses
List<GetDb Instance Plans Plan Plan Config Pause> 
- Pause instance plan config.
- resumes
List<GetDb Instance Plans Plan Plan Config Resume> 
- Resume instance plan config.
- scaleIns List<GetDb Instance Plans Plan Plan Config Scale In> 
- Scale In instance plan config.
- scaleOuts List<GetDb Instance Plans Plan Plan Config Scale Out> 
- Scale out instance plan config.
- pauses
GetDb Instance Plans Plan Plan Config Pause[] 
- Pause instance plan config.
- resumes
GetDb Instance Plans Plan Plan Config Resume[] 
- Resume instance plan config.
- scaleIns GetDb Instance Plans Plan Plan Config Scale In[] 
- Scale In instance plan config.
- scaleOuts GetDb Instance Plans Plan Plan Config Scale Out[] 
- Scale out instance plan config.
- pauses
Sequence[GetDb Instance Plans Plan Plan Config Pause] 
- Pause instance plan config.
- resumes
Sequence[GetDb Instance Plans Plan Plan Config Resume] 
- Resume instance plan config.
- scale_ins Sequence[GetDb Instance Plans Plan Plan Config Scale In] 
- Scale In instance plan config.
- scale_outs Sequence[GetDb Instance Plans Plan Plan Config Scale Out] 
- Scale out instance plan config.
- pauses List<Property Map>
- Pause instance plan config.
- resumes List<Property Map>
- Resume instance plan config.
- scaleIns List<Property Map>
- Scale In instance plan config.
- scaleOuts List<Property Map>
- Scale out instance plan config.
GetDbInstancePlansPlanPlanConfigPause       
- ExecuteTime string
- The executed time of the Plan.
- PlanCron stringTime 
- The Cron Time of the plan.
- PlanTask stringStatus 
- The Status of the plan Task.
- ExecuteTime string
- The executed time of the Plan.
- PlanCron stringTime 
- The Cron Time of the plan.
- PlanTask stringStatus 
- The Status of the plan Task.
- executeTime String
- The executed time of the Plan.
- planCron StringTime 
- The Cron Time of the plan.
- planTask StringStatus 
- The Status of the plan Task.
- executeTime string
- The executed time of the Plan.
- planCron stringTime 
- The Cron Time of the plan.
- planTask stringStatus 
- The Status of the plan Task.
- execute_time str
- The executed time of the Plan.
- plan_cron_ strtime 
- The Cron Time of the plan.
- plan_task_ strstatus 
- The Status of the plan Task.
- executeTime String
- The executed time of the Plan.
- planCron StringTime 
- The Cron Time of the plan.
- planTask StringStatus 
- The Status of the plan Task.
GetDbInstancePlansPlanPlanConfigResume       
- ExecuteTime string
- The executed time of the Plan.
- PlanCron stringTime 
- The Cron Time of the plan.
- PlanTask stringStatus 
- The Status of the plan Task.
- ExecuteTime string
- The executed time of the Plan.
- PlanCron stringTime 
- The Cron Time of the plan.
- PlanTask stringStatus 
- The Status of the plan Task.
- executeTime String
- The executed time of the Plan.
- planCron StringTime 
- The Cron Time of the plan.
- planTask StringStatus 
- The Status of the plan Task.
- executeTime string
- The executed time of the Plan.
- planCron stringTime 
- The Cron Time of the plan.
- planTask stringStatus 
- The Status of the plan Task.
- execute_time str
- The executed time of the Plan.
- plan_cron_ strtime 
- The Cron Time of the plan.
- plan_task_ strstatus 
- The Status of the plan Task.
- executeTime String
- The executed time of the Plan.
- planCron StringTime 
- The Cron Time of the plan.
- planTask StringStatus 
- The Status of the plan Task.
GetDbInstancePlansPlanPlanConfigScaleIn        
- ExecuteTime string
- The executed time of the Plan.
- PlanCron stringTime 
- The Cron Time of the plan.
- PlanTask stringStatus 
- The Status of the plan Task.
- SegmentNode stringNum 
- The segment Node Num of the Plan.
- ExecuteTime string
- The executed time of the Plan.
- PlanCron stringTime 
- The Cron Time of the plan.
- PlanTask stringStatus 
- The Status of the plan Task.
- SegmentNode stringNum 
- The segment Node Num of the Plan.
- executeTime String
- The executed time of the Plan.
- planCron StringTime 
- The Cron Time of the plan.
- planTask StringStatus 
- The Status of the plan Task.
- segmentNode StringNum 
- The segment Node Num of the Plan.
- executeTime string
- The executed time of the Plan.
- planCron stringTime 
- The Cron Time of the plan.
- planTask stringStatus 
- The Status of the plan Task.
- segmentNode stringNum 
- The segment Node Num of the Plan.
- execute_time str
- The executed time of the Plan.
- plan_cron_ strtime 
- The Cron Time of the plan.
- plan_task_ strstatus 
- The Status of the plan Task.
- segment_node_ strnum 
- The segment Node Num of the Plan.
- executeTime String
- The executed time of the Plan.
- planCron StringTime 
- The Cron Time of the plan.
- planTask StringStatus 
- The Status of the plan Task.
- segmentNode StringNum 
- The segment Node Num of the Plan.
GetDbInstancePlansPlanPlanConfigScaleOut        
- ExecuteTime string
- The executed time of the Plan.
- PlanCron stringTime 
- The Cron Time of the plan.
- PlanTask stringStatus 
- The Status of the plan Task.
- SegmentNode stringNum 
- The segment Node Num of the Plan.
- ExecuteTime string
- The executed time of the Plan.
- PlanCron stringTime 
- The Cron Time of the plan.
- PlanTask stringStatus 
- The Status of the plan Task.
- SegmentNode stringNum 
- The segment Node Num of the Plan.
- executeTime String
- The executed time of the Plan.
- planCron StringTime 
- The Cron Time of the plan.
- planTask StringStatus 
- The Status of the plan Task.
- segmentNode StringNum 
- The segment Node Num of the Plan.
- executeTime string
- The executed time of the Plan.
- planCron stringTime 
- The Cron Time of the plan.
- planTask stringStatus 
- The Status of the plan Task.
- segmentNode stringNum 
- The segment Node Num of the Plan.
- execute_time str
- The executed time of the Plan.
- plan_cron_ strtime 
- The Cron Time of the plan.
- plan_task_ strstatus 
- The Status of the plan Task.
- segment_node_ strnum 
- The segment Node Num of the Plan.
- executeTime String
- The executed time of the Plan.
- planCron StringTime 
- The Cron Time of the plan.
- planTask StringStatus 
- The Status of the plan Task.
- segmentNode StringNum 
- The segment Node Num of the Plan.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.