GetInstanceTypes
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_outdatedto true.NOTE: If one instance type is sold out, it will not be exported.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var typesDs = Output.Create(AliCloud.Ecs.GetInstanceTypes.InvokeAsync(new AliCloud.Ecs.GetInstanceTypesArgs
{
CpuCoreCount = 1,
MemorySize = 2,
}));
var instance = new AliCloud.Ecs.Instance("instance", new AliCloud.Ecs.InstanceArgs
{
InstanceType = typesDs.Apply(typesDs => typesDs.InstanceTypes[0].Id),
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
types_ds = alicloud.ecs.get_instance_types(cpu_core_count=1,
memory_size=2)
instance = alicloud.ecs.Instance("instance", instance_type=types_ds.instance_types[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const typesDs = pulumi.output(alicloud.ecs.getInstanceTypes({
cpuCoreCount: 1,
memorySize: 2,
}, { async: true }));
const instance = new alicloud.ecs.Instance("instance", {
instanceType: typesDs.instanceTypes[0].id,
});Using GetInstanceTypes
function getInstanceTypes(args: GetInstanceTypesArgs, opts?: InvokeOptions): Promise<GetInstanceTypesResult>function get_instance_types(availability_zone=None, cpu_core_count=None, eni_amount=None, gpu_amount=None, gpu_spec=None, instance_charge_type=None, instance_type_family=None, is_outdated=None, kubernetes_node_role=None, memory_size=None, network_type=None, output_file=None, sorted_by=None, spot_strategy=None, opts=None)func GetInstanceTypes(ctx *Context, args *GetInstanceTypesArgs, opts ...InvokeOption) (*GetInstanceTypesResult, error)public static class GetInstanceTypes {
public static Task<GetInstanceTypesResult> InvokeAsync(GetInstanceTypesArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Availability
Zone string The zone where instance types are supported.
- Cpu
Core intCount Filter the results to a specific number of cpu cores.
- Eni
Amount int Filter the result whose network interface number is no more than
eni_amount.- Gpu
Amount int The GPU amount of an instance type.
- Gpu
Spec string The GPU spec of an instance type.
- Instance
Charge stringType Filter the results by charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.- Instance
Type stringFamily Filter the results based on their family name. For example: ‘ecs.n4’.
- Is
Outdated bool If true, outdated instance types are included in the results. Default to false.
- Kubernetes
Node stringRole - Memory
Size double Filter the results to a specific memory size in GB.
- Network
Type string Filter the results by network type. Valid values:
ClassicandVpc.- Output
File string - Sorted
By string - Spot
Strategy string Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot.
- Availability
Zone string The zone where instance types are supported.
- Cpu
Core intCount Filter the results to a specific number of cpu cores.
- Eni
Amount int Filter the result whose network interface number is no more than
eni_amount.- Gpu
Amount int The GPU amount of an instance type.
- Gpu
Spec string The GPU spec of an instance type.
- Instance
Charge stringType Filter the results by charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.- Instance
Type stringFamily Filter the results based on their family name. For example: ‘ecs.n4’.
- Is
Outdated bool If true, outdated instance types are included in the results. Default to false.
- Kubernetes
Node stringRole - Memory
Size float64 Filter the results to a specific memory size in GB.
- Network
Type string Filter the results by network type. Valid values:
ClassicandVpc.- Output
File string - Sorted
By string - Spot
Strategy string Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot.
- availability
Zone string The zone where instance types are supported.
- cpu
Core numberCount Filter the results to a specific number of cpu cores.
- eni
Amount number Filter the result whose network interface number is no more than
eni_amount.- gpu
Amount number The GPU amount of an instance type.
- gpu
Spec string The GPU spec of an instance type.
- instance
Charge stringType Filter the results by charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.- instance
Type stringFamily Filter the results based on their family name. For example: ‘ecs.n4’.
- is
Outdated boolean If true, outdated instance types are included in the results. Default to false.
- kubernetes
Node stringRole - memory
Size number Filter the results to a specific memory size in GB.
- network
Type string Filter the results by network type. Valid values:
ClassicandVpc.- output
File string - sorted
By string - spot
Strategy string Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot.
- availability_
zone str The zone where instance types are supported.
- cpu_
core_ floatcount Filter the results to a specific number of cpu cores.
- eni_
amount float Filter the result whose network interface number is no more than
eni_amount.- gpu_
amount float The GPU amount of an instance type.
- gpu_
spec str The GPU spec of an instance type.
- instance_
charge_ strtype Filter the results by charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.- instance_
type_ strfamily Filter the results based on their family name. For example: ‘ecs.n4’.
- is_
outdated bool If true, outdated instance types are included in the results. Default to false.
- kubernetes_
node_ strrole - memory_
size float Filter the results to a specific memory size in GB.
- network_
type str Filter the results by network type. Valid values:
ClassicandVpc.- output_
file str - sorted_
by str - spot_
strategy str Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot.
GetInstanceTypes Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of instance type IDs.
- Instance
Types List<Pulumi.Ali Cloud. Ecs. Outputs. Get Instance Types Instance Type> A list of image types. Each element contains the following attributes:
- Availability
Zone string - Cpu
Core intCount Number of CPU cores.
- Eni
Amount int The maximum number of network interfaces that an instance type can be attached to.
- Gpu
Amount int - Gpu
Spec string - Instance
Charge stringType - Instance
Type stringFamily - Is
Outdated bool - Kubernetes
Node stringRole - Memory
Size double Size of memory, measured in GB.
- Network
Type string - Output
File string - Sorted
By string - Spot
Strategy string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of instance type IDs.
- Instance
Types []GetInstance Types Instance Type A list of image types. Each element contains the following attributes:
- Availability
Zone string - Cpu
Core intCount Number of CPU cores.
- Eni
Amount int The maximum number of network interfaces that an instance type can be attached to.
- Gpu
Amount int - Gpu
Spec string - Instance
Charge stringType - Instance
Type stringFamily - Is
Outdated bool - Kubernetes
Node stringRole - Memory
Size float64 Size of memory, measured in GB.
- Network
Type string - Output
File string - Sorted
By string - Spot
Strategy string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of instance type IDs.
- instance
Types GetInstance Types Instance Type[] A list of image types. Each element contains the following attributes:
- availability
Zone string - cpu
Core numberCount Number of CPU cores.
- eni
Amount number The maximum number of network interfaces that an instance type can be attached to.
- gpu
Amount number - gpu
Spec string - instance
Charge stringType - instance
Type stringFamily - is
Outdated boolean - kubernetes
Node stringRole - memory
Size number Size of memory, measured in GB.
- network
Type string - output
File string - sorted
By string - spot
Strategy string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of instance type IDs.
- instance_
types List[GetInstance Types Instance Type] A list of image types. Each element contains the following attributes:
- availability_
zone str - cpu_
core_ floatcount Number of CPU cores.
- eni_
amount float The maximum number of network interfaces that an instance type can be attached to.
- gpu_
amount float - gpu_
spec str - instance_
charge_ strtype - instance_
type_ strfamily - is_
outdated bool - kubernetes_
node_ strrole - memory_
size float Size of memory, measured in GB.
- network_
type str - output_
file str - sorted_
by str - spot_
strategy str
Supporting Types
GetInstanceTypesInstanceType
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Availability
Zones List<string> List of availability zones that support the instance type.
- Burstable
Instance Pulumi.Ali Cloud. Ecs. Inputs. Get Instance Types Instance Type Burstable Instance Args The burstable instance attribution:
- Cpu
Core intCount Filter the results to a specific number of cpu cores.
- Eni
Amount int Filter the result whose network interface number is no more than
eni_amount.- Family string
The instance type family.
- Gpu
Pulumi.
Ali Cloud. Ecs. Inputs. Get Instance Types Instance Type Gpu Args The GPU attribution of an instance type:
- Id string
ID of the instance type.
- Local
Storage Pulumi.Ali Cloud. Ecs. Inputs. Get Instance Types Instance Type Local Storage Args Local storage of an instance type:
- Memory
Size double Filter the results to a specific memory size in GB.
- Price string
- Availability
Zones []string List of availability zones that support the instance type.
- Burstable
Instance GetInstance Types Instance Type Burstable Instance The burstable instance attribution:
- Cpu
Core intCount Filter the results to a specific number of cpu cores.
- Eni
Amount int Filter the result whose network interface number is no more than
eni_amount.- Family string
The instance type family.
- Gpu
Get
Instance Types Instance Type Gpu The GPU attribution of an instance type:
- Id string
ID of the instance type.
- Local
Storage GetInstance Types Instance Type Local Storage Local storage of an instance type:
- Memory
Size float64 Filter the results to a specific memory size in GB.
- Price string
- availability
Zones string[] List of availability zones that support the instance type.
- burstable
Instance GetInstance Types Instance Type Burstable Instance The burstable instance attribution:
- cpu
Core numberCount Filter the results to a specific number of cpu cores.
- eni
Amount number Filter the result whose network interface number is no more than
eni_amount.- family string
The instance type family.
- gpu
Get
Instance Types Instance Type Gpu The GPU attribution of an instance type:
- id string
ID of the instance type.
- local
Storage GetInstance Types Instance Type Local Storage Local storage of an instance type:
- memory
Size number Filter the results to a specific memory size in GB.
- price string
- availability
Zones List[str] List of availability zones that support the instance type.
- burstable
Instance Dict[GetInstance Types Instance Type Burstable Instance] The burstable instance attribution:
- cpu
Core floatCount Filter the results to a specific number of cpu cores.
- eni
Amount float Filter the result whose network interface number is no more than
eni_amount.- family str
The instance type family.
- gpu
Dict[Get
Instance Types Instance Type Gpu] The GPU attribution of an instance type:
- id str
ID of the instance type.
- local
Storage Dict[GetInstance Types Instance Type Local Storage] Local storage of an instance type:
- memory_
size float Filter the results to a specific memory size in GB.
- price str
GetInstanceTypesInstanceTypeBurstableInstance
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Baseline
Credit string The compute performance benchmark CPU credit of a burstable instance.
- Initial
Credit string The initial CPU credit of a burstable instance.
- Baseline
Credit string The compute performance benchmark CPU credit of a burstable instance.
- Initial
Credit string The initial CPU credit of a burstable instance.
- baseline
Credit string The compute performance benchmark CPU credit of a burstable instance.
- initial
Credit string The initial CPU credit of a burstable instance.
- baseline
Credit str The compute performance benchmark CPU credit of a burstable instance.
- initial
Credit str The initial CPU credit of a burstable instance.
GetInstanceTypesInstanceTypeGpu
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetInstanceTypesInstanceTypeLocalStorage
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.