1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. oss
  5. getInstances
Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi

alicloud.oss.getInstances

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi
    Deprecated: alicloud.oss.getInstances has been deprecated in favor of alicloud.ots.getInstances

    This data source provides the ots instances of the current Alibaba Cloud user.

    NOTE: Available since v1.40.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const instancesDs = alicloud.ots.getInstances({
        outputFile: "instances.txt",
    });
    export const firstInstanceId = instancesDs.then(instancesDs => instancesDs.instances?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(output_file="instances.txt")
    pulumi.export("firstInstanceId", instances_ds.instances[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		instancesDs, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			OutputFile: pulumi.StringRef("instances.txt"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstInstanceId", instancesDs.Instances[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            OutputFile = "instances.txt",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstInstanceId"] = instancesDs.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .outputFile("instances.txt")
                .build());
    
            ctx.export("firstInstanceId", instancesDs.applyValue(getInstancesResult -> getInstancesResult.instances()[0].id()));
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            outputFile: instances.txt
    outputs:
      firstInstanceId: ${instancesDs.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,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInstancesResult
    def get_instances_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      tags: Optional[pulumi.Input[Mapping[str, 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:oss/getInstances:getInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of instance IDs.
    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).
    Tags Dictionary<string, string>
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    Ids []string
    A list of instance IDs.
    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).
    Tags map[string]string
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    ids List<String>
    A list of instance IDs.
    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).
    tags Map<String,String>
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    ids string[]
    A list of instance IDs.
    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).
    tags {[key: string]: string}
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    ids Sequence[str]
    A list of instance IDs.
    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).
    tags Mapping[str, str]
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    ids List<String>
    A list of instance IDs.
    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).
    tags Map<String>
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    

    getInstances Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of instance IDs.
    Instances List<Pulumi.AliCloud.Oss.Outputs.GetInstancesInstance>
    A list of instances. Each element contains the following attributes:
    Names List<string>
    A list of instance names.
    NameRegex string
    OutputFile string
    Tags Dictionary<string, string>
    The tags of the instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of instance IDs.
    Instances []GetInstancesInstance
    A list of instances. Each element contains the following attributes:
    Names []string
    A list of instance names.
    NameRegex string
    OutputFile string
    Tags map[string]string
    The tags of the instance.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of instance IDs.
    instances List<GetInstancesInstance>
    A list of instances. Each element contains the following attributes:
    names List<String>
    A list of instance names.
    nameRegex String
    outputFile String
    tags Map<String,String>
    The tags of the instance.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of instance IDs.
    instances GetInstancesInstance[]
    A list of instances. Each element contains the following attributes:
    names string[]
    A list of instance names.
    nameRegex string
    outputFile string
    tags {[key: string]: string}
    The tags of the instance.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of instance IDs.
    instances Sequence[GetInstancesInstance]
    A list of instances. Each element contains the following attributes:
    names Sequence[str]
    A list of instance names.
    name_regex str
    output_file str
    tags Mapping[str, str]
    The tags of the instance.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of instance IDs.
    instances List<Property Map>
    A list of instances. Each element contains the following attributes:
    names List<String>
    A list of instance names.
    nameRegex String
    outputFile String
    tags Map<String>
    The tags of the instance.

    Supporting Types

    GetInstancesInstance

    ClusterType string
    The cluster type of the instance. Possible values: SSD, HYBRID.
    CreateTime string
    The create time of the instance.
    Description string
    The description of the instance.
    EntityQuota int
    (Removed since v1.221.0) The instance quota which indicating the maximum number of tables.
    Id string
    ID of the instance.
    Name string
    Instance name.
    Network string
    (Removed since v1.221.0) The network type of the instance. Possible values: NORMAL, VPC, VPC_CONSOLE.
    NetworkSourceAcls List<string>
    (Available since v1.221.0) The set of request sources that are allowed access. Possible values: TRUST_PROXY.
    NetworkTypeAcls List<string>
    (Available since v1.221.0) The set of network types that are allowed access. Possible values: CLASSIC, VPC, INTERNET.
    Policy string
    (Available since v1.221.0) instance policy, json string.
    PolicyVersion int
    (Available since v1.221.0) instance policy version.
    ResourceGroupId string
    (Available since v1.221.0) The resource group the instance belongs to.
    Status string
    Instance status. Possible values: Running, Disabled, Deleting.
    TableQuota int
    (Available since v1.221.0) The instance quota which indicating the maximum number of tables.
    Tags Dictionary<string, string>
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    title="Required"> <span id="userid_csharp">

    UserId string

    The user id of the instance.

    ClusterType string
    The cluster type of the instance. Possible values: SSD, HYBRID.
    CreateTime string
    The create time of the instance.
    Description string
    The description of the instance.
    EntityQuota int
    (Removed since v1.221.0) The instance quota which indicating the maximum number of tables.
    Id string
    ID of the instance.
    Name string
    Instance name.
    Network string
    (Removed since v1.221.0) The network type of the instance. Possible values: NORMAL, VPC, VPC_CONSOLE.
    NetworkSourceAcls []string
    (Available since v1.221.0) The set of request sources that are allowed access. Possible values: TRUST_PROXY.
    NetworkTypeAcls []string
    (Available since v1.221.0) The set of network types that are allowed access. Possible values: CLASSIC, VPC, INTERNET.
    Policy string
    (Available since v1.221.0) instance policy, json string.
    PolicyVersion int
    (Available since v1.221.0) instance policy version.
    ResourceGroupId string
    (Available since v1.221.0) The resource group the instance belongs to.
    Status string
    Instance status. Possible values: Running, Disabled, Deleting.
    TableQuota int
    (Available since v1.221.0) The instance quota which indicating the maximum number of tables.
    Tags map[string]string
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    title="Required"> <span id="userid_go">

    UserId string

    The user id of the instance.

    clusterType String
    The cluster type of the instance. Possible values: SSD, HYBRID.
    createTime String
    The create time of the instance.
    description String
    The description of the instance.
    entityQuota Integer
    (Removed since v1.221.0) The instance quota which indicating the maximum number of tables.
    id String
    ID of the instance.
    name String
    Instance name.
    network String
    (Removed since v1.221.0) The network type of the instance. Possible values: NORMAL, VPC, VPC_CONSOLE.
    networkSourceAcls List<String>
    (Available since v1.221.0) The set of request sources that are allowed access. Possible values: TRUST_PROXY.
    networkTypeAcls List<String>
    (Available since v1.221.0) The set of network types that are allowed access. Possible values: CLASSIC, VPC, INTERNET.
    policy String
    (Available since v1.221.0) instance policy, json string.
    policyVersion Integer
    (Available since v1.221.0) instance policy version.
    resourceGroupId String
    (Available since v1.221.0) The resource group the instance belongs to.
    status String
    Instance status. Possible values: Running, Disabled, Deleting.
    tableQuota Integer
    (Available since v1.221.0) The instance quota which indicating the maximum number of tables.
    tags Map<String,String>
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    title="Required"> <span id="userid_java">

    userId String

    The user id of the instance.

    clusterType string
    The cluster type of the instance. Possible values: SSD, HYBRID.
    createTime string
    The create time of the instance.
    description string
    The description of the instance.
    entityQuota number
    (Removed since v1.221.0) The instance quota which indicating the maximum number of tables.
    id string
    ID of the instance.
    name string
    Instance name.
    network string
    (Removed since v1.221.0) The network type of the instance. Possible values: NORMAL, VPC, VPC_CONSOLE.
    networkSourceAcls string[]
    (Available since v1.221.0) The set of request sources that are allowed access. Possible values: TRUST_PROXY.
    networkTypeAcls string[]
    (Available since v1.221.0) The set of network types that are allowed access. Possible values: CLASSIC, VPC, INTERNET.
    policy string
    (Available since v1.221.0) instance policy, json string.
    policyVersion number
    (Available since v1.221.0) instance policy version.
    resourceGroupId string
    (Available since v1.221.0) The resource group the instance belongs to.
    status string
    Instance status. Possible values: Running, Disabled, Deleting.
    tableQuota number
    (Available since v1.221.0) The instance quota which indicating the maximum number of tables.
    tags {[key: string]: string}
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    title="Required"> <span id="userid_nodejs">

    userId string

    The user id of the instance.

    cluster_type str
    The cluster type of the instance. Possible values: SSD, HYBRID.
    create_time str
    The create time of the instance.
    description str
    The description of the instance.
    entity_quota int
    (Removed since v1.221.0) The instance quota which indicating the maximum number of tables.
    id str
    ID of the instance.
    name str
    Instance name.
    network str
    (Removed since v1.221.0) The network type of the instance. Possible values: NORMAL, VPC, VPC_CONSOLE.
    network_source_acls Sequence[str]
    (Available since v1.221.0) The set of request sources that are allowed access. Possible values: TRUST_PROXY.
    network_type_acls Sequence[str]
    (Available since v1.221.0) The set of network types that are allowed access. Possible values: CLASSIC, VPC, INTERNET.
    policy str
    (Available since v1.221.0) instance policy, json string.
    policy_version int
    (Available since v1.221.0) instance policy version.
    resource_group_id str
    (Available since v1.221.0) The resource group the instance belongs to.
    status str
    Instance status. Possible values: Running, Disabled, Deleting.
    table_quota int
    (Available since v1.221.0) The instance quota which indicating the maximum number of tables.
    tags Mapping[str, str]
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    title="Required"> <span id="user_id_python">

    user_id str

    The user id of the instance.

    clusterType String
    The cluster type of the instance. Possible values: SSD, HYBRID.
    createTime String
    The create time of the instance.
    description String
    The description of the instance.
    entityQuota Number
    (Removed since v1.221.0) The instance quota which indicating the maximum number of tables.
    id String
    ID of the instance.
    name String
    Instance name.
    network String
    (Removed since v1.221.0) The network type of the instance. Possible values: NORMAL, VPC, VPC_CONSOLE.
    networkSourceAcls List<String>
    (Available since v1.221.0) The set of request sources that are allowed access. Possible values: TRUST_PROXY.
    networkTypeAcls List<String>
    (Available since v1.221.0) The set of network types that are allowed access. Possible values: CLASSIC, VPC, INTERNET.
    policy String
    (Available since v1.221.0) instance policy, json string.
    policyVersion Number
    (Available since v1.221.0) instance policy version.
    resourceGroupId String
    (Available since v1.221.0) The resource group the instance belongs to.
    status String
    Instance status. Possible values: Running, Disabled, Deleting.
    tableQuota Number
    (Available since v1.221.0) The instance quota which indicating the maximum number of tables.
    tags Map<String>
    A map of tags assigned to the instance. It must be in the format:

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    

    const instancesDs = alicloud.ots.getInstances({ tags: { tagKey1: "tagValue1", tagKey2: "tagValue2", }, });

    import pulumi
    import pulumi_alicloud as alicloud
    
    instances_ds = alicloud.ots.get_instances(tags={
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2",
    })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instancesDs = AliCloud.Ots.GetInstances.Invoke(new()
        {
            Tags = 
            {
                { "tagKey1", "tagValue1" },
                { "tagKey2", "tagValue2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ots.GetInstances(ctx, &ots.GetInstancesArgs{
    			Tags: map[string]interface{}{
    				"tagKey1": "tagValue1",
    				"tagKey2": "tagValue2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ots.OtsFunctions;
    import com.pulumi.alicloud.ots.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 instancesDs = OtsFunctions.getInstances(GetInstancesArgs.builder()
                .tags(Map.ofEntries(
                    Map.entry("tagKey1", "tagValue1"),
                    Map.entry("tagKey2", "tagValue2")
                ))
                .build());
    
        }
    }
    
    variables:
      instancesDs:
        fn::invoke:
          Function: alicloud:ots:getInstances
          Arguments:
            tags:
              tagKey1: tagValue1
              tagKey2: tagValue2
    
    title="Required"> <span id="userid_yaml">

    userId String

    The user id of the instance.

    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.69.0 published on Monday, Dec 9, 2024 by Pulumi