1. Packages
  2. Alicloud Provider
  3. API Docs
  4. sae
  5. getInstanceSpecifications
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.sae.getInstanceSpecifications

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

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

    NOTE: Available in v1.139.0+.

    Example Usage

    Basic Usage

    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);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.sae.get_instance_specifications()
    pulumi.export("saeInstanceSpecificationId1", ids.specifications[0].id)
    
    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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Sae.GetInstanceSpecifications.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["saeInstanceSpecificationId1"] = ids.Apply(getInstanceSpecificationsResult => getInstanceSpecificationsResult.Specifications[0]?.Id),
        };
    });
    
    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()));
        }
    }
    
    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
    File name where to save data source results (after running pulumi preview).
    Ids []string
    A list of Instance Specification IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Instance Specification IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    A list of Instance Specification IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    A list of Instance Specification IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Instance Specification IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    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
    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.62.1 published on Monday, Sep 16, 2024 by Pulumi