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

opentelekomcloud.getDehServerV1

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 DEH ECSs you can get at documentation portal

    Use this data source to get details about the server on a specified Dedicated Host.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const dehId = config.requireObject("dehId");
    const serverId = config.requireObject("serverId");
    const dehServer = opentelekomcloud.getDehServerV1({
        id: dehId,
        serverId: serverId,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    deh_id = config.require_object("dehId")
    server_id = config.require_object("serverId")
    deh_server = opentelekomcloud.get_deh_server_v1(id=deh_id,
        server_id=server_id)
    
    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, "")
    		dehId := cfg.RequireObject("dehId")
    		serverId := cfg.RequireObject("serverId")
    		_, err := opentelekomcloud.GetDehServerV1(ctx, &opentelekomcloud.GetDehServerV1Args{
    			Id:       pulumi.StringRef(dehId),
    			ServerId: pulumi.StringRef(serverId),
    		}, 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 dehId = config.RequireObject<dynamic>("dehId");
        var serverId = config.RequireObject<dynamic>("serverId");
        var dehServer = Opentelekomcloud.GetDehServerV1.Invoke(new()
        {
            Id = dehId,
            ServerId = serverId,
        });
    
    });
    
    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.GetDehServerV1Args;
    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 dehId = config.get("dehId");
            final var serverId = config.get("serverId");
            final var dehServer = OpentelekomcloudFunctions.getDehServerV1(GetDehServerV1Args.builder()
                .id(dehId)
                .serverId(serverId)
                .build());
    
        }
    }
    
    configuration:
      dehId:
        type: dynamic
      serverId:
        type: dynamic
    variables:
      dehServer:
        fn::invoke:
          function: opentelekomcloud:getDehServerV1
          arguments:
            id: ${dehId}
            serverId: ${serverId}
    

    Using getDehServerV1

    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 getDehServerV1(args: GetDehServerV1Args, opts?: InvokeOptions): Promise<GetDehServerV1Result>
    function getDehServerV1Output(args: GetDehServerV1OutputArgs, opts?: InvokeOptions): Output<GetDehServerV1Result>
    def get_deh_server_v1(addresses: Optional[Sequence[GetDehServerV1Address]] = None,
                          dedicated_host_id: Optional[str] = None,
                          id: Optional[str] = None,
                          region: Optional[str] = None,
                          server_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDehServerV1Result
    def get_deh_server_v1_output(addresses: Optional[pulumi.Input[Sequence[pulumi.Input[GetDehServerV1AddressArgs]]]] = None,
                          dedicated_host_id: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          region: Optional[pulumi.Input[str]] = None,
                          server_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetDehServerV1Result]
    func GetDehServerV1(ctx *Context, args *GetDehServerV1Args, opts ...InvokeOption) (*GetDehServerV1Result, error)
    func GetDehServerV1Output(ctx *Context, args *GetDehServerV1OutputArgs, opts ...InvokeOption) GetDehServerV1ResultOutput

    > Note: This function is named GetDehServerV1 in the Go SDK.

    public static class GetDehServerV1 
    {
        public static Task<GetDehServerV1Result> InvokeAsync(GetDehServerV1Args args, InvokeOptions? opts = null)
        public static Output<GetDehServerV1Result> Invoke(GetDehServerV1InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDehServerV1Result> getDehServerV1(GetDehServerV1Args args, InvokeOptions options)
    public static Output<GetDehServerV1Result> getDehServerV1(GetDehServerV1Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getDehServerV1:getDehServerV1
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Addresses List<GetDehServerV1Address>
    The network addresses of the server.
    DedicatedHostId string
    The Dedicated Host ID.
    Id string
    Region string
    ServerId string
    The Server ID.
    Addresses []GetDehServerV1Address
    The network addresses of the server.
    DedicatedHostId string
    The Dedicated Host ID.
    Id string
    Region string
    ServerId string
    The Server ID.
    addresses List<GetDehServerV1Address>
    The network addresses of the server.
    dedicatedHostId String
    The Dedicated Host ID.
    id String
    region String
    serverId String
    The Server ID.
    addresses GetDehServerV1Address[]
    The network addresses of the server.
    dedicatedHostId string
    The Dedicated Host ID.
    id string
    region string
    serverId string
    The Server ID.
    addresses Sequence[GetDehServerV1Address]
    The network addresses of the server.
    dedicated_host_id str
    The Dedicated Host ID.
    id str
    region str
    server_id str
    The Server ID.
    addresses List<Property Map>
    The network addresses of the server.
    dedicatedHostId String
    The Dedicated Host ID.
    id String
    region String
    serverId String
    The Server ID.

    getDehServerV1 Result

    The following output properties are available:

    Flavor Dictionary<string, string>
    The ID of server specifications.
    Id string
    Metadata Dictionary<string, string>
    The metadata of the server.
    Name string
    The server name.
    Region string
    Status string
    The status of the server.
    TenantId string
    The ID of the tenant to which the server belongs.
    UserId string
    The ID of the user to which the server belongs.
    Addresses List<GetDehServerV1Address>
    The network addresses of the server.
    DedicatedHostId string
    ServerId string
    Flavor map[string]string
    The ID of server specifications.
    Id string
    Metadata map[string]string
    The metadata of the server.
    Name string
    The server name.
    Region string
    Status string
    The status of the server.
    TenantId string
    The ID of the tenant to which the server belongs.
    UserId string
    The ID of the user to which the server belongs.
    Addresses []GetDehServerV1Address
    The network addresses of the server.
    DedicatedHostId string
    ServerId string
    flavor Map<String,String>
    The ID of server specifications.
    id String
    metadata Map<String,String>
    The metadata of the server.
    name String
    The server name.
    region String
    status String
    The status of the server.
    tenantId String
    The ID of the tenant to which the server belongs.
    userId String
    The ID of the user to which the server belongs.
    addresses List<GetDehServerV1Address>
    The network addresses of the server.
    dedicatedHostId String
    serverId String
    flavor {[key: string]: string}
    The ID of server specifications.
    id string
    metadata {[key: string]: string}
    The metadata of the server.
    name string
    The server name.
    region string
    status string
    The status of the server.
    tenantId string
    The ID of the tenant to which the server belongs.
    userId string
    The ID of the user to which the server belongs.
    addresses GetDehServerV1Address[]
    The network addresses of the server.
    dedicatedHostId string
    serverId string
    flavor Mapping[str, str]
    The ID of server specifications.
    id str
    metadata Mapping[str, str]
    The metadata of the server.
    name str
    The server name.
    region str
    status str
    The status of the server.
    tenant_id str
    The ID of the tenant to which the server belongs.
    user_id str
    The ID of the user to which the server belongs.
    addresses Sequence[GetDehServerV1Address]
    The network addresses of the server.
    dedicated_host_id str
    server_id str
    flavor Map<String>
    The ID of server specifications.
    id String
    metadata Map<String>
    The metadata of the server.
    name String
    The server name.
    region String
    status String
    The status of the server.
    tenantId String
    The ID of the tenant to which the server belongs.
    userId String
    The ID of the user to which the server belongs.
    addresses List<Property Map>
    The network addresses of the server.
    dedicatedHostId String
    serverId String

    Supporting Types

    GetDehServerV1Address

    FixedIpV4 string
    Name string
    The server name.
    FixedIpV4 string
    Name string
    The server name.
    fixedIpV4 String
    name String
    The server name.
    fixedIpV4 string
    name string
    The server name.
    fixed_ip_v4 str
    name str
    The server name.
    fixedIpV4 String
    name String
    The server name.

    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