Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi
alicloud.rds.getCharacterSetNames
Explore with Pulumi AI
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]);
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])
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
})
}
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]),
};
});
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]));
}
}
variables:
# Declare the data source
names:
fn::invoke:
Function: alicloud:rds:getCharacterSetNames
Arguments:
engine: MySQL
outputs:
firstRdsCharacterSetNames: ${names.names[0]}
Using getCharacterSetNames
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 getCharacterSetNames(args: GetCharacterSetNamesArgs, opts?: InvokeOptions): Promise<GetCharacterSetNamesResult>
function getCharacterSetNamesOutput(args: GetCharacterSetNamesOutputArgs, opts?: InvokeOptions): Output<GetCharacterSetNamesResult>
def get_character_set_names(engine: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCharacterSetNamesResult
def get_character_set_names_output(engine: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCharacterSetNamesResult]
func GetCharacterSetNames(ctx *Context, args *GetCharacterSetNamesArgs, opts ...InvokeOption) (*GetCharacterSetNamesResult, error)
func GetCharacterSetNamesOutput(ctx *Context, args *GetCharacterSetNamesOutputArgs, opts ...InvokeOption) GetCharacterSetNamesResultOutput
> Note: This function is named GetCharacterSetNames
in the Go SDK.
public static class GetCharacterSetNames
{
public static Task<GetCharacterSetNamesResult> InvokeAsync(GetCharacterSetNamesArgs args, InvokeOptions? opts = null)
public static Output<GetCharacterSetNamesResult> Invoke(GetCharacterSetNamesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCharacterSetNamesResult> getCharacterSetNames(GetCharacterSetNamesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:rds/getCharacterSetNames:getCharacterSetNames
arguments:
# arguments dictionary
The following arguments are supported:
- Engine string
- Database type. Options are
MySQL
,SQLServer
,PostgreSQL
,MariaDB
. - Output
File string
- Engine string
- Database type. Options are
MySQL
,SQLServer
,PostgreSQL
,MariaDB
. - Output
File string
- engine String
- Database type. Options are
MySQL
,SQLServer
,PostgreSQL
,MariaDB
. - output
File String
- engine string
- Database type. Options are
MySQL
,SQLServer
,PostgreSQL
,MariaDB
. - output
File string
- engine str
- Database type. Options are
MySQL
,SQLServer
,PostgreSQL
,MariaDB
. - output_
file str
- engine String
- Database type. Options are
MySQL
,SQLServer
,PostgreSQL
,MariaDB
. - output
File String
getCharacterSetNames Result
The following output properties are available:
- Engine string
- Id string
- The provider-assigned unique ID for this managed resource.
- Names List<string>
- Output
File string
- Engine string
- Id string
- The provider-assigned unique ID for this managed resource.
- Names []string
- Output
File string
- engine String
- id String
- The provider-assigned unique ID for this managed resource.
- names List<String>
- output
File String
- engine string
- id string
- The provider-assigned unique ID for this managed resource.
- names string[]
- output
File string
- engine str
- id str
- The provider-assigned unique ID for this managed resource.
- names Sequence[str]
- output_
file str
- engine String
- id String
- The provider-assigned unique ID for this managed resource.
- names List<String>
- output
File String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.