opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud
opentelekomcloud.getComputeInstancesV2
Explore with Pulumi AI
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud
Up-to-date reference of API arguments for ECS instances you can get at documentation portal
Get information on an ECS instances.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const nameRegex = config.requireObject("nameRegex");
const test = opentelekomcloud.getComputeInstancesV2({
    name: nameRegex,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
name_regex = config.require_object("nameRegex")
test = opentelekomcloud.get_compute_instances_v2(name=name_regex)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		nameRegex := cfg.RequireObject("nameRegex")
		_, err := opentelekomcloud.GetComputeInstancesV2(ctx, &opentelekomcloud.GetComputeInstancesV2Args{
			Name: pulumi.StringRef(nameRegex),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var nameRegex = config.RequireObject<dynamic>("nameRegex");
    var test = Opentelekomcloud.GetComputeInstancesV2.Invoke(new()
    {
        Name = nameRegex,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetComputeInstancesV2Args;
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 config = ctx.config();
        final var nameRegex = config.get("nameRegex");
        final var test = OpentelekomcloudFunctions.getComputeInstancesV2(GetComputeInstancesV2Args.builder()
            .name(nameRegex)
            .build());
    }
}
configuration:
  nameRegex:
    type: dynamic
variables:
  test:
    fn::invoke:
      function: opentelekomcloud:getComputeInstancesV2
      arguments:
        name: ${nameRegex}
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const test = opentelekomcloud.getComputeInstancesV2({
    status: "ACTIVE",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
test = opentelekomcloud.get_compute_instances_v2(status="ACTIVE")
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opentelekomcloud.GetComputeInstancesV2(ctx, &opentelekomcloud.GetComputeInstancesV2Args{
			Status: pulumi.StringRef("ACTIVE"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() => 
{
    var test = Opentelekomcloud.GetComputeInstancesV2.Invoke(new()
    {
        Status = "ACTIVE",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetComputeInstancesV2Args;
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 test = OpentelekomcloudFunctions.getComputeInstancesV2(GetComputeInstancesV2Args.builder()
            .status("ACTIVE")
            .build());
    }
}
variables:
  test:
    fn::invoke:
      function: opentelekomcloud:getComputeInstancesV2
      arguments:
        status: ACTIVE
Using getComputeInstancesV2
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 getComputeInstancesV2(args: GetComputeInstancesV2Args, opts?: InvokeOptions): Promise<GetComputeInstancesV2Result>
function getComputeInstancesV2Output(args: GetComputeInstancesV2OutputArgs, opts?: InvokeOptions): Output<GetComputeInstancesV2Result>def get_compute_instances_v2(availability_zone: Optional[str] = None,
                             flavor_id: Optional[str] = None,
                             flavor_name: Optional[str] = None,
                             id: Optional[str] = None,
                             image_id: Optional[str] = None,
                             instance_id: Optional[str] = None,
                             key_pair: Optional[str] = None,
                             limit: Optional[float] = None,
                             name: Optional[str] = None,
                             project_id: Optional[str] = None,
                             status: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetComputeInstancesV2Result
def get_compute_instances_v2_output(availability_zone: Optional[pulumi.Input[str]] = None,
                             flavor_id: Optional[pulumi.Input[str]] = None,
                             flavor_name: Optional[pulumi.Input[str]] = None,
                             id: Optional[pulumi.Input[str]] = None,
                             image_id: Optional[pulumi.Input[str]] = None,
                             instance_id: Optional[pulumi.Input[str]] = None,
                             key_pair: Optional[pulumi.Input[str]] = None,
                             limit: Optional[pulumi.Input[float]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             project_id: Optional[pulumi.Input[str]] = None,
                             status: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetComputeInstancesV2Result]func GetComputeInstancesV2(ctx *Context, args *GetComputeInstancesV2Args, opts ...InvokeOption) (*GetComputeInstancesV2Result, error)
func GetComputeInstancesV2Output(ctx *Context, args *GetComputeInstancesV2OutputArgs, opts ...InvokeOption) GetComputeInstancesV2ResultOutput> Note: This function is named GetComputeInstancesV2 in the Go SDK.
public static class GetComputeInstancesV2 
{
    public static Task<GetComputeInstancesV2Result> InvokeAsync(GetComputeInstancesV2Args args, InvokeOptions? opts = null)
    public static Output<GetComputeInstancesV2Result> Invoke(GetComputeInstancesV2InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetComputeInstancesV2Result> getComputeInstancesV2(GetComputeInstancesV2Args args, InvokeOptions options)
public static Output<GetComputeInstancesV2Result> getComputeInstancesV2(GetComputeInstancesV2Args args, InvokeOptions options)
fn::invoke:
  function: opentelekomcloud:index/getComputeInstancesV2:getComputeInstancesV2
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AvailabilityZone string
- The availability zone of this server.
- FlavorId string
- Specifies the flavor ID.
- FlavorName string
- Specifies the flavor name of the instance.
- Id string
- The instance ID in UUID format.
- ImageId string
- Specifies the image ID of the instance.
- InstanceId string
- Specifies the ECS ID.
- KeyPair string
- Specifies the key pair that is used to authenticate the instance.
- Limit double
- Specifies the number of instances to be queried. The value is an integer and is 100 by default.
- Name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- ProjectId string
- Specifies the project where instance hosted.
- Status string
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- AvailabilityZone string
- The availability zone of this server.
- FlavorId string
- Specifies the flavor ID.
- FlavorName string
- Specifies the flavor name of the instance.
- Id string
- The instance ID in UUID format.
- ImageId string
- Specifies the image ID of the instance.
- InstanceId string
- Specifies the ECS ID.
- KeyPair string
- Specifies the key pair that is used to authenticate the instance.
- Limit float64
- Specifies the number of instances to be queried. The value is an integer and is 100 by default.
- Name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- ProjectId string
- Specifies the project where instance hosted.
- Status string
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- availabilityZone String
- The availability zone of this server.
- flavorId String
- Specifies the flavor ID.
- flavorName String
- Specifies the flavor name of the instance.
- id String
- The instance ID in UUID format.
- imageId String
- Specifies the image ID of the instance.
- instanceId String
- Specifies the ECS ID.
- keyPair String
- Specifies the key pair that is used to authenticate the instance.
- limit Double
- Specifies the number of instances to be queried. The value is an integer and is 100 by default.
- name String
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- projectId String
- Specifies the project where instance hosted.
- status String
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- availabilityZone string
- The availability zone of this server.
- flavorId string
- Specifies the flavor ID.
- flavorName string
- Specifies the flavor name of the instance.
- id string
- The instance ID in UUID format.
- imageId string
- Specifies the image ID of the instance.
- instanceId string
- Specifies the ECS ID.
- keyPair string
- Specifies the key pair that is used to authenticate the instance.
- limit number
- Specifies the number of instances to be queried. The value is an integer and is 100 by default.
- name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- projectId string
- Specifies the project where instance hosted.
- status string
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- availability_zone str
- The availability zone of this server.
- flavor_id str
- Specifies the flavor ID.
- flavor_name str
- Specifies the flavor name of the instance.
- id str
- The instance ID in UUID format.
- image_id str
- Specifies the image ID of the instance.
- instance_id str
- Specifies the ECS ID.
- key_pair str
- Specifies the key pair that is used to authenticate the instance.
- limit float
- Specifies the number of instances to be queried. The value is an integer and is 100 by default.
- name str
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- project_id str
- Specifies the project where instance hosted.
- status str
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- availabilityZone String
- The availability zone of this server.
- flavorId String
- Specifies the flavor ID.
- flavorName String
- Specifies the flavor name of the instance.
- id String
- The instance ID in UUID format.
- imageId String
- Specifies the image ID of the instance.
- instanceId String
- Specifies the ECS ID.
- keyPair String
- Specifies the key pair that is used to authenticate the instance.
- limit Number
- Specifies the number of instances to be queried. The value is an integer and is 100 by default.
- name String
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- projectId String
- Specifies the project where instance hosted.
- status String
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
getComputeInstancesV2 Result
The following output properties are available:
- Id string
- The instance ID in UUID format.
- Instances
List<GetCompute Instances V2Instance> 
- List of ECS instance details. The object structure of each ECS instance is documented below.
- AvailabilityZone string
- The availability zone of this server.
- FlavorId string
- The flavor ID used to create the server.
- FlavorName string
- ImageId string
- The image ID used to create the server.
- InstanceId string
- KeyPair string
- The key pair that is used to authenticate the instance.
- Limit double
- Name string
- The name of the network
- ProjectId string
- The instance project ID.
- Status string
- The instance status.
- Id string
- The instance ID in UUID format.
- Instances
[]GetCompute Instances V2Instance 
- List of ECS instance details. The object structure of each ECS instance is documented below.
- AvailabilityZone string
- The availability zone of this server.
- FlavorId string
- The flavor ID used to create the server.
- FlavorName string
- ImageId string
- The image ID used to create the server.
- InstanceId string
- KeyPair string
- The key pair that is used to authenticate the instance.
- Limit float64
- Name string
- The name of the network
- ProjectId string
- The instance project ID.
- Status string
- The instance status.
- id String
- The instance ID in UUID format.
- instances
List<GetCompute Instances V2Instance> 
- List of ECS instance details. The object structure of each ECS instance is documented below.
- availabilityZone String
- The availability zone of this server.
- flavorId String
- The flavor ID used to create the server.
- flavorName String
- imageId String
- The image ID used to create the server.
- instanceId String
- keyPair String
- The key pair that is used to authenticate the instance.
- limit Double
- name String
- The name of the network
- projectId String
- The instance project ID.
- status String
- The instance status.
- id string
- The instance ID in UUID format.
- instances
GetCompute Instances V2Instance[] 
- List of ECS instance details. The object structure of each ECS instance is documented below.
- availabilityZone string
- The availability zone of this server.
- flavorId string
- The flavor ID used to create the server.
- flavorName string
- imageId string
- The image ID used to create the server.
- instanceId string
- keyPair string
- The key pair that is used to authenticate the instance.
- limit number
- name string
- The name of the network
- projectId string
- The instance project ID.
- status string
- The instance status.
- id str
- The instance ID in UUID format.
- instances
Sequence[GetCompute Instances V2Instance] 
- List of ECS instance details. The object structure of each ECS instance is documented below.
- availability_zone str
- The availability zone of this server.
- flavor_id str
- The flavor ID used to create the server.
- flavor_name str
- image_id str
- The image ID used to create the server.
- instance_id str
- key_pair str
- The key pair that is used to authenticate the instance.
- limit float
- name str
- The name of the network
- project_id str
- The instance project ID.
- status str
- The instance status.
- id String
- The instance ID in UUID format.
- instances List<Property Map>
- List of ECS instance details. The object structure of each ECS instance is documented below.
- availabilityZone String
- The availability zone of this server.
- flavorId String
- The flavor ID used to create the server.
- flavorName String
- imageId String
- The image ID used to create the server.
- instanceId String
- keyPair String
- The key pair that is used to authenticate the instance.
- limit Number
- name String
- The name of the network
- projectId String
- The instance project ID.
- status String
- The instance status.
Supporting Types
GetComputeInstancesV2Instance   
- AvailabilityZone string
- The availability zone of this server.
- Description string
- Server description.
- FlavorId string
- Specifies the flavor ID.
- Id string
- The instance ID in UUID format.
- ImageId string
- Specifies the image ID of the instance.
- ImageName string
- The image name used to create the server.
- KeyPair string
- Specifies the key pair that is used to authenticate the instance.
- Name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- Networks
List<GetCompute Instances V2Instance Network> 
- An array of maps, detailed below.
- ProjectId string
- Specifies the project where instance hosted.
- PublicIp string
- SecurityGroups List<string>Ids 
- An array of one or more security group Ids to associate with the instance.
- Status string
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- SystemDisk stringId 
- Dictionary<string, string>
- UserData string
- AvailabilityZone string
- The availability zone of this server.
- Description string
- Server description.
- FlavorId string
- Specifies the flavor ID.
- Id string
- The instance ID in UUID format.
- ImageId string
- Specifies the image ID of the instance.
- ImageName string
- The image name used to create the server.
- KeyPair string
- Specifies the key pair that is used to authenticate the instance.
- Name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- Networks
[]GetCompute Instances V2Instance Network 
- An array of maps, detailed below.
- ProjectId string
- Specifies the project where instance hosted.
- PublicIp string
- SecurityGroups []stringIds 
- An array of one or more security group Ids to associate with the instance.
- Status string
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- SystemDisk stringId 
- map[string]string
- UserData string
- availabilityZone String
- The availability zone of this server.
- description String
- Server description.
- flavorId String
- Specifies the flavor ID.
- id String
- The instance ID in UUID format.
- imageId String
- Specifies the image ID of the instance.
- imageName String
- The image name used to create the server.
- keyPair String
- Specifies the key pair that is used to authenticate the instance.
- name String
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- networks
List<GetCompute Instances V2Instance Network> 
- An array of maps, detailed below.
- projectId String
- Specifies the project where instance hosted.
- publicIp String
- securityGroups List<String>Ids 
- An array of one or more security group Ids to associate with the instance.
- status String
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- systemDisk StringId 
- Map<String,String>
- userData String
- availabilityZone string
- The availability zone of this server.
- description string
- Server description.
- flavorId string
- Specifies the flavor ID.
- id string
- The instance ID in UUID format.
- imageId string
- Specifies the image ID of the instance.
- imageName string
- The image name used to create the server.
- keyPair string
- Specifies the key pair that is used to authenticate the instance.
- name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- networks
GetCompute Instances V2Instance Network[] 
- An array of maps, detailed below.
- projectId string
- Specifies the project where instance hosted.
- publicIp string
- securityGroups string[]Ids 
- An array of one or more security group Ids to associate with the instance.
- status string
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- systemDisk stringId 
- {[key: string]: string}
- userData string
- availability_zone str
- The availability zone of this server.
- description str
- Server description.
- flavor_id str
- Specifies the flavor ID.
- id str
- The instance ID in UUID format.
- image_id str
- Specifies the image ID of the instance.
- image_name str
- The image name used to create the server.
- key_pair str
- Specifies the key pair that is used to authenticate the instance.
- name str
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- networks
Sequence[GetCompute Instances V2Instance Network] 
- An array of maps, detailed below.
- project_id str
- Specifies the project where instance hosted.
- public_ip str
- security_groups_ Sequence[str]ids 
- An array of one or more security group Ids to associate with the instance.
- status str
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- system_disk_ strid 
- Mapping[str, str]
- user_data str
- availabilityZone String
- The availability zone of this server.
- description String
- Server description.
- flavorId String
- Specifies the flavor ID.
- id String
- The instance ID in UUID format.
- imageId String
- Specifies the image ID of the instance.
- imageName String
- The image name used to create the server.
- keyPair String
- Specifies the key pair that is used to authenticate the instance.
- name String
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- networks List<Property Map>
- An array of maps, detailed below.
- projectId String
- Specifies the project where instance hosted.
- publicIp String
- securityGroups List<String>Ids 
- An array of one or more security group Ids to associate with the instance.
- status String
- Specifies the status of the instance. The valid values are as follows:- ACTIVE: The instance is running properly.
- SHUTOFF: The instance has been properly stopped.
- ERROR: An error has occurred on the instance.
 
- systemDisk StringId 
- Map<String>
- userData String
GetComputeInstancesV2InstanceNetwork    
- FixedIp stringV4 
- The IPv4 address assigned to this network port. Not supported.
- FixedIp stringV6 
- The IPv6 address assigned to this network port. Not supported.
- Mac string
- The MAC address assigned to this network interface.
- Name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- Port string
- The port UUID for this network
- Uuid string
- The UUID of the network
- FixedIp stringV4 
- The IPv4 address assigned to this network port. Not supported.
- FixedIp stringV6 
- The IPv6 address assigned to this network port. Not supported.
- Mac string
- The MAC address assigned to this network interface.
- Name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- Port string
- The port UUID for this network
- Uuid string
- The UUID of the network
- fixedIp StringV4 
- The IPv4 address assigned to this network port. Not supported.
- fixedIp StringV6 
- The IPv6 address assigned to this network port. Not supported.
- mac String
- The MAC address assigned to this network interface.
- name String
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- port String
- The port UUID for this network
- uuid String
- The UUID of the network
- fixedIp stringV4 
- The IPv4 address assigned to this network port. Not supported.
- fixedIp stringV6 
- The IPv6 address assigned to this network port. Not supported.
- mac string
- The MAC address assigned to this network interface.
- name string
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- port string
- The port UUID for this network
- uuid string
- The UUID of the network
- fixed_ip_ strv4 
- The IPv4 address assigned to this network port. Not supported.
- fixed_ip_ strv6 
- The IPv6 address assigned to this network port. Not supported.
- mac str
- The MAC address assigned to this network interface.
- name str
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- port str
- The port UUID for this network
- uuid str
- The UUID of the network
- fixedIp StringV4 
- The IPv4 address assigned to this network port. Not supported.
- fixedIp StringV6 
- The IPv6 address assigned to this network port. Not supported.
- mac String
- The MAC address assigned to this network interface.
- name String
- Specifies the instance name, which can be queried with a regular expression. The instance name supports fuzzy matching query too.
- port String
- The port UUID for this network
- uuid String
- The UUID of the network
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the opentelekomcloudTerraform Provider.
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud