1. Packages
  2. AWS
  3. API Docs
  4. storagegateway
  5. UploadBuffer
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.storagegateway.UploadBuffer

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages an AWS Storage Gateway upload buffer.

    NOTE: The Storage Gateway API provides no method to remove an upload buffer disk. Destroying this resource does not perform any Storage Gateway actions.

    Example Usage

    Cached and VTL Gateway Type

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.storagegateway.getLocalDisk({
        diskNode: testAwsVolumeAttachment.deviceName,
        gatewayArn: testAwsStoragegatewayGateway.arn,
    });
    const testUploadBuffer = new aws.storagegateway.UploadBuffer("test", {
        diskPath: test.then(test => test.diskPath),
        gatewayArn: testAwsStoragegatewayGateway.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.storagegateway.get_local_disk(disk_node=test_aws_volume_attachment["deviceName"],
        gateway_arn=test_aws_storagegateway_gateway["arn"])
    test_upload_buffer = aws.storagegateway.UploadBuffer("test",
        disk_path=test.disk_path,
        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 {
    		test, err := storagegateway.GetLocalDisk(ctx, &storagegateway.GetLocalDiskArgs{
    			DiskNode:   pulumi.StringRef(testAwsVolumeAttachment.DeviceName),
    			GatewayArn: testAwsStoragegatewayGateway.Arn,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = storagegateway.NewUploadBuffer(ctx, "test", &storagegateway.UploadBufferArgs{
    			DiskPath:   pulumi.String(test.DiskPath),
    			GatewayArn: pulumi.Any(testAwsStoragegatewayGateway.Arn),
    		})
    		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()
        {
            DiskNode = testAwsVolumeAttachment.DeviceName,
            GatewayArn = testAwsStoragegatewayGateway.Arn,
        });
    
        var testUploadBuffer = new Aws.StorageGateway.UploadBuffer("test", new()
        {
            DiskPath = test.Apply(getLocalDiskResult => getLocalDiskResult.DiskPath),
            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 com.pulumi.aws.storagegateway.UploadBuffer;
    import com.pulumi.aws.storagegateway.UploadBufferArgs;
    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()
                .diskNode(testAwsVolumeAttachment.deviceName())
                .gatewayArn(testAwsStoragegatewayGateway.arn())
                .build());
    
            var testUploadBuffer = new UploadBuffer("testUploadBuffer", UploadBufferArgs.builder()
                .diskPath(test.applyValue(getLocalDiskResult -> getLocalDiskResult.diskPath()))
                .gatewayArn(testAwsStoragegatewayGateway.arn())
                .build());
    
        }
    }
    
    resources:
      testUploadBuffer:
        type: aws:storagegateway:UploadBuffer
        name: test
        properties:
          diskPath: ${test.diskPath}
          gatewayArn: ${testAwsStoragegatewayGateway.arn}
    variables:
      test:
        fn::invoke:
          Function: aws:storagegateway:getLocalDisk
          Arguments:
            diskNode: ${testAwsVolumeAttachment.deviceName}
            gatewayArn: ${testAwsStoragegatewayGateway.arn}
    

    Stored Gateway Type

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.storagegateway.getLocalDisk({
        diskNode: testAwsVolumeAttachment.deviceName,
        gatewayArn: testAwsStoragegatewayGateway.arn,
    });
    const example = new aws.storagegateway.UploadBuffer("example", {
        diskId: exampleAwsStoragegatewayLocalDisk.id,
        gatewayArn: exampleAwsStoragegatewayGateway.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.storagegateway.get_local_disk(disk_node=test_aws_volume_attachment["deviceName"],
        gateway_arn=test_aws_storagegateway_gateway["arn"])
    example = aws.storagegateway.UploadBuffer("example",
        disk_id=example_aws_storagegateway_local_disk["id"],
        gateway_arn=example_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{
    			DiskNode:   pulumi.StringRef(testAwsVolumeAttachment.DeviceName),
    			GatewayArn: testAwsStoragegatewayGateway.Arn,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = storagegateway.NewUploadBuffer(ctx, "example", &storagegateway.UploadBufferArgs{
    			DiskId:     pulumi.Any(exampleAwsStoragegatewayLocalDisk.Id),
    			GatewayArn: pulumi.Any(exampleAwsStoragegatewayGateway.Arn),
    		})
    		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()
        {
            DiskNode = testAwsVolumeAttachment.DeviceName,
            GatewayArn = testAwsStoragegatewayGateway.Arn,
        });
    
        var example = new Aws.StorageGateway.UploadBuffer("example", new()
        {
            DiskId = exampleAwsStoragegatewayLocalDisk.Id,
            GatewayArn = exampleAwsStoragegatewayGateway.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 com.pulumi.aws.storagegateway.UploadBuffer;
    import com.pulumi.aws.storagegateway.UploadBufferArgs;
    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()
                .diskNode(testAwsVolumeAttachment.deviceName())
                .gatewayArn(testAwsStoragegatewayGateway.arn())
                .build());
    
            var example = new UploadBuffer("example", UploadBufferArgs.builder()
                .diskId(exampleAwsStoragegatewayLocalDisk.id())
                .gatewayArn(exampleAwsStoragegatewayGateway.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:storagegateway:UploadBuffer
        properties:
          diskId: ${exampleAwsStoragegatewayLocalDisk.id}
          gatewayArn: ${exampleAwsStoragegatewayGateway.arn}
    variables:
      test:
        fn::invoke:
          Function: aws:storagegateway:getLocalDisk
          Arguments:
            diskNode: ${testAwsVolumeAttachment.deviceName}
            gatewayArn: ${testAwsStoragegatewayGateway.arn}
    

    Create UploadBuffer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new UploadBuffer(name: string, args: UploadBufferArgs, opts?: CustomResourceOptions);
    @overload
    def UploadBuffer(resource_name: str,
                     args: UploadBufferArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def UploadBuffer(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     gateway_arn: Optional[str] = None,
                     disk_id: Optional[str] = None,
                     disk_path: Optional[str] = None)
    func NewUploadBuffer(ctx *Context, name string, args UploadBufferArgs, opts ...ResourceOption) (*UploadBuffer, error)
    public UploadBuffer(string name, UploadBufferArgs args, CustomResourceOptions? opts = null)
    public UploadBuffer(String name, UploadBufferArgs args)
    public UploadBuffer(String name, UploadBufferArgs args, CustomResourceOptions options)
    
    type: aws:storagegateway:UploadBuffer
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args UploadBufferArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UploadBufferArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UploadBufferArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UploadBufferArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UploadBufferArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var uploadBufferResource = new Aws.StorageGateway.UploadBuffer("uploadBufferResource", new()
    {
        GatewayArn = "string",
        DiskId = "string",
        DiskPath = "string",
    });
    
    example, err := storagegateway.NewUploadBuffer(ctx, "uploadBufferResource", &storagegateway.UploadBufferArgs{
    	GatewayArn: pulumi.String("string"),
    	DiskId:     pulumi.String("string"),
    	DiskPath:   pulumi.String("string"),
    })
    
    var uploadBufferResource = new UploadBuffer("uploadBufferResource", UploadBufferArgs.builder()
        .gatewayArn("string")
        .diskId("string")
        .diskPath("string")
        .build());
    
    upload_buffer_resource = aws.storagegateway.UploadBuffer("uploadBufferResource",
        gateway_arn="string",
        disk_id="string",
        disk_path="string")
    
    const uploadBufferResource = new aws.storagegateway.UploadBuffer("uploadBufferResource", {
        gatewayArn: "string",
        diskId: "string",
        diskPath: "string",
    });
    
    type: aws:storagegateway:UploadBuffer
    properties:
        diskId: string
        diskPath: string
        gatewayArn: string
    

    UploadBuffer Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The UploadBuffer resource accepts the following input properties:

    GatewayArn string
    The Amazon Resource Name (ARN) of the gateway.
    DiskId string
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    DiskPath string
    Local disk path. For example, /dev/nvme1n1.
    GatewayArn string
    The Amazon Resource Name (ARN) of the gateway.
    DiskId string
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    DiskPath string
    Local disk path. For example, /dev/nvme1n1.
    gatewayArn String
    The Amazon Resource Name (ARN) of the gateway.
    diskId String
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    diskPath String
    Local disk path. For example, /dev/nvme1n1.
    gatewayArn string
    The Amazon Resource Name (ARN) of the gateway.
    diskId string
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    diskPath string
    Local disk path. For example, /dev/nvme1n1.
    gateway_arn str
    The Amazon Resource Name (ARN) of the gateway.
    disk_id str
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    disk_path str
    Local disk path. For example, /dev/nvme1n1.
    gatewayArn String
    The Amazon Resource Name (ARN) of the gateway.
    diskId String
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    diskPath String
    Local disk path. For example, /dev/nvme1n1.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UploadBuffer resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing UploadBuffer Resource

    Get an existing UploadBuffer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: UploadBufferState, opts?: CustomResourceOptions): UploadBuffer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disk_id: Optional[str] = None,
            disk_path: Optional[str] = None,
            gateway_arn: Optional[str] = None) -> UploadBuffer
    func GetUploadBuffer(ctx *Context, name string, id IDInput, state *UploadBufferState, opts ...ResourceOption) (*UploadBuffer, error)
    public static UploadBuffer Get(string name, Input<string> id, UploadBufferState? state, CustomResourceOptions? opts = null)
    public static UploadBuffer get(String name, Output<String> id, UploadBufferState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DiskId string
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    DiskPath string
    Local disk path. For example, /dev/nvme1n1.
    GatewayArn string
    The Amazon Resource Name (ARN) of the gateway.
    DiskId string
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    DiskPath string
    Local disk path. For example, /dev/nvme1n1.
    GatewayArn string
    The Amazon Resource Name (ARN) of the gateway.
    diskId String
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    diskPath String
    Local disk path. For example, /dev/nvme1n1.
    gatewayArn String
    The Amazon Resource Name (ARN) of the gateway.
    diskId string
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    diskPath string
    Local disk path. For example, /dev/nvme1n1.
    gatewayArn string
    The Amazon Resource Name (ARN) of the gateway.
    disk_id str
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    disk_path str
    Local disk path. For example, /dev/nvme1n1.
    gateway_arn str
    The Amazon Resource Name (ARN) of the gateway.
    diskId String
    Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
    diskPath String
    Local disk path. For example, /dev/nvme1n1.
    gatewayArn String
    The Amazon Resource Name (ARN) of the gateway.

    Import

    Using pulumi import, import aws_storagegateway_upload_buffer using the gateway Amazon Resource Name (ARN) and local disk identifier separated with a colon (:). For example:

    $ pulumi import aws:storagegateway/uploadBuffer:UploadBuffer example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.54.0 published on Friday, Sep 27, 2024 by Pulumi