get Character Set Names
suspend fun getCharacterSetNames(argument: GetCharacterSetNamesPlainArgs): GetCharacterSetNamesResult
This data source is the character set supported by querying RDS instances.
NOTE: Available in v1.198.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const names = alicloud.rds.getCharacterSetNames({
engine: "MySQL",
});
export const firstRdsCharacterSetNames = names.then(names => names.names?.[0]);
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
names = alicloud.rds.get_character_set_names(engine="MySQL")
pulumi.export("firstRdsCharacterSetNames", names.names[0])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var names = AliCloud.Rds.GetCharacterSetNames.Invoke(new()
{
Engine = "MySQL",
});
return new Dictionary<string, object?>
{
["firstRdsCharacterSetNames"] = names.Apply(getCharacterSetNamesResult => getCharacterSetNamesResult.Names[0]),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Declare the data source
names, err := rds.GetCharacterSetNames(ctx, &rds.GetCharacterSetNamesArgs{
Engine: "MySQL",
}, nil)
if err != nil {
return err
}
ctx.Export("firstRdsCharacterSetNames", names.Names[0])
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rds.RdsFunctions;
import com.pulumi.alicloud.rds.inputs.GetCharacterSetNamesArgs;
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) {
// Declare the data source
final var names = RdsFunctions.getCharacterSetNames(GetCharacterSetNamesArgs.builder()
.engine("MySQL")
.build());
ctx.export("firstRdsCharacterSetNames", names.applyValue(getCharacterSetNamesResult -> getCharacterSetNamesResult.names()[0]));
}
}
Content copied to clipboard
variables:
# Declare the data source
names:
fn::invoke:
function: alicloud:rds:getCharacterSetNames
arguments:
engine: MySQL
outputs:
firstRdsCharacterSetNames: ${names.names[0]}
Content copied to clipboard
Return
A collection of values returned by getCharacterSetNames.
Parameters
argument
A collection of arguments for invoking getCharacterSetNames.
suspend fun getCharacterSetNames(engine: String, outputFile: String? = null): GetCharacterSetNamesResult
Return
A collection of values returned by getCharacterSetNames.
Parameters
engine
Database type. Options are MySQL
, SQLServer
, PostgreSQL
, MariaDB
.
output File
See also
suspend fun getCharacterSetNames(argument: suspend GetCharacterSetNamesPlainArgsBuilder.() -> Unit): GetCharacterSetNamesResult
Return
A collection of values returned by getCharacterSetNames.
Parameters
argument
Builder for com.pulumi.alicloud.rds.kotlin.inputs.GetCharacterSetNamesPlainArgs.