Linode
getInstanceTypes
Provides information about Linode Instance types that match a set of filters.
Attributes
Each Linode Instance type will be stored in the types
attribute and will export the following attributes:
id
- The ID representing the Linode Type.label
- The Linode Type’s label is for display purposes only.class
- The class of the Linode Type. See all classes here.disk
- The Disk size, in MB, of the Linode Type.price.0.hourly
- Cost (in US dollars) per hour.price.0.monthly
- Cost (in US dollars) per month.addons.0.backups.0.price.0.hourly
- The cost (in US dollars) per hour to add Backups service.addons.0.backups.0.price.0.monthly
- The cost (in US dollars) per month to add Backups service.network_out
- The Mbits outbound bandwidth allocation.memory
- The amount of RAM included in this Linode Type.transfer
- The monthly outbound transfer amount, in MB.vcpus
- The number of VCPU cores this Linode Type offers.
Filterable Fields
class
disk
gpus
label
memory
network_out
transfer
vcpus
Example Usage
using Pulumi;
using Linode = Pulumi.Linode;
class MyStack : Stack
{
public MyStack()
{
var specific_types = Output.Create(Linode.GetInstanceTypes.InvokeAsync(new Linode.GetInstanceTypesArgs
{
Filters =
{
new Linode.Inputs.GetInstanceTypesFilterArgs
{
Name = "vcpus",
Values =
{
"2",
},
},
},
}));
}
}
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := linode.GetInstanceTypes(ctx, &GetInstanceTypesArgs{
Filters: []GetInstanceTypesFilter{
GetInstanceTypesFilter{
Name: "vcpus",
Values: []string{
"2",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_linode as linode
specific_types = linode.get_instance_types(filters=[linode.GetInstanceTypesFilterArgs(
name="vcpus",
values=["2"],
)])
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const specific_types = pulumi.output(linode.getInstanceTypes({
filters: [{
name: "vcpus",
values: ["2"],
}],
}));
Coming soon!
Using getInstanceTypes
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 getInstanceTypes(args: GetInstanceTypesArgs, opts?: InvokeOptions): Promise<GetInstanceTypesResult>
function getInstanceTypesOutput(args: GetInstanceTypesOutputArgs, opts?: InvokeOptions): Output<GetInstanceTypesResult>
def get_instance_types(filters: Optional[Sequence[GetInstanceTypesFilter]] = None,
order: Optional[str] = None,
order_by: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceTypesResult
def get_instance_types_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetInstanceTypesFilterArgs]]]] = None,
order: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceTypesResult]
func GetInstanceTypes(ctx *Context, args *GetInstanceTypesArgs, opts ...InvokeOption) (*GetInstanceTypesResult, error)
func GetInstanceTypesOutput(ctx *Context, args *GetInstanceTypesOutputArgs, opts ...InvokeOption) GetInstanceTypesResultOutput
> Note: This function is named GetInstanceTypes
in the Go SDK.
public static class GetInstanceTypes
{
public static Task<GetInstanceTypesResult> InvokeAsync(GetInstanceTypesArgs args, InvokeOptions? opts = null)
public static Output<GetInstanceTypesResult> Invoke(GetInstanceTypesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceTypesResult> getInstanceTypes(GetInstanceTypesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: linode:index/getInstanceTypes:getInstanceTypes
Arguments:
# Arguments dictionary
The following arguments are supported:
- Filters
List<Get
Instance Types Filter> - Order string
The order in which results should be returned. (
asc
,desc
; defaultasc
)- Order
By string The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- Filters
[]Get
Instance Types Filter - Order string
The order in which results should be returned. (
asc
,desc
; defaultasc
)- Order
By string The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
List
Instance Types Filter> - order String
The order in which results should be returned. (
asc
,desc
; defaultasc
)- order
By String The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Get
Instance Types Filter[] - order string
The order in which results should be returned. (
asc
,desc
; defaultasc
)- order
By string The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
- filters
Sequence[Get
Instance Types Filter] - order str
The order in which results should be returned. (
asc
,desc
; defaultasc
)- order_
by str The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
getInstanceTypes Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Types
List<Get
Instance Types Type> - Filters
List<Get
Instance Types Filter> - Order string
- Order
By string
- Id string
The provider-assigned unique ID for this managed resource.
- Types
[]Get
Instance Types Type - Filters
[]Get
Instance Types Filter - Order string
- Order
By string
- id String
The provider-assigned unique ID for this managed resource.
- types
List
Instance Types Type> - filters
List
Instance Types Filter> - order String
- order
By String
- id string
The provider-assigned unique ID for this managed resource.
- types
Get
Instance Types Type[] - filters
Get
Instance Types Filter[] - order string
- order
By string
- id str
The provider-assigned unique ID for this managed resource.
- types
Sequence[Get
Instance Types Type] - filters
Sequence[Get
Instance Types Filter] - order str
- order_
by str
Supporting Types
GetInstanceTypesFilter
- Name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values List<string>
A list of values for the filter to allow. These values should all be in string form.
- Match
By string The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- Name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values []string
A list of values for the filter to allow. These values should all be in string form.
- Match
By string The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name String
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values
List
A list of values for the filter to allow. These values should all be in string form.
- match
By String The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values string[]
A list of values for the filter to allow. These values should all be in string form.
- match
By string The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name str
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values Sequence[str]
A list of values for the filter to allow. These values should all be in string form.
- match_
by str The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name String
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values
List
A list of values for the filter to allow. These values should all be in string form.
- match
By String The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
GetInstanceTypesType
- Addons
List<Get
Instance Types Type Addon> - Class string
- Disk int
- Id string
- Label string
- Memory int
- Network
Out int - Prices
List<Get
Instance Types Type Price> - Transfer int
- Vcpus int
- Addons
[]Get
Instance Types Type Addon - Class string
- Disk int
- Id string
- Label string
- Memory int
- Network
Out int - Prices
[]Get
Instance Types Type Price - Transfer int
- Vcpus int
- addons
List
Instance Types Type Addon> - class_ String
- disk Integer
- id String
- label String
- memory Integer
- network
Out Integer - prices
List
Instance Types Type Price> - transfer Integer
- vcpus Integer
- addons
Get
Instance Types Type Addon[] - class string
- disk number
- id string
- label string
- memory number
- network
Out number - prices
Get
Instance Types Type Price[] - transfer number
- vcpus number
- addons
Sequence[Get
Instance Types Type Addon] - class_ str
- disk int
- id str
- label str
- memory int
- network_
out int - prices
Sequence[Get
Instance Types Type Price] - transfer int
- vcpus int
GetInstanceTypesTypeAddon
GetInstanceTypesTypeAddonBackup
GetInstanceTypesTypeAddonBackupPrice
GetInstanceTypesTypePrice
Package Details
- Repository
- https://github.com/pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
linode
Terraform Provider.