AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

UploadBuffer

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

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var testLocalDisk = Output.Create(Aws.StorageGateway.GetLocalDisk.InvokeAsync(new Aws.StorageGateway.GetLocalDiskArgs
        {
            DiskNode = aws_volume_attachment.Test.Device_name,
            GatewayArn = aws_storagegateway_gateway.Test.Arn,
        }));
        var testUploadBuffer = new Aws.StorageGateway.UploadBuffer("testUploadBuffer", new Aws.StorageGateway.UploadBufferArgs
        {
            DiskPath = testLocalDisk.Apply(testLocalDisk => testLocalDisk.DiskPath),
            GatewayArn = aws_storagegateway_gateway.Test.Arn,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/storagegateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testLocalDisk, err := storagegateway.GetLocalDisk(ctx, &storagegateway.GetLocalDiskArgs{
			DiskNode:   pulumi.StringRef(aws_volume_attachment.Test.Device_name),
			GatewayArn: aws_storagegateway_gateway.Test.Arn,
		}, nil)
		if err != nil {
			return err
		}
		_, err = storagegateway.NewUploadBuffer(ctx, "testUploadBuffer", &storagegateway.UploadBufferArgs{
			DiskPath:   pulumi.String(testLocalDisk.DiskPath),
			GatewayArn: pulumi.Any(aws_storagegateway_gateway.Test.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testLocalDisk = Output.of(StoragegatewayFunctions.getLocalDisk(GetLocalDiskArgs.builder()
            .diskNode(aws_volume_attachment.test().device_name())
            .gatewayArn(aws_storagegateway_gateway.test().arn())
            .build()));

        var testUploadBuffer = new UploadBuffer("testUploadBuffer", UploadBufferArgs.builder()        
            .diskPath(testLocalDisk.apply(getLocalDiskResult -> getLocalDiskResult.diskPath()))
            .gatewayArn(aws_storagegateway_gateway.test().arn())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test_local_disk = aws.storagegateway.get_local_disk(disk_node=aws_volume_attachment["test"]["device_name"],
    gateway_arn=aws_storagegateway_gateway["test"]["arn"])
test_upload_buffer = aws.storagegateway.UploadBuffer("testUploadBuffer",
    disk_path=test_local_disk.disk_path,
    gateway_arn=aws_storagegateway_gateway["test"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const testLocalDisk = aws.storagegateway.getLocalDisk({
    diskNode: aws_volume_attachment.test.device_name,
    gatewayArn: aws_storagegateway_gateway.test.arn,
});
const testUploadBuffer = new aws.storagegateway.UploadBuffer("testUploadBuffer", {
    diskPath: testLocalDisk.then(testLocalDisk => testLocalDisk.diskPath),
    gatewayArn: aws_storagegateway_gateway.test.arn,
});
resources:
  testUploadBuffer:
    type: aws:storagegateway:UploadBuffer
    properties:
      diskPath: ${testLocalDisk.diskPath}
      gatewayArn: ${aws_storagegateway_gateway.test.arn}
variables:
  testLocalDisk:
    Fn::Invoke:
      Function: aws:storagegateway:getLocalDisk
      Arguments:
        diskNode: ${aws_volume_attachment.test.device_name}
        gatewayArn: ${aws_storagegateway_gateway.test.arn}

Stored Gateway Type

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Aws.StorageGateway.GetLocalDisk.InvokeAsync(new Aws.StorageGateway.GetLocalDiskArgs
        {
            DiskNode = aws_volume_attachment.Test.Device_name,
            GatewayArn = aws_storagegateway_gateway.Test.Arn,
        }));
        var example = new Aws.StorageGateway.UploadBuffer("example", new Aws.StorageGateway.UploadBufferArgs
        {
            DiskId = data.Aws_storagegateway_local_disk.Example.Id,
            GatewayArn = aws_storagegateway_gateway.Example.Arn,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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(aws_volume_attachment.Test.Device_name),
			GatewayArn: aws_storagegateway_gateway.Test.Arn,
		}, nil)
		if err != nil {
			return err
		}
		_, err = storagegateway.NewUploadBuffer(ctx, "example", &storagegateway.UploadBufferArgs{
			DiskId:     pulumi.Any(data.Aws_storagegateway_local_disk.Example.Id),
			GatewayArn: pulumi.Any(aws_storagegateway_gateway.Example.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = Output.of(StoragegatewayFunctions.getLocalDisk(GetLocalDiskArgs.builder()
            .diskNode(aws_volume_attachment.test().device_name())
            .gatewayArn(aws_storagegateway_gateway.test().arn())
            .build()));

        var example = new UploadBuffer("example", UploadBufferArgs.builder()        
            .diskId(data.aws_storagegateway_local_disk().example().id())
            .gatewayArn(aws_storagegateway_gateway.example().arn())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test = aws.storagegateway.get_local_disk(disk_node=aws_volume_attachment["test"]["device_name"],
    gateway_arn=aws_storagegateway_gateway["test"]["arn"])
example = aws.storagegateway.UploadBuffer("example",
    disk_id=data["aws_storagegateway_local_disk"]["example"]["id"],
    gateway_arn=aws_storagegateway_gateway["example"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = aws.storagegateway.getLocalDisk({
    diskNode: aws_volume_attachment.test.device_name,
    gatewayArn: aws_storagegateway_gateway.test.arn,
});
const example = new aws.storagegateway.UploadBuffer("example", {
    diskId: data.aws_storagegateway_local_disk.example.id,
    gatewayArn: aws_storagegateway_gateway.example.arn,
});
resources:
  example:
    type: aws:storagegateway:UploadBuffer
    properties:
      diskId: ${data.aws_storagegateway_local_disk.example.id}
      gatewayArn: ${aws_storagegateway_gateway.example.arn}
variables:
  test:
    Fn::Invoke:
      Function: aws:storagegateway:getLocalDisk
      Arguments:
        diskNode: ${aws_volume_attachment.test.device_name}
        gatewayArn: ${aws_storagegateway_gateway.test.arn}

Create a UploadBuffer Resource

new UploadBuffer(name: string, args: UploadBufferArgs, opts?: CustomResourceOptions);
@overload
def UploadBuffer(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 disk_id: Optional[str] = None,
                 disk_path: Optional[str] = None,
                 gateway_arn: Optional[str] = None)
@overload
def UploadBuffer(resource_name: str,
                 args: UploadBufferArgs,
                 opts: Optional[ResourceOptions] = 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.

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.

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 an 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

aws_storagegateway_upload_buffer can be imported by using the gateway Amazon Resource Name (ARN) and local disk identifier separated with a colon (:), e.g.,

 $ 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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.