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 System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = Aws.StorageGateway.GetLocalDisk.Invoke(new()
    {
        DiskPath = aws_volume_attachment.Test.Device_name,
        GatewayArn = aws_storagegateway_gateway.Test.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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(aws_volume_attachment.Test.Device_name),
			GatewayArn: aws_storagegateway_gateway.Test.Arn,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(aws_volume_attachment.test().device_name())
            .gatewayArn(aws_storagegateway_gateway.test().arn())
            .build());

    }
}
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 = aws.storagegateway.getLocalDisk({
    diskPath: aws_volume_attachment.test.device_name,
    gatewayArn: aws_storagegateway_gateway.test.arn,
});
variables:
  test:
    fn::invoke:
      Function: aws:storagegateway:getLocalDisk
      Arguments:
        diskPath: ${aws_volume_attachment.test.device_name}
        gatewayArn: ${aws_storagegateway_gateway.test.arn}

Using getLocalDisk

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getLocalDisk(args: GetLocalDiskArgs, opts?: InvokeOptions): Promise<GetLocalDiskResult>
function getLocalDiskOutput(args: GetLocalDiskOutputArgs, opts?: InvokeOptions): Output<GetLocalDiskResult>
def get_local_disk(disk_node: Optional[str] = None,
                   disk_path: Optional[str] = None,
                   gateway_arn: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetLocalDiskResult
def get_local_disk_output(disk_node: Optional[pulumi.Input[str]] = None,
                   disk_path: Optional[pulumi.Input[str]] = None,
                   gateway_arn: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetLocalDiskResult]
func GetLocalDisk(ctx *Context, args *GetLocalDiskArgs, opts ...InvokeOption) (*GetLocalDiskResult, error)
func GetLocalDiskOutput(ctx *Context, args *GetLocalDiskOutputArgs, opts ...InvokeOption) GetLocalDiskResultOutput

> Note: This function is named GetLocalDisk in the Go SDK.

public static class GetLocalDisk 
{
    public static Task<GetLocalDiskResult> InvokeAsync(GetLocalDiskArgs args, InvokeOptions? opts = null)
    public static Output<GetLocalDiskResult> Invoke(GetLocalDiskInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLocalDiskResult> getLocalDisk(GetLocalDiskArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aws:storagegateway/getLocalDisk:getLocalDisk
  arguments:
    # arguments dictionary

The following arguments are supported:

GatewayArn string

ARN of the gateway.

DiskNode string

Device node of the local disk to retrieve. For example, /dev/sdb.

DiskPath string

Device path of the local disk to retrieve. For example, /dev/xvdb or /dev/nvme1n1.

GatewayArn string

ARN of the gateway.

DiskNode string

Device node of the local disk to retrieve. For example, /dev/sdb.

DiskPath string

Device path of the local disk to retrieve. For example, /dev/xvdb or /dev/nvme1n1.

gatewayArn String

ARN of the gateway.

diskNode String

Device node of the local disk to retrieve. For example, /dev/sdb.

diskPath String

Device path of the local disk to retrieve. For example, /dev/xvdb or /dev/nvme1n1.

gatewayArn string

ARN of the gateway.

diskNode string

Device node of the local disk to retrieve. For example, /dev/sdb.

diskPath string

Device path of the local disk to retrieve. For example, /dev/xvdb or /dev/nvme1n1.

gateway_arn str

ARN of the gateway.

disk_node str

Device node of the local disk to retrieve. For example, /dev/sdb.

disk_path str

Device path of the local disk to retrieve. For example, /dev/xvdb or /dev/nvme1n1.

gatewayArn String

ARN of the gateway.

diskNode String

Device node of the local disk to retrieve. For example, /dev/sdb.

diskPath String

Device path of the local disk to retrieve. For example, /dev/xvdb or /dev/nvme1n1.

getLocalDisk Result

The following output properties are available:

DiskId string

Disk identifierE.g., pci-0000:03:00.0-scsi-0:0:0:0

DiskNode string
DiskPath string
GatewayArn string
Id string

The provider-assigned unique ID for this managed resource.

DiskId string

Disk identifierE.g., pci-0000:03:00.0-scsi-0:0:0:0

DiskNode string
DiskPath string
GatewayArn string
Id string

The provider-assigned unique ID for this managed resource.

diskId String

Disk identifierE.g., pci-0000:03:00.0-scsi-0:0:0:0

diskNode String
diskPath String
gatewayArn String
id String

The provider-assigned unique ID for this managed resource.

diskId string

Disk identifierE.g., pci-0000:03:00.0-scsi-0:0:0:0

diskNode string
diskPath string
gatewayArn string
id string

The provider-assigned unique ID for this managed resource.

disk_id str

Disk identifierE.g., pci-0000:03:00.0-scsi-0:0:0:0

disk_node str
disk_path str
gateway_arn str
id str

The provider-assigned unique ID for this managed resource.

diskId String

Disk identifierE.g., pci-0000:03:00.0-scsi-0:0:0:0

diskNode String
diskPath String
gatewayArn String
id String

The provider-assigned unique ID for this managed resource.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.