1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecp
  5. getInstanceTypes
Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi

alicloud.ecp.getInstanceTypes

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi

    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 System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Ecp.GetInstanceTypes.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["firstEcpInstanceTypesInstanceType"] = @default.Apply(@default => @default.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.InstanceType)),
        };
    });
    
    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 default = alicloud.ecp.getInstanceTypes({});
    export const firstEcpInstanceTypesInstanceType = _default.then(_default => _default.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
    File name where to save data source results (after running pulumi preview).
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    outputFile String
    File name where to save data source results (after running pulumi preview).
    outputFile string
    File name where to save data source results (after running pulumi preview).
    output_file str
    File name where to save data source results (after running pulumi preview).
    outputFile String
    File name where to save data source results (after running pulumi preview).

    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
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi