flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud
flexibleengine.getComputeInstances
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud
Use this data source to get a list of compute instances.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const nameRegex = config.requireObject("nameRegex");
const demo = flexibleengine.getComputeInstances({
name: nameRegex,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
name_regex = config.require_object("nameRegex")
demo = flexibleengine.get_compute_instances(name=name_regex)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"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 := flexibleengine.GetComputeInstances(ctx, &flexibleengine.GetComputeInstancesArgs{
Name: pulumi.StringRef(nameRegex),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var nameRegex = config.RequireObject<dynamic>("nameRegex");
var demo = Flexibleengine.GetComputeInstances.Invoke(new()
{
Name = nameRegex,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.FlexibleengineFunctions;
import com.pulumi.flexibleengine.inputs.GetComputeInstancesArgs;
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 demo = FlexibleengineFunctions.getComputeInstances(GetComputeInstancesArgs.builder()
.name(nameRegex)
.build());
}
}
configuration:
nameRegex:
type: dynamic
variables:
demo:
fn::invoke:
function: flexibleengine:getComputeInstances
arguments:
name: ${nameRegex}
Using getComputeInstances
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 getComputeInstances(args: GetComputeInstancesArgs, opts?: InvokeOptions): Promise<GetComputeInstancesResult>
function getComputeInstancesOutput(args: GetComputeInstancesOutputArgs, opts?: InvokeOptions): Output<GetComputeInstancesResult>def get_compute_instances(availability_zone: Optional[str] = None,
fixed_ip_v4: Optional[str] = None,
flavor_id: Optional[str] = None,
flavor_name: Optional[str] = None,
id: Optional[str] = None,
image_id: Optional[str] = None,
key_pair: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetComputeInstancesResult
def get_compute_instances_output(availability_zone: Optional[pulumi.Input[str]] = None,
fixed_ip_v4: 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,
key_pair: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetComputeInstancesResult]func GetComputeInstances(ctx *Context, args *GetComputeInstancesArgs, opts ...InvokeOption) (*GetComputeInstancesResult, error)
func GetComputeInstancesOutput(ctx *Context, args *GetComputeInstancesOutputArgs, opts ...InvokeOption) GetComputeInstancesResultOutput> Note: This function is named GetComputeInstances in the Go SDK.
public static class GetComputeInstances
{
public static Task<GetComputeInstancesResult> InvokeAsync(GetComputeInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetComputeInstancesResult> Invoke(GetComputeInstancesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetComputeInstancesResult> getComputeInstances(GetComputeInstancesArgs args, InvokeOptions options)
public static Output<GetComputeInstancesResult> getComputeInstances(GetComputeInstancesArgs args, InvokeOptions options)
fn::invoke:
function: flexibleengine:index/getComputeInstances:getComputeInstances
arguments:
# arguments dictionaryThe following arguments are supported:
- Availability
Zone string - Specifies the availability zone where the instance is located.
- Fixed
Ip stringV4 - Specifies the IPv4 addresses of the 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.
- Key
Pair string - Specifies the key pair that is used to authenticate the instance.
- Name string
- Specifies the server name, which can be queried with a regular expression.
- Region string
- The region in which to obtain the server 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.
- Availability
Zone string - Specifies the availability zone where the instance is located.
- Fixed
Ip stringV4 - Specifies the IPv4 addresses of the 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.
- Key
Pair string - Specifies the key pair that is used to authenticate the instance.
- Name string
- Specifies the server name, which can be queried with a regular expression.
- Region string
- The region in which to obtain the server 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.
- availability
Zone String - Specifies the availability zone where the instance is located.
- fixed
Ip StringV4 - Specifies the IPv4 addresses of the 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.
- key
Pair String - Specifies the key pair that is used to authenticate the instance.
- name String
- Specifies the server name, which can be queried with a regular expression.
- region String
- The region in which to obtain the server 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.
- availability
Zone string - Specifies the availability zone where the instance is located.
- fixed
Ip stringV4 - Specifies the IPv4 addresses of the 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.
- key
Pair string - Specifies the key pair that is used to authenticate the instance.
- name string
- Specifies the server name, which can be queried with a regular expression.
- region string
- The region in which to obtain the server 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.
- availability_
zone str - Specifies the availability zone where the instance is located.
- fixed_
ip_ strv4 - Specifies the IPv4 addresses of the 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.
- key_
pair str - Specifies the key pair that is used to authenticate the instance.
- name str
- Specifies the server name, which can be queried with a regular expression.
- region str
- The region in which to obtain the server 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.
- availability
Zone String - Specifies the availability zone where the instance is located.
- fixed
Ip StringV4 - Specifies the IPv4 addresses of the 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.
- key
Pair String - Specifies the key pair that is used to authenticate the instance.
- name String
- Specifies the server name, which can be queried with a regular expression.
- region String
- The region in which to obtain the server 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.
getComputeInstances Result
The following output properties are available:
- Flavor
Id string - The flavor ID of the instance.
- Id string
- The instance ID in UUID format.
- Instances
List<Get
Compute Instances Instance> - List of ECS instance details. The instances object structure is documented below.
- Name string
- The instance name.
- Region string
- Availability
Zone string - The availability zone where the instance is located.
- Fixed
Ip stringV4 - The fixed IPv4 address of the instance on this network.
- Flavor
Name string - The flavor name of the instance.
- Image
Id string - The image ID of the instance.
- Key
Pair string - The key pair that is used to authenticate the instance.
- Status string
- The status of the instance.
- Flavor
Id string - The flavor ID of the instance.
- Id string
- The instance ID in UUID format.
- Instances
[]Get
Compute Instances Instance - List of ECS instance details. The instances object structure is documented below.
- Name string
- The instance name.
- Region string
- Availability
Zone string - The availability zone where the instance is located.
- Fixed
Ip stringV4 - The fixed IPv4 address of the instance on this network.
- Flavor
Name string - The flavor name of the instance.
- Image
Id string - The image ID of the instance.
- Key
Pair string - The key pair that is used to authenticate the instance.
- Status string
- The status of the instance.
- flavor
Id String - The flavor ID of the instance.
- id String
- The instance ID in UUID format.
- instances
List<Get
Compute Instances Instance> - List of ECS instance details. The instances object structure is documented below.
- name String
- The instance name.
- region String
- availability
Zone String - The availability zone where the instance is located.
- fixed
Ip StringV4 - The fixed IPv4 address of the instance on this network.
- flavor
Name String - The flavor name of the instance.
- image
Id String - The image ID of the instance.
- key
Pair String - The key pair that is used to authenticate the instance.
- status String
- The status of the instance.
- flavor
Id string - The flavor ID of the instance.
- id string
- The instance ID in UUID format.
- instances
Get
Compute Instances Instance[] - List of ECS instance details. The instances object structure is documented below.
- name string
- The instance name.
- region string
- availability
Zone string - The availability zone where the instance is located.
- fixed
Ip stringV4 - The fixed IPv4 address of the instance on this network.
- flavor
Name string - The flavor name of the instance.
- image
Id string - The image ID of the instance.
- key
Pair string - The key pair that is used to authenticate the instance.
- status string
- The status of the instance.
- flavor_
id str - The flavor ID of the instance.
- id str
- The instance ID in UUID format.
- instances
Sequence[Get
Compute Instances Instance] - List of ECS instance details. The instances object structure is documented below.
- name str
- The instance name.
- region str
- availability_
zone str - The availability zone where the instance is located.
- fixed_
ip_ strv4 - The fixed IPv4 address of the instance on this network.
- flavor_
name str - The flavor name of the instance.
- image_
id str - The image ID of the instance.
- key_
pair str - The key pair that is used to authenticate the instance.
- status str
- The status of the instance.
- flavor
Id String - The flavor ID of the instance.
- id String
- The instance ID in UUID format.
- instances List<Property Map>
- List of ECS instance details. The instances object structure is documented below.
- name String
- The instance name.
- region String
- availability
Zone String - The availability zone where the instance is located.
- fixed
Ip StringV4 - The fixed IPv4 address of the instance on this network.
- flavor
Name String - The flavor name of the instance.
- image
Id String - The image ID of the instance.
- key
Pair String - The key pair that is used to authenticate the instance.
- status String
- The status of the instance.
Supporting Types
GetComputeInstancesInstance
- Availability
Zone string - Specifies the availability zone where the instance is located.
- Flavor
Id string - Specifies the flavor ID.
- Flavor
Name string - Specifies the flavor name of the instance.
- Floating
Ip string - The EIP address that is associated to the instance.
- Id string
- The instance ID in UUID format.
- Image
Id string - Specifies the image ID of the instance.
- Image
Name string - The image name of the instance.
- Key
Pair string - Specifies the key pair that is used to authenticate the instance.
- Metadata Dictionary<string, string>
- The metadata of the instance in key/value format.
- Name string
- Specifies the server name, which can be queried with a regular expression.
- Networks
List<Get
Compute Instances Instance Network> - An array of one or more networks to attach to the instance. The network object structure is documented below.
- Scheduler
Hints List<GetCompute Instances Instance Scheduler Hint> - The scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented below.
- Security
Groups List<string> - An array of one or more security group names 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.
- Dictionary<string, string>
- The tags of the instance in key/value format.
- User
Data string - The user data (information after encoding) configured during instance creation.
- Volume
Attacheds List<GetCompute Instances Instance Volume Attached> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- Availability
Zone string - Specifies the availability zone where the instance is located.
- Flavor
Id string - Specifies the flavor ID.
- Flavor
Name string - Specifies the flavor name of the instance.
- Floating
Ip string - The EIP address that is associated to the instance.
- Id string
- The instance ID in UUID format.
- Image
Id string - Specifies the image ID of the instance.
- Image
Name string - The image name of the instance.
- Key
Pair string - Specifies the key pair that is used to authenticate the instance.
- Metadata map[string]string
- The metadata of the instance in key/value format.
- Name string
- Specifies the server name, which can be queried with a regular expression.
- Networks
[]Get
Compute Instances Instance Network - An array of one or more networks to attach to the instance. The network object structure is documented below.
- Scheduler
Hints []GetCompute Instances Instance Scheduler Hint - The scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented below.
- Security
Groups []string - An array of one or more security group names 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.
- map[string]string
- The tags of the instance in key/value format.
- User
Data string - The user data (information after encoding) configured during instance creation.
- Volume
Attacheds []GetCompute Instances Instance Volume Attached - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- availability
Zone String - Specifies the availability zone where the instance is located.
- flavor
Id String - Specifies the flavor ID.
- flavor
Name String - Specifies the flavor name of the instance.
- floating
Ip String - The EIP address that is associated to the instance.
- id String
- The instance ID in UUID format.
- image
Id String - Specifies the image ID of the instance.
- image
Name String - The image name of the instance.
- key
Pair String - Specifies the key pair that is used to authenticate the instance.
- metadata Map<String,String>
- The metadata of the instance in key/value format.
- name String
- Specifies the server name, which can be queried with a regular expression.
- networks
List<Get
Compute Instances Instance Network> - An array of one or more networks to attach to the instance. The network object structure is documented below.
- scheduler
Hints List<GetCompute Instances Instance Scheduler Hint> - The scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented below.
- security
Groups List<String> - An array of one or more security group names 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.
- Map<String,String>
- The tags of the instance in key/value format.
- user
Data String - The user data (information after encoding) configured during instance creation.
- volume
Attacheds List<GetCompute Instances Instance Volume Attached> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- availability
Zone string - Specifies the availability zone where the instance is located.
- flavor
Id string - Specifies the flavor ID.
- flavor
Name string - Specifies the flavor name of the instance.
- floating
Ip string - The EIP address that is associated to the instance.
- id string
- The instance ID in UUID format.
- image
Id string - Specifies the image ID of the instance.
- image
Name string - The image name of the instance.
- key
Pair string - Specifies the key pair that is used to authenticate the instance.
- metadata {[key: string]: string}
- The metadata of the instance in key/value format.
- name string
- Specifies the server name, which can be queried with a regular expression.
- networks
Get
Compute Instances Instance Network[] - An array of one or more networks to attach to the instance. The network object structure is documented below.
- scheduler
Hints GetCompute Instances Instance Scheduler Hint[] - The scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented below.
- security
Groups string[] - An array of one or more security group names 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.
- {[key: string]: string}
- The tags of the instance in key/value format.
- user
Data string - The user data (information after encoding) configured during instance creation.
- volume
Attacheds GetCompute Instances Instance Volume Attached[] - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- availability_
zone str - Specifies the availability zone where the instance is located.
- flavor_
id str - Specifies the flavor ID.
- flavor_
name str - Specifies the flavor name of the instance.
- floating_
ip str - The EIP address that is associated to the instance.
- id str
- The instance ID in UUID format.
- image_
id str - Specifies the image ID of the instance.
- image_
name str - The image name of the instance.
- key_
pair str - Specifies the key pair that is used to authenticate the instance.
- metadata Mapping[str, str]
- The metadata of the instance in key/value format.
- name str
- Specifies the server name, which can be queried with a regular expression.
- networks
Sequence[Get
Compute Instances Instance Network] - An array of one or more networks to attach to the instance. The network object structure is documented below.
- scheduler_
hints Sequence[GetCompute Instances Instance Scheduler Hint] - The scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented below.
- security_
groups Sequence[str] - An array of one or more security group names 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.
- Mapping[str, str]
- The tags of the instance in key/value format.
- user_
data str - The user data (information after encoding) configured during instance creation.
- volume_
attacheds Sequence[GetCompute Instances Instance Volume Attached] - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
- availability
Zone String - Specifies the availability zone where the instance is located.
- flavor
Id String - Specifies the flavor ID.
- flavor
Name String - Specifies the flavor name of the instance.
- floating
Ip String - The EIP address that is associated to the instance.
- id String
- The instance ID in UUID format.
- image
Id String - Specifies the image ID of the instance.
- image
Name String - The image name of the instance.
- key
Pair String - Specifies the key pair that is used to authenticate the instance.
- metadata Map<String>
- The metadata of the instance in key/value format.
- name String
- Specifies the server name, which can be queried with a regular expression.
- networks List<Property Map>
- An array of one or more networks to attach to the instance. The network object structure is documented below.
- scheduler
Hints List<Property Map> - The scheduler with hints on how the instance should be launched. The scheduler_hints object structure is documented below.
- security
Groups List<String> - An array of one or more security group names 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.
- Map<String>
- The tags of the instance in key/value format.
- user
Data String - The user data (information after encoding) configured during instance creation.
- volume
Attacheds List<Property Map> - An array of one or more disks to attach to the instance. The volume_attached object structure is documented below.
GetComputeInstancesInstanceNetwork
- Fixed
Ip stringV4 - Specifies the IPv4 addresses of the server.
- Fixed
Ip stringV6 - The Fixed IPv6 address of the instance on that network.
- Mac string
- The MAC address of the NIC on that network.
- Port string
- The port ID corresponding to the IP address on that network.
- Uuid string
- The network UUID to attach to the server.
- Fixed
Ip stringV4 - Specifies the IPv4 addresses of the server.
- Fixed
Ip stringV6 - The Fixed IPv6 address of the instance on that network.
- Mac string
- The MAC address of the NIC on that network.
- Port string
- The port ID corresponding to the IP address on that network.
- Uuid string
- The network UUID to attach to the server.
- fixed
Ip StringV4 - Specifies the IPv4 addresses of the server.
- fixed
Ip StringV6 - The Fixed IPv6 address of the instance on that network.
- mac String
- The MAC address of the NIC on that network.
- port String
- The port ID corresponding to the IP address on that network.
- uuid String
- The network UUID to attach to the server.
- fixed
Ip stringV4 - Specifies the IPv4 addresses of the server.
- fixed
Ip stringV6 - The Fixed IPv6 address of the instance on that network.
- mac string
- The MAC address of the NIC on that network.
- port string
- The port ID corresponding to the IP address on that network.
- uuid string
- The network UUID to attach to the server.
- fixed_
ip_ strv4 - Specifies the IPv4 addresses of the server.
- fixed_
ip_ strv6 - The Fixed IPv6 address of the instance on that network.
- mac str
- The MAC address of the NIC on that network.
- port str
- The port ID corresponding to the IP address on that network.
- uuid str
- The network UUID to attach to the server.
- fixed
Ip StringV4 - Specifies the IPv4 addresses of the server.
- fixed
Ip StringV6 - The Fixed IPv6 address of the instance on that network.
- mac String
- The MAC address of the NIC on that network.
- port String
- The port ID corresponding to the IP address on that network.
- uuid String
- The network UUID to attach to the server.
GetComputeInstancesInstanceSchedulerHint
- Group string
- The UUID of a Server Group where the instance will be placed into.
- Group string
- The UUID of a Server Group where the instance will be placed into.
- group String
- The UUID of a Server Group where the instance will be placed into.
- group string
- The UUID of a Server Group where the instance will be placed into.
- group str
- The UUID of a Server Group where the instance will be placed into.
- group String
- The UUID of a Server Group where the instance will be placed into.
GetComputeInstancesInstanceVolumeAttached
- Is
Sys boolVolume - Whether the volume is the system disk.
- Volume
Id string - The volume id on that attachment.
- Is
Sys boolVolume - Whether the volume is the system disk.
- Volume
Id string - The volume id on that attachment.
- is
Sys BooleanVolume - Whether the volume is the system disk.
- volume
Id String - The volume id on that attachment.
- is
Sys booleanVolume - Whether the volume is the system disk.
- volume
Id string - The volume id on that attachment.
- is_
sys_ boolvolume - Whether the volume is the system disk.
- volume_
id str - The volume id on that attachment.
- is
Sys BooleanVolume - Whether the volume is the system disk.
- volume
Id String - The volume id on that attachment.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengineTerraform Provider.
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud
