GetDedicatedHost

Use this data source to access information about an existing Dedicated Host.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Compute.GetDedicatedHost.InvokeAsync(new Azure.Compute.GetDedicatedHostArgs
        {
            Name = "example-host",
            DedicatedHostGroupName = "example-host-group",
            ResourceGroupName = "example-resources",
        }));
        this.DedicatedHostId = example.Apply(example => example.Id);
    }

    [Output("dedicatedHostId")]
    public Output<string> DedicatedHostId { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/compute"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := compute.LookupDedicatedHost(ctx, &compute.LookupDedicatedHostArgs{
            Name:                   "example-host",
            DedicatedHostGroupName: "example-host-group",
            ResourceGroupName:      "example-resources",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("dedicatedHostId", example.Id)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.compute.get_dedicated_host(name="example-host",
    dedicated_host_group_name="example-host-group",
    resource_group_name="example-resources")
pulumi.export("dedicatedHostId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.compute.getDedicatedHost({
    name: "example-host",
    dedicatedHostGroupName: "example-host-group",
    resourceGroupName: "example-resources",
});
export const dedicatedHostId = example.then(example => example.id);

Using GetDedicatedHost

function getDedicatedHost(args: GetDedicatedHostArgs, opts?: InvokeOptions): Promise<GetDedicatedHostResult>
function  get_dedicated_host(dedicated_host_group_name=None, name=None, resource_group_name=None, opts=None)
func LookupDedicatedHost(ctx *Context, args *LookupDedicatedHostArgs, opts ...InvokeOption) (*LookupDedicatedHostResult, error)

Note: This function is named LookupDedicatedHost in the Go SDK.

public static class GetDedicatedHost {
    public static Task<GetDedicatedHostResult> InvokeAsync(GetDedicatedHostArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DedicatedHostGroupName string

Specifies the name of the Dedicated Host Group the Dedicated Host is located in.

Name string

Specifies the name of the Dedicated Host.

ResourceGroupName string

Specifies the name of the resource group the Dedicated Host is located in.

DedicatedHostGroupName string

Specifies the name of the Dedicated Host Group the Dedicated Host is located in.

Name string

Specifies the name of the Dedicated Host.

ResourceGroupName string

Specifies the name of the resource group the Dedicated Host is located in.

dedicatedHostGroupName string

Specifies the name of the Dedicated Host Group the Dedicated Host is located in.

name string

Specifies the name of the Dedicated Host.

resourceGroupName string

Specifies the name of the resource group the Dedicated Host is located in.

dedicated_host_group_name str

Specifies the name of the Dedicated Host Group the Dedicated Host is located in.

name str

Specifies the name of the Dedicated Host.

resource_group_name str

Specifies the name of the resource group the Dedicated Host is located in.

GetDedicatedHost Result

The following output properties are available:

DedicatedHostGroupName string
Id string

The provider-assigned unique ID for this managed resource.

Location string

The location where the Dedicated Host exists.

Name string
ResourceGroupName string
Tags Dictionary<string, string>

A mapping of tags assigned to the Dedicated Host.

DedicatedHostGroupName string
Id string

The provider-assigned unique ID for this managed resource.

Location string

The location where the Dedicated Host exists.

Name string
ResourceGroupName string
Tags map[string]string

A mapping of tags assigned to the Dedicated Host.

dedicatedHostGroupName string
id string

The provider-assigned unique ID for this managed resource.

location string

The location where the Dedicated Host exists.

name string
resourceGroupName string
tags {[key: string]: string}

A mapping of tags assigned to the Dedicated Host.

dedicated_host_group_name str
id str

The provider-assigned unique ID for this managed resource.

location str

The location where the Dedicated Host exists.

name str
resource_group_name str
tags Dict[str, str]

A mapping of tags assigned to the Dedicated Host.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.