This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
getComputeDisk.go
193 lines (162 loc) · 7.76 KB
/
getComputeDisk.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
// *** 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 yandex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get information about a Yandex Compute disk. For more information, see
// [the official documentation](https://cloud.yandex.com/docs/compute/concepts/disk).
func LookupComputeDisk(ctx *pulumi.Context, args *LookupComputeDiskArgs, opts ...pulumi.InvokeOption) (*LookupComputeDiskResult, error) {
var rv LookupComputeDiskResult
err := ctx.Invoke("yandex:index/getComputeDisk:getComputeDisk", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getComputeDisk.
type LookupComputeDiskArgs struct {
// The ID of a specific disk.
DiskId *string `pulumi:"diskId"`
DiskPlacementPolicy *GetComputeDiskDiskPlacementPolicy `pulumi:"diskPlacementPolicy"`
// ID of the folder that the disk belongs to.
FolderId *string `pulumi:"folderId"`
// Name of the disk.
Name *string `pulumi:"name"`
}
// A collection of values returned by getComputeDisk.
type LookupComputeDiskResult struct {
// The block size of the disk in bytes.
BlockSize int `pulumi:"blockSize"`
// Disk creation timestamp.
CreatedAt string `pulumi:"createdAt"`
// Optional description of this disk.
Description string `pulumi:"description"`
DiskId string `pulumi:"diskId"`
DiskPlacementPolicy *GetComputeDiskDiskPlacementPolicy `pulumi:"diskPlacementPolicy"`
// ID of the folder that the disk belongs to.
FolderId string `pulumi:"folderId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// ID of the source image that was used to create this disk.
ImageId string `pulumi:"imageId"`
// IDs of instances to which this disk is attached.
InstanceIds []string `pulumi:"instanceIds"`
// Map of labels applied to this disk.
Labels map[string]string `pulumi:"labels"`
Name string `pulumi:"name"`
// License IDs that indicate which licenses are attached to this disk.
ProductIds []string `pulumi:"productIds"`
// Size of the disk, specified in Gb.
Size int `pulumi:"size"`
// Source snapshot that was used to create this disk.
SnapshotId string `pulumi:"snapshotId"`
// Status of the disk.
Status string `pulumi:"status"`
// Type of the disk.
Type string `pulumi:"type"`
// ID of the zone where the disk resides.
Zone string `pulumi:"zone"`
}
func LookupComputeDiskOutput(ctx *pulumi.Context, args LookupComputeDiskOutputArgs, opts ...pulumi.InvokeOption) LookupComputeDiskResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupComputeDiskResult, error) {
args := v.(LookupComputeDiskArgs)
r, err := LookupComputeDisk(ctx, &args, opts...)
return *r, err
}).(LookupComputeDiskResultOutput)
}
// A collection of arguments for invoking getComputeDisk.
type LookupComputeDiskOutputArgs struct {
// The ID of a specific disk.
DiskId pulumi.StringPtrInput `pulumi:"diskId"`
DiskPlacementPolicy GetComputeDiskDiskPlacementPolicyPtrInput `pulumi:"diskPlacementPolicy"`
// ID of the folder that the disk belongs to.
FolderId pulumi.StringPtrInput `pulumi:"folderId"`
// Name of the disk.
Name pulumi.StringPtrInput `pulumi:"name"`
}
func (LookupComputeDiskOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupComputeDiskArgs)(nil)).Elem()
}
// A collection of values returned by getComputeDisk.
type LookupComputeDiskResultOutput struct{ *pulumi.OutputState }
func (LookupComputeDiskResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupComputeDiskResult)(nil)).Elem()
}
func (o LookupComputeDiskResultOutput) ToLookupComputeDiskResultOutput() LookupComputeDiskResultOutput {
return o
}
func (o LookupComputeDiskResultOutput) ToLookupComputeDiskResultOutputWithContext(ctx context.Context) LookupComputeDiskResultOutput {
return o
}
// The block size of the disk in bytes.
func (o LookupComputeDiskResultOutput) BlockSize() pulumi.IntOutput {
return o.ApplyT(func(v LookupComputeDiskResult) int { return v.BlockSize }).(pulumi.IntOutput)
}
// Disk creation timestamp.
func (o LookupComputeDiskResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
// Optional description of this disk.
func (o LookupComputeDiskResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.Description }).(pulumi.StringOutput)
}
func (o LookupComputeDiskResultOutput) DiskId() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.DiskId }).(pulumi.StringOutput)
}
func (o LookupComputeDiskResultOutput) DiskPlacementPolicy() GetComputeDiskDiskPlacementPolicyPtrOutput {
return o.ApplyT(func(v LookupComputeDiskResult) *GetComputeDiskDiskPlacementPolicy { return v.DiskPlacementPolicy }).(GetComputeDiskDiskPlacementPolicyPtrOutput)
}
// ID of the folder that the disk belongs to.
func (o LookupComputeDiskResultOutput) FolderId() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.FolderId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupComputeDiskResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.Id }).(pulumi.StringOutput)
}
// ID of the source image that was used to create this disk.
func (o LookupComputeDiskResultOutput) ImageId() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.ImageId }).(pulumi.StringOutput)
}
// IDs of instances to which this disk is attached.
func (o LookupComputeDiskResultOutput) InstanceIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupComputeDiskResult) []string { return v.InstanceIds }).(pulumi.StringArrayOutput)
}
// Map of labels applied to this disk.
func (o LookupComputeDiskResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupComputeDiskResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
func (o LookupComputeDiskResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.Name }).(pulumi.StringOutput)
}
// License IDs that indicate which licenses are attached to this disk.
func (o LookupComputeDiskResultOutput) ProductIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupComputeDiskResult) []string { return v.ProductIds }).(pulumi.StringArrayOutput)
}
// Size of the disk, specified in Gb.
func (o LookupComputeDiskResultOutput) Size() pulumi.IntOutput {
return o.ApplyT(func(v LookupComputeDiskResult) int { return v.Size }).(pulumi.IntOutput)
}
// Source snapshot that was used to create this disk.
func (o LookupComputeDiskResultOutput) SnapshotId() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.SnapshotId }).(pulumi.StringOutput)
}
// Status of the disk.
func (o LookupComputeDiskResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.Status }).(pulumi.StringOutput)
}
// Type of the disk.
func (o LookupComputeDiskResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.Type }).(pulumi.StringOutput)
}
// ID of the zone where the disk resides.
func (o LookupComputeDiskResultOutput) Zone() pulumi.StringOutput {
return o.ApplyT(func(v LookupComputeDiskResult) string { return v.Zone }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupComputeDiskResultOutput{})
}