/
uploadBuffer.go
93 lines (80 loc) · 3.23 KB
/
uploadBuffer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package storagegateway
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/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.
type UploadBuffer struct {
pulumi.CustomResourceState
// Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`.
DiskId pulumi.StringOutput `pulumi:"diskId"`
// The Amazon Resource Name (ARN) of the gateway.
GatewayArn pulumi.StringOutput `pulumi:"gatewayArn"`
}
// NewUploadBuffer registers a new resource with the given unique name, arguments, and options.
func NewUploadBuffer(ctx *pulumi.Context,
name string, args *UploadBufferArgs, opts ...pulumi.ResourceOption) (*UploadBuffer, error) {
if args == nil || args.DiskId == nil {
return nil, errors.New("missing required argument 'DiskId'")
}
if args == nil || args.GatewayArn == nil {
return nil, errors.New("missing required argument 'GatewayArn'")
}
if args == nil {
args = &UploadBufferArgs{}
}
var resource UploadBuffer
err := ctx.RegisterResource("aws:storagegateway/uploadBuffer:UploadBuffer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetUploadBuffer gets an existing UploadBuffer resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetUploadBuffer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *UploadBufferState, opts ...pulumi.ResourceOption) (*UploadBuffer, error) {
var resource UploadBuffer
err := ctx.ReadResource("aws:storagegateway/uploadBuffer:UploadBuffer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering UploadBuffer resources.
type uploadBufferState struct {
// Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`.
DiskId *string `pulumi:"diskId"`
// The Amazon Resource Name (ARN) of the gateway.
GatewayArn *string `pulumi:"gatewayArn"`
}
type UploadBufferState struct {
// Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`.
DiskId pulumi.StringPtrInput
// The Amazon Resource Name (ARN) of the gateway.
GatewayArn pulumi.StringPtrInput
}
func (UploadBufferState) ElementType() reflect.Type {
return reflect.TypeOf((*uploadBufferState)(nil)).Elem()
}
type uploadBufferArgs struct {
// Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`.
DiskId string `pulumi:"diskId"`
// The Amazon Resource Name (ARN) of the gateway.
GatewayArn string `pulumi:"gatewayArn"`
}
// The set of arguments for constructing a UploadBuffer resource.
type UploadBufferArgs struct {
// Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`.
DiskId pulumi.StringInput
// The Amazon Resource Name (ARN) of the gateway.
GatewayArn pulumi.StringInput
}
func (UploadBufferArgs) ElementType() reflect.Type {
return reflect.TypeOf((*uploadBufferArgs)(nil)).Elem()
}