1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. polardb
  5. getParameterGroups
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.polardb.getParameterGroups

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

NOTE: Available since v1.183.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = alicloud.polardb.getParameterGroups({
    dbType: "MySQL",
    dbVersion: "8.0",
});
const ids = _default.then(_default => alicloud.polardb.getParameterGroups({
    ids: [_default.groups?.[0]?.id],
}));
export const polardbParameterGroupId1 = ids.then(ids => ids.groups?.[0]?.id);
const nameRegex = _default.then(_default => alicloud.polardb.getParameterGroups({
    nameRegex: _default.groups?.[0]?.parameterGroupName,
}));
export const polardbParameterGroupId2 = nameRegex.then(nameRegex => nameRegex.groups?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.polardb.get_parameter_groups(db_type="MySQL",
    db_version="8.0")
ids = alicloud.polardb.get_parameter_groups(ids=[default.groups[0].id])
pulumi.export("polardbParameterGroupId1", ids.groups[0].id)
name_regex = alicloud.polardb.get_parameter_groups(name_regex=default.groups[0].parameter_group_name)
pulumi.export("polardbParameterGroupId2", name_regex.groups[0].id)
Copy
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 {
_default, err := polardb.GetParameterGroups(ctx, &polardb.GetParameterGroupsArgs{
DbType: pulumi.StringRef("MySQL"),
DbVersion: pulumi.StringRef("8.0"),
}, nil);
if err != nil {
return err
}
ids, err := polardb.GetParameterGroups(ctx, &polardb.GetParameterGroupsArgs{
Ids: interface{}{
_default.Groups[0].Id,
},
}, nil);
if err != nil {
return err
}
ctx.Export("polardbParameterGroupId1", ids.Groups[0].Id)
nameRegex, err := polardb.GetParameterGroups(ctx, &polardb.GetParameterGroupsArgs{
NameRegex: pulumi.StringRef(_default.Groups[0].ParameterGroupName),
}, nil);
if err != nil {
return err
}
ctx.Export("polardbParameterGroupId2", nameRegex.Groups[0].Id)
return nil
})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.PolarDB.GetParameterGroups.Invoke(new()
    {
        DbType = "MySQL",
        DbVersion = "8.0",
    });

    var ids = AliCloud.PolarDB.GetParameterGroups.Invoke(new()
    {
        Ids = new[]
        {
            @default.Apply(getParameterGroupsResult => getParameterGroupsResult.Groups[0]?.Id),
        },
    });

    var nameRegex = AliCloud.PolarDB.GetParameterGroups.Invoke(new()
    {
        NameRegex = @default.Apply(getParameterGroupsResult => getParameterGroupsResult.Groups[0]?.ParameterGroupName),
    });

    return new Dictionary<string, object?>
    {
        ["polardbParameterGroupId1"] = ids.Apply(getParameterGroupsResult => getParameterGroupsResult.Groups[0]?.Id),
        ["polardbParameterGroupId2"] = nameRegex.Apply(getParameterGroupsResult => getParameterGroupsResult.Groups[0]?.Id),
    };
});
Copy
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 default = PolardbFunctions.getParameterGroups(GetParameterGroupsArgs.builder()
            .dbType("MySQL")
            .dbVersion("8.0")
            .build());

        final var ids = PolardbFunctions.getParameterGroups(GetParameterGroupsArgs.builder()
            .ids(default_.groups()[0].id())
            .build());

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

        ctx.export("polardbParameterGroupId2", nameRegex.applyValue(getParameterGroupsResult -> getParameterGroupsResult.groups()[0].id()));
    }
}
Copy
variables:
  default:
    fn::invoke:
      function: alicloud:polardb:getParameterGroups
      arguments:
        dbType: MySQL
        dbVersion: '8.0'
  ids:
    fn::invoke:
      function: alicloud:polardb:getParameterGroups
      arguments:
        ids:
          - ${default.groups[0].id}
  nameRegex:
    fn::invoke:
      function: alicloud:polardb:getParameterGroups
      arguments:
        nameRegex: ${default.groups[0].parameterGroupName}
outputs:
  polardbParameterGroupId1: ${ids.groups[0].id}
  polardbParameterGroupId2: ${nameRegex.groups[0].id}
Copy

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>
Copy
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]
Copy
func GetParameterGroups(ctx *Context, args *GetParameterGroupsArgs, opts ...InvokeOption) (*GetParameterGroupsResult, error)
func GetParameterGroupsOutput(ctx *Context, args *GetParameterGroupsOutputArgs, opts ...InvokeOption) GetParameterGroupsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetParameterGroupsResult> getParameterGroups(GetParameterGroupsArgs args, InvokeOptions options)
public static Output<GetParameterGroupsResult> getParameterGroups(GetParameterGroupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:polardb/getParameterGroups:getParameterGroups
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DbType Changes to this property will trigger replacement. string
The type of the database engine. Only MySQL is supported.
DbVersion Changes to this property will trigger replacement. string
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
Ids Changes to this property will trigger replacement. List<string>
A list of Parameter Group IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Parameter Group name.
OutputFile string
File name where to save data source results (after running pulumi preview).
DbType Changes to this property will trigger replacement. string
The type of the database engine. Only MySQL is supported.
DbVersion Changes to this property will trigger replacement. string
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
Ids Changes to this property will trigger replacement. []string
A list of Parameter Group IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Parameter Group name.
OutputFile string
File name where to save data source results (after running pulumi preview).
dbType Changes to this property will trigger replacement. String
The type of the database engine. Only MySQL is supported.
dbVersion Changes to this property will trigger replacement. String
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
ids Changes to this property will trigger replacement. List<String>
A list of Parameter Group IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Parameter Group name.
outputFile String
File name where to save data source results (after running pulumi preview).
dbType Changes to this property will trigger replacement. string
The type of the database engine. Only MySQL is supported.
dbVersion Changes to this property will trigger replacement. string
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
ids Changes to this property will trigger replacement. string[]
A list of Parameter Group IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Parameter Group name.
outputFile string
File name where to save data source results (after running pulumi preview).
db_type Changes to this property will trigger replacement. str
The type of the database engine. Only MySQL is supported.
db_version Changes to this property will trigger replacement. str
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Parameter Group IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Parameter Group name.
output_file str
File name where to save data source results (after running pulumi preview).
dbType Changes to this property will trigger replacement. String
The type of the database engine. Only MySQL is supported.
dbVersion Changes to this property will trigger replacement. String
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
ids Changes to this property will trigger replacement. List<String>
A list of Parameter Group IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Parameter Group name.
outputFile String
File name where to save data source results (after running pulumi preview).

getParameterGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.PolarDB.Outputs.GetParameterGroupsGroup>
A list of PolarDB Parameter Groups. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
A list of Parameter Group names.
DbType string
The type of the database engine.
DbVersion string
The version number of the database engine.
NameRegex string
OutputFile string
Groups []GetParameterGroupsGroup
A list of PolarDB Parameter Groups. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
A list of Parameter Group names.
DbType string
The type of the database engine.
DbVersion string
The version number of the database engine.
NameRegex string
OutputFile string
groups List<GetParameterGroupsGroup>
A list of PolarDB Parameter Groups. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of Parameter Group names.
dbType String
The type of the database engine.
dbVersion String
The version number of the database engine.
nameRegex String
outputFile String
groups GetParameterGroupsGroup[]
A list of PolarDB Parameter Groups. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
A list of Parameter Group names.
dbType string
The type of the database engine.
dbVersion string
The version number of the database engine.
nameRegex string
outputFile string
groups Sequence[GetParameterGroupsGroup]
A list of PolarDB Parameter Groups. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
A list of Parameter Group names.
db_type str
The type of the database engine.
db_version str
The version number of the database engine.
name_regex str
output_file str
groups List<Property Map>
A list of PolarDB Parameter Groups. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of Parameter Group names.
dbType String
The type of the database engine.
dbVersion String
The version number of the database engine.
nameRegex String
outputFile String

Supporting Types

GetParameterGroupsGroup

CreateTime This property is required. 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 This property is required. string
The type of the database engine. Only MySQL is supported.
DbVersion This property is required. string
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
ForceRestart This property is required. string
Indicates whether to restart the cluster when this parameter template is applied.
Id This property is required. string
The ID of the Parameter Group.
ParameterCounts This property is required. int
The number of parameters in the parameter template.
ParameterGroupDesc This property is required. string
The description of the parameter template.
ParameterGroupId This property is required. string
The ID of the Parameter Group.
ParameterGroupName This property is required. string
The name of the parameter template.
ParameterGroupType This property is required. string
The type of the parameter template.
CreateTime This property is required. 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 This property is required. string
The type of the database engine. Only MySQL is supported.
DbVersion This property is required. string
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
ForceRestart This property is required. string
Indicates whether to restart the cluster when this parameter template is applied.
Id This property is required. string
The ID of the Parameter Group.
ParameterCounts This property is required. int
The number of parameters in the parameter template.
ParameterGroupDesc This property is required. string
The description of the parameter template.
ParameterGroupId This property is required. string
The ID of the Parameter Group.
ParameterGroupName This property is required. string
The name of the parameter template.
ParameterGroupType This property is required. string
The type of the parameter template.
createTime This property is required. 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 This property is required. String
The type of the database engine. Only MySQL is supported.
dbVersion This property is required. String
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
forceRestart This property is required. String
Indicates whether to restart the cluster when this parameter template is applied.
id This property is required. String
The ID of the Parameter Group.
parameterCounts This property is required. Integer
The number of parameters in the parameter template.
parameterGroupDesc This property is required. String
The description of the parameter template.
parameterGroupId This property is required. String
The ID of the Parameter Group.
parameterGroupName This property is required. String
The name of the parameter template.
parameterGroupType This property is required. String
The type of the parameter template.
createTime This property is required. 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 This property is required. string
The type of the database engine. Only MySQL is supported.
dbVersion This property is required. string
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
forceRestart This property is required. string
Indicates whether to restart the cluster when this parameter template is applied.
id This property is required. string
The ID of the Parameter Group.
parameterCounts This property is required. number
The number of parameters in the parameter template.
parameterGroupDesc This property is required. string
The description of the parameter template.
parameterGroupId This property is required. string
The ID of the Parameter Group.
parameterGroupName This property is required. string
The name of the parameter template.
parameterGroupType This property is required. string
The type of the parameter template.
create_time This property is required. 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 This property is required. str
The type of the database engine. Only MySQL is supported.
db_version This property is required. str
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
force_restart This property is required. str
Indicates whether to restart the cluster when this parameter template is applied.
id This property is required. str
The ID of the Parameter Group.
parameter_counts This property is required. int
The number of parameters in the parameter template.
parameter_group_desc This property is required. str
The description of the parameter template.
parameter_group_id This property is required. str
The ID of the Parameter Group.
parameter_group_name This property is required. str
The name of the parameter template.
parameter_group_type This property is required. str
The type of the parameter template.
createTime This property is required. 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 This property is required. String
The type of the database engine. Only MySQL is supported.
dbVersion This property is required. String
The version number of the database engine. Valid values: 5.6, 5.7, 8.0.
forceRestart This property is required. String
Indicates whether to restart the cluster when this parameter template is applied.
id This property is required. String
The ID of the Parameter Group.
parameterCounts This property is required. Number
The number of parameters in the parameter template.
parameterGroupDesc This property is required. String
The description of the parameter template.
parameterGroupId This property is required. String
The ID of the Parameter Group.
parameterGroupName This property is required. String
The name of the parameter template.
parameterGroupType This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi