1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eais
  5. getInstances
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.eais.getInstances

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the Eais Instances of the current Alibaba Cloud user.

    NOTE: Available in v1.137.0+.

    Example Usage

    Basic Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.eais.EaisFunctions;
    import com.pulumi.alicloud.eais.inputs.GetInstancesArgs;
    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 = EaisFunctions.getInstances(GetInstancesArgs.builder()
                .id("example_id")
                .build());
    
            ctx.export("eaisInstanceId1", ids.applyValue(getInstancesResult -> getInstancesResult.instances()[0].id()));
            final var nameRegex = EaisFunctions.getInstances(GetInstancesArgs.builder()
                .nameRegex("^my-Instance")
                .build());
    
            ctx.export("eaisInstanceId2", nameRegex.applyValue(getInstancesResult -> getInstancesResult.instances()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:eais:getInstances
          Arguments:
            id:
              - example_id
      nameRegex:
        fn::invoke:
          Function: alicloud:eais:getInstances
          Arguments:
            nameRegex: ^my-Instance
    outputs:
      eaisInstanceId1: ${ids.instances[0].id}
      eaisInstanceId2: ${nameRegex.instances[0].id}
    

    Using getInstances

    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 getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
    function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>
    def get_instances(ids: Optional[Sequence[str]] = None,
                      instance_type: Optional[str] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      status: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInstancesResult
    def get_instances_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      instance_type: Optional[pulumi.Input[str]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]
    func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
    func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput

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

    public static class GetInstances 
    {
        public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:eais/getInstances:getInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Instance IDs.
    InstanceType string
    EAIS instance type. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    NameRegex string
    A regex string to filter results by Instance name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    Ids []string
    A list of Instance IDs.
    InstanceType string
    EAIS instance type. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    NameRegex string
    A regex string to filter results by Instance name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    ids List<String>
    A list of Instance IDs.
    instanceType String
    EAIS instance type. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    nameRegex String
    A regex string to filter results by Instance name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    ids string[]
    A list of Instance IDs.
    instanceType string
    EAIS instance type. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    nameRegex string
    A regex string to filter results by Instance name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    ids Sequence[str]
    A list of Instance IDs.
    instance_type str
    EAIS instance type. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    name_regex str
    A regex string to filter results by Instance name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    ids List<String>
    A list of Instance IDs.
    instanceType String
    EAIS instance type. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    nameRegex String
    A regex string to filter results by Instance name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.

    getInstances Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Instances List<Pulumi.AliCloud.Eais.Outputs.GetInstancesInstance>
    Names List<string>
    InstanceType string
    NameRegex string
    OutputFile string
    Status string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Instances []GetInstancesInstance
    Names []string
    InstanceType string
    NameRegex string
    OutputFile string
    Status string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<GetInstancesInstance>
    names List<String>
    instanceType String
    nameRegex String
    outputFile String
    status String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instances GetInstancesInstance[]
    names string[]
    instanceType string
    nameRegex string
    outputFile string
    status string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instances Sequence[GetInstancesInstance]
    names Sequence[str]
    instance_type str
    name_regex str
    output_file str
    status str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<Property Map>
    names List<String>
    instanceType String
    nameRegex String
    outputFile String
    status String

    Supporting Types

    GetInstancesInstance

    ClientInstanceId string
    The ID of the ECS instance to be bound.
    ClientInstanceName string
    The name of the ECS instance bound to the EAIS instance.
    ClientInstanceType string
    The type of the ECS instance bound to the EAIS instance.
    Id string
    The ID of the Instance.
    InstanceId string
    The ID of the resource.
    InstanceName string
    The name of the resource.
    InstanceType string
    The type of the resource. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    Status string
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    ZoneId string
    The ID of the region to which the EAIS instance belongs.
    ClientInstanceId string
    The ID of the ECS instance to be bound.
    ClientInstanceName string
    The name of the ECS instance bound to the EAIS instance.
    ClientInstanceType string
    The type of the ECS instance bound to the EAIS instance.
    Id string
    The ID of the Instance.
    InstanceId string
    The ID of the resource.
    InstanceName string
    The name of the resource.
    InstanceType string
    The type of the resource. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    Status string
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    ZoneId string
    The ID of the region to which the EAIS instance belongs.
    clientInstanceId String
    The ID of the ECS instance to be bound.
    clientInstanceName String
    The name of the ECS instance bound to the EAIS instance.
    clientInstanceType String
    The type of the ECS instance bound to the EAIS instance.
    id String
    The ID of the Instance.
    instanceId String
    The ID of the resource.
    instanceName String
    The name of the resource.
    instanceType String
    The type of the resource. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    status String
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    zoneId String
    The ID of the region to which the EAIS instance belongs.
    clientInstanceId string
    The ID of the ECS instance to be bound.
    clientInstanceName string
    The name of the ECS instance bound to the EAIS instance.
    clientInstanceType string
    The type of the ECS instance bound to the EAIS instance.
    id string
    The ID of the Instance.
    instanceId string
    The ID of the resource.
    instanceName string
    The name of the resource.
    instanceType string
    The type of the resource. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    status string
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    zoneId string
    The ID of the region to which the EAIS instance belongs.
    client_instance_id str
    The ID of the ECS instance to be bound.
    client_instance_name str
    The name of the ECS instance bound to the EAIS instance.
    client_instance_type str
    The type of the ECS instance bound to the EAIS instance.
    id str
    The ID of the Instance.
    instance_id str
    The ID of the resource.
    instance_name str
    The name of the resource.
    instance_type str
    The type of the resource. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    status str
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    zone_id str
    The ID of the region to which the EAIS instance belongs.
    clientInstanceId String
    The ID of the ECS instance to be bound.
    clientInstanceName String
    The name of the ECS instance bound to the EAIS instance.
    clientInstanceType String
    The type of the ECS instance bound to the EAIS instance.
    id String
    The ID of the Instance.
    instanceId String
    The ID of the resource.
    instanceName String
    The name of the resource.
    instanceType String
    The type of the resource. Valid values: eais.ei-a6.4xlarge, eais.ei-a6.2xlarge, eais.ei-a6.xlarge, eais.ei-a6.large, eais.ei-a6.medium.
    status String
    The status of the resource. Valid values: Attaching, Available, Detaching, InUse, Starting, Unavailable.
    zoneId String
    The ID of the region to which the EAIS instance belongs.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi