flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud
flexibleengine.getComputeInstanceV2
Explore with Pulumi AI
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud
Use this data source to get the details of a specified compute instance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const serverName = config.requireObject("serverName");
const demo = flexibleengine.getComputeInstanceV2({
name: serverName,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
server_name = config.require_object("serverName")
demo = flexibleengine.get_compute_instance_v2(name=server_name)
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, "")
serverName := cfg.RequireObject("serverName")
_, err := flexibleengine.LookupComputeInstanceV2(ctx, &flexibleengine.LookupComputeInstanceV2Args{
Name: pulumi.StringRef(serverName),
}, 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 serverName = config.RequireObject<dynamic>("serverName");
var demo = Flexibleengine.GetComputeInstanceV2.Invoke(new()
{
Name = serverName,
});
});
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.GetComputeInstanceV2Args;
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 serverName = config.get("serverName");
final var demo = FlexibleengineFunctions.getComputeInstanceV2(GetComputeInstanceV2Args.builder()
.name(serverName)
.build());
}
}
configuration:
serverName:
type: dynamic
variables:
demo:
fn::invoke:
function: flexibleengine:getComputeInstanceV2
arguments:
name: ${serverName}
Using getComputeInstanceV2
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 getComputeInstanceV2(args: GetComputeInstanceV2Args, opts?: InvokeOptions): Promise<GetComputeInstanceV2Result>
function getComputeInstanceV2Output(args: GetComputeInstanceV2OutputArgs, opts?: InvokeOptions): Output<GetComputeInstanceV2Result>
def get_compute_instance_v2(fixed_ip_v4: Optional[str] = None,
flavor_id: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetComputeInstanceV2Result
def get_compute_instance_v2_output(fixed_ip_v4: Optional[pulumi.Input[str]] = None,
flavor_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetComputeInstanceV2Result]
func LookupComputeInstanceV2(ctx *Context, args *LookupComputeInstanceV2Args, opts ...InvokeOption) (*LookupComputeInstanceV2Result, error)
func LookupComputeInstanceV2Output(ctx *Context, args *LookupComputeInstanceV2OutputArgs, opts ...InvokeOption) LookupComputeInstanceV2ResultOutput
> Note: This function is named LookupComputeInstanceV2
in the Go SDK.
public static class GetComputeInstanceV2
{
public static Task<GetComputeInstanceV2Result> InvokeAsync(GetComputeInstanceV2Args args, InvokeOptions? opts = null)
public static Output<GetComputeInstanceV2Result> Invoke(GetComputeInstanceV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetComputeInstanceV2Result> getComputeInstanceV2(GetComputeInstanceV2Args args, InvokeOptions options)
public static Output<GetComputeInstanceV2Result> getComputeInstanceV2(GetComputeInstanceV2Args args, InvokeOptions options)
fn::invoke:
function: flexibleengine:index/getComputeInstanceV2:getComputeInstanceV2
arguments:
# arguments dictionary
The following arguments are supported:
- Fixed
Ip stringV4 - Specifies the IPv4 addresses of the server.
- Flavor
Id string - Specifies the flavor ID.
- Id string
- The instance ID in UUID format.
- 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. If omitted, the provider-level region will be used.
- Fixed
Ip stringV4 - Specifies the IPv4 addresses of the server.
- Flavor
Id string - Specifies the flavor ID.
- Id string
- The instance ID in UUID format.
- 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. If omitted, the provider-level region will be used.
- fixed
Ip StringV4 - Specifies the IPv4 addresses of the server.
- flavor
Id String - Specifies the flavor ID.
- id String
- The instance ID in UUID format.
- 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. If omitted, the provider-level region will be used.
- fixed
Ip stringV4 - Specifies the IPv4 addresses of the server.
- flavor
Id string - Specifies the flavor ID.
- id string
- The instance ID in UUID format.
- 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. If omitted, the provider-level region will be used.
- fixed_
ip_ strv4 - Specifies the IPv4 addresses of the server.
- flavor_
id str - Specifies the flavor ID.
- id str
- The instance ID in UUID format.
- 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. If omitted, the provider-level region will be used.
- fixed
Ip StringV4 - Specifies the IPv4 addresses of the server.
- flavor
Id String - Specifies the flavor ID.
- id String
- The instance ID in UUID format.
- 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. If omitted, the provider-level region will be used.
getComputeInstanceV2 Result
The following output properties are available:
- Availability
Zone string - The availability zone where the instance is located.
- Block
Devices List<GetCompute Instance V2Block Device> - An array of one or more disks to attach to the instance. The block_device object structure is documented below.
- Flavor
Id string - Flavor
Name string - 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 - The image ID of the instance.
- Image
Name string - The image name of the instance.
- Key
Pair string - 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
- Networks
List<Get
Compute Instance V2Network> - An array of one or more networks to attach to the instance. The network object structure is documented below.
- Region string
- Scheduler
Hints List<GetCompute Instance V2Scheduler 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
- The status of the instance.
- System
Disk stringId - The system disk volume ID.
- 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.
- Fixed
Ip stringV4 - The fixed IPv4 address of the instance on this network.
- Availability
Zone string - The availability zone where the instance is located.
- Block
Devices []GetCompute Instance V2Block Device - An array of one or more disks to attach to the instance. The block_device object structure is documented below.
- Flavor
Id string - Flavor
Name string - 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 - The image ID of the instance.
- Image
Name string - The image name of the instance.
- Key
Pair string - 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
- Networks
[]Get
Compute Instance V2Network - An array of one or more networks to attach to the instance. The network object structure is documented below.
- Region string
- Scheduler
Hints []GetCompute Instance V2Scheduler 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
- The status of the instance.
- System
Disk stringId - The system disk volume ID.
- 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.
- Fixed
Ip stringV4 - The fixed IPv4 address of the instance on this network.
- availability
Zone String - The availability zone where the instance is located.
- block
Devices List<GetCompute Instance V2Block Device> - An array of one or more disks to attach to the instance. The block_device object structure is documented below.
- flavor
Id String - flavor
Name String - 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 - The image ID of the instance.
- image
Name String - The image name of the instance.
- key
Pair String - 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
- networks
List<Get
Compute Instance V2Network> - An array of one or more networks to attach to the instance. The network object structure is documented below.
- region String
- scheduler
Hints List<GetCompute Instance V2Scheduler 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
- The status of the instance.
- system
Disk StringId - The system disk volume ID.
- 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.
- fixed
Ip StringV4 - The fixed IPv4 address of the instance on this network.
- availability
Zone string - The availability zone where the instance is located.
- block
Devices GetCompute Instance V2Block Device[] - An array of one or more disks to attach to the instance. The block_device object structure is documented below.
- flavor
Id string - flavor
Name string - 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 - The image ID of the instance.
- image
Name string - The image name of the instance.
- key
Pair string - 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
- networks
Get
Compute Instance V2Network[] - An array of one or more networks to attach to the instance. The network object structure is documented below.
- region string
- scheduler
Hints GetCompute Instance V2Scheduler 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
- The status of the instance.
- system
Disk stringId - The system disk volume ID.
- {[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.
- fixed
Ip stringV4 - The fixed IPv4 address of the instance on this network.
- availability_
zone str - The availability zone where the instance is located.
- block_
devices Sequence[GetCompute Instance V2Block Device] - An array of one or more disks to attach to the instance. The block_device object structure is documented below.
- flavor_
id str - flavor_
name str - 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 - The image ID of the instance.
- image_
name str - The image name of the instance.
- key_
pair str - 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
- networks
Sequence[Get
Compute Instance V2Network] - An array of one or more networks to attach to the instance. The network object structure is documented below.
- region str
- scheduler_
hints Sequence[GetCompute Instance V2Scheduler 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
- The status of the instance.
- system_
disk_ strid - The system disk volume ID.
- 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.
- fixed_
ip_ strv4 - The fixed IPv4 address of the instance on this network.
- availability
Zone String - The availability zone where the instance is located.
- block
Devices List<Property Map> - An array of one or more disks to attach to the instance. The block_device object structure is documented below.
- flavor
Id String - flavor
Name String - 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 - The image ID of the instance.
- image
Name String - The image name of the instance.
- key
Pair String - The key pair that is used to authenticate the instance.
- metadata Map<String>
- The metadata of the instance in key/value format.
- name String
- networks List<Property Map>
- An array of one or more networks to attach to the instance. The network object structure is documented below.
- region String
- 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
- The status of the instance.
- system
Disk StringId - The system disk volume ID.
- Map<String>
- The tags of the instance in key/value format.
- user
Data String - The user data (information after encoding) configured during instance creation.
- fixed
Ip StringV4 - The fixed IPv4 address of the instance on this network.
Supporting Types
GetComputeInstanceV2BlockDevice
- Boot
Index double - The volume boot index on that attachment.
- Pci
Address string - The volume pci address on that attachment.
- Size double
- The volume size on that attachment.
- Type string
- The volume type on that attachment.
- Uuid string
- The volume id on that attachment.
- Boot
Index float64 - The volume boot index on that attachment.
- Pci
Address string - The volume pci address on that attachment.
- Size float64
- The volume size on that attachment.
- Type string
- The volume type on that attachment.
- Uuid string
- The volume id on that attachment.
- boot
Index Double - The volume boot index on that attachment.
- pci
Address String - The volume pci address on that attachment.
- size Double
- The volume size on that attachment.
- type String
- The volume type on that attachment.
- uuid String
- The volume id on that attachment.
- boot
Index number - The volume boot index on that attachment.
- pci
Address string - The volume pci address on that attachment.
- size number
- The volume size on that attachment.
- type string
- The volume type on that attachment.
- uuid string
- The volume id on that attachment.
- boot_
index float - The volume boot index on that attachment.
- pci_
address str - The volume pci address on that attachment.
- size float
- The volume size on that attachment.
- type str
- The volume type on that attachment.
- uuid str
- The volume id on that attachment.
- boot
Index Number - The volume boot index on that attachment.
- pci
Address String - The volume pci address on that attachment.
- size Number
- The volume size on that attachment.
- type String
- The volume type on that attachment.
- uuid String
- The volume id on that attachment.
GetComputeInstanceV2Network
- 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 volume id on that attachment.
GetComputeInstanceV2SchedulerHint
- 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.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud