alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.polardb.getParameterGroups

This data source provides the PolarDB Parameter Groups of the current Alibaba Cloud user.

NOTE: Available in v1.183.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.PolarDB.GetParameterGroups.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
    });

    var nameRegex = AliCloud.PolarDB.GetParameterGroups.Invoke(new()
    {
        NameRegex = "example_name",
    });

    return new Dictionary<string, object?>
    {
        ["polardbParameterGroupId1"] = ids.Apply(getParameterGroupsResult => getParameterGroupsResult.Groups[0]?.Id),
        ["polardbParameterGroupId2"] = nameRegex.Apply(getParameterGroupsResult => getParameterGroupsResult.Groups[0]?.Id),
    };
});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/polardb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := polardb.GetParameterGroups(ctx, &polardb.GetParameterGroupsArgs{
			Ids: []string{
				"example_id",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("polardbParameterGroupId1", ids.Groups[0].Id)
		nameRegex, err := polardb.GetParameterGroups(ctx, &polardb.GetParameterGroupsArgs{
			NameRegex: pulumi.StringRef("example_name"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("polardbParameterGroupId2", nameRegex.Groups[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.polardb.PolardbFunctions;
import com.pulumi.alicloud.polardb.inputs.GetParameterGroupsArgs;
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 = PolardbFunctions.getParameterGroups(GetParameterGroupsArgs.builder()
            .ids("example_id")
            .build());

        ctx.export("polardbParameterGroupId1", ids.applyValue(getParameterGroupsResult -> getParameterGroupsResult.groups()[0].id()));
        final var nameRegex = PolardbFunctions.getParameterGroups(GetParameterGroupsArgs.builder()
            .nameRegex("example_name")
            .build());

        ctx.export("polardbParameterGroupId2", nameRegex.applyValue(getParameterGroupsResult -> getParameterGroupsResult.groups()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.polardb.get_parameter_groups(ids=["example_id"])
pulumi.export("polardbParameterGroupId1", ids.groups[0].id)
name_regex = alicloud.polardb.get_parameter_groups(name_regex="example_name")
pulumi.export("polardbParameterGroupId2", name_regex.groups[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.polardb.getParameterGroups({
    ids: ["example_id"],
});
export const polardbParameterGroupId1 = ids.then(ids => ids.groups?.[0]?.id);
const nameRegex = alicloud.polardb.getParameterGroups({
    nameRegex: "example_name",
});
export const polardbParameterGroupId2 = nameRegex.then(nameRegex => nameRegex.groups?.[0]?.id);
variables:
  ids:
    fn::invoke:
      Function: alicloud:polardb:getParameterGroups
      Arguments:
        ids:
          - example_id
  nameRegex:
    fn::invoke:
      Function: alicloud:polardb:getParameterGroups
      Arguments:
        nameRegex: example_name
outputs:
  polardbParameterGroupId1: ${ids.groups[0].id}
  polardbParameterGroupId2: ${nameRegex.groups[0].id}

Using getParameterGroups

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 getParameterGroups(args: GetParameterGroupsArgs, opts?: InvokeOptions): Promise<GetParameterGroupsResult>
function getParameterGroupsOutput(args: GetParameterGroupsOutputArgs, opts?: InvokeOptions): Output<GetParameterGroupsResult>
def get_parameter_groups(db_type: Optional[str] = None,
                         db_version: Optional[str] = None,
                         ids: Optional[Sequence[str]] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetParameterGroupsResult
def get_parameter_groups_output(db_type: Optional[pulumi.Input[str]] = None,
                         db_version: 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,
                         opts: Optional[InvokeOptions] = None) -> Output[GetParameterGroupsResult]
func GetParameterGroups(ctx *Context, args *GetParameterGroupsArgs, opts ...InvokeOption) (*GetParameterGroupsResult, error)
func GetParameterGroupsOutput(ctx *Context, args *GetParameterGroupsOutputArgs, opts ...InvokeOption) GetParameterGroupsResultOutput

> Note: This function is named GetParameterGroups in the Go SDK.

public static class GetParameterGroups 
{
    public static Task<GetParameterGroupsResult> InvokeAsync(GetParameterGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetParameterGroupsResult> Invoke(GetParameterGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetParameterGroupsResult> getParameterGroups(GetParameterGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:polardb/getParameterGroups:getParameterGroups
  arguments:
    # arguments dictionary

The following arguments are supported:

DbType string

The type of the database engine.

DbVersion string

The version number of the database engine.

Ids List<string>

A list of Parameter Group IDs.

NameRegex string

A regex string to filter results by Parameter Group name.

OutputFile string
DbType string

The type of the database engine.

DbVersion string

The version number of the database engine.

Ids []string

A list of Parameter Group IDs.

NameRegex string

A regex string to filter results by Parameter Group name.

OutputFile string
dbType String

The type of the database engine.

dbVersion String

The version number of the database engine.

ids List<String>

A list of Parameter Group IDs.

nameRegex String

A regex string to filter results by Parameter Group name.

outputFile String
dbType string

The type of the database engine.

dbVersion string

The version number of the database engine.

ids string[]

A list of Parameter Group IDs.

nameRegex string

A regex string to filter results by Parameter Group name.

outputFile string
db_type str

The type of the database engine.

db_version str

The version number of the database engine.

ids Sequence[str]

A list of Parameter Group IDs.

name_regex str

A regex string to filter results by Parameter Group name.

output_file str
dbType String

The type of the database engine.

dbVersion String

The version number of the database engine.

ids List<String>

A list of Parameter Group IDs.

nameRegex String

A regex string to filter results by Parameter Group name.

outputFile String

getParameterGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.PolarDB.Outputs.GetParameterGroupsGroup>
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
DbType string
DbVersion string
NameRegex string
OutputFile string
Groups []GetParameterGroupsGroup
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
DbType string
DbVersion string
NameRegex string
OutputFile string
groups List<GetParameterGroupsGroup>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
dbType String
dbVersion String
nameRegex String
outputFile String
groups GetParameterGroupsGroup[]
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
dbType string
dbVersion string
nameRegex string
outputFile string
groups Sequence[GetParameterGroupsGroup]
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
db_type str
db_version str
name_regex str
output_file str
groups List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
dbType String
dbVersion String
nameRegex String
outputFile String

Supporting Types

GetParameterGroupsGroup

CreateTime string

The time when the parameter template was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

DbType string

The type of the database engine.

DbVersion string

The version number of the database engine.

ForceRestart string

Indicates whether to restart the cluster when this parameter template is applied.

Id string

The ID of the Parameter Group.

ParameterCounts int

The number of parameters in the parameter template.

ParameterGroupDesc string

The description of the parameter template.

ParameterGroupId string

The ID of the Parameter Group.

ParameterGroupName string

The name of the parameter template.

ParameterGroupType string

The type of the parameter template.

CreateTime string

The time when the parameter template was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

DbType string

The type of the database engine.

DbVersion string

The version number of the database engine.

ForceRestart string

Indicates whether to restart the cluster when this parameter template is applied.

Id string

The ID of the Parameter Group.

ParameterCounts int

The number of parameters in the parameter template.

ParameterGroupDesc string

The description of the parameter template.

ParameterGroupId string

The ID of the Parameter Group.

ParameterGroupName string

The name of the parameter template.

ParameterGroupType string

The type of the parameter template.

createTime String

The time when the parameter template was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

dbType String

The type of the database engine.

dbVersion String

The version number of the database engine.

forceRestart String

Indicates whether to restart the cluster when this parameter template is applied.

id String

The ID of the Parameter Group.

parameterCounts Integer

The number of parameters in the parameter template.

parameterGroupDesc String

The description of the parameter template.

parameterGroupId String

The ID of the Parameter Group.

parameterGroupName String

The name of the parameter template.

parameterGroupType String

The type of the parameter template.

createTime string

The time when the parameter template was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

dbType string

The type of the database engine.

dbVersion string

The version number of the database engine.

forceRestart string

Indicates whether to restart the cluster when this parameter template is applied.

id string

The ID of the Parameter Group.

parameterCounts number

The number of parameters in the parameter template.

parameterGroupDesc string

The description of the parameter template.

parameterGroupId string

The ID of the Parameter Group.

parameterGroupName string

The name of the parameter template.

parameterGroupType string

The type of the parameter template.

create_time str

The time when the parameter template was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

db_type str

The type of the database engine.

db_version str

The version number of the database engine.

force_restart str

Indicates whether to restart the cluster when this parameter template is applied.

id str

The ID of the Parameter Group.

parameter_counts int

The number of parameters in the parameter template.

parameter_group_desc str

The description of the parameter template.

parameter_group_id str

The ID of the Parameter Group.

parameter_group_name str

The name of the parameter template.

parameter_group_type str

The type of the parameter template.

createTime String

The time when the parameter template was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

dbType String

The type of the database engine.

dbVersion String

The version number of the database engine.

forceRestart String

Indicates whether to restart the cluster when this parameter template is applied.

id String

The ID of the Parameter Group.

parameterCounts Number

The number of parameters in the parameter template.

parameterGroupDesc String

The description of the parameter template.

parameterGroupId String

The ID of the Parameter Group.

parameterGroupName String

The name of the parameter template.

parameterGroupType String

The type of the parameter template.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.