1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getComputeInstanceV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.getComputeInstanceV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for ECS instance you can get at documentation portal

    Get information on an ECS instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const instance = opentelekomcloud.getComputeInstanceV2({
        id: "2ba26dc6-a12d-4889-8f25-794ea5bf4453",
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    instance = opentelekomcloud.get_compute_instance_v2(id="2ba26dc6-a12d-4889-8f25-794ea5bf4453")
    
    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.LookupComputeInstanceV2(ctx, &opentelekomcloud.LookupComputeInstanceV2Args{
    			Id: pulumi.StringRef("2ba26dc6-a12d-4889-8f25-794ea5bf4453"),
    		}, 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 instance = Opentelekomcloud.GetComputeInstanceV2.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.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.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 instance = OpentelekomcloudFunctions.getComputeInstanceV2(GetComputeInstanceV2Args.builder()
                .id("2ba26dc6-a12d-4889-8f25-794ea5bf4453")
                .build());
    
        }
    }
    
    variables:
      instance:
        fn::invoke:
          function: opentelekomcloud:getComputeInstanceV2
          arguments:
            id: 2ba26dc6-a12d-4889-8f25-794ea5bf4453
    

    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(id: Optional[str] = None,
                                name: Optional[str] = None,
                                networks: Optional[Sequence[GetComputeInstanceV2Network]] = None,
                                region: Optional[str] = None,
                                ssh_private_key_path: Optional[str] = None,
                                tags: Optional[Mapping[str, str]] = None,
                                user_data: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetComputeInstanceV2Result
    def get_compute_instance_v2_output(id: Optional[pulumi.Input[str]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                networks: Optional[pulumi.Input[Sequence[pulumi.Input[GetComputeInstanceV2NetworkArgs]]]] = None,
                                region: Optional[pulumi.Input[str]] = None,
                                ssh_private_key_path: Optional[pulumi.Input[str]] = None,
                                tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                user_data: 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: opentelekomcloud:index/getComputeInstanceV2:getComputeInstanceV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The UUID of the instance
    Name string
    The name of the network
    Networks List<GetComputeInstanceV2Network>
    An array of maps, detailed below.
    Region string
    SshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    Tags Dictionary<string, string>
    A set of string tags assigned to this server.
    UserData string
    The user data added when the server was created.
    Id string
    The UUID of the instance
    Name string
    The name of the network
    Networks []GetComputeInstanceV2Network
    An array of maps, detailed below.
    Region string
    SshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    Tags map[string]string
    A set of string tags assigned to this server.
    UserData string
    The user data added when the server was created.
    id String
    The UUID of the instance
    name String
    The name of the network
    networks List<GetComputeInstanceV2Network>
    An array of maps, detailed below.
    region String
    sshPrivateKeyPath String
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    tags Map<String,String>
    A set of string tags assigned to this server.
    userData String
    The user data added when the server was created.
    id string
    The UUID of the instance
    name string
    The name of the network
    networks GetComputeInstanceV2Network[]
    An array of maps, detailed below.
    region string
    sshPrivateKeyPath string
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    tags {[key: string]: string}
    A set of string tags assigned to this server.
    userData string
    The user data added when the server was created.
    id str
    The UUID of the instance
    name str
    The name of the network
    networks Sequence[GetComputeInstanceV2Network]
    An array of maps, detailed below.
    region str
    ssh_private_key_path str
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    tags Mapping[str, str]
    A set of string tags assigned to this server.
    user_data str
    The user data added when the server was created.
    id String
    The UUID of the instance
    name String
    The name of the network
    networks List<Property Map>
    An array of maps, detailed below.
    region String
    sshPrivateKeyPath String
    The path to the private key to use for SSH access. Required only if you want to get the password from the windows instance.
    tags Map<String>
    A set of string tags assigned to this server.
    userData String
    The user data added when the server was created.

    getComputeInstanceV2 Result

    The following output properties are available:

    AccessIpV4 string
    The first IPv4 address assigned to this server.
    AccessIpV6 string
    The first IPv6 address assigned to this server.
    AdminPass string
    AvailabilityZone string
    The availability zone of this server.
    Description string
    Server description.
    EncryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    FlavorId string
    The flavor ID used to create the server.
    FlavorName string
    The flavor name used to create the server.
    Id string
    ImageId string
    The image ID used to create the server.
    ImageName string
    The image name used to create the server.
    KeyPair 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
    Password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    PowerState string
    Region string
    SecurityGroups List<string>
    An array of security group names associated with this server.
    UserData string
    The user data added when the server was created.
    Networks List<GetComputeInstanceV2Network>
    An array of maps, detailed below.
    SshPrivateKeyPath string
    Tags Dictionary<string, string>
    A set of string tags assigned to this server.
    AccessIpV4 string
    The first IPv4 address assigned to this server.
    AccessIpV6 string
    The first IPv6 address assigned to this server.
    AdminPass string
    AvailabilityZone string
    The availability zone of this server.
    Description string
    Server description.
    EncryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    FlavorId string
    The flavor ID used to create the server.
    FlavorName string
    The flavor name used to create the server.
    Id string
    ImageId string
    The image ID used to create the server.
    ImageName string
    The image name used to create the server.
    KeyPair 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
    Password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    PowerState string
    Region string
    SecurityGroups []string
    An array of security group names associated with this server.
    UserData string
    The user data added when the server was created.
    Networks []GetComputeInstanceV2Network
    An array of maps, detailed below.
    SshPrivateKeyPath string
    Tags map[string]string
    A set of string tags assigned to this server.
    accessIpV4 String
    The first IPv4 address assigned to this server.
    accessIpV6 String
    The first IPv6 address assigned to this server.
    adminPass String
    availabilityZone String
    The availability zone of this server.
    description String
    Server description.
    encryptedPassword String
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    flavorId String
    The flavor ID used to create the server.
    flavorName String
    The flavor name used to create the server.
    id String
    imageId String
    The image ID used to create the server.
    imageName String
    The image name used to create the server.
    keyPair 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
    password String
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    powerState String
    region String
    securityGroups List<String>
    An array of security group names associated with this server.
    userData String
    The user data added when the server was created.
    networks List<GetComputeInstanceV2Network>
    An array of maps, detailed below.
    sshPrivateKeyPath String
    tags Map<String,String>
    A set of string tags assigned to this server.
    accessIpV4 string
    The first IPv4 address assigned to this server.
    accessIpV6 string
    The first IPv6 address assigned to this server.
    adminPass string
    availabilityZone string
    The availability zone of this server.
    description string
    Server description.
    encryptedPassword string
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    flavorId string
    The flavor ID used to create the server.
    flavorName string
    The flavor name used to create the server.
    id string
    imageId string
    The image ID used to create the server.
    imageName string
    The image name used to create the server.
    keyPair 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
    password string
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    powerState string
    region string
    securityGroups string[]
    An array of security group names associated with this server.
    userData string
    The user data added when the server was created.
    networks GetComputeInstanceV2Network[]
    An array of maps, detailed below.
    sshPrivateKeyPath string
    tags {[key: string]: string}
    A set of string tags assigned to this server.
    access_ip_v4 str
    The first IPv4 address assigned to this server.
    access_ip_v6 str
    The first IPv6 address assigned to this server.
    admin_pass str
    availability_zone str
    The availability zone of this server.
    description str
    Server description.
    encrypted_password str
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    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
    password str
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    power_state str
    region str
    security_groups Sequence[str]
    An array of security group names associated with this server.
    user_data str
    The user data added when the server was created.
    networks Sequence[GetComputeInstanceV2Network]
    An array of maps, detailed below.
    ssh_private_key_path str
    tags Mapping[str, str]
    A set of string tags assigned to this server.
    accessIpV4 String
    The first IPv4 address assigned to this server.
    accessIpV6 String
    The first IPv6 address assigned to this server.
    adminPass String
    availabilityZone String
    The availability zone of this server.
    description String
    Server description.
    encryptedPassword String
    The encrypted password of the server. This is only available if the server is a Windows server. If privateKey == nil the encrypted password is returned and can be decrypted with: echo '' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
    flavorId String
    The flavor ID used to create the server.
    flavorName String
    The flavor name used to create the server.
    id String
    imageId String
    The image ID used to create the server.
    imageName String
    The image name used to create the server.
    keyPair 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
    password String
    The password of the server. This is only available if the server is a Windows server. If privateKey != nil the password is decrypted with the private key.
    powerState String
    region String
    securityGroups List<String>
    An array of security group names associated with this server.
    userData String
    The user data added when the server was created.
    networks List<Property Map>
    An array of maps, detailed below.
    sshPrivateKeyPath String
    tags Map<String>
    A set of string tags assigned to this server.

    Supporting Types

    GetComputeInstanceV2Network

    FixedIpV4 string
    The IPv4 address assigned to this network port.
    FixedIpV6 string
    The IPv6 address assigned to this network port.
    Mac string
    The MAC address assigned to this network interface.
    Name string
    The name of the network
    Port string
    The port UUID for this network
    Uuid string
    The UUID of the network
    FixedIpV4 string
    The IPv4 address assigned to this network port.
    FixedIpV6 string
    The IPv6 address assigned to this network port.
    Mac string
    The MAC address assigned to this network interface.
    Name string
    The name of the network
    Port string
    The port UUID for this network
    Uuid string
    The UUID of the network
    fixedIpV4 String
    The IPv4 address assigned to this network port.
    fixedIpV6 String
    The IPv6 address assigned to this network port.
    mac String
    The MAC address assigned to this network interface.
    name String
    The name of the network
    port String
    The port UUID for this network
    uuid String
    The UUID of the network
    fixedIpV4 string
    The IPv4 address assigned to this network port.
    fixedIpV6 string
    The IPv6 address assigned to this network port.
    mac string
    The MAC address assigned to this network interface.
    name string
    The name of the network
    port string
    The port UUID for this network
    uuid string
    The UUID of the network
    fixed_ip_v4 str
    The IPv4 address assigned to this network port.
    fixed_ip_v6 str
    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
    fixedIpV4 String
    The IPv4 address assigned to this network port.
    fixedIpV6 String
    The IPv6 address assigned to this network port.
    mac String
    The MAC address assigned to this network interface.
    name String
    The name of the network
    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 logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud