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

aws.storagegateway.UploadBuffer

Explore with Pulumi AI

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,
});
Copy
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"])
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 {
		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
	})
}
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()
    {
        DiskNode = testAwsVolumeAttachment.DeviceName,
        GatewayArn = testAwsStoragegatewayGateway.Arn,
    });

    var testUploadBuffer = new Aws.StorageGateway.UploadBuffer("test", new()
    {
        DiskPath = test.Apply(getLocalDiskResult => getLocalDiskResult.DiskPath),
        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 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());

    }
}
Copy
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}
Copy

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,
});
Copy
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"])
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{
			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
	})
}
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()
    {
        DiskNode = testAwsVolumeAttachment.DeviceName,
        GatewayArn = testAwsStoragegatewayGateway.Arn,
    });

    var example = new Aws.StorageGateway.UploadBuffer("example", new()
    {
        DiskId = exampleAwsStoragegatewayLocalDisk.Id,
        GatewayArn = exampleAwsStoragegatewayGateway.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 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());

    }
}
Copy
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}
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. UploadBufferArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. UploadBufferArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UploadBufferArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
example, err := storagegateway.NewUploadBuffer(ctx, "uploadBufferResource", &storagegateway.UploadBufferArgs{
	GatewayArn: pulumi.String("string"),
	DiskId:     pulumi.String("string"),
	DiskPath:   pulumi.String("string"),
})
Copy
var uploadBufferResource = new UploadBuffer("uploadBufferResource", UploadBufferArgs.builder()
    .gatewayArn("string")
    .diskId("string")
    .diskPath("string")
    .build());
Copy
upload_buffer_resource = aws.storagegateway.UploadBuffer("uploadBufferResource",
    gateway_arn="string",
    disk_id="string",
    disk_path="string")
Copy
const uploadBufferResource = new aws.storagegateway.UploadBuffer("uploadBufferResource", {
    gatewayArn: "string",
    diskId: "string",
    diskPath: "string",
});
Copy
type: aws:storagegateway:UploadBuffer
properties:
    diskId: string
    diskPath: string
    gatewayArn: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The UploadBuffer resource accepts the following input properties:

GatewayArn
This property is required.
Changes to this property will trigger replacement.
string
The Amazon Resource Name (ARN) of the gateway.
DiskId Changes to this property will trigger replacement. string
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
DiskPath Changes to this property will trigger replacement. string
Local disk path. For example, /dev/nvme1n1.
GatewayArn
This property is required.
Changes to this property will trigger replacement.
string
The Amazon Resource Name (ARN) of the gateway.
DiskId Changes to this property will trigger replacement. string
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
DiskPath Changes to this property will trigger replacement. string
Local disk path. For example, /dev/nvme1n1.
gatewayArn
This property is required.
Changes to this property will trigger replacement.
String
The Amazon Resource Name (ARN) of the gateway.
diskId Changes to this property will trigger replacement. String
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
diskPath Changes to this property will trigger replacement. String
Local disk path. For example, /dev/nvme1n1.
gatewayArn
This property is required.
Changes to this property will trigger replacement.
string
The Amazon Resource Name (ARN) of the gateway.
diskId Changes to this property will trigger replacement. string
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
diskPath Changes to this property will trigger replacement. string
Local disk path. For example, /dev/nvme1n1.
gateway_arn
This property is required.
Changes to this property will trigger replacement.
str
The Amazon Resource Name (ARN) of the gateway.
disk_id Changes to this property will trigger replacement. str
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
disk_path Changes to this property will trigger replacement. str
Local disk path. For example, /dev/nvme1n1.
gatewayArn
This property is required.
Changes to this property will trigger replacement.
String
The Amazon Resource Name (ARN) of the gateway.
diskId Changes to this property will trigger replacement. String
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
diskPath Changes to this property will trigger replacement. 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)
resources:  _:    type: aws:storagegateway:UploadBuffer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
DiskPath Changes to this property will trigger replacement. string
Local disk path. For example, /dev/nvme1n1.
GatewayArn Changes to this property will trigger replacement. string
The Amazon Resource Name (ARN) of the gateway.
DiskId Changes to this property will trigger replacement. string
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
DiskPath Changes to this property will trigger replacement. string
Local disk path. For example, /dev/nvme1n1.
GatewayArn Changes to this property will trigger replacement. string
The Amazon Resource Name (ARN) of the gateway.
diskId Changes to this property will trigger replacement. String
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
diskPath Changes to this property will trigger replacement. String
Local disk path. For example, /dev/nvme1n1.
gatewayArn Changes to this property will trigger replacement. String
The Amazon Resource Name (ARN) of the gateway.
diskId Changes to this property will trigger replacement. string
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
diskPath Changes to this property will trigger replacement. string
Local disk path. For example, /dev/nvme1n1.
gatewayArn Changes to this property will trigger replacement. string
The Amazon Resource Name (ARN) of the gateway.
disk_id Changes to this property will trigger replacement. str
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
disk_path Changes to this property will trigger replacement. str
Local disk path. For example, /dev/nvme1n1.
gateway_arn Changes to this property will trigger replacement. str
The Amazon Resource Name (ARN) of the gateway.
diskId Changes to this property will trigger replacement. String
Local disk identifier. For example, pci-0000:03:00.0-scsi-0:0:0:0.
diskPath Changes to this property will trigger replacement. String
Local disk path. For example, /dev/nvme1n1.
gatewayArn Changes to this property will trigger replacement. 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
Copy

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.