/
uploadBuffer.ts
101 lines (95 loc) · 3.85 KB
/
uploadBuffer.ts
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
94
95
96
97
98
99
100
101
// *** 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! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";
/**
* Manages an AWS Storage Gateway upload buffer.
*
* > **NOTE:** The Storage Gateway API provides no method to remove an upload buffer disk. Destroying this Terraform resource does not perform any Storage Gateway actions.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.storagegateway.UploadBuffer("example", {
* diskId: aws_storagegateway_local_disk_example.id.apply(id => id),
* gatewayArn: aws_storagegateway_gateway_example.arn,
* });
* ```
*/
export class UploadBuffer extends pulumi.CustomResource {
/**
* Get an existing UploadBuffer resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UploadBufferState, opts?: pulumi.CustomResourceOptions): UploadBuffer {
return new UploadBuffer(name, <any>state, { ...opts, id: id });
}
/**
* Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`.
*/
public readonly diskId: pulumi.Output<string>;
/**
* The Amazon Resource Name (ARN) of the gateway.
*/
public readonly gatewayArn: pulumi.Output<string>;
/**
* Create a UploadBuffer resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: UploadBufferArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: UploadBufferArgs | UploadBufferState, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
if (opts && opts.id) {
const state: UploadBufferState = argsOrState as UploadBufferState | undefined;
inputs["diskId"] = state ? state.diskId : undefined;
inputs["gatewayArn"] = state ? state.gatewayArn : undefined;
} else {
const args = argsOrState as UploadBufferArgs | undefined;
if (!args || args.diskId === undefined) {
throw new Error("Missing required property 'diskId'");
}
if (!args || args.gatewayArn === undefined) {
throw new Error("Missing required property 'gatewayArn'");
}
inputs["diskId"] = args ? args.diskId : undefined;
inputs["gatewayArn"] = args ? args.gatewayArn : undefined;
}
super("aws:storagegateway/uploadBuffer:UploadBuffer", name, inputs, opts);
}
}
/**
* Input properties used for looking up and filtering UploadBuffer resources.
*/
export interface UploadBufferState {
/**
* Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`.
*/
readonly diskId?: pulumi.Input<string>;
/**
* The Amazon Resource Name (ARN) of the gateway.
*/
readonly gatewayArn?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a UploadBuffer resource.
*/
export interface UploadBufferArgs {
/**
* Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`.
*/
readonly diskId: pulumi.Input<string>;
/**
* The Amazon Resource Name (ARN) of the gateway.
*/
readonly gatewayArn: pulumi.Input<string>;
}