forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diskPool.go
272 lines (234 loc) · 9.97 KB
/
diskPool.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storagepool
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Response for Disk Pool request.
// Azure REST API version: 2021-08-01. Prior API version in Azure Native 1.x: 2020-03-15-preview.
//
// Other available API versions: 2020-03-15-preview.
type DiskPool struct {
pulumi.CustomResourceState
// List of additional capabilities for Disk Pool.
AdditionalCapabilities pulumi.StringArrayOutput `pulumi:"additionalCapabilities"`
// Logical zone for Disk Pool resource; example: ["1"].
AvailabilityZones pulumi.StringArrayOutput `pulumi:"availabilityZones"`
// List of Azure Managed Disks to attach to a Disk Pool.
Disks DiskResponseArrayOutput `pulumi:"disks"`
// The geo-location where the resource lives.
Location pulumi.StringOutput `pulumi:"location"`
// Azure resource id. Indicates if this resource is managed by another Azure resource.
ManagedBy pulumi.StringOutput `pulumi:"managedBy"`
// List of Azure resource ids that manage this resource.
ManagedByExtended pulumi.StringArrayOutput `pulumi:"managedByExtended"`
// The name of the resource
Name pulumi.StringOutput `pulumi:"name"`
// State of the operation on the resource.
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// Operational status of the Disk Pool.
Status pulumi.StringOutput `pulumi:"status"`
// Azure Resource ID of a Subnet for the Disk Pool.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// Resource metadata required by ARM RPC
SystemData SystemMetadataResponseOutput `pulumi:"systemData"`
// Resource tags.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Sku tier
Tier pulumi.StringPtrOutput `pulumi:"tier"`
// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewDiskPool registers a new resource with the given unique name, arguments, and options.
func NewDiskPool(ctx *pulumi.Context,
name string, args *DiskPoolArgs, opts ...pulumi.ResourceOption) (*DiskPool, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-native:storagepool/v20200315preview:DiskPool"),
},
{
Type: pulumi.String("azure-native:storagepool/v20210401preview:DiskPool"),
},
{
Type: pulumi.String("azure-native:storagepool/v20210801:DiskPool"),
},
})
opts = append(opts, aliases)
opts = utilities.PkgResourceDefaultOpts(opts)
var resource DiskPool
err := ctx.RegisterResource("azure-native:storagepool:DiskPool", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDiskPool gets an existing DiskPool 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 GetDiskPool(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DiskPoolState, opts ...pulumi.ResourceOption) (*DiskPool, error) {
var resource DiskPool
err := ctx.ReadResource("azure-native:storagepool:DiskPool", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DiskPool resources.
type diskPoolState struct {
}
type DiskPoolState struct {
}
func (DiskPoolState) ElementType() reflect.Type {
return reflect.TypeOf((*diskPoolState)(nil)).Elem()
}
type diskPoolArgs struct {
// List of additional capabilities for a Disk Pool.
AdditionalCapabilities []string `pulumi:"additionalCapabilities"`
// Logical zone for Disk Pool resource; example: ["1"].
AvailabilityZones []string `pulumi:"availabilityZones"`
// The name of the Disk Pool.
DiskPoolName *string `pulumi:"diskPoolName"`
// List of Azure Managed Disks to attach to a Disk Pool.
Disks []Disk `pulumi:"disks"`
// The geo-location where the resource lives.
Location *string `pulumi:"location"`
// Azure resource id. Indicates if this resource is managed by another Azure resource.
ManagedBy *string `pulumi:"managedBy"`
// List of Azure resource ids that manage this resource.
ManagedByExtended []string `pulumi:"managedByExtended"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Determines the SKU of the Disk Pool
Sku Sku `pulumi:"sku"`
// Azure Resource ID of a Subnet for the Disk Pool.
SubnetId string `pulumi:"subnetId"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a DiskPool resource.
type DiskPoolArgs struct {
// List of additional capabilities for a Disk Pool.
AdditionalCapabilities pulumi.StringArrayInput
// Logical zone for Disk Pool resource; example: ["1"].
AvailabilityZones pulumi.StringArrayInput
// The name of the Disk Pool.
DiskPoolName pulumi.StringPtrInput
// List of Azure Managed Disks to attach to a Disk Pool.
Disks DiskArrayInput
// The geo-location where the resource lives.
Location pulumi.StringPtrInput
// Azure resource id. Indicates if this resource is managed by another Azure resource.
ManagedBy pulumi.StringPtrInput
// List of Azure resource ids that manage this resource.
ManagedByExtended pulumi.StringArrayInput
// The name of the resource group. The name is case insensitive.
ResourceGroupName pulumi.StringInput
// Determines the SKU of the Disk Pool
Sku SkuInput
// Azure Resource ID of a Subnet for the Disk Pool.
SubnetId pulumi.StringInput
// Resource tags.
Tags pulumi.StringMapInput
}
func (DiskPoolArgs) ElementType() reflect.Type {
return reflect.TypeOf((*diskPoolArgs)(nil)).Elem()
}
type DiskPoolInput interface {
pulumi.Input
ToDiskPoolOutput() DiskPoolOutput
ToDiskPoolOutputWithContext(ctx context.Context) DiskPoolOutput
}
func (*DiskPool) ElementType() reflect.Type {
return reflect.TypeOf((**DiskPool)(nil)).Elem()
}
func (i *DiskPool) ToDiskPoolOutput() DiskPoolOutput {
return i.ToDiskPoolOutputWithContext(context.Background())
}
func (i *DiskPool) ToDiskPoolOutputWithContext(ctx context.Context) DiskPoolOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiskPoolOutput)
}
type DiskPoolOutput struct{ *pulumi.OutputState }
func (DiskPoolOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DiskPool)(nil)).Elem()
}
func (o DiskPoolOutput) ToDiskPoolOutput() DiskPoolOutput {
return o
}
func (o DiskPoolOutput) ToDiskPoolOutputWithContext(ctx context.Context) DiskPoolOutput {
return o
}
// List of additional capabilities for Disk Pool.
func (o DiskPoolOutput) AdditionalCapabilities() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringArrayOutput { return v.AdditionalCapabilities }).(pulumi.StringArrayOutput)
}
// Logical zone for Disk Pool resource; example: ["1"].
func (o DiskPoolOutput) AvailabilityZones() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringArrayOutput { return v.AvailabilityZones }).(pulumi.StringArrayOutput)
}
// List of Azure Managed Disks to attach to a Disk Pool.
func (o DiskPoolOutput) Disks() DiskResponseArrayOutput {
return o.ApplyT(func(v *DiskPool) DiskResponseArrayOutput { return v.Disks }).(DiskResponseArrayOutput)
}
// The geo-location where the resource lives.
func (o DiskPoolOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Azure resource id. Indicates if this resource is managed by another Azure resource.
func (o DiskPoolOutput) ManagedBy() pulumi.StringOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringOutput { return v.ManagedBy }).(pulumi.StringOutput)
}
// List of Azure resource ids that manage this resource.
func (o DiskPoolOutput) ManagedByExtended() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringArrayOutput { return v.ManagedByExtended }).(pulumi.StringArrayOutput)
}
// The name of the resource
func (o DiskPoolOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// State of the operation on the resource.
func (o DiskPoolOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringOutput { return v.ProvisioningState }).(pulumi.StringOutput)
}
// Operational status of the Disk Pool.
func (o DiskPoolOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// Azure Resource ID of a Subnet for the Disk Pool.
func (o DiskPoolOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
}
// Resource metadata required by ARM RPC
func (o DiskPoolOutput) SystemData() SystemMetadataResponseOutput {
return o.ApplyT(func(v *DiskPool) SystemMetadataResponseOutput { return v.SystemData }).(SystemMetadataResponseOutput)
}
// Resource tags.
func (o DiskPoolOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Sku tier
func (o DiskPoolOutput) Tier() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringPtrOutput { return v.Tier }).(pulumi.StringPtrOutput)
}
// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
func (o DiskPoolOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *DiskPool) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(DiskPoolOutput{})
}