Viewing docs for ucloud 1.49.0
published on Tuesday, Oct 27, 2026 by ucloud
published on Tuesday, Oct 27, 2026 by ucloud
ucloud
Viewing docs for ucloud 1.49.0
published on Tuesday, Oct 27, 2026 by ucloud
published on Tuesday, Oct 27, 2026 by ucloud
This data source provides a list of MySQL instance resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const example = ucloud.getUdbMysqlInstances({});
export const first = example.then(example => example.udbMysqlInstances?.[0]?.id);
import pulumi
import pulumi_ucloud as ucloud
example = ucloud.get_udb_mysql_instances()
pulumi.export("first", example.udb_mysql_instances[0].id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ucloud.GetUdbMysqlInstances(ctx, &ucloud.GetUdbMysqlInstancesArgs{}, nil)
if err != nil {
return err
}
ctx.Export("first", example.UdbMysqlInstances[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var example = Ucloud.GetUdbMysqlInstances.Invoke();
return new Dictionary<string, object?>
{
["first"] = example.Apply(getUdbMysqlInstancesResult => getUdbMysqlInstancesResult.UdbMysqlInstances[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.UcloudFunctions;
import com.pulumi.ucloud.inputs.GetUdbMysqlInstancesArgs;
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 example = UcloudFunctions.getUdbMysqlInstances(GetUdbMysqlInstancesArgs.builder()
.build());
ctx.export("first", example.udbMysqlInstances()[0].id());
}
}
variables:
example:
fn::invoke:
function: ucloud:getUdbMysqlInstances
arguments: {}
outputs:
first: ${example.udbMysqlInstances[0].id}
Example coming soon!
Using getUdbMysqlInstances
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 getUdbMysqlInstances(args: GetUdbMysqlInstancesArgs, opts?: InvokeOptions): Promise<GetUdbMysqlInstancesResult>
function getUdbMysqlInstancesOutput(args: GetUdbMysqlInstancesOutputArgs, opts?: InvokeOutputOptions): Output<GetUdbMysqlInstancesResult>def get_udb_mysql_instances(availability_zone: Optional[str] = None,
id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
vpc_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUdbMysqlInstancesResult
def get_udb_mysql_instances_output(availability_zone: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
name_regex: pulumi.Input[Optional[str]] = None,
output_file: pulumi.Input[Optional[str]] = None,
vpc_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetUdbMysqlInstancesResult]func GetUdbMysqlInstances(ctx *Context, args *GetUdbMysqlInstancesArgs, opts ...InvokeOption) (*GetUdbMysqlInstancesResult, error)
func GetUdbMysqlInstancesOutput(ctx *Context, args *GetUdbMysqlInstancesOutputArgs, opts ...InvokeOption) GetUdbMysqlInstancesResultOutput> Note: This function is named GetUdbMysqlInstances in the Go SDK.
public static class GetUdbMysqlInstances
{
public static Task<GetUdbMysqlInstancesResult> InvokeAsync(GetUdbMysqlInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetUdbMysqlInstancesResult> Invoke(GetUdbMysqlInstancesInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetUdbMysqlInstancesResult> Invoke(GetUdbMysqlInstancesInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetUdbMysqlInstancesResult> getUdbMysqlInstances(GetUdbMysqlInstancesArgs args, InvokeOptions options)
public static Output<GetUdbMysqlInstancesResult> getUdbMysqlInstances(GetUdbMysqlInstancesArgs args, InvokeOptions options)
public static Output<GetUdbMysqlInstancesResult> getUdbMysqlInstances(GetUdbMysqlInstancesArgs args, InvokeOutputOptions options)
fn::invoke:
function: ucloud:index/getUdbMysqlInstances:getUdbMysqlInstances
arguments:
# arguments dictionarydata "ucloud_get_udb_mysql_instances" "name" {
# arguments
}The following arguments are supported:
- Availability
Zone string - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- Id string
- The ID of the instance.
- Ids List<string>
- A list of MySQL instance IDs.
- Name
Regex string - A regex string to filter resulting instances by name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Vpc
Id string - The ID of the VPC linked to the instances.
- Availability
Zone string - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- Id string
- The ID of the instance.
- Ids []string
- A list of MySQL instance IDs.
- Name
Regex string - A regex string to filter resulting instances by name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Vpc
Id string - The ID of the VPC linked to the instances.
- availability_
zone string - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- id string
- The ID of the instance.
- ids list(string)
- A list of MySQL instance IDs.
- name_
regex string - A regex string to filter resulting instances by name.
- output_
file string - File name where to save data source results (after running
pulumi preview). - vpc_
id string - The ID of the VPC linked to the instances.
- availability
Zone String - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- id String
- The ID of the instance.
- ids List<String>
- A list of MySQL instance IDs.
- name
Regex String - A regex string to filter resulting instances by name.
- output
File String - File name where to save data source results (after running
pulumi preview). - vpc
Id String - The ID of the VPC linked to the instances.
- availability
Zone string - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- id string
- The ID of the instance.
- ids string[]
- A list of MySQL instance IDs.
- name
Regex string - A regex string to filter resulting instances by name.
- output
File string - File name where to save data source results (after running
pulumi preview). - vpc
Id string - The ID of the VPC linked to the instances.
- availability_
zone str - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- id str
- The ID of the instance.
- ids Sequence[str]
- A list of MySQL instance IDs.
- name_
regex str - A regex string to filter resulting instances by name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - vpc_
id str - The ID of the VPC linked to the instances.
- availability
Zone String - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- id String
- The ID of the instance.
- ids List<String>
- A list of MySQL instance IDs.
- name
Regex String - A regex string to filter resulting instances by name.
- output
File String - File name where to save data source results (after running
pulumi preview). - vpc
Id String - The ID of the VPC linked to the instances.
getUdbMysqlInstances Result
The following output properties are available:
- Id string
- The ID of the instance.
- Ids List<string>
- Total
Count double - Total number of instances that satisfy the condition.
- Udb
Mysql List<GetInstances Udb Mysql Instances Udb Mysql Instance> - It is a nested type which documented below.
- Availability
Zone string - Availability zone where the instance is located.
- Name
Regex string - Output
File string - Vpc
Id string - The ID of the VPC linked to the instance.
- Id string
- The ID of the instance.
- Ids []string
- Total
Count float64 - Total number of instances that satisfy the condition.
- Udb
Mysql []GetInstances Udb Mysql Instances Udb Mysql Instance - It is a nested type which documented below.
- Availability
Zone string - Availability zone where the instance is located.
- Name
Regex string - Output
File string - Vpc
Id string - The ID of the VPC linked to the instance.
- id string
- The ID of the instance.
- ids list(string)
- total_
count number - Total number of instances that satisfy the condition.
- udb_
mysql_ list(object)instances - It is a nested type which documented below.
- availability_
zone string - Availability zone where the instance is located.
- name_
regex string - output_
file string - vpc_
id string - The ID of the VPC linked to the instance.
- id String
- The ID of the instance.
- ids List<String>
- total
Count Double - Total number of instances that satisfy the condition.
- udb
Mysql List<GetInstances Udb Mysql Instances Udb Mysql Instance> - It is a nested type which documented below.
- availability
Zone String - Availability zone where the instance is located.
- name
Regex String - output
File String - vpc
Id String - The ID of the VPC linked to the instance.
- id string
- The ID of the instance.
- ids string[]
- total
Count number - Total number of instances that satisfy the condition.
- udb
Mysql GetInstances Udb Mysql Instances Udb Mysql Instance[] - It is a nested type which documented below.
- availability
Zone string - Availability zone where the instance is located.
- name
Regex string - output
File string - vpc
Id string - The ID of the VPC linked to the instance.
- id str
- The ID of the instance.
- ids Sequence[str]
- total_
count float - Total number of instances that satisfy the condition.
- udb_
mysql_ Sequence[Getinstances Udb Mysql Instances Udb Mysql Instance] - It is a nested type which documented below.
- availability_
zone str - Availability zone where the instance is located.
- name_
regex str - output_
file str - vpc_
id str - The ID of the VPC linked to the instance.
- id String
- The ID of the instance.
- ids List<String>
- total
Count Number - Total number of instances that satisfy the condition.
- udb
Mysql List<Property Map>Instances - It is a nested type which documented below.
- availability
Zone String - Availability zone where the instance is located.
- name
Regex String - output
File String - vpc
Id String - The ID of the VPC linked to the instance.
Supporting Types
GetUdbMysqlInstancesUdbMysqlInstance
- Availability
Zone string - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- Charge
Type string - The charge type of the instance.
- Cpu double
- The number of CPU cores.
- Create
Time string - The time when the instance was created.
- Db
Version string - The database version.
- Disk
Space double - The allocated storage size in gigabytes (GB).
- Expire
Time string - The expiration time of the instance.
- Id string
- The ID of the instance.
- Instance
Mode string - The instance mode.
- Memory double
- The size of memory in gigabytes (GB).
- Name string
- The name of the instance.
- Port double
- The port on which the database accepts connections.
- Private
Ip string - The private IP address assigned to the instance.
- Status string
- The current status of the instance.
- Subnet
Id string - The ID of the subnet linked to the instance.
- Vpc
Id string - The ID of the VPC linked to the instances.
- Availability
Zone string - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- Charge
Type string - The charge type of the instance.
- Cpu float64
- The number of CPU cores.
- Create
Time string - The time when the instance was created.
- Db
Version string - The database version.
- Disk
Space float64 - The allocated storage size in gigabytes (GB).
- Expire
Time string - The expiration time of the instance.
- Id string
- The ID of the instance.
- Instance
Mode string - The instance mode.
- Memory float64
- The size of memory in gigabytes (GB).
- Name string
- The name of the instance.
- Port float64
- The port on which the database accepts connections.
- Private
Ip string - The private IP address assigned to the instance.
- Status string
- The current status of the instance.
- Subnet
Id string - The ID of the subnet linked to the instance.
- Vpc
Id string - The ID of the VPC linked to the instances.
- availability_
zone string - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- charge_
type string - The charge type of the instance.
- cpu number
- The number of CPU cores.
- create_
time string - The time when the instance was created.
- db_
version string - The database version.
- disk_
space number - The allocated storage size in gigabytes (GB).
- expire_
time string - The expiration time of the instance.
- id string
- The ID of the instance.
- instance_
mode string - The instance mode.
- memory number
- The size of memory in gigabytes (GB).
- name string
- The name of the instance.
- port number
- The port on which the database accepts connections.
- private_
ip string - The private IP address assigned to the instance.
- status string
- The current status of the instance.
- subnet_
id string - The ID of the subnet linked to the instance.
- vpc_
id string - The ID of the VPC linked to the instances.
- availability
Zone String - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- charge
Type String - The charge type of the instance.
- cpu Double
- The number of CPU cores.
- create
Time String - The time when the instance was created.
- db
Version String - The database version.
- disk
Space Double - The allocated storage size in gigabytes (GB).
- expire
Time String - The expiration time of the instance.
- id String
- The ID of the instance.
- instance
Mode String - The instance mode.
- memory Double
- The size of memory in gigabytes (GB).
- name String
- The name of the instance.
- port Double
- The port on which the database accepts connections.
- private
Ip String - The private IP address assigned to the instance.
- status String
- The current status of the instance.
- subnet
Id String - The ID of the subnet linked to the instance.
- vpc
Id String - The ID of the VPC linked to the instances.
- availability
Zone string - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- charge
Type string - The charge type of the instance.
- cpu number
- The number of CPU cores.
- create
Time string - The time when the instance was created.
- db
Version string - The database version.
- disk
Space number - The allocated storage size in gigabytes (GB).
- expire
Time string - The expiration time of the instance.
- id string
- The ID of the instance.
- instance
Mode string - The instance mode.
- memory number
- The size of memory in gigabytes (GB).
- name string
- The name of the instance.
- port number
- The port on which the database accepts connections.
- private
Ip string - The private IP address assigned to the instance.
- status string
- The current status of the instance.
- subnet
Id string - The ID of the subnet linked to the instance.
- vpc
Id string - The ID of the VPC linked to the instances.
- availability_
zone str - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- charge_
type str - The charge type of the instance.
- cpu float
- The number of CPU cores.
- create_
time str - The time when the instance was created.
- db_
version str - The database version.
- disk_
space float - The allocated storage size in gigabytes (GB).
- expire_
time str - The expiration time of the instance.
- id str
- The ID of the instance.
- instance_
mode str - The instance mode.
- memory float
- The size of memory in gigabytes (GB).
- name str
- The name of the instance.
- port float
- The port on which the database accepts connections.
- private_
ip str - The private IP address assigned to the instance.
- status str
- The current status of the instance.
- subnet_
id str - The ID of the subnet linked to the instance.
- vpc_
id str - The ID of the VPC linked to the instances.
- availability
Zone String - Availability zone where the MySQL instances are located. Such as: "cn-bj2-05".
- charge
Type String - The charge type of the instance.
- cpu Number
- The number of CPU cores.
- create
Time String - The time when the instance was created.
- db
Version String - The database version.
- disk
Space Number - The allocated storage size in gigabytes (GB).
- expire
Time String - The expiration time of the instance.
- id String
- The ID of the instance.
- instance
Mode String - The instance mode.
- memory Number
- The size of memory in gigabytes (GB).
- name String
- The name of the instance.
- port Number
- The port on which the database accepts connections.
- private
Ip String - The private IP address assigned to the instance.
- status String
- The current status of the instance.
- subnet
Id String - The ID of the subnet linked to the instance.
- vpc
Id String - The ID of the VPC linked to the instances.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloudTerraform Provider.
ucloud
Viewing docs for ucloud 1.49.0
published on Tuesday, Oct 27, 2026 by ucloud
published on Tuesday, Oct 27, 2026 by ucloud