AWS Classic v5.41.0, May 15 23
AWS Classic v5.41.0, May 15 23
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var testLocalDisk = Aws.StorageGateway.GetLocalDisk.Invoke(new()
{
DiskNode = aws_volume_attachment.Test.Device_name,
GatewayArn = aws_storagegateway_gateway.Test.Arn,
});
var testUploadBuffer = new Aws.StorageGateway.UploadBuffer("testUploadBuffer", new()
{
DiskPath = testLocalDisk.Apply(getLocalDiskResult => getLocalDiskResult.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 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 testLocalDisk = 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.applyValue(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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.StorageGateway.GetLocalDisk.Invoke(new()
{
DiskNode = aws_volume_attachment.Test.Device_name,
GatewayArn = aws_storagegateway_gateway.Test.Arn,
});
var example = new Aws.StorageGateway.UploadBuffer("example", new()
{
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 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(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 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:
- Gateway
Arn string The Amazon Resource Name (ARN) of the gateway.
- Disk
Id string Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- Disk
Path string Local disk path. For example,
/dev/nvme1n1
.
- Gateway
Arn string The Amazon Resource Name (ARN) of the gateway.
- Disk
Id string Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- Disk
Path string Local disk path. For example,
/dev/nvme1n1
.
- gateway
Arn String The Amazon Resource Name (ARN) of the gateway.
- disk
Id String Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- disk
Path String Local disk path. For example,
/dev/nvme1n1
.
- gateway
Arn string The Amazon Resource Name (ARN) of the gateway.
- disk
Id string Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- disk
Path 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
.
- gateway
Arn String The Amazon Resource Name (ARN) of the gateway.
- disk
Id String Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- disk
Path 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.
- Disk
Id string Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- Disk
Path string Local disk path. For example,
/dev/nvme1n1
.- Gateway
Arn string The Amazon Resource Name (ARN) of the gateway.
- Disk
Id string Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- Disk
Path string Local disk path. For example,
/dev/nvme1n1
.- Gateway
Arn string The Amazon Resource Name (ARN) of the gateway.
- disk
Id String Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- disk
Path String Local disk path. For example,
/dev/nvme1n1
.- gateway
Arn String The Amazon Resource Name (ARN) of the gateway.
- disk
Id string Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- disk
Path string Local disk path. For example,
/dev/nvme1n1
.- gateway
Arn 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.
- disk
Id String Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
.- disk
Path String Local disk path. For example,
/dev/nvme1n1
.- gateway
Arn 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
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.