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 SQL Server instance resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const example = ucloud.getSqlserverInstances({});
export const first = example.then(example => example.sqlserverInstances?.[0]?.id);
import pulumi
import pulumi_ucloud as ucloud
example = ucloud.get_sqlserver_instances()
pulumi.export("first", example.sqlserver_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.GetSqlserverInstances(ctx, &ucloud.GetSqlserverInstancesArgs{}, nil)
if err != nil {
return err
}
ctx.Export("first", example.SqlserverInstances[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var example = Ucloud.GetSqlserverInstances.Invoke();
return new Dictionary<string, object?>
{
["first"] = example.Apply(getSqlserverInstancesResult => getSqlserverInstancesResult.SqlserverInstances[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.GetSqlserverInstancesArgs;
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.getSqlserverInstances(GetSqlserverInstancesArgs.builder()
.build());
ctx.export("first", example.sqlserverInstances()[0].id());
}
}
variables:
example:
fn::invoke:
function: ucloud:getSqlserverInstances
arguments: {}
outputs:
first: ${example.sqlserverInstances[0].id}
Example coming soon!
Using getSqlserverInstances
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 getSqlserverInstances(args: GetSqlserverInstancesArgs, opts?: InvokeOptions): Promise<GetSqlserverInstancesResult>
function getSqlserverInstancesOutput(args: GetSqlserverInstancesOutputArgs, opts?: InvokeOutputOptions): Output<GetSqlserverInstancesResult>def get_sqlserver_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) -> GetSqlserverInstancesResult
def get_sqlserver_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[GetSqlserverInstancesResult]func GetSqlserverInstances(ctx *Context, args *GetSqlserverInstancesArgs, opts ...InvokeOption) (*GetSqlserverInstancesResult, error)
func GetSqlserverInstancesOutput(ctx *Context, args *GetSqlserverInstancesOutputArgs, opts ...InvokeOption) GetSqlserverInstancesResultOutput> Note: This function is named GetSqlserverInstances in the Go SDK.
public static class GetSqlserverInstances
{
public static Task<GetSqlserverInstancesResult> InvokeAsync(GetSqlserverInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetSqlserverInstancesResult> Invoke(GetSqlserverInstancesInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetSqlserverInstancesResult> Invoke(GetSqlserverInstancesInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetSqlserverInstancesResult> getSqlserverInstances(GetSqlserverInstancesArgs args, InvokeOptions options)
public static Output<GetSqlserverInstancesResult> getSqlserverInstances(GetSqlserverInstancesArgs args, InvokeOptions options)
public static Output<GetSqlserverInstancesResult> getSqlserverInstances(GetSqlserverInstancesArgs args, InvokeOutputOptions options)
fn::invoke:
function: ucloud:index/getSqlserverInstances:getSqlserverInstances
arguments:
# arguments dictionarydata "ucloud_get_sqlserver_instances" "name" {
# arguments
}The following arguments are supported:
- Availability
Zone string - Availability zone where the SQL Server instances are located. Such as: "cn-bj2-05".
- Id string
- The ID of the instance.
- Ids List<string>
- A list of SQL Server 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 SQL Server instances are located. Such as: "cn-bj2-05".
- Id string
- The ID of the instance.
- Ids []string
- A list of SQL Server 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 SQL Server instances are located. Such as: "cn-bj2-05".
- id string
- The ID of the instance.
- ids list(string)
- A list of SQL Server 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 SQL Server instances are located. Such as: "cn-bj2-05".
- id String
- The ID of the instance.
- ids List<String>
- A list of SQL Server 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 SQL Server instances are located. Such as: "cn-bj2-05".
- id string
- The ID of the instance.
- ids string[]
- A list of SQL Server 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 SQL Server instances are located. Such as: "cn-bj2-05".
- id str
- The ID of the instance.
- ids Sequence[str]
- A list of SQL Server 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 SQL Server instances are located. Such as: "cn-bj2-05".
- id String
- The ID of the instance.
- ids List<String>
- A list of SQL Server 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.
getSqlserverInstances Result
The following output properties are available:
- Id string
- The ID of the instance.
- Ids List<string>
- Sqlserver
Instances List<GetSqlserver Instances Sqlserver Instance> - It is a nested type which documented below.
- Total
Count double - Total number of instances that satisfy the condition.
- 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
- Sqlserver
Instances []GetSqlserver Instances Sqlserver Instance - It is a nested type which documented below.
- Total
Count float64 - Total number of instances that satisfy the condition.
- 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)
- sqlserver_
instances list(object) - It is a nested type which documented below.
- total_
count number - Total number of instances that satisfy the condition.
- 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>
- sqlserver
Instances List<GetSqlserver Instances Sqlserver Instance> - It is a nested type which documented below.
- total
Count Double - Total number of instances that satisfy the condition.
- 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[]
- sqlserver
Instances GetSqlserver Instances Sqlserver Instance[] - It is a nested type which documented below.
- total
Count number - Total number of instances that satisfy the condition.
- 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]
- sqlserver_
instances Sequence[GetSqlserver Instances Sqlserver Instance] - It is a nested type which documented below.
- total_
count float - Total number of instances that satisfy the condition.
- 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>
- sqlserver
Instances List<Property Map> - It is a nested type which documented below.
- total
Count Number - Total number of instances that satisfy the condition.
- 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
GetSqlserverInstancesSqlserverInstance
- Availability
Zone string - Availability zone where the SQL Server 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.
- Memory double
- The size of memory in megabytes (MB).
- 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 SQL Server 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.
- Memory float64
- The size of memory in megabytes (MB).
- 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 SQL Server 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.
- memory number
- The size of memory in megabytes (MB).
- 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 SQL Server 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.
- memory Double
- The size of memory in megabytes (MB).
- 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 SQL Server 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.
- memory number
- The size of memory in megabytes (MB).
- 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 SQL Server 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.
- memory float
- The size of memory in megabytes (MB).
- 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 SQL Server 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.
- memory Number
- The size of memory in megabytes (MB).
- 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