Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the ECS instance type families of Alibaba Cloud.
NOTE: Available in 1.54.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.ecs.getInstanceTypeFamilies({
instanceChargeType: "PrePaid",
});
export const firstInstanceTypeFamilyId = _default.then(_default => _default.families?.[0]?.id);
export const instanceIds = _default.then(_default => _default.ids);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ecs.get_instance_type_families(instance_charge_type="PrePaid")
pulumi.export("firstInstanceTypeFamilyId", default.families[0].id)
pulumi.export("instanceIds", default.ids)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := ecs.GetInstanceTypeFamilies(ctx, &ecs.GetInstanceTypeFamiliesArgs{
InstanceChargeType: pulumi.StringRef("PrePaid"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstInstanceTypeFamilyId", _default.Families[0].Id)
ctx.Export("instanceIds", _default.Ids)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Ecs.GetInstanceTypeFamilies.Invoke(new()
{
InstanceChargeType = "PrePaid",
});
return new Dictionary<string, object?>
{
["firstInstanceTypeFamilyId"] = @default.Apply(@default => @default.Apply(getInstanceTypeFamiliesResult => getInstanceTypeFamiliesResult.Families[0]?.Id)),
["instanceIds"] = @default.Apply(@default => @default.Apply(getInstanceTypeFamiliesResult => getInstanceTypeFamiliesResult.Ids)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypeFamiliesArgs;
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 default = EcsFunctions.getInstanceTypeFamilies(GetInstanceTypeFamiliesArgs.builder()
.instanceChargeType("PrePaid")
.build());
ctx.export("firstInstanceTypeFamilyId", default_.families()[0].id());
ctx.export("instanceIds", default_.ids());
}
}
variables:
default:
fn::invoke:
function: alicloud:ecs:getInstanceTypeFamilies
arguments:
instanceChargeType: PrePaid
outputs:
firstInstanceTypeFamilyId: ${default.families[0].id}
instanceIds: ${default.ids}
Using getInstanceTypeFamilies
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 getInstanceTypeFamilies(args: GetInstanceTypeFamiliesArgs, opts?: InvokeOptions): Promise<GetInstanceTypeFamiliesResult>
function getInstanceTypeFamiliesOutput(args: GetInstanceTypeFamiliesOutputArgs, opts?: InvokeOptions): Output<GetInstanceTypeFamiliesResult>def get_instance_type_families(generation: Optional[str] = None,
instance_charge_type: Optional[str] = None,
output_file: Optional[str] = None,
spot_strategy: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceTypeFamiliesResult
def get_instance_type_families_output(generation: Optional[pulumi.Input[str]] = None,
instance_charge_type: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
spot_strategy: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceTypeFamiliesResult]func GetInstanceTypeFamilies(ctx *Context, args *GetInstanceTypeFamiliesArgs, opts ...InvokeOption) (*GetInstanceTypeFamiliesResult, error)
func GetInstanceTypeFamiliesOutput(ctx *Context, args *GetInstanceTypeFamiliesOutputArgs, opts ...InvokeOption) GetInstanceTypeFamiliesResultOutput> Note: This function is named GetInstanceTypeFamilies in the Go SDK.
public static class GetInstanceTypeFamilies
{
public static Task<GetInstanceTypeFamiliesResult> InvokeAsync(GetInstanceTypeFamiliesArgs args, InvokeOptions? opts = null)
public static Output<GetInstanceTypeFamiliesResult> Invoke(GetInstanceTypeFamiliesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstanceTypeFamiliesResult> getInstanceTypeFamilies(GetInstanceTypeFamiliesArgs args, InvokeOptions options)
public static Output<GetInstanceTypeFamiliesResult> getInstanceTypeFamilies(GetInstanceTypeFamiliesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:ecs/getInstanceTypeFamilies:getInstanceTypeFamilies
arguments:
# arguments dictionaryThe following arguments are supported:
- Generation string
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - Instance
Charge stringType - Valid values are
PrePaid,PostPaid, Default toPostPaid. - Output
File string - File name where to save data source results (after running
pulumi preview). - Spot
Strategy string - Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot. - Zone
Id string - The Zone to launch the instance.
- Generation string
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - Instance
Charge stringType - Valid values are
PrePaid,PostPaid, Default toPostPaid. - Output
File string - File name where to save data source results (after running
pulumi preview). - Spot
Strategy string - Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot. - Zone
Id string - The Zone to launch the instance.
- generation String
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - instance
Charge StringType - Valid values are
PrePaid,PostPaid, Default toPostPaid. - output
File String - File name where to save data source results (after running
pulumi preview). - spot
Strategy String - Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot. - zone
Id String - The Zone to launch the instance.
- generation string
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - instance
Charge stringType - Valid values are
PrePaid,PostPaid, Default toPostPaid. - output
File string - File name where to save data source results (after running
pulumi preview). - spot
Strategy string - Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot. - zone
Id string - The Zone to launch the instance.
- generation str
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - instance_
charge_ strtype - Valid values are
PrePaid,PostPaid, Default toPostPaid. - output_
file str - File name where to save data source results (after running
pulumi preview). - spot_
strategy str - Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot. - zone_
id str - The Zone to launch the instance.
- generation String
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - instance
Charge StringType - Valid values are
PrePaid,PostPaid, Default toPostPaid. - output
File String - File name where to save data source results (after running
pulumi preview). - spot
Strategy String - Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot. - zone
Id String - The Zone to launch the instance.
getInstanceTypeFamilies Result
The following output properties are available:
- Families
List<Pulumi.
Ali Cloud. Ecs. Outputs. Get Instance Type Families Family> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of instance type family IDs.
- Generation string
- The generation of the instance type family.
- Instance
Charge stringType - Output
File string - Spot
Strategy string - Zone
Id string
- Families
[]Get
Instance Type Families Family - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of instance type family IDs.
- Generation string
- The generation of the instance type family.
- Instance
Charge stringType - Output
File string - Spot
Strategy string - Zone
Id string
- families
List<Get
Instance Type Families Family> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of instance type family IDs.
- generation String
- The generation of the instance type family.
- instance
Charge StringType - output
File String - spot
Strategy String - zone
Id String
- families
Get
Instance Type Families Family[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of instance type family IDs.
- generation string
- The generation of the instance type family.
- instance
Charge stringType - output
File string - spot
Strategy string - zone
Id string
- families
Sequence[Get
Instance Type Families Family] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of instance type family IDs.
- generation str
- The generation of the instance type family.
- instance_
charge_ strtype - output_
file str - spot_
strategy str - zone_
id str
- families List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of instance type family IDs.
- generation String
- The generation of the instance type family.
- instance
Charge StringType - output
File String - spot
Strategy String - zone
Id String
Supporting Types
GetInstanceTypeFamiliesFamily
- Generation string
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - Id string
- ID of the instance type family.
- Zone
Ids List<string> - A list of Zone to launch the instance.
- Generation string
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - Id string
- ID of the instance type family.
- Zone
Ids []string - A list of Zone to launch the instance.
- generation String
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - id String
- ID of the instance type family.
- zone
Ids List<String> - A list of Zone to launch the instance.
- generation string
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - id string
- ID of the instance type family.
- zone
Ids string[] - A list of Zone to launch the instance.
- generation str
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - id str
- ID of the instance type family.
- zone_
ids Sequence[str] - A list of Zone to launch the instance.
- generation String
- The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3,ecs-4,ecs-5,ecs-6. For more information, see Instance type families. - id String
- ID of the instance type family.
- zone
Ids List<String> - A list of Zone to launch the instance.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
