OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi
openstack.compute.getInstanceV2
Explore with Pulumi AI
Use this data source to get the details of a running server
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const instance = openstack.compute.getInstanceV2({
id: "2ba26dc6-a12d-4889-8f25-794ea5bf4453",
});
import pulumi
import pulumi_openstack as openstack
instance = openstack.compute.get_instance_v2(id="2ba26dc6-a12d-4889-8f25-794ea5bf4453")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.GetInstanceV2(ctx, &compute.GetInstanceV2Args{
Id: "2ba26dc6-a12d-4889-8f25-794ea5bf4453",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var instance = OpenStack.Compute.GetInstanceV2.Invoke(new()
{
Id = "2ba26dc6-a12d-4889-8f25-794ea5bf4453",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.compute.ComputeFunctions;
import com.pulumi.openstack.compute.inputs.GetInstanceV2Args;
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 instance = ComputeFunctions.getInstanceV2(GetInstanceV2Args.builder()
.id("2ba26dc6-a12d-4889-8f25-794ea5bf4453")
.build());
}
}
variables:
instance:
fn::invoke:
Function: openstack:compute:getInstanceV2
Arguments:
id: 2ba26dc6-a12d-4889-8f25-794ea5bf4453
Using getInstanceV2
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 getInstanceV2(args: GetInstanceV2Args, opts?: InvokeOptions): Promise<GetInstanceV2Result>
function getInstanceV2Output(args: GetInstanceV2OutputArgs, opts?: InvokeOptions): Output<GetInstanceV2Result>
def get_instance_v2(id: Optional[str] = None,
networks: Optional[Sequence[GetInstanceV2Network]] = None,
region: Optional[str] = None,
user_data: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceV2Result
def get_instance_v2_output(id: Optional[pulumi.Input[str]] = None,
networks: Optional[pulumi.Input[Sequence[pulumi.Input[GetInstanceV2NetworkArgs]]]] = None,
region: Optional[pulumi.Input[str]] = None,
user_data: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceV2Result]
func GetInstanceV2(ctx *Context, args *GetInstanceV2Args, opts ...InvokeOption) (*GetInstanceV2Result, error)
func GetInstanceV2Output(ctx *Context, args *GetInstanceV2OutputArgs, opts ...InvokeOption) GetInstanceV2ResultOutput
> Note: This function is named GetInstanceV2
in the Go SDK.
public static class GetInstanceV2
{
public static Task<GetInstanceV2Result> InvokeAsync(GetInstanceV2Args args, InvokeOptions? opts = null)
public static Output<GetInstanceV2Result> Invoke(GetInstanceV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceV2Result> getInstanceV2(GetInstanceV2Args args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: openstack:compute/getInstanceV2:getInstanceV2
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The UUID of the instance
- Networks
List<Pulumi.
Open Stack. Compute. Inputs. Get Instance V2Network> - An array of maps, detailed below.
- Region string
- User
Data string - The user data added when the server was created.
- Id string
- The UUID of the instance
- Networks
[]Get
Instance V2Network - An array of maps, detailed below.
- Region string
- User
Data string - The user data added when the server was created.
- id String
- The UUID of the instance
- networks
List<Get
Instance V2Network> - An array of maps, detailed below.
- region String
- user
Data String - The user data added when the server was created.
- id string
- The UUID of the instance
- networks
Get
Instance V2Network[] - An array of maps, detailed below.
- region string
- user
Data string - The user data added when the server was created.
- id str
- The UUID of the instance
- networks
Sequence[Get
Instance V2Network] - An array of maps, detailed below.
- region str
- user_
data str - The user data added when the server was created.
- id String
- The UUID of the instance
- networks List<Property Map>
- An array of maps, detailed below.
- region String
- user
Data String - The user data added when the server was created.
getInstanceV2 Result
The following output properties are available:
- Access
Ip stringV4 - The first IPv4 address assigned to this server.
- Access
Ip stringV6 - The first IPv6 address assigned to this server.
- Availability
Zone string - The availability zone of this server.
- Created string
- The creation time of the instance.
- Flavor
Id string - The flavor ID used to create the server.
- Flavor
Name string - The flavor name used to create the server.
- Id string
- Image
Id string - The image ID used to create the server.
- Image
Name string - The image name used to create the server.
- Key
Pair string - The name of the key pair assigned to this server.
- Metadata Dictionary<string, string>
- A set of key/value pairs made available to the server.
- Name string
- The name of the network
- Networks
List<Pulumi.
Open Stack. Compute. Outputs. Get Instance V2Network> - An array of maps, detailed below.
- Power
State string - Region string
- Security
Groups List<string> - An array of security group names associated with this server.
- List<string>
- A set of string tags assigned to this server.
- Updated string
- The time when the instance was last updated.
- User
Data string - The user data added when the server was created.
- Access
Ip stringV4 - The first IPv4 address assigned to this server.
- Access
Ip stringV6 - The first IPv6 address assigned to this server.
- Availability
Zone string - The availability zone of this server.
- Created string
- The creation time of the instance.
- Flavor
Id string - The flavor ID used to create the server.
- Flavor
Name string - The flavor name used to create the server.
- Id string
- Image
Id string - The image ID used to create the server.
- Image
Name string - The image name used to create the server.
- Key
Pair string - The name of the key pair assigned to this server.
- Metadata map[string]string
- A set of key/value pairs made available to the server.
- Name string
- The name of the network
- Networks
[]Get
Instance V2Network - An array of maps, detailed below.
- Power
State string - Region string
- Security
Groups []string - An array of security group names associated with this server.
- []string
- A set of string tags assigned to this server.
- Updated string
- The time when the instance was last updated.
- User
Data string - The user data added when the server was created.
- access
Ip StringV4 - The first IPv4 address assigned to this server.
- access
Ip StringV6 - The first IPv6 address assigned to this server.
- availability
Zone String - The availability zone of this server.
- created String
- The creation time of the instance.
- flavor
Id String - The flavor ID used to create the server.
- flavor
Name String - The flavor name used to create the server.
- id String
- image
Id String - The image ID used to create the server.
- image
Name String - The image name used to create the server.
- key
Pair String - The name of the key pair assigned to this server.
- metadata Map<String,String>
- A set of key/value pairs made available to the server.
- name String
- The name of the network
- networks
List<Get
Instance V2Network> - An array of maps, detailed below.
- power
State String - region String
- security
Groups List<String> - An array of security group names associated with this server.
- List<String>
- A set of string tags assigned to this server.
- updated String
- The time when the instance was last updated.
- user
Data String - The user data added when the server was created.
- access
Ip stringV4 - The first IPv4 address assigned to this server.
- access
Ip stringV6 - The first IPv6 address assigned to this server.
- availability
Zone string - The availability zone of this server.
- created string
- The creation time of the instance.
- flavor
Id string - The flavor ID used to create the server.
- flavor
Name string - The flavor name used to create the server.
- id string
- image
Id string - The image ID used to create the server.
- image
Name string - The image name used to create the server.
- key
Pair string - The name of the key pair assigned to this server.
- metadata {[key: string]: string}
- A set of key/value pairs made available to the server.
- name string
- The name of the network
- networks
Get
Instance V2Network[] - An array of maps, detailed below.
- power
State string - region string
- security
Groups string[] - An array of security group names associated with this server.
- string[]
- A set of string tags assigned to this server.
- updated string
- The time when the instance was last updated.
- user
Data string - The user data added when the server was created.
- access_
ip_ strv4 - The first IPv4 address assigned to this server.
- access_
ip_ strv6 - The first IPv6 address assigned to this server.
- availability_
zone str - The availability zone of this server.
- created str
- The creation time of the instance.
- flavor_
id str - The flavor ID used to create the server.
- flavor_
name str - The flavor name used to create the server.
- id str
- image_
id str - The image ID used to create the server.
- image_
name str - The image name used to create the server.
- key_
pair str - The name of the key pair assigned to this server.
- metadata Mapping[str, str]
- A set of key/value pairs made available to the server.
- name str
- The name of the network
- networks
Sequence[Get
Instance V2Network] - An array of maps, detailed below.
- power_
state str - region str
- security_
groups Sequence[str] - An array of security group names associated with this server.
- Sequence[str]
- A set of string tags assigned to this server.
- updated str
- The time when the instance was last updated.
- user_
data str - The user data added when the server was created.
- access
Ip StringV4 - The first IPv4 address assigned to this server.
- access
Ip StringV6 - The first IPv6 address assigned to this server.
- availability
Zone String - The availability zone of this server.
- created String
- The creation time of the instance.
- flavor
Id String - The flavor ID used to create the server.
- flavor
Name String - The flavor name used to create the server.
- id String
- image
Id String - The image ID used to create the server.
- image
Name String - The image name used to create the server.
- key
Pair String - The name of the key pair assigned to this server.
- metadata Map<String>
- A set of key/value pairs made available to the server.
- name String
- The name of the network
- networks List<Property Map>
- An array of maps, detailed below.
- power
State String - region String
- security
Groups List<String> - An array of security group names associated with this server.
- List<String>
- A set of string tags assigned to this server.
- updated String
- The time when the instance was last updated.
- user
Data String - The user data added when the server was created.
Supporting Types
GetInstanceV2Network
- fixed_
ip_ strv4 - The IPv4 address assigned to this network port.
- fixed_
ip_ strv6 - The IPv6 address assigned to this network port.
- mac str
- The MAC address assigned to this network interface.
- name str
- The name of the network
- port str
- The port UUID for this network
- uuid str
- The UUID of the network
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.