This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
blobContainer.go
281 lines (257 loc) · 13.6 KB
/
blobContainer.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
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20190601
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Properties of the blob container, including Id, resource name, resource type, Etag.
type BlobContainer struct {
pulumi.CustomResourceState
// Default the container to use specified encryption scope for all writes.
DefaultEncryptionScope pulumi.StringPtrOutput `pulumi:"defaultEncryptionScope"`
// Indicates whether the blob container was deleted.
Deleted pulumi.BoolOutput `pulumi:"deleted"`
// Blob container deletion time.
DeletedTime pulumi.StringOutput `pulumi:"deletedTime"`
// Block override of encryption scope from the container default.
DenyEncryptionScopeOverride pulumi.BoolPtrOutput `pulumi:"denyEncryptionScopeOverride"`
// Resource Etag.
Etag pulumi.StringOutput `pulumi:"etag"`
// The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
HasImmutabilityPolicy pulumi.BoolOutput `pulumi:"hasImmutabilityPolicy"`
// The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
HasLegalHold pulumi.BoolOutput `pulumi:"hasLegalHold"`
// The ImmutabilityPolicy property of the container.
ImmutabilityPolicy ImmutabilityPolicyPropertiesResponseOutput `pulumi:"immutabilityPolicy"`
// Returns the date and time the container was last modified.
LastModifiedTime pulumi.StringOutput `pulumi:"lastModifiedTime"`
// Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
LeaseDuration pulumi.StringOutput `pulumi:"leaseDuration"`
// Lease state of the container.
LeaseState pulumi.StringOutput `pulumi:"leaseState"`
// The lease status of the container.
LeaseStatus pulumi.StringOutput `pulumi:"leaseStatus"`
// The LegalHold property of the container.
LegalHold LegalHoldPropertiesResponseOutput `pulumi:"legalHold"`
// A name-value pair to associate with the container as metadata.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// The name of the resource
Name pulumi.StringOutput `pulumi:"name"`
// Specifies whether data in the container may be accessed publicly and the level of access.
PublicAccess pulumi.StringPtrOutput `pulumi:"publicAccess"`
// Remaining retention days for soft deleted blob container.
RemainingRetentionDays pulumi.IntOutput `pulumi:"remainingRetentionDays"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type pulumi.StringOutput `pulumi:"type"`
// The version of the deleted blob container.
Version pulumi.StringOutput `pulumi:"version"`
}
// NewBlobContainer registers a new resource with the given unique name, arguments, and options.
func NewBlobContainer(ctx *pulumi.Context,
name string, args *BlobContainerArgs, opts ...pulumi.ResourceOption) (*BlobContainer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccountName == nil {
return nil, errors.New("invalid value for required argument 'AccountName'")
}
if args.ContainerName == nil {
return nil, errors.New("invalid value for required argument 'ContainerName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:storage/latest:BlobContainer"),
},
{
Type: pulumi.String("azure-nextgen:storage/v20180201:BlobContainer"),
},
{
Type: pulumi.String("azure-nextgen:storage/v20180301preview:BlobContainer"),
},
{
Type: pulumi.String("azure-nextgen:storage/v20180701:BlobContainer"),
},
{
Type: pulumi.String("azure-nextgen:storage/v20181101:BlobContainer"),
},
{
Type: pulumi.String("azure-nextgen:storage/v20190401:BlobContainer"),
},
{
Type: pulumi.String("azure-nextgen:storage/v20200801preview:BlobContainer"),
},
})
opts = append(opts, aliases)
var resource BlobContainer
err := ctx.RegisterResource("azure-nextgen:storage/v20190601:BlobContainer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBlobContainer gets an existing BlobContainer 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 GetBlobContainer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BlobContainerState, opts ...pulumi.ResourceOption) (*BlobContainer, error) {
var resource BlobContainer
err := ctx.ReadResource("azure-nextgen:storage/v20190601:BlobContainer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BlobContainer resources.
type blobContainerState struct {
// Default the container to use specified encryption scope for all writes.
DefaultEncryptionScope *string `pulumi:"defaultEncryptionScope"`
// Indicates whether the blob container was deleted.
Deleted *bool `pulumi:"deleted"`
// Blob container deletion time.
DeletedTime *string `pulumi:"deletedTime"`
// Block override of encryption scope from the container default.
DenyEncryptionScopeOverride *bool `pulumi:"denyEncryptionScopeOverride"`
// Resource Etag.
Etag *string `pulumi:"etag"`
// The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
HasImmutabilityPolicy *bool `pulumi:"hasImmutabilityPolicy"`
// The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
HasLegalHold *bool `pulumi:"hasLegalHold"`
// The ImmutabilityPolicy property of the container.
ImmutabilityPolicy *ImmutabilityPolicyPropertiesResponse `pulumi:"immutabilityPolicy"`
// Returns the date and time the container was last modified.
LastModifiedTime *string `pulumi:"lastModifiedTime"`
// Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
LeaseDuration *string `pulumi:"leaseDuration"`
// Lease state of the container.
LeaseState *string `pulumi:"leaseState"`
// The lease status of the container.
LeaseStatus *string `pulumi:"leaseStatus"`
// The LegalHold property of the container.
LegalHold *LegalHoldPropertiesResponse `pulumi:"legalHold"`
// A name-value pair to associate with the container as metadata.
Metadata map[string]string `pulumi:"metadata"`
// The name of the resource
Name *string `pulumi:"name"`
// Specifies whether data in the container may be accessed publicly and the level of access.
PublicAccess *string `pulumi:"publicAccess"`
// Remaining retention days for soft deleted blob container.
RemainingRetentionDays *int `pulumi:"remainingRetentionDays"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `pulumi:"type"`
// The version of the deleted blob container.
Version *string `pulumi:"version"`
}
type BlobContainerState struct {
// Default the container to use specified encryption scope for all writes.
DefaultEncryptionScope pulumi.StringPtrInput
// Indicates whether the blob container was deleted.
Deleted pulumi.BoolPtrInput
// Blob container deletion time.
DeletedTime pulumi.StringPtrInput
// Block override of encryption scope from the container default.
DenyEncryptionScopeOverride pulumi.BoolPtrInput
// Resource Etag.
Etag pulumi.StringPtrInput
// The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
HasImmutabilityPolicy pulumi.BoolPtrInput
// The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
HasLegalHold pulumi.BoolPtrInput
// The ImmutabilityPolicy property of the container.
ImmutabilityPolicy ImmutabilityPolicyPropertiesResponsePtrInput
// Returns the date and time the container was last modified.
LastModifiedTime pulumi.StringPtrInput
// Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
LeaseDuration pulumi.StringPtrInput
// Lease state of the container.
LeaseState pulumi.StringPtrInput
// The lease status of the container.
LeaseStatus pulumi.StringPtrInput
// The LegalHold property of the container.
LegalHold LegalHoldPropertiesResponsePtrInput
// A name-value pair to associate with the container as metadata.
Metadata pulumi.StringMapInput
// The name of the resource
Name pulumi.StringPtrInput
// Specifies whether data in the container may be accessed publicly and the level of access.
PublicAccess pulumi.StringPtrInput
// Remaining retention days for soft deleted blob container.
RemainingRetentionDays pulumi.IntPtrInput
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type pulumi.StringPtrInput
// The version of the deleted blob container.
Version pulumi.StringPtrInput
}
func (BlobContainerState) ElementType() reflect.Type {
return reflect.TypeOf((*blobContainerState)(nil)).Elem()
}
type blobContainerArgs struct {
// The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
AccountName string `pulumi:"accountName"`
// The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
ContainerName string `pulumi:"containerName"`
// Default the container to use specified encryption scope for all writes.
DefaultEncryptionScope *string `pulumi:"defaultEncryptionScope"`
// Block override of encryption scope from the container default.
DenyEncryptionScopeOverride *bool `pulumi:"denyEncryptionScopeOverride"`
// A name-value pair to associate with the container as metadata.
Metadata map[string]string `pulumi:"metadata"`
// Specifies whether data in the container may be accessed publicly and the level of access.
PublicAccess *string `pulumi:"publicAccess"`
// The name of the resource group within the user's subscription. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a BlobContainer resource.
type BlobContainerArgs struct {
// The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
AccountName pulumi.StringInput
// The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
ContainerName pulumi.StringInput
// Default the container to use specified encryption scope for all writes.
DefaultEncryptionScope pulumi.StringPtrInput
// Block override of encryption scope from the container default.
DenyEncryptionScopeOverride pulumi.BoolPtrInput
// A name-value pair to associate with the container as metadata.
Metadata pulumi.StringMapInput
// Specifies whether data in the container may be accessed publicly and the level of access.
PublicAccess PublicAccess
// The name of the resource group within the user's subscription. The name is case insensitive.
ResourceGroupName pulumi.StringInput
}
func (BlobContainerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*blobContainerArgs)(nil)).Elem()
}
type BlobContainerInput interface {
pulumi.Input
ToBlobContainerOutput() BlobContainerOutput
ToBlobContainerOutputWithContext(ctx context.Context) BlobContainerOutput
}
func (*BlobContainer) ElementType() reflect.Type {
return reflect.TypeOf((*BlobContainer)(nil))
}
func (i *BlobContainer) ToBlobContainerOutput() BlobContainerOutput {
return i.ToBlobContainerOutputWithContext(context.Background())
}
func (i *BlobContainer) ToBlobContainerOutputWithContext(ctx context.Context) BlobContainerOutput {
return pulumi.ToOutputWithContext(ctx, i).(BlobContainerOutput)
}
type BlobContainerOutput struct {
*pulumi.OutputState
}
func (BlobContainerOutput) ElementType() reflect.Type {
return reflect.TypeOf((*BlobContainer)(nil))
}
func (o BlobContainerOutput) ToBlobContainerOutput() BlobContainerOutput {
return o
}
func (o BlobContainerOutput) ToBlobContainerOutputWithContext(ctx context.Context) BlobContainerOutput {
return o
}
func init() {
pulumi.RegisterOutputType(BlobContainerOutput{})
}