1. Packages
  2. AWS
  3. API Docs
  4. storagegateway
  5. getLocalDisk
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.storagegateway.getLocalDisk

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 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)
    // 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
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi