GetLocalDisk
Retrieve information about a Storage Gateway local disk. The disk identifier is useful for adding the disk as a cache or upload buffer to a gateway.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var test = Output.Create(Aws.StorageGateway.GetLocalDisk.InvokeAsync(new Aws.StorageGateway.GetLocalDiskArgs
{
DiskPath = aws_volume_attachment.Test.Device_name,
GatewayArn = aws_storagegateway_gateway.Test.Arn,
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/storagegateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := aws_volume_attachment.Test.Device_name
_, err := storagegateway.GetLocalDisk(ctx, &storagegateway.GetLocalDiskArgs{
DiskPath: &opt0,
GatewayArn: aws_storagegateway_gateway.Test.Arn,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
test = aws.storagegateway.get_local_disk(disk_path=aws_volume_attachment["test"]["device_name"],
gateway_arn=aws_storagegateway_gateway["test"]["arn"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = pulumi.all([aws_volume_attachment_test.deviceName, aws_storagegateway_gateway_test.arn]).apply(([deviceName, arn]) => aws.storagegateway.getLocalDisk({
diskPath: deviceName,
gatewayArn: arn,
}, { async: true }));Using GetLocalDisk
function getLocalDisk(args: GetLocalDiskArgs, opts?: InvokeOptions): Promise<GetLocalDiskResult>function get_local_disk(disk_node=None, disk_path=None, gateway_arn=None, opts=None)func GetLocalDisk(ctx *Context, args *GetLocalDiskArgs, opts ...InvokeOption) (*GetLocalDiskResult, error)public static class GetLocalDisk {
public static Task<GetLocalDiskResult> InvokeAsync(GetLocalDiskArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetLocalDisk Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.