Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.27.0 published on Monday, Aug 8, 2022 by Pulumi

getInstanceSpecifications

This data source provides the Sae Instance Specifications of the current Alibaba Cloud user.

NOTE: Available in v1.139.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Sae.GetInstanceSpecifications.InvokeAsync());
        this.SaeInstanceSpecificationId1 = ids.Apply(ids => ids.Specifications?[0]?.Id);
    }

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

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := sae.GetInstanceSpecifications(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("saeInstanceSpecificationId1", ids.Specifications[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.sae.SaeFunctions;
import com.pulumi.alicloud.sae.inputs.GetInstanceSpecificationsArgs;
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 ids = SaeFunctions.getInstanceSpecifications();

        ctx.export("saeInstanceSpecificationId1", ids.applyValue(getInstanceSpecificationsResult -> getInstanceSpecificationsResult.specifications()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.sae.get_instance_specifications()
pulumi.export("saeInstanceSpecificationId1", ids.specifications[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.sae.getInstanceSpecifications({});
export const saeInstanceSpecificationId1 = ids.then(ids => ids.specifications?[0]?.id);
variables:
  ids:
    Fn::Invoke:
      Function: alicloud:sae:getInstanceSpecifications
      Arguments: {}
outputs:
  saeInstanceSpecificationId1: ${ids.specifications[0].id}

Using getInstanceSpecifications

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 getInstanceSpecifications(args: GetInstanceSpecificationsArgs, opts?: InvokeOptions): Promise<GetInstanceSpecificationsResult>
function getInstanceSpecificationsOutput(args: GetInstanceSpecificationsOutputArgs, opts?: InvokeOptions): Output<GetInstanceSpecificationsResult>
def get_instance_specifications(ids: Optional[Sequence[str]] = None,
                                output_file: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetInstanceSpecificationsResult
def get_instance_specifications_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                output_file: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetInstanceSpecificationsResult]
func GetInstanceSpecifications(ctx *Context, args *GetInstanceSpecificationsArgs, opts ...InvokeOption) (*GetInstanceSpecificationsResult, error)
func GetInstanceSpecificationsOutput(ctx *Context, args *GetInstanceSpecificationsOutputArgs, opts ...InvokeOption) GetInstanceSpecificationsResultOutput

> Note: This function is named GetInstanceSpecifications in the Go SDK.

public static class GetInstanceSpecifications 
{
    public static Task<GetInstanceSpecificationsResult> InvokeAsync(GetInstanceSpecificationsArgs args, InvokeOptions? opts = null)
    public static Output<GetInstanceSpecificationsResult> Invoke(GetInstanceSpecificationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceSpecificationsResult> getInstanceSpecifications(GetInstanceSpecificationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:sae/getInstanceSpecifications:getInstanceSpecifications
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Ids List<string>

A list of Instance Specification IDs.

OutputFile string
Ids []string

A list of Instance Specification IDs.

OutputFile string
ids List<String>

A list of Instance Specification IDs.

outputFile String
ids string[]

A list of Instance Specification IDs.

outputFile string
ids Sequence[str]

A list of Instance Specification IDs.

output_file str
ids List<String>

A list of Instance Specification IDs.

outputFile String

getInstanceSpecifications Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Specifications List<Pulumi.AliCloud.Sae.Outputs.GetInstanceSpecificationsSpecification>
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Specifications []GetInstanceSpecificationsSpecification
OutputFile string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
specifications List<GetInstanceSpecificationsSpecification>
outputFile String
id string

The provider-assigned unique ID for this managed resource.

ids string[]
specifications GetInstanceSpecificationsSpecification[]
outputFile string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
specifications Sequence[GetInstanceSpecificationsSpecification]
output_file str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
specifications List<Property Map>
outputFile String

Supporting Types

GetInstanceSpecificationsSpecification

Cpu int

CPU Size, Specifications for Micronucleus.

Enable bool

Whether the instance is available. The value description is as follows:

Id string

The ID of the Instance Specification.

InstanceSpecificationId string

The first ID of the resource.

Memory int

The Memory specifications for the MB.

SpecInfo string

The specification configuration name.

Version int

The specification configuration version.

Cpu int

CPU Size, Specifications for Micronucleus.

Enable bool

Whether the instance is available. The value description is as follows:

Id string

The ID of the Instance Specification.

InstanceSpecificationId string

The first ID of the resource.

Memory int

The Memory specifications for the MB.

SpecInfo string

The specification configuration name.

Version int

The specification configuration version.

cpu Integer

CPU Size, Specifications for Micronucleus.

enable Boolean

Whether the instance is available. The value description is as follows:

id String

The ID of the Instance Specification.

instanceSpecificationId String

The first ID of the resource.

memory Integer

The Memory specifications for the MB.

specInfo String

The specification configuration name.

version Integer

The specification configuration version.

cpu number

CPU Size, Specifications for Micronucleus.

enable boolean

Whether the instance is available. The value description is as follows:

id string

The ID of the Instance Specification.

instanceSpecificationId string

The first ID of the resource.

memory number

The Memory specifications for the MB.

specInfo string

The specification configuration name.

version number

The specification configuration version.

cpu int

CPU Size, Specifications for Micronucleus.

enable bool

Whether the instance is available. The value description is as follows:

id str

The ID of the Instance Specification.

instance_specification_id str

The first ID of the resource.

memory int

The Memory specifications for the MB.

spec_info str

The specification configuration name.

version int

The specification configuration version.

cpu Number

CPU Size, Specifications for Micronucleus.

enable Boolean

Whether the instance is available. The value description is as follows:

id String

The ID of the Instance Specification.

instanceSpecificationId String

The first ID of the resource.

memory Number

The Memory specifications for the MB.

specInfo String

The specification configuration name.

version Number

The specification configuration version.

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.