opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud
opentelekomcloud.getComputeInstancesV2
Explore with Pulumi AI
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 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 dictionary
The following arguments are supported:
- Availability
Zone string - The availability zone of this server.
- Flavor
Id string - Specifies the flavor ID.
- Flavor
Name string - Specifies the flavor name of the instance.
- Id string
- The instance ID in UUID format.
- Image
Id string - Specifies the image ID of the instance.
- Instance
Id string - Specifies the ECS ID.
- Key
Pair 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.
- Project
Id 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 string - The availability zone of this server.
- Flavor
Id string - Specifies the flavor ID.
- Flavor
Name string - Specifies the flavor name of the instance.
- Id string
- The instance ID in UUID format.
- Image
Id string - Specifies the image ID of the instance.
- Instance
Id string - Specifies the ECS ID.
- Key
Pair 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.
- Project
Id 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 String - The availability zone of this server.
- flavor
Id String - Specifies the flavor ID.
- flavor
Name String - Specifies the flavor name of the instance.
- id String
- The instance ID in UUID format.
- image
Id String - Specifies the image ID of the instance.
- instance
Id String - Specifies the ECS ID.
- key
Pair 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.
- project
Id 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 string - The availability zone of this server.
- flavor
Id string - Specifies the flavor ID.
- flavor
Name string - Specifies the flavor name of the instance.
- id string
- The instance ID in UUID format.
- image
Id string - Specifies the image ID of the instance.
- instance
Id string - Specifies the ECS ID.
- key
Pair 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.
- project
Id 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.
- availability
Zone String - The availability zone of this server.
- flavor
Id String - Specifies the flavor ID.
- flavor
Name String - Specifies the flavor name of the instance.
- id String
- The instance ID in UUID format.
- image
Id String - Specifies the image ID of the instance.
- instance
Id String - Specifies the ECS ID.
- key
Pair 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.
- project
Id 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<Get
Compute Instances V2Instance> - List of ECS instance details. The object structure of each ECS instance is documented below.
- Availability
Zone string - The availability zone of this server.
- Flavor
Id string - The flavor ID used to create the server.
- Flavor
Name string - Image
Id string - The image ID used to create the server.
- Instance
Id string - Key
Pair string - The key pair that is used to authenticate the instance.
- Limit double
- Name string
- The name of the network
- Project
Id string - The instance project ID.
- Status string
- The instance status.
- Id string
- The instance ID in UUID format.
- Instances
[]Get
Compute Instances V2Instance - List of ECS instance details. The object structure of each ECS instance is documented below.
- Availability
Zone string - The availability zone of this server.
- Flavor
Id string - The flavor ID used to create the server.
- Flavor
Name string - Image
Id string - The image ID used to create the server.
- Instance
Id string - Key
Pair string - The key pair that is used to authenticate the instance.
- Limit float64
- Name string
- The name of the network
- Project
Id string - The instance project ID.
- Status string
- The instance status.
- id String
- The instance ID in UUID format.
- instances
List<Get
Compute Instances V2Instance> - List of ECS instance details. The object structure of each ECS instance is documented below.
- availability
Zone String - The availability zone of this server.
- flavor
Id String - The flavor ID used to create the server.
- flavor
Name String - image
Id String - The image ID used to create the server.
- instance
Id String - key
Pair String - The key pair that is used to authenticate the instance.
- limit Double
- name String
- The name of the network
- project
Id String - The instance project ID.
- status String
- The instance status.
- id string
- The instance ID in UUID format.
- instances
Get
Compute Instances V2Instance[] - List of ECS instance details. The object structure of each ECS instance is documented below.
- availability
Zone string - The availability zone of this server.
- flavor
Id string - The flavor ID used to create the server.
- flavor
Name string - image
Id string - The image ID used to create the server.
- instance
Id string - key
Pair string - The key pair that is used to authenticate the instance.
- limit number
- name string
- The name of the network
- project
Id string - The instance project ID.
- status string
- The instance status.
- id str
- The instance ID in UUID format.
- instances
Sequence[Get
Compute 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.
- availability
Zone String - The availability zone of this server.
- flavor
Id String - The flavor ID used to create the server.
- flavor
Name String - image
Id String - The image ID used to create the server.
- instance
Id String - key
Pair String - The key pair that is used to authenticate the instance.
- limit Number
- name String
- The name of the network
- project
Id String - The instance project ID.
- status String
- The instance status.
Supporting Types
GetComputeInstancesV2Instance
- Availability
Zone string - The availability zone of this server.
- Description string
- Server description.
- Flavor
Id string - Specifies the flavor ID.
- Id string
- The instance ID in UUID format.
- Image
Id string - Specifies the image ID of the instance.
- Image
Name string - The image name used to create the server.
- Key
Pair 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<Get
Compute Instances V2Instance Network> - An array of maps, detailed below.
- Project
Id string - Specifies the project where instance hosted.
- Public
Ip string - Security
Groups 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.
- System
Disk stringId - Dictionary<string, string>
- User
Data string
- Availability
Zone string - The availability zone of this server.
- Description string
- Server description.
- Flavor
Id string - Specifies the flavor ID.
- Id string
- The instance ID in UUID format.
- Image
Id string - Specifies the image ID of the instance.
- Image
Name string - The image name used to create the server.
- Key
Pair 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
[]Get
Compute Instances V2Instance Network - An array of maps, detailed below.
- Project
Id string - Specifies the project where instance hosted.
- Public
Ip string - Security
Groups []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.
- System
Disk stringId - map[string]string
- User
Data string
- availability
Zone String - The availability zone of this server.
- description String
- Server description.
- flavor
Id String - Specifies the flavor ID.
- id String
- The instance ID in UUID format.
- image
Id String - Specifies the image ID of the instance.
- image
Name String - The image name used to create the server.
- key
Pair 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<Get
Compute Instances V2Instance Network> - An array of maps, detailed below.
- project
Id String - Specifies the project where instance hosted.
- public
Ip String - security
Groups 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.
- system
Disk StringId - Map<String,String>
- user
Data String
- availability
Zone string - The availability zone of this server.
- description string
- Server description.
- flavor
Id string - Specifies the flavor ID.
- id string
- The instance ID in UUID format.
- image
Id string - Specifies the image ID of the instance.
- image
Name string - The image name used to create the server.
- key
Pair 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
Get
Compute Instances V2Instance Network[] - An array of maps, detailed below.
- project
Id string - Specifies the project where instance hosted.
- public
Ip string - security
Groups 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.
- system
Disk stringId - {[key: string]: string}
- user
Data 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[Get
Compute 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
- availability
Zone String - The availability zone of this server.
- description String
- Server description.
- flavor
Id String - Specifies the flavor ID.
- id String
- The instance ID in UUID format.
- image
Id String - Specifies the image ID of the instance.
- image
Name String - The image name used to create the server.
- key
Pair 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.
- project
Id String - Specifies the project where instance hosted.
- public
Ip String - security
Groups 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.
- system
Disk StringId - Map<String>
- user
Data String
GetComputeInstancesV2InstanceNetwork
- Fixed
Ip stringV4 - The IPv4 address assigned to this network port. Not supported.
- Fixed
Ip 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 stringV4 - The IPv4 address assigned to this network port. Not supported.
- Fixed
Ip 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 StringV4 - The IPv4 address assigned to this network port. Not supported.
- fixed
Ip 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 stringV4 - The IPv4 address assigned to this network port. Not supported.
- fixed
Ip 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
- fixed
Ip StringV4 - The IPv4 address assigned to this network port. Not supported.
- fixed
Ip 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
opentelekomcloud
Terraform Provider.
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud