1. Packages
  2. AWS
  3. API Docs
  4. storagegateway
  5. getLocalDisk
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.storagegateway.getLocalDisk

Explore with Pulumi AI

AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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,
});
Copy
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"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: aws:storagegateway:getLocalDisk
      arguments:
        diskPath: ${testAwsVolumeAttachment.deviceName}
        gatewayArn: ${testAwsStoragegatewayGateway.arn}
Copy

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>
Copy
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]
Copy
func GetLocalDisk(ctx *Context, args *GetLocalDiskArgs, opts ...InvokeOption) (*GetLocalDiskResult, error)
func GetLocalDiskOutput(ctx *Context, args *GetLocalDiskOutputArgs, opts ...InvokeOption) GetLocalDiskResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetLocalDiskResult> getLocalDisk(GetLocalDiskArgs args, InvokeOptions options)
public static Output<GetLocalDiskResult> getLocalDisk(GetLocalDiskArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:storagegateway/getLocalDisk:getLocalDisk
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

GatewayArn This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi