tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getReservedInstances
Start a Neo task
Explain and create a tencentcloud.getReservedInstances resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query reserved instances.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const instances = tencentcloud.getReservedInstances({
availabilityZone: "na-siliconvalley-1",
instanceType: "S2.MEDIUM8",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
instances = tencentcloud.get_reserved_instances(availability_zone="na-siliconvalley-1",
instance_type="S2.MEDIUM8")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.GetReservedInstances(ctx, &tencentcloud.GetReservedInstancesArgs{
AvailabilityZone: pulumi.StringRef("na-siliconvalley-1"),
InstanceType: pulumi.StringRef("S2.MEDIUM8"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var instances = Tencentcloud.GetReservedInstances.Invoke(new()
{
AvailabilityZone = "na-siliconvalley-1",
InstanceType = "S2.MEDIUM8",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetReservedInstancesArgs;
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 instances = TencentcloudFunctions.getReservedInstances(GetReservedInstancesArgs.builder()
.availabilityZone("na-siliconvalley-1")
.instanceType("S2.MEDIUM8")
.build());
}
}
variables:
instances:
fn::invoke:
function: tencentcloud:getReservedInstances
arguments:
availabilityZone: na-siliconvalley-1
instanceType: S2.MEDIUM8
Using getReservedInstances
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 getReservedInstances(args: GetReservedInstancesArgs, opts?: InvokeOptions): Promise<GetReservedInstancesResult>
function getReservedInstancesOutput(args: GetReservedInstancesOutputArgs, opts?: InvokeOptions): Output<GetReservedInstancesResult>def get_reserved_instances(availability_zone: Optional[str] = None,
id: Optional[str] = None,
instance_type: Optional[str] = None,
reserved_instance_id: Optional[str] = None,
result_output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetReservedInstancesResult
def get_reserved_instances_output(availability_zone: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
instance_type: Optional[pulumi.Input[str]] = None,
reserved_instance_id: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetReservedInstancesResult]func GetReservedInstances(ctx *Context, args *GetReservedInstancesArgs, opts ...InvokeOption) (*GetReservedInstancesResult, error)
func GetReservedInstancesOutput(ctx *Context, args *GetReservedInstancesOutputArgs, opts ...InvokeOption) GetReservedInstancesResultOutput> Note: This function is named GetReservedInstances in the Go SDK.
public static class GetReservedInstances
{
public static Task<GetReservedInstancesResult> InvokeAsync(GetReservedInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetReservedInstancesResult> Invoke(GetReservedInstancesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetReservedInstancesResult> getReservedInstances(GetReservedInstancesArgs args, InvokeOptions options)
public static Output<GetReservedInstancesResult> getReservedInstances(GetReservedInstancesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getReservedInstances:getReservedInstances
arguments:
# arguments dictionaryThe following arguments are supported:
- Availability
Zone string - The available zone that the reserved instance locates at.
- Id string
- Instance
Type string - The type of reserved instance.
- Reserved
Instance stringId - ID of the reserved instance to be query.
- Result
Output stringFile - Used to save results.
- Availability
Zone string - The available zone that the reserved instance locates at.
- Id string
- Instance
Type string - The type of reserved instance.
- Reserved
Instance stringId - ID of the reserved instance to be query.
- Result
Output stringFile - Used to save results.
- availability
Zone String - The available zone that the reserved instance locates at.
- id String
- instance
Type String - The type of reserved instance.
- reserved
Instance StringId - ID of the reserved instance to be query.
- result
Output StringFile - Used to save results.
- availability
Zone string - The available zone that the reserved instance locates at.
- id string
- instance
Type string - The type of reserved instance.
- reserved
Instance stringId - ID of the reserved instance to be query.
- result
Output stringFile - Used to save results.
- availability_
zone str - The available zone that the reserved instance locates at.
- id str
- instance_
type str - The type of reserved instance.
- reserved_
instance_ strid - ID of the reserved instance to be query.
- result_
output_ strfile - Used to save results.
- availability
Zone String - The available zone that the reserved instance locates at.
- id String
- instance
Type String - The type of reserved instance.
- reserved
Instance StringId - ID of the reserved instance to be query.
- result
Output StringFile - Used to save results.
getReservedInstances Result
The following output properties are available:
- Id string
- Reserved
Instance List<GetLists Reserved Instances Reserved Instance List> - An information list of reserved instance. Each element contains the following attributes:
- Availability
Zone string - Availability zone of the reserved instance.
- Instance
Type string - The type of reserved instance.
- Reserved
Instance stringId - ID of the reserved instance.
- Result
Output stringFile
- Id string
- Reserved
Instance []GetLists Reserved Instances Reserved Instance List - An information list of reserved instance. Each element contains the following attributes:
- Availability
Zone string - Availability zone of the reserved instance.
- Instance
Type string - The type of reserved instance.
- Reserved
Instance stringId - ID of the reserved instance.
- Result
Output stringFile
- id String
- reserved
Instance List<GetLists Reserved Instances Reserved Instance List> - An information list of reserved instance. Each element contains the following attributes:
- availability
Zone String - Availability zone of the reserved instance.
- instance
Type String - The type of reserved instance.
- reserved
Instance StringId - ID of the reserved instance.
- result
Output StringFile
- id string
- reserved
Instance GetLists Reserved Instances Reserved Instance List[] - An information list of reserved instance. Each element contains the following attributes:
- availability
Zone string - Availability zone of the reserved instance.
- instance
Type string - The type of reserved instance.
- reserved
Instance stringId - ID of the reserved instance.
- result
Output stringFile
- id str
- reserved_
instance_ Sequence[Getlists Reserved Instances Reserved Instance List] - An information list of reserved instance. Each element contains the following attributes:
- availability_
zone str - Availability zone of the reserved instance.
- instance_
type str - The type of reserved instance.
- reserved_
instance_ strid - ID of the reserved instance.
- result_
output_ strfile
- id String
- reserved
Instance List<Property Map>Lists - An information list of reserved instance. Each element contains the following attributes:
- availability
Zone String - Availability zone of the reserved instance.
- instance
Type String - The type of reserved instance.
- reserved
Instance StringId - ID of the reserved instance.
- result
Output StringFile
Supporting Types
GetReservedInstancesReservedInstanceList
- Availability
Zone string - The available zone that the reserved instance locates at.
- End
Time string - Expiry time of the reserved instance.
- Instance
Count double - Number of reserved instance.
- Instance
Type string - The type of reserved instance.
- Reserved
Instance stringId - ID of the reserved instance to be query.
- Start
Time string - Start time of the reserved instance.
- Status string
- Status of the reserved instance.
- Availability
Zone string - The available zone that the reserved instance locates at.
- End
Time string - Expiry time of the reserved instance.
- Instance
Count float64 - Number of reserved instance.
- Instance
Type string - The type of reserved instance.
- Reserved
Instance stringId - ID of the reserved instance to be query.
- Start
Time string - Start time of the reserved instance.
- Status string
- Status of the reserved instance.
- availability
Zone String - The available zone that the reserved instance locates at.
- end
Time String - Expiry time of the reserved instance.
- instance
Count Double - Number of reserved instance.
- instance
Type String - The type of reserved instance.
- reserved
Instance StringId - ID of the reserved instance to be query.
- start
Time String - Start time of the reserved instance.
- status String
- Status of the reserved instance.
- availability
Zone string - The available zone that the reserved instance locates at.
- end
Time string - Expiry time of the reserved instance.
- instance
Count number - Number of reserved instance.
- instance
Type string - The type of reserved instance.
- reserved
Instance stringId - ID of the reserved instance to be query.
- start
Time string - Start time of the reserved instance.
- status string
- Status of the reserved instance.
- availability_
zone str - The available zone that the reserved instance locates at.
- end_
time str - Expiry time of the reserved instance.
- instance_
count float - Number of reserved instance.
- instance_
type str - The type of reserved instance.
- reserved_
instance_ strid - ID of the reserved instance to be query.
- start_
time str - Start time of the reserved instance.
- status str
- Status of the reserved instance.
- availability
Zone String - The available zone that the reserved instance locates at.
- end
Time String - Expiry time of the reserved instance.
- instance
Count Number - Number of reserved instance.
- instance
Type String - The type of reserved instance.
- reserved
Instance StringId - ID of the reserved instance to be query.
- start
Time String - Start time of the reserved instance.
- status String
- Status of the reserved instance.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
