Viewing docs for AWS v6.83.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for AWS v6.83.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 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,
});
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"])
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
})
}
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,
});
});
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());
}
}
variables:
test:
fn::invoke:
function: aws:storagegateway:getLocalDisk
arguments:
diskPath: ${testAwsVolumeAttachment.deviceName}
gatewayArn: ${testAwsStoragegatewayGateway.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)
public static Output<GetLocalDiskResult> getLocalDisk(GetLocalDiskArgs args, InvokeOptions options)
fn::invoke:
function: aws:storagegateway/getLocalDisk:getLocalDisk
arguments:
# arguments dictionaryThe following arguments are supported:
- Gateway
Arn string - ARN of the gateway.
- Disk
Node string - Device node of the local disk to retrieve. For example,
/dev/sdb. - Disk
Path string - Device path of the local disk to retrieve. For example,
/dev/xvdbor/dev/nvme1n1.
- Gateway
Arn string - ARN of the gateway.
- Disk
Node string - Device node of the local disk to retrieve. For example,
/dev/sdb. - Disk
Path string - Device path of the local disk to retrieve. For example,
/dev/xvdbor/dev/nvme1n1.
- gateway
Arn String - ARN of the gateway.
- disk
Node String - Device node of the local disk to retrieve. For example,
/dev/sdb. - disk
Path String - Device path of the local disk to retrieve. For example,
/dev/xvdbor/dev/nvme1n1.
- gateway
Arn string - ARN of the gateway.
- disk
Node string - Device node of the local disk to retrieve. For example,
/dev/sdb. - disk
Path string - Device path of the local disk to retrieve. For example,
/dev/xvdbor/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/xvdbor/dev/nvme1n1.
- gateway
Arn String - ARN of the gateway.
- disk
Node String - Device node of the local disk to retrieve. For example,
/dev/sdb. - disk
Path String - Device path of the local disk to retrieve. For example,
/dev/xvdbor/dev/nvme1n1.
getLocalDisk Result
The following output properties are available:
- Disk
Id string - Disk identifierE.g.,
pci-0000:03:00.0-scsi-0:0:0:0 - Disk
Node string - Disk
Path string - Gateway
Arn string - Id string
- The provider-assigned unique ID for this managed resource.
- Disk
Id string - Disk identifierE.g.,
pci-0000:03:00.0-scsi-0:0:0:0 - Disk
Node string - Disk
Path string - Gateway
Arn string - Id string
- The provider-assigned unique ID for this managed resource.
- disk
Id String - Disk identifierE.g.,
pci-0000:03:00.0-scsi-0:0:0:0 - disk
Node String - disk
Path String - gateway
Arn String - id String
- The provider-assigned unique ID for this managed resource.
- disk
Id string - Disk identifierE.g.,
pci-0000:03:00.0-scsi-0:0:0:0 - disk
Node string - disk
Path string - gateway
Arn 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.
- disk
Id String - Disk identifierE.g.,
pci-0000:03:00.0-scsi-0:0:0:0 - disk
Node String - disk
Path String - gateway
Arn 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
awsTerraform Provider.
Viewing docs for AWS v6.83.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
