get Local Disk
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.storagegateway.getLocalDisk({
diskPath: testAwsVolumeAttachment.deviceName,
gatewayArn: testAwsStoragegatewayGateway.arn,
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
test = aws.storagegateway.get_local_disk(disk_path=test_aws_volume_attachment["deviceName"],
gateway_arn=test_aws_storagegateway_gateway["arn"])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.StorageGateway.GetLocalDisk.Invoke(new()
{
DiskPath = testAwsVolumeAttachment.DeviceName,
GatewayArn = testAwsStoragegatewayGateway.Arn,
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/storagegateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storagegateway.GetLocalDisk(ctx, &storagegateway.GetLocalDiskArgs{
DiskPath: pulumi.StringRef(testAwsVolumeAttachment.DeviceName),
GatewayArn: testAwsStoragegatewayGateway.Arn,
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.StoragegatewayFunctions;
import com.pulumi.aws.storagegateway.inputs.GetLocalDiskArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var test = StoragegatewayFunctions.getLocalDisk(GetLocalDiskArgs.builder()
.diskPath(testAwsVolumeAttachment.deviceName())
.gatewayArn(testAwsStoragegatewayGateway.arn())
.build());
}
}
Content copied to clipboard
variables:
test:
fn::invoke:
function: aws:storagegateway:getLocalDisk
arguments:
diskPath: ${testAwsVolumeAttachment.deviceName}
gatewayArn: ${testAwsStoragegatewayGateway.arn}
Content copied to clipboard
Return
A collection of values returned by getLocalDisk.
Parameters
argument
A collection of arguments for invoking getLocalDisk.
suspend fun getLocalDisk(diskNode: String? = null, diskPath: String? = null, gatewayArn: String): GetLocalDiskResult
Return
A collection of values returned by getLocalDisk.
Parameters
disk Node
Device node of the local disk to retrieve. For example, /dev/sdb
.
disk Path
Device path of the local disk to retrieve. For example, /dev/xvdb
or /dev/nvme1n1
.
gateway Arn
ARN of the gateway.
See also
suspend fun getLocalDisk(argument: suspend GetLocalDiskPlainArgsBuilder.() -> Unit): GetLocalDiskResult
Return
A collection of values returned by getLocalDisk.
Parameters
argument
Builder for com.pulumi.aws.storagegateway.kotlin.inputs.GetLocalDiskPlainArgs.