Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.polardb.getParameterGroups
Explore with Pulumi AI
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);
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)
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
})
}
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),
};
});
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()));
}
}
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}
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:
- Db
Type string - The type of the database engine. Only
MySQL
is supported. - Db
Version string - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - Ids List<string>
- A list of Parameter Group IDs.
- Name
Regex string - A regex string to filter results by Parameter Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Db
Type string - The type of the database engine. Only
MySQL
is supported. - Db
Version string - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - Ids []string
- A list of Parameter Group IDs.
- Name
Regex string - A regex string to filter results by Parameter Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- db
Type String - The type of the database engine. Only
MySQL
is supported. - db
Version String - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - ids List<String>
- A list of Parameter Group IDs.
- name
Regex String - A regex string to filter results by Parameter Group name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- db
Type string - The type of the database engine. Only
MySQL
is supported. - db
Version string - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - ids string[]
- A list of Parameter Group IDs.
- name
Regex string - A regex string to filter results by Parameter Group name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- db_
type str - The type of the database engine. Only
MySQL
is supported. - db_
version str - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - 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 - File name where to save data source results (after running
pulumi preview
).
- db
Type String - The type of the database engine. Only
MySQL
is supported. - db
Version String - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - ids List<String>
- A list of Parameter Group IDs.
- name
Regex String - A regex string to filter results by Parameter Group name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getParameterGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Polar DB. Outputs. Get Parameter Groups Group> - 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.
- Db
Type string - The type of the database engine.
- Db
Version string - The version number of the database engine.
- Name
Regex string - Output
File string
- Groups
[]Get
Parameter Groups Group - 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.
- Db
Type string - The type of the database engine.
- Db
Version string - The version number of the database engine.
- Name
Regex string - Output
File string
- groups
List<Get
Parameter Groups Group> - 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.
- db
Type String - The type of the database engine.
- db
Version String - The version number of the database engine.
- name
Regex String - output
File String
- groups
Get
Parameter Groups Group[] - 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.
- db
Type string - The type of the database engine.
- db
Version string - The version number of the database engine.
- name
Regex string - output
File string
- groups
Sequence[Get
Parameter Groups Group] - 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.
- db
Type String - The type of the database engine.
- db
Version String - The version number of the database engine.
- name
Regex String - output
File String
Supporting Types
GetParameterGroupsGroup
- Create
Time 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.
- Db
Type string - The type of the database engine. Only
MySQL
is supported. - Db
Version string - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - Force
Restart string - Indicates whether to restart the cluster when this parameter template is applied.
- Id string
- The ID of the Parameter Group.
- Parameter
Counts int - The number of parameters in the parameter template.
- Parameter
Group stringDesc - The description of the parameter template.
- Parameter
Group stringId - The ID of the Parameter Group.
- Parameter
Group stringName - The name of the parameter template.
- Parameter
Group stringType - The type of the parameter template.
- Create
Time 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.
- Db
Type string - The type of the database engine. Only
MySQL
is supported. - Db
Version string - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - Force
Restart string - Indicates whether to restart the cluster when this parameter template is applied.
- Id string
- The ID of the Parameter Group.
- Parameter
Counts int - The number of parameters in the parameter template.
- Parameter
Group stringDesc - The description of the parameter template.
- Parameter
Group stringId - The ID of the Parameter Group.
- Parameter
Group stringName - The name of the parameter template.
- Parameter
Group stringType - The type of the parameter template.
- create
Time 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.
- db
Type String - The type of the database engine. Only
MySQL
is supported. - db
Version String - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - force
Restart String - Indicates whether to restart the cluster when this parameter template is applied.
- id String
- The ID of the Parameter Group.
- parameter
Counts Integer - The number of parameters in the parameter template.
- parameter
Group StringDesc - The description of the parameter template.
- parameter
Group StringId - The ID of the Parameter Group.
- parameter
Group StringName - The name of the parameter template.
- parameter
Group StringType - The type of the parameter template.
- create
Time 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.
- db
Type string - The type of the database engine. Only
MySQL
is supported. - db
Version string - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - force
Restart string - Indicates whether to restart the cluster when this parameter template is applied.
- id string
- The ID of the Parameter Group.
- parameter
Counts number - The number of parameters in the parameter template.
- parameter
Group stringDesc - The description of the parameter template.
- parameter
Group stringId - The ID of the Parameter Group.
- parameter
Group stringName - The name of the parameter template.
- parameter
Group stringType - 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. Only
MySQL
is supported. - db_
version str - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - 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_ strdesc - The description of the parameter template.
- parameter_
group_ strid - The ID of the Parameter Group.
- parameter_
group_ strname - The name of the parameter template.
- parameter_
group_ strtype - The type of the parameter template.
- create
Time 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.
- db
Type String - The type of the database engine. Only
MySQL
is supported. - db
Version String - The version number of the database engine. Valid values:
5.6
,5.7
,8.0
. - force
Restart String - Indicates whether to restart the cluster when this parameter template is applied.
- id String
- The ID of the Parameter Group.
- parameter
Counts Number - The number of parameters in the parameter template.
- parameter
Group StringDesc - The description of the parameter template.
- parameter
Group StringId - The ID of the Parameter Group.
- parameter
Group StringName - The name of the parameter template.
- parameter
Group StringType - 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.