get Instance Types
This data source provides the ECS instance types of Alibaba Cloud.
NOTE: By default, only the upgraded instance types are returned. If you want to get outdated instance types, you must set
is_outdated
to true. NOTE: If one instance type is sold out, it will not be exported.
Example Usage
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.GetInstanceTypesArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
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 typesDs = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.cpuCoreCount(1)
.memorySize(2)
.build());
var instance = new Instance("instance", InstanceArgs.builder()
.instanceType(typesDs.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
.build());
}
}
Return
A collection of values returned by getInstanceTypes.
Parameters
A collection of arguments for invoking getInstanceTypes.
Return
A collection of values returned by getInstanceTypes.
See also
Parameters
The zone where instance types are supported.
Filter the results to a specific number of cpu cores.
Filter the result whose network interface number is no more than eni_amount
.
The GPU amount of an instance type.
The GPU spec of an instance type.
The ID of the image.
Filter the results by charge type. Valid values: PrePaid
and PostPaid
. Default to PostPaid
.
Filter the results based on their family name. For example: 'ecs.n4'.
If true, outdated instance types are included in the results. Default to false.
Filter the result which is used to create a kubernetes cluster and managed kubernetes cluster. Optional Values: Master
and Worker
.
Filter the results to a specific memory size in GB.
The minimum number of IPv6 addresses per ENI. Note: If an instance type supports fewer IPv6 addresses per ENI than the specified value, information about the instance type is not queried.
Filter the results by network type. Valid values: Classic
and Vpc
.
File name where to save data source results (after running pulumi preview
).
Filter the results by ECS spot type. Valid values: NoSpot
, SpotWithPriceLimit
and SpotAsPriceGo
. Default to NoSpot
.
Filter the results by system disk category. Valid values: cloud
, ephemeral_ssd
, cloud_essd
, cloud_efficiency
, cloud_ssd
. NOTE: Its default value cloud_efficiency
has been removed from the version v1.150.0.
Return
A collection of values returned by getInstanceTypes.
See also
Parameters
Builder for com.pulumi.alicloud.ecs.kotlin.inputs.GetInstanceTypesPlainArgs.