generated from pulumi/pulumi-tf-provider-boilerplate
/
gatewayBlockVolume.go
512 lines (449 loc) · 24.8 KB
/
gatewayBlockVolume.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cloudstoragegateway
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a Cloud Storage Gateway Gateway Block Volume resource.
//
// For information about Cloud Storage Gateway Gateway Block Volume and how to use it, see [What is Gateway Block Volume](https://www.alibabacloud.com/help/en/doc-detail/53972.htm).
//
// > **NOTE:** Available in v1.144.0+.
//
// ## Import
//
// Cloud Storage Gateway Gateway Block Volume can be imported using the id, e.g.
//
// ```sh
//
// $ pulumi import alicloud:cloudstoragegateway/gatewayBlockVolume:GatewayBlockVolume example <gateway_id>:<index_id>
//
// ```
type GatewayBlockVolume struct {
pulumi.CustomResourceState
// The Block volume set mode to cache mode. Valid values: `Cache`, `WriteThrough`.
CacheMode pulumi.StringOutput `pulumi:"cacheMode"`
// Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: `false`.
ChapEnabled pulumi.BoolOutput `pulumi:"chapEnabled"`
// The password for inbound authentication when the block volume enables iSCSI access to CHAP authentication. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInPassword pulumi.StringPtrOutput `pulumi:"chapInPassword"`
// The Inbound CHAP user. The `chapInUser` must be 1 to 32 characters in length, and can contain letters and digits. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInUser pulumi.StringPtrOutput `pulumi:"chapInUser"`
// The Block volume storage allocation unit. Valid values: `8192`, `16384`, `32768`, `65536`, `131072`. Default value: `32768`. Unit: `Byte`.
ChunkSize pulumi.IntOutput `pulumi:"chunkSize"`
// The Block volume name. The name must be 1 to 32 characters in length, and can contain lower case letters and digits.
GatewayBlockVolumeName pulumi.StringOutput `pulumi:"gatewayBlockVolumeName"`
// The Gateway ID.
GatewayId pulumi.StringOutput `pulumi:"gatewayId"`
// The ID of the index.
IndexId pulumi.StringOutput `pulumi:"indexId"`
// Whether to delete the source data. Default value `true`. **NOTE:** When `isSourceDeletion` is `true`, the data in the OSS Bucket on the cloud is also deleted when deleting the block gateway volume. Please operate with caution.
IsSourceDeletion pulumi.BoolPtrOutput `pulumi:"isSourceDeletion"`
// The Cache disk to local path. **NOTE:** When the `cacheMode` is `Cache` is,The `chapInPassword` is valid.
LocalPath pulumi.StringPtrOutput `pulumi:"localPath"`
// The name of the OSS Bucket.
OssBucketName pulumi.StringOutput `pulumi:"ossBucketName"`
// Whether to enable SSL access your OSS Buckets. Default value: `true`.
OssBucketSsl pulumi.BoolOutput `pulumi:"ossBucketSsl"`
// The endpoint of the OSS Bucket.
OssEndpoint pulumi.StringOutput `pulumi:"ossEndpoint"`
// The Protocol. Valid values: `iSCSI`.
Protocol pulumi.StringOutput `pulumi:"protocol"`
// The recovery.
Recovery pulumi.BoolPtrOutput `pulumi:"recovery"`
// The Volume size. Valid values: `1` to `262144`. Unit: `Byte`.
Size pulumi.IntOutput `pulumi:"size"`
// The status of volume. Valid values:
// - `0`: Normal condition.
// - `1`: Failed to create volume.
// - `2`: Failed to delete volume.
// - `3`: Failed to enable target.
// - `4`: Failed to disable target.
// - `5`: Database error.
// - `6`: Failed to enable cache.
// - `7`: Failed to disable cache.
// - `8`: System error.
Status pulumi.StringOutput `pulumi:"status"`
}
// NewGatewayBlockVolume registers a new resource with the given unique name, arguments, and options.
func NewGatewayBlockVolume(ctx *pulumi.Context,
name string, args *GatewayBlockVolumeArgs, opts ...pulumi.ResourceOption) (*GatewayBlockVolume, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.GatewayBlockVolumeName == nil {
return nil, errors.New("invalid value for required argument 'GatewayBlockVolumeName'")
}
if args.GatewayId == nil {
return nil, errors.New("invalid value for required argument 'GatewayId'")
}
if args.OssBucketName == nil {
return nil, errors.New("invalid value for required argument 'OssBucketName'")
}
if args.OssEndpoint == nil {
return nil, errors.New("invalid value for required argument 'OssEndpoint'")
}
if args.Protocol == nil {
return nil, errors.New("invalid value for required argument 'Protocol'")
}
opts = pkgResourceDefaultOpts(opts)
var resource GatewayBlockVolume
err := ctx.RegisterResource("alicloud:cloudstoragegateway/gatewayBlockVolume:GatewayBlockVolume", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGatewayBlockVolume gets an existing GatewayBlockVolume 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 GetGatewayBlockVolume(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GatewayBlockVolumeState, opts ...pulumi.ResourceOption) (*GatewayBlockVolume, error) {
var resource GatewayBlockVolume
err := ctx.ReadResource("alicloud:cloudstoragegateway/gatewayBlockVolume:GatewayBlockVolume", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GatewayBlockVolume resources.
type gatewayBlockVolumeState struct {
// The Block volume set mode to cache mode. Valid values: `Cache`, `WriteThrough`.
CacheMode *string `pulumi:"cacheMode"`
// Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: `false`.
ChapEnabled *bool `pulumi:"chapEnabled"`
// The password for inbound authentication when the block volume enables iSCSI access to CHAP authentication. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInPassword *string `pulumi:"chapInPassword"`
// The Inbound CHAP user. The `chapInUser` must be 1 to 32 characters in length, and can contain letters and digits. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInUser *string `pulumi:"chapInUser"`
// The Block volume storage allocation unit. Valid values: `8192`, `16384`, `32768`, `65536`, `131072`. Default value: `32768`. Unit: `Byte`.
ChunkSize *int `pulumi:"chunkSize"`
// The Block volume name. The name must be 1 to 32 characters in length, and can contain lower case letters and digits.
GatewayBlockVolumeName *string `pulumi:"gatewayBlockVolumeName"`
// The Gateway ID.
GatewayId *string `pulumi:"gatewayId"`
// The ID of the index.
IndexId *string `pulumi:"indexId"`
// Whether to delete the source data. Default value `true`. **NOTE:** When `isSourceDeletion` is `true`, the data in the OSS Bucket on the cloud is also deleted when deleting the block gateway volume. Please operate with caution.
IsSourceDeletion *bool `pulumi:"isSourceDeletion"`
// The Cache disk to local path. **NOTE:** When the `cacheMode` is `Cache` is,The `chapInPassword` is valid.
LocalPath *string `pulumi:"localPath"`
// The name of the OSS Bucket.
OssBucketName *string `pulumi:"ossBucketName"`
// Whether to enable SSL access your OSS Buckets. Default value: `true`.
OssBucketSsl *bool `pulumi:"ossBucketSsl"`
// The endpoint of the OSS Bucket.
OssEndpoint *string `pulumi:"ossEndpoint"`
// The Protocol. Valid values: `iSCSI`.
Protocol *string `pulumi:"protocol"`
// The recovery.
Recovery *bool `pulumi:"recovery"`
// The Volume size. Valid values: `1` to `262144`. Unit: `Byte`.
Size *int `pulumi:"size"`
// The status of volume. Valid values:
// - `0`: Normal condition.
// - `1`: Failed to create volume.
// - `2`: Failed to delete volume.
// - `3`: Failed to enable target.
// - `4`: Failed to disable target.
// - `5`: Database error.
// - `6`: Failed to enable cache.
// - `7`: Failed to disable cache.
// - `8`: System error.
Status *string `pulumi:"status"`
}
type GatewayBlockVolumeState struct {
// The Block volume set mode to cache mode. Valid values: `Cache`, `WriteThrough`.
CacheMode pulumi.StringPtrInput
// Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: `false`.
ChapEnabled pulumi.BoolPtrInput
// The password for inbound authentication when the block volume enables iSCSI access to CHAP authentication. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInPassword pulumi.StringPtrInput
// The Inbound CHAP user. The `chapInUser` must be 1 to 32 characters in length, and can contain letters and digits. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInUser pulumi.StringPtrInput
// The Block volume storage allocation unit. Valid values: `8192`, `16384`, `32768`, `65536`, `131072`. Default value: `32768`. Unit: `Byte`.
ChunkSize pulumi.IntPtrInput
// The Block volume name. The name must be 1 to 32 characters in length, and can contain lower case letters and digits.
GatewayBlockVolumeName pulumi.StringPtrInput
// The Gateway ID.
GatewayId pulumi.StringPtrInput
// The ID of the index.
IndexId pulumi.StringPtrInput
// Whether to delete the source data. Default value `true`. **NOTE:** When `isSourceDeletion` is `true`, the data in the OSS Bucket on the cloud is also deleted when deleting the block gateway volume. Please operate with caution.
IsSourceDeletion pulumi.BoolPtrInput
// The Cache disk to local path. **NOTE:** When the `cacheMode` is `Cache` is,The `chapInPassword` is valid.
LocalPath pulumi.StringPtrInput
// The name of the OSS Bucket.
OssBucketName pulumi.StringPtrInput
// Whether to enable SSL access your OSS Buckets. Default value: `true`.
OssBucketSsl pulumi.BoolPtrInput
// The endpoint of the OSS Bucket.
OssEndpoint pulumi.StringPtrInput
// The Protocol. Valid values: `iSCSI`.
Protocol pulumi.StringPtrInput
// The recovery.
Recovery pulumi.BoolPtrInput
// The Volume size. Valid values: `1` to `262144`. Unit: `Byte`.
Size pulumi.IntPtrInput
// The status of volume. Valid values:
// - `0`: Normal condition.
// - `1`: Failed to create volume.
// - `2`: Failed to delete volume.
// - `3`: Failed to enable target.
// - `4`: Failed to disable target.
// - `5`: Database error.
// - `6`: Failed to enable cache.
// - `7`: Failed to disable cache.
// - `8`: System error.
Status pulumi.StringPtrInput
}
func (GatewayBlockVolumeState) ElementType() reflect.Type {
return reflect.TypeOf((*gatewayBlockVolumeState)(nil)).Elem()
}
type gatewayBlockVolumeArgs struct {
// The Block volume set mode to cache mode. Valid values: `Cache`, `WriteThrough`.
CacheMode *string `pulumi:"cacheMode"`
// Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: `false`.
ChapEnabled *bool `pulumi:"chapEnabled"`
// The password for inbound authentication when the block volume enables iSCSI access to CHAP authentication. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInPassword *string `pulumi:"chapInPassword"`
// The Inbound CHAP user. The `chapInUser` must be 1 to 32 characters in length, and can contain letters and digits. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInUser *string `pulumi:"chapInUser"`
// The Block volume storage allocation unit. Valid values: `8192`, `16384`, `32768`, `65536`, `131072`. Default value: `32768`. Unit: `Byte`.
ChunkSize *int `pulumi:"chunkSize"`
// The Block volume name. The name must be 1 to 32 characters in length, and can contain lower case letters and digits.
GatewayBlockVolumeName string `pulumi:"gatewayBlockVolumeName"`
// The Gateway ID.
GatewayId string `pulumi:"gatewayId"`
// Whether to delete the source data. Default value `true`. **NOTE:** When `isSourceDeletion` is `true`, the data in the OSS Bucket on the cloud is also deleted when deleting the block gateway volume. Please operate with caution.
IsSourceDeletion *bool `pulumi:"isSourceDeletion"`
// The Cache disk to local path. **NOTE:** When the `cacheMode` is `Cache` is,The `chapInPassword` is valid.
LocalPath *string `pulumi:"localPath"`
// The name of the OSS Bucket.
OssBucketName string `pulumi:"ossBucketName"`
// Whether to enable SSL access your OSS Buckets. Default value: `true`.
OssBucketSsl *bool `pulumi:"ossBucketSsl"`
// The endpoint of the OSS Bucket.
OssEndpoint string `pulumi:"ossEndpoint"`
// The Protocol. Valid values: `iSCSI`.
Protocol string `pulumi:"protocol"`
// The recovery.
Recovery *bool `pulumi:"recovery"`
// The Volume size. Valid values: `1` to `262144`. Unit: `Byte`.
Size *int `pulumi:"size"`
}
// The set of arguments for constructing a GatewayBlockVolume resource.
type GatewayBlockVolumeArgs struct {
// The Block volume set mode to cache mode. Valid values: `Cache`, `WriteThrough`.
CacheMode pulumi.StringPtrInput
// Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: `false`.
ChapEnabled pulumi.BoolPtrInput
// The password for inbound authentication when the block volume enables iSCSI access to CHAP authentication. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInPassword pulumi.StringPtrInput
// The Inbound CHAP user. The `chapInUser` must be 1 to 32 characters in length, and can contain letters and digits. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
ChapInUser pulumi.StringPtrInput
// The Block volume storage allocation unit. Valid values: `8192`, `16384`, `32768`, `65536`, `131072`. Default value: `32768`. Unit: `Byte`.
ChunkSize pulumi.IntPtrInput
// The Block volume name. The name must be 1 to 32 characters in length, and can contain lower case letters and digits.
GatewayBlockVolumeName pulumi.StringInput
// The Gateway ID.
GatewayId pulumi.StringInput
// Whether to delete the source data. Default value `true`. **NOTE:** When `isSourceDeletion` is `true`, the data in the OSS Bucket on the cloud is also deleted when deleting the block gateway volume. Please operate with caution.
IsSourceDeletion pulumi.BoolPtrInput
// The Cache disk to local path. **NOTE:** When the `cacheMode` is `Cache` is,The `chapInPassword` is valid.
LocalPath pulumi.StringPtrInput
// The name of the OSS Bucket.
OssBucketName pulumi.StringInput
// Whether to enable SSL access your OSS Buckets. Default value: `true`.
OssBucketSsl pulumi.BoolPtrInput
// The endpoint of the OSS Bucket.
OssEndpoint pulumi.StringInput
// The Protocol. Valid values: `iSCSI`.
Protocol pulumi.StringInput
// The recovery.
Recovery pulumi.BoolPtrInput
// The Volume size. Valid values: `1` to `262144`. Unit: `Byte`.
Size pulumi.IntPtrInput
}
func (GatewayBlockVolumeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*gatewayBlockVolumeArgs)(nil)).Elem()
}
type GatewayBlockVolumeInput interface {
pulumi.Input
ToGatewayBlockVolumeOutput() GatewayBlockVolumeOutput
ToGatewayBlockVolumeOutputWithContext(ctx context.Context) GatewayBlockVolumeOutput
}
func (*GatewayBlockVolume) ElementType() reflect.Type {
return reflect.TypeOf((**GatewayBlockVolume)(nil)).Elem()
}
func (i *GatewayBlockVolume) ToGatewayBlockVolumeOutput() GatewayBlockVolumeOutput {
return i.ToGatewayBlockVolumeOutputWithContext(context.Background())
}
func (i *GatewayBlockVolume) ToGatewayBlockVolumeOutputWithContext(ctx context.Context) GatewayBlockVolumeOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayBlockVolumeOutput)
}
// GatewayBlockVolumeArrayInput is an input type that accepts GatewayBlockVolumeArray and GatewayBlockVolumeArrayOutput values.
// You can construct a concrete instance of `GatewayBlockVolumeArrayInput` via:
//
// GatewayBlockVolumeArray{ GatewayBlockVolumeArgs{...} }
type GatewayBlockVolumeArrayInput interface {
pulumi.Input
ToGatewayBlockVolumeArrayOutput() GatewayBlockVolumeArrayOutput
ToGatewayBlockVolumeArrayOutputWithContext(context.Context) GatewayBlockVolumeArrayOutput
}
type GatewayBlockVolumeArray []GatewayBlockVolumeInput
func (GatewayBlockVolumeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GatewayBlockVolume)(nil)).Elem()
}
func (i GatewayBlockVolumeArray) ToGatewayBlockVolumeArrayOutput() GatewayBlockVolumeArrayOutput {
return i.ToGatewayBlockVolumeArrayOutputWithContext(context.Background())
}
func (i GatewayBlockVolumeArray) ToGatewayBlockVolumeArrayOutputWithContext(ctx context.Context) GatewayBlockVolumeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayBlockVolumeArrayOutput)
}
// GatewayBlockVolumeMapInput is an input type that accepts GatewayBlockVolumeMap and GatewayBlockVolumeMapOutput values.
// You can construct a concrete instance of `GatewayBlockVolumeMapInput` via:
//
// GatewayBlockVolumeMap{ "key": GatewayBlockVolumeArgs{...} }
type GatewayBlockVolumeMapInput interface {
pulumi.Input
ToGatewayBlockVolumeMapOutput() GatewayBlockVolumeMapOutput
ToGatewayBlockVolumeMapOutputWithContext(context.Context) GatewayBlockVolumeMapOutput
}
type GatewayBlockVolumeMap map[string]GatewayBlockVolumeInput
func (GatewayBlockVolumeMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GatewayBlockVolume)(nil)).Elem()
}
func (i GatewayBlockVolumeMap) ToGatewayBlockVolumeMapOutput() GatewayBlockVolumeMapOutput {
return i.ToGatewayBlockVolumeMapOutputWithContext(context.Background())
}
func (i GatewayBlockVolumeMap) ToGatewayBlockVolumeMapOutputWithContext(ctx context.Context) GatewayBlockVolumeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayBlockVolumeMapOutput)
}
type GatewayBlockVolumeOutput struct{ *pulumi.OutputState }
func (GatewayBlockVolumeOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GatewayBlockVolume)(nil)).Elem()
}
func (o GatewayBlockVolumeOutput) ToGatewayBlockVolumeOutput() GatewayBlockVolumeOutput {
return o
}
func (o GatewayBlockVolumeOutput) ToGatewayBlockVolumeOutputWithContext(ctx context.Context) GatewayBlockVolumeOutput {
return o
}
// The Block volume set mode to cache mode. Valid values: `Cache`, `WriteThrough`.
func (o GatewayBlockVolumeOutput) CacheMode() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringOutput { return v.CacheMode }).(pulumi.StringOutput)
}
// Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: `false`.
func (o GatewayBlockVolumeOutput) ChapEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.BoolOutput { return v.ChapEnabled }).(pulumi.BoolOutput)
}
// The password for inbound authentication when the block volume enables iSCSI access to CHAP authentication. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
func (o GatewayBlockVolumeOutput) ChapInPassword() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringPtrOutput { return v.ChapInPassword }).(pulumi.StringPtrOutput)
}
// The Inbound CHAP user. The `chapInUser` must be 1 to 32 characters in length, and can contain letters and digits. **NOTE:** When the `chapEnabled` is `true` is,The `chapInPassword` is valid.
func (o GatewayBlockVolumeOutput) ChapInUser() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringPtrOutput { return v.ChapInUser }).(pulumi.StringPtrOutput)
}
// The Block volume storage allocation unit. Valid values: `8192`, `16384`, `32768`, `65536`, `131072`. Default value: `32768`. Unit: `Byte`.
func (o GatewayBlockVolumeOutput) ChunkSize() pulumi.IntOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.IntOutput { return v.ChunkSize }).(pulumi.IntOutput)
}
// The Block volume name. The name must be 1 to 32 characters in length, and can contain lower case letters and digits.
func (o GatewayBlockVolumeOutput) GatewayBlockVolumeName() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringOutput { return v.GatewayBlockVolumeName }).(pulumi.StringOutput)
}
// The Gateway ID.
func (o GatewayBlockVolumeOutput) GatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringOutput { return v.GatewayId }).(pulumi.StringOutput)
}
// The ID of the index.
func (o GatewayBlockVolumeOutput) IndexId() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringOutput { return v.IndexId }).(pulumi.StringOutput)
}
// Whether to delete the source data. Default value `true`. **NOTE:** When `isSourceDeletion` is `true`, the data in the OSS Bucket on the cloud is also deleted when deleting the block gateway volume. Please operate with caution.
func (o GatewayBlockVolumeOutput) IsSourceDeletion() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.BoolPtrOutput { return v.IsSourceDeletion }).(pulumi.BoolPtrOutput)
}
// The Cache disk to local path. **NOTE:** When the `cacheMode` is `Cache` is,The `chapInPassword` is valid.
func (o GatewayBlockVolumeOutput) LocalPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringPtrOutput { return v.LocalPath }).(pulumi.StringPtrOutput)
}
// The name of the OSS Bucket.
func (o GatewayBlockVolumeOutput) OssBucketName() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringOutput { return v.OssBucketName }).(pulumi.StringOutput)
}
// Whether to enable SSL access your OSS Buckets. Default value: `true`.
func (o GatewayBlockVolumeOutput) OssBucketSsl() pulumi.BoolOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.BoolOutput { return v.OssBucketSsl }).(pulumi.BoolOutput)
}
// The endpoint of the OSS Bucket.
func (o GatewayBlockVolumeOutput) OssEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringOutput { return v.OssEndpoint }).(pulumi.StringOutput)
}
// The Protocol. Valid values: `iSCSI`.
func (o GatewayBlockVolumeOutput) Protocol() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput)
}
// The recovery.
func (o GatewayBlockVolumeOutput) Recovery() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.BoolPtrOutput { return v.Recovery }).(pulumi.BoolPtrOutput)
}
// The Volume size. Valid values: `1` to `262144`. Unit: `Byte`.
func (o GatewayBlockVolumeOutput) Size() pulumi.IntOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.IntOutput { return v.Size }).(pulumi.IntOutput)
}
// The status of volume. Valid values:
// - `0`: Normal condition.
// - `1`: Failed to create volume.
// - `2`: Failed to delete volume.
// - `3`: Failed to enable target.
// - `4`: Failed to disable target.
// - `5`: Database error.
// - `6`: Failed to enable cache.
// - `7`: Failed to disable cache.
// - `8`: System error.
func (o GatewayBlockVolumeOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayBlockVolume) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
type GatewayBlockVolumeArrayOutput struct{ *pulumi.OutputState }
func (GatewayBlockVolumeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GatewayBlockVolume)(nil)).Elem()
}
func (o GatewayBlockVolumeArrayOutput) ToGatewayBlockVolumeArrayOutput() GatewayBlockVolumeArrayOutput {
return o
}
func (o GatewayBlockVolumeArrayOutput) ToGatewayBlockVolumeArrayOutputWithContext(ctx context.Context) GatewayBlockVolumeArrayOutput {
return o
}
func (o GatewayBlockVolumeArrayOutput) Index(i pulumi.IntInput) GatewayBlockVolumeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GatewayBlockVolume {
return vs[0].([]*GatewayBlockVolume)[vs[1].(int)]
}).(GatewayBlockVolumeOutput)
}
type GatewayBlockVolumeMapOutput struct{ *pulumi.OutputState }
func (GatewayBlockVolumeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GatewayBlockVolume)(nil)).Elem()
}
func (o GatewayBlockVolumeMapOutput) ToGatewayBlockVolumeMapOutput() GatewayBlockVolumeMapOutput {
return o
}
func (o GatewayBlockVolumeMapOutput) ToGatewayBlockVolumeMapOutputWithContext(ctx context.Context) GatewayBlockVolumeMapOutput {
return o
}
func (o GatewayBlockVolumeMapOutput) MapIndex(k pulumi.StringInput) GatewayBlockVolumeOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GatewayBlockVolume {
return vs[0].(map[string]*GatewayBlockVolume)[vs[1].(string)]
}).(GatewayBlockVolumeOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GatewayBlockVolumeInput)(nil)).Elem(), &GatewayBlockVolume{})
pulumi.RegisterInputType(reflect.TypeOf((*GatewayBlockVolumeArrayInput)(nil)).Elem(), GatewayBlockVolumeArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GatewayBlockVolumeMapInput)(nil)).Elem(), GatewayBlockVolumeMap{})
pulumi.RegisterOutputType(GatewayBlockVolumeOutput{})
pulumi.RegisterOutputType(GatewayBlockVolumeArrayOutput{})
pulumi.RegisterOutputType(GatewayBlockVolumeMapOutput{})
}