Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getInstanceTypes

This data source provides the available instance types with the Cloud Phone (ECP) Instance of the current Alibaba Cloud user.

NOTE: Available in v1.158.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.Ecp.GetInstanceTypes.InvokeAsync());
        this.FirstEcpInstanceTypesInstanceType = @default.Apply(@default => @default.InstanceTypes?[0]?.InstanceType);
    }

    [Output("firstEcpInstanceTypesInstanceType")]
    public Output<string> FirstEcpInstanceTypesInstanceType { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := ecp.GetInstanceTypes(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstEcpInstanceTypesInstanceType", _default.InstanceTypes[0].InstanceType)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecp.EcpFunctions;
import com.pulumi.alicloud.ecp.inputs.GetInstanceTypesArgs;
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 = EcpFunctions.getInstanceTypes();

        ctx.export("firstEcpInstanceTypesInstanceType", default_.instanceTypes()[0].instanceType());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.ecp.get_instance_types()
pulumi.export("firstEcpInstanceTypesInstanceType", default.instance_types[0].instance_type)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultInstanceTypes = pulumi.output(alicloud.ecp.getInstanceTypes());

export const firstEcpInstanceTypesInstanceType = defaultInstanceTypes.instanceTypes[0].instanceType;
variables:
  default:
    Fn::Invoke:
      Function: alicloud:ecp:getInstanceTypes
      Arguments: {}
outputs:
  firstEcpInstanceTypesInstanceType: ${default.instanceTypes[0].instanceType}

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(output_file: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetInstanceTypesResult
def get_instance_types_output(output_file: 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: alicloud:ecp/getInstanceTypes:getInstanceTypes
  arguments:
    # arguments dictionary

The following arguments are supported:

OutputFile string
OutputFile string
outputFile String
outputFile string
outputFile String

getInstanceTypes Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceTypes List<Pulumi.AliCloud.Ecp.Outputs.GetInstanceTypesInstanceType>
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

InstanceTypes []GetInstanceTypesInstanceType
OutputFile string
id String

The provider-assigned unique ID for this managed resource.

instanceTypes List<GetInstanceTypesInstanceType>
outputFile String
id string

The provider-assigned unique ID for this managed resource.

instanceTypes GetInstanceTypesInstanceType[]
outputFile string
id str

The provider-assigned unique ID for this managed resource.

instance_types Sequence[GetInstanceTypesInstanceType]
output_file str
id String

The provider-assigned unique ID for this managed resource.

instanceTypes List<Property Map>
outputFile String

Supporting Types

GetInstanceTypesInstanceType

CpuCoreCount int

The cpu core count of the current instance type.

DefaultResolution string

The default resolution of the current instance type.

InstanceType string

The list of available instance type.

InstanceTypeFamily string
Name string

The name of the current instance type.

NameEn string

The English name of the current instance type.

CpuCoreCount int

The cpu core count of the current instance type.

DefaultResolution string

The default resolution of the current instance type.

InstanceType string

The list of available instance type.

InstanceTypeFamily string
Name string

The name of the current instance type.

NameEn string

The English name of the current instance type.

cpuCoreCount Integer

The cpu core count of the current instance type.

defaultResolution String

The default resolution of the current instance type.

instanceType String

The list of available instance type.

instanceTypeFamily String
name String

The name of the current instance type.

nameEn String

The English name of the current instance type.

cpuCoreCount number

The cpu core count of the current instance type.

defaultResolution string

The default resolution of the current instance type.

instanceType string

The list of available instance type.

instanceTypeFamily string
name string

The name of the current instance type.

nameEn string

The English name of the current instance type.

cpu_core_count int

The cpu core count of the current instance type.

default_resolution str

The default resolution of the current instance type.

instance_type str

The list of available instance type.

instance_type_family str
name str

The name of the current instance type.

name_en str

The English name of the current instance type.

cpuCoreCount Number

The cpu core count of the current instance type.

defaultResolution String

The default resolution of the current instance type.

instanceType String

The list of available instance type.

instanceTypeFamily String
name String

The name of the current instance type.

nameEn String

The English name of the current instance type.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.