Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.ecp.getInstanceTypes
Explore with Pulumi AI
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
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);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ecp.get_instance_types()
pulumi.export("firstEcpInstanceTypesInstanceType", default.instance_types[0].instance_type)
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, &ecp.GetInstanceTypesArgs{}, nil)
if err != nil {
return err
}
ctx.Export("firstEcpInstanceTypesInstanceType", _default.InstanceTypes[0].InstanceType)
return nil
})
}
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 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());
}
}
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:
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- output
File String - File name where to save data source results (after running
pulumi preview
).
- output
File 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
).
- output
File 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.
- Instance
Types List<Pulumi.Ali Cloud. Ecp. Outputs. Get Instance Types Instance Type> - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Types []GetInstance Types Instance Type - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Types List<GetInstance Types Instance Type> - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Types GetInstance Types Instance Type[] - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
types Sequence[GetInstance Types Instance Type] - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Types List<Property Map> - output
File String
Supporting Types
GetInstanceTypesInstanceType
- Cpu
Core intCount - The cpu core count of the current instance type.
- Default
Resolution string - The default resolution of the current instance type.
- Instance
Type string - The list of available instance type.
- Instance
Type stringFamily - Name string
- The name of the current instance type.
- Name
En string - The English name of the current instance type.
- Cpu
Core intCount - The cpu core count of the current instance type.
- Default
Resolution string - The default resolution of the current instance type.
- Instance
Type string - The list of available instance type.
- Instance
Type stringFamily - Name string
- The name of the current instance type.
- Name
En string - The English name of the current instance type.
- cpu
Core IntegerCount - The cpu core count of the current instance type.
- default
Resolution String - The default resolution of the current instance type.
- instance
Type String - The list of available instance type.
- instance
Type StringFamily - name String
- The name of the current instance type.
- name
En String - The English name of the current instance type.
- cpu
Core numberCount - The cpu core count of the current instance type.
- default
Resolution string - The default resolution of the current instance type.
- instance
Type string - The list of available instance type.
- instance
Type stringFamily - name string
- The name of the current instance type.
- name
En string - The English name of the current instance type.
- cpu_
core_ intcount - 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_ strfamily - name str
- The name of the current instance type.
- name_
en str - The English name of the current instance type.
- cpu
Core NumberCount - The cpu core count of the current instance type.
- default
Resolution String - The default resolution of the current instance type.
- instance
Type String - The list of available instance type.
- instance
Type StringFamily - name String
- The name of the current instance type.
- name
En 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.