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
LookupAvailabilitySetin 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.
- Resource
Group stringName The name of the resource group in which the Availability Set exists.
- Name string
The name of the Availability Set.
- Resource
Group stringName The name of the resource group in which the Availability Set exists.
- name string
The name of the Availability Set.
- resource
Group stringName The name of the resource group in which the Availability Set exists.
- name str
The name of the Availability Set.
- resource_
group_ strname 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
- Platform
Fault stringDomain Count The number of fault domains that are used.
- Platform
Update stringDomain Count The number of update domains that are used.
- Resource
Group stringName - 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
- Platform
Fault stringDomain Count The number of fault domains that are used.
- Platform
Update stringDomain Count The number of update domains that are used.
- Resource
Group stringName - 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
- platform
Fault stringDomain Count The number of fault domains that are used.
- platform
Update stringDomain Count The number of update domains that are used.
- resource
Group stringName - {[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_ strdomain_ count The number of fault domains that are used.
- platform_
update_ strdomain_ count The number of update domains that are used.
- resource_
group_ strname - 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
azurermTerraform Provider.