GetManagedDisk
Use this data source to access information about an existing Managed Disk.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var existing = Output.Create(Azure.Compute.GetManagedDisk.InvokeAsync(new Azure.Compute.GetManagedDiskArgs
{
Name = "example-datadisk",
ResourceGroupName = "example-resources",
}));
this.Id = existing.Apply(existing => existing.Id);
}
[Output("id")]
public Output<string> Id { 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 {
existing, err := compute.LookupManagedDisk(ctx, &compute.LookupManagedDiskArgs{
Name: "example-datadisk",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
ctx.Export("id", existing.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
existing = azure.compute.get_managed_disk(name="example-datadisk",
resource_group_name="example-resources")
pulumi.export("id", existing.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const existing = azure.compute.getManagedDisk({
name: "example-datadisk",
resourceGroupName: "example-resources",
});
export const id = existing.then(existing => existing.id);Using GetManagedDisk
function getManagedDisk(args: GetManagedDiskArgs, opts?: InvokeOptions): Promise<GetManagedDiskResult>function get_managed_disk(name=None, resource_group_name=None, tags=None, zones=None, opts=None)func LookupManagedDisk(ctx *Context, args *LookupManagedDiskArgs, opts ...InvokeOption) (*LookupManagedDiskResult, error)Note: This function is named
LookupManagedDiskin the Go SDK.
public static class GetManagedDisk {
public static Task<GetManagedDiskResult> InvokeAsync(GetManagedDiskArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
Specifies the name of the Managed Disk.
- Resource
Group stringName Specifies the name of the Resource Group where this Managed Disk exists.
- Dictionary<string, string>
A mapping of tags assigned to the resource.
- Zones List<string>
A list of Availability Zones where the Managed Disk exists.
GetManagedDisk Result
The following output properties are available:
- Create
Option string - Disk
Encryption stringSet Id The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- Disk
Iops intRead Write The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- Disk
Mbps intRead Write The bandwidth allowed for this disk.
- Disk
Size intGb The size of the Managed Disk in gigabytes.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Os
Type string The operating system used for this Managed Disk.
- Resource
Group stringName - Source
Resource stringId The ID of an existing Managed Disk which this Disk was created from.
- Source
Uri string The Source URI for this Managed Disk.
- Storage
Account stringId The ID of the Storage Account where the
source_uriis located.- Storage
Account stringType The storage account type for the Managed Disk.
- Zones List<string>
A list of Availability Zones where the Managed Disk exists.
- Dictionary<string, string>
A mapping of tags assigned to the resource.
- Create
Option string - Disk
Encryption stringSet Id The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- Disk
Iops intRead Write The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- Disk
Mbps intRead Write The bandwidth allowed for this disk.
- Disk
Size intGb The size of the Managed Disk in gigabytes.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Os
Type string The operating system used for this Managed Disk.
- Resource
Group stringName - Source
Resource stringId The ID of an existing Managed Disk which this Disk was created from.
- Source
Uri string The Source URI for this Managed Disk.
- Storage
Account stringId The ID of the Storage Account where the
source_uriis located.- Storage
Account stringType The storage account type for the Managed Disk.
- Zones []string
A list of Availability Zones where the Managed Disk exists.
- map[string]string
A mapping of tags assigned to the resource.
- create
Option string - disk
Encryption stringSet Id The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- disk
Iops numberRead Write The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- disk
Mbps numberRead Write The bandwidth allowed for this disk.
- disk
Size numberGb The size of the Managed Disk in gigabytes.
- id string
The provider-assigned unique ID for this managed resource.
- name string
- os
Type string The operating system used for this Managed Disk.
- resource
Group stringName - source
Resource stringId The ID of an existing Managed Disk which this Disk was created from.
- source
Uri string The Source URI for this Managed Disk.
- storage
Account stringId The ID of the Storage Account where the
source_uriis located.- storage
Account stringType The storage account type for the Managed Disk.
- zones string[]
A list of Availability Zones where the Managed Disk exists.
- {[key: string]: string}
A mapping of tags assigned to the resource.
- create_
option str - disk_
encryption_ strset_ id The ID of the Disk Encryption Set used to encrypt this Managed Disk.
- disk_
iops_ floatread_ write The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes.
- disk_
mbps_ floatread_ write The bandwidth allowed for this disk.
- disk_
size_ floatgb The size of the Managed Disk in gigabytes.
- id str
The provider-assigned unique ID for this managed resource.
- name str
- os_
type str The operating system used for this Managed Disk.
- resource_
group_ strname - source_
resource_ strid The ID of an existing Managed Disk which this Disk was created from.
- source_
uri str The Source URI for this Managed Disk.
- storage_
account_ strid The ID of the Storage Account where the
source_uriis located.- storage_
account_ strtype The storage account type for the Managed Disk.
- zones List[str]
A list of Availability Zones where the Managed Disk exists.
- 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.