GetAvailabilitySet

Use this data source to access information about an existing Availability Set.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Compute.GetAvailabilitySet.InvokeAsync(new Azure.Compute.GetAvailabilitySetArgs
        {
            Name = "tf-appsecuritygroup",
            ResourceGroupName = "my-resource-group",
        }));
        this.AvailabilitySetId = example.Apply(example => example.Id);
    }

    [Output("availabilitySetId")]
    public Output<string> AvailabilitySetId { 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.LookupAvailabilitySet(ctx, &compute.LookupAvailabilitySetArgs{
            Name:              "tf-appsecuritygroup",
            ResourceGroupName: "my-resource-group",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("availabilitySetId", example.Id)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.compute.get_availability_set(name="tf-appsecuritygroup",
    resource_group_name="my-resource-group")
pulumi.export("availabilitySetId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.compute.getAvailabilitySet({
    name: "tf-appsecuritygroup",
    resourceGroupName: "my-resource-group",
});
export const availabilitySetId = example.then(example => example.id);

Using GetAvailabilitySet

function getAvailabilitySet(args: GetAvailabilitySetArgs, opts?: InvokeOptions): Promise<GetAvailabilitySetResult>
function  get_availability_set(name=None, resource_group_name=None, opts=None)
func LookupAvailabilitySet(ctx *Context, args *LookupAvailabilitySetArgs, opts ...InvokeOption) (*LookupAvailabilitySetResult, error)

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

public static class GetAvailabilitySet {
    public static Task<GetAvailabilitySetResult> InvokeAsync(GetAvailabilitySetArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Availability Set.

ResourceGroupName string

The name of the resource group in which the Availability Set exists.

Name string

The name of the Availability Set.

ResourceGroupName string

The name of the resource group in which the Availability Set exists.

name string

The name of the Availability Set.

resourceGroupName string

The name of the resource group in which the Availability Set exists.

name str

The name of the Availability Set.

resource_group_name str

The name of the resource group in which the Availability Set exists.

GetAvailabilitySet Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Location string

The supported Azure location where the Availability Set exists.

Managed bool

Whether the availability set is managed or not.

Name string
PlatformFaultDomainCount string

The number of fault domains that are used.

PlatformUpdateDomainCount string

The number of update domains that are used.

ResourceGroupName string
Tags Dictionary<string, string>

A mapping of tags assigned to the resource.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The supported Azure location where the Availability Set exists.

Managed bool

Whether the availability set is managed or not.

Name string
PlatformFaultDomainCount string

The number of fault domains that are used.

PlatformUpdateDomainCount string

The number of update domains that are used.

ResourceGroupName string
Tags map[string]string

A mapping of tags assigned to the resource.

id string

The provider-assigned unique ID for this managed resource.

location string

The supported Azure location where the Availability Set exists.

managed boolean

Whether the availability set is managed or not.

name string
platformFaultDomainCount string

The number of fault domains that are used.

platformUpdateDomainCount string

The number of update domains that are used.

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

A mapping of tags assigned to the resource.

id str

The provider-assigned unique ID for this managed resource.

location str

The supported Azure location where the Availability Set exists.

managed bool

Whether the availability set is managed or not.

name str
platform_fault_domain_count str

The number of fault domains that are used.

platform_update_domain_count str

The number of update domains that are used.

resource_group_name str
tags Dict[str, str]

A mapping of tags assigned to the resource.

Package Details

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