alicloud logo
Alibaba Cloud v3.29.0, Jan 20 23

alicloud.gpdb.getDbInstancePlans

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

using System.Collections.Generic;
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 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
	})
}
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()));
    }
}
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)
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);
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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:gpdb/getDbInstancePlans:getDbInstancePlans
  arguments:
    # arguments dictionary

The following arguments are supported:

DbInstanceId string

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
PlanScheduleType string

Plan scheduling type. Valid values: Postpone, Regular.

PlanType string

The type of the Plan. Valid values: PauseResume, Resize.

Status string

The Status of the Plan.

DbInstanceId string

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
PlanScheduleType string

Plan scheduling type. Valid values: Postpone, Regular.

PlanType string

The type of the Plan. Valid values: PauseResume, Resize.

Status string

The Status of the Plan.

dbInstanceId String

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
planScheduleType String

Plan scheduling type. Valid values: Postpone, Regular.

planType String

The type of the Plan. Valid values: PauseResume, Resize.

status String

The Status of the Plan.

dbInstanceId string

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
planScheduleType string

Plan scheduling type. Valid values: Postpone, Regular.

planType string

The type of the Plan. Valid values: PauseResume, Resize.

status string

The Status of the Plan.

db_instance_id str

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
plan_schedule_type str

Plan scheduling type. Valid values: Postpone, Regular.

plan_type str

The type of the Plan. Valid values: PauseResume, Resize.

status str

The Status of the Plan.

dbInstanceId String

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
planScheduleType String

Plan scheduling type. Valid values: Postpone, Regular.

planType String

The type of the Plan. Valid values: PauseResume, Resize.

status String

The Status of the Plan.

getDbInstancePlans Result

The following output properties are available:

DbInstanceId string
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
Plans List<Pulumi.AliCloud.Gpdb.Outputs.GetDbInstancePlansPlan>
NameRegex string
OutputFile string
PlanScheduleType string
PlanType string
Status string
DbInstanceId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
Plans []GetDbInstancePlansPlan
NameRegex string
OutputFile string
PlanScheduleType string
PlanType string
Status string
dbInstanceId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
plans List<GetDbInstancePlansPlan>
nameRegex String
outputFile String
planScheduleType String
planType String
status String
dbInstanceId string
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
plans GetDbInstancePlansPlan[]
nameRegex string
outputFile string
planScheduleType string
planType string
status string
db_instance_id str
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
plans Sequence[GetDbInstancePlansPlan]
name_regex str
output_file str
plan_schedule_type str
plan_type str
status str
dbInstanceId String
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
planScheduleType String
planType String
status String

Supporting Types

GetDbInstancePlansPlan

DbInstancePlanName string

The name of the Plan.

Id string

The ID of the resource. The value formats as <db_instance_id>:<plan_id>.

PlanConfigs List<Pulumi.AliCloud.Gpdb.Inputs.GetDbInstancePlansPlanPlanConfig>

Plan configuration information.

PlanDesc string
PlanEndDate string

The end time of the Plan.

PlanId string

The ID of DB Instance Plan.

PlanScheduleType string

Plan scheduling type. 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.

DbInstancePlanName string

The name of the Plan.

Id string

The ID of the resource. The value formats as <db_instance_id>:<plan_id>.

PlanConfigs []GetDbInstancePlansPlanPlanConfig

Plan configuration information.

PlanDesc string
PlanEndDate string

The end time of the Plan.

PlanId string

The ID of DB Instance Plan.

PlanScheduleType string

Plan scheduling type. 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.

dbInstancePlanName String

The name of the Plan.

id String

The ID of the resource. The value formats as <db_instance_id>:<plan_id>.

planConfigs List<GetDbInstancePlansPlanPlanConfig>

Plan configuration information.

planDesc String
planEndDate String

The end time of the Plan.

planId String

The ID of DB Instance Plan.

planScheduleType String

Plan scheduling type. 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.

dbInstancePlanName string

The name of the Plan.

id string

The ID of the resource. The value formats as <db_instance_id>:<plan_id>.

planConfigs GetDbInstancePlansPlanPlanConfig[]

Plan configuration information.

planDesc string
planEndDate string

The end time of the Plan.

planId string

The ID of DB Instance Plan.

planScheduleType string

Plan scheduling type. 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.

db_instance_plan_name str

The name of the Plan.

id str

The ID of the resource. The value formats as <db_instance_id>:<plan_id>.

plan_configs Sequence[GetDbInstancePlansPlanPlanConfig]

Plan configuration information.

plan_desc str
plan_end_date str

The end time of the Plan.

plan_id str

The ID of DB Instance Plan.

plan_schedule_type str

Plan scheduling type. 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.

dbInstancePlanName String

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
planEndDate String

The end time of the Plan.

planId String

The ID of DB Instance Plan.

planScheduleType String

Plan scheduling type. 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.

GetDbInstancePlansPlanPlanConfig

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.

PlanCronTime string

The Cron Time of the plan.

PlanTaskStatus string

The Status of the plan Task.

ExecuteTime string

The executed time of the Plan.

PlanCronTime string

The Cron Time of the plan.

PlanTaskStatus string

The Status of the plan Task.

executeTime String

The executed time of the Plan.

planCronTime String

The Cron Time of the plan.

planTaskStatus String

The Status of the plan Task.

executeTime string

The executed time of the Plan.

planCronTime string

The Cron Time of the plan.

planTaskStatus string

The Status of the plan Task.

execute_time str

The executed time of the Plan.

plan_cron_time str

The Cron Time of the plan.

plan_task_status str

The Status of the plan Task.

executeTime String

The executed time of the Plan.

planCronTime String

The Cron Time of the plan.

planTaskStatus String

The Status of the plan Task.

GetDbInstancePlansPlanPlanConfigResume

ExecuteTime string

The executed time of the Plan.

PlanCronTime string

The Cron Time of the plan.

PlanTaskStatus string

The Status of the plan Task.

ExecuteTime string

The executed time of the Plan.

PlanCronTime string

The Cron Time of the plan.

PlanTaskStatus string

The Status of the plan Task.

executeTime String

The executed time of the Plan.

planCronTime String

The Cron Time of the plan.

planTaskStatus String

The Status of the plan Task.

executeTime string

The executed time of the Plan.

planCronTime string

The Cron Time of the plan.

planTaskStatus string

The Status of the plan Task.

execute_time str

The executed time of the Plan.

plan_cron_time str

The Cron Time of the plan.

plan_task_status str

The Status of the plan Task.

executeTime String

The executed time of the Plan.

planCronTime String

The Cron Time of the plan.

planTaskStatus String

The Status of the plan Task.

GetDbInstancePlansPlanPlanConfigScaleIn

ExecuteTime string

The executed time of the Plan.

PlanCronTime string

The Cron Time of the plan.

PlanTaskStatus string

The Status of the plan Task.

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.

PlanTaskStatus string

The Status of the plan Task.

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.

planTaskStatus String

The Status of the plan Task.

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.

planTaskStatus string

The Status of the plan Task.

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.

plan_task_status str

The Status of the plan Task.

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.

planTaskStatus String

The Status of the plan Task.

segmentNodeNum String

The segment Node Num of the Plan.

GetDbInstancePlansPlanPlanConfigScaleOut

ExecuteTime string

The executed time of the Plan.

PlanCronTime string

The Cron Time of the plan.

PlanTaskStatus string

The Status of the plan Task.

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.

PlanTaskStatus string

The Status of the plan Task.

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.

planTaskStatus String

The Status of the plan Task.

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.

planTaskStatus string

The Status of the plan Task.

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.

plan_task_status str

The Status of the plan Task.

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.

planTaskStatus String

The Status of the plan Task.

segmentNodeNum String

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 alicloud Terraform Provider.