generated from pulumi/pulumi-tf-provider-boilerplate
/
storageIntegration.go
310 lines (264 loc) · 14.1 KB
/
storageIntegration.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
// *** 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 snowflake
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Import
//
// ```sh
// $ pulumi import snowflake:index/storageIntegration:StorageIntegration example name
// ```
type StorageIntegration struct {
pulumi.CustomResourceState
// The consent URL that is used to create an Azure Snowflake service principle inside your tenant.
AzureConsentUrl pulumi.StringOutput `pulumi:"azureConsentUrl"`
// This is the name of the Snowflake client application created for your account.
AzureMultiTenantAppName pulumi.StringOutput `pulumi:"azureMultiTenantAppName"`
AzureTenantId pulumi.StringPtrOutput `pulumi:"azureTenantId"`
Comment pulumi.StringPtrOutput `pulumi:"comment"`
// Date and time when the storage integration was created.
CreatedOn pulumi.StringOutput `pulumi:"createdOn"`
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
Name pulumi.StringOutput `pulumi:"name"`
// Explicitly limits external stages that use the integration to reference one or more storage locations.
StorageAllowedLocations pulumi.StringArrayOutput `pulumi:"storageAllowedLocations"`
// The external ID that Snowflake will use when assuming the AWS role.
StorageAwsExternalId pulumi.StringOutput `pulumi:"storageAwsExternalId"`
// The Snowflake user that will attempt to assume the AWS role.
StorageAwsIamUserArn pulumi.StringOutput `pulumi:"storageAwsIamUserArn"`
// "bucket-owner-full-control" Enables support for AWS access control lists (ACLs) to grant the bucket owner full control.
StorageAwsObjectAcl pulumi.StringPtrOutput `pulumi:"storageAwsObjectAcl"`
StorageAwsRoleArn pulumi.StringPtrOutput `pulumi:"storageAwsRoleArn"`
// Explicitly prohibits external stages that use the integration from referencing one or more storage locations.
StorageBlockedLocations pulumi.StringArrayOutput `pulumi:"storageBlockedLocations"`
// This is the name of the Snowflake Google Service Account created for your account.
StorageGcpServiceAccount pulumi.StringOutput `pulumi:"storageGcpServiceAccount"`
StorageProvider pulumi.StringOutput `pulumi:"storageProvider"`
Type pulumi.StringPtrOutput `pulumi:"type"`
}
// NewStorageIntegration registers a new resource with the given unique name, arguments, and options.
func NewStorageIntegration(ctx *pulumi.Context,
name string, args *StorageIntegrationArgs, opts ...pulumi.ResourceOption) (*StorageIntegration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageAllowedLocations == nil {
return nil, errors.New("invalid value for required argument 'StorageAllowedLocations'")
}
if args.StorageProvider == nil {
return nil, errors.New("invalid value for required argument 'StorageProvider'")
}
var resource StorageIntegration
err := ctx.RegisterResource("snowflake:index/storageIntegration:StorageIntegration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStorageIntegration gets an existing StorageIntegration 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 GetStorageIntegration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StorageIntegrationState, opts ...pulumi.ResourceOption) (*StorageIntegration, error) {
var resource StorageIntegration
err := ctx.ReadResource("snowflake:index/storageIntegration:StorageIntegration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StorageIntegration resources.
type storageIntegrationState struct {
// The consent URL that is used to create an Azure Snowflake service principle inside your tenant.
AzureConsentUrl *string `pulumi:"azureConsentUrl"`
// This is the name of the Snowflake client application created for your account.
AzureMultiTenantAppName *string `pulumi:"azureMultiTenantAppName"`
AzureTenantId *string `pulumi:"azureTenantId"`
Comment *string `pulumi:"comment"`
// Date and time when the storage integration was created.
CreatedOn *string `pulumi:"createdOn"`
Enabled *bool `pulumi:"enabled"`
Name *string `pulumi:"name"`
// Explicitly limits external stages that use the integration to reference one or more storage locations.
StorageAllowedLocations []string `pulumi:"storageAllowedLocations"`
// The external ID that Snowflake will use when assuming the AWS role.
StorageAwsExternalId *string `pulumi:"storageAwsExternalId"`
// The Snowflake user that will attempt to assume the AWS role.
StorageAwsIamUserArn *string `pulumi:"storageAwsIamUserArn"`
// "bucket-owner-full-control" Enables support for AWS access control lists (ACLs) to grant the bucket owner full control.
StorageAwsObjectAcl *string `pulumi:"storageAwsObjectAcl"`
StorageAwsRoleArn *string `pulumi:"storageAwsRoleArn"`
// Explicitly prohibits external stages that use the integration from referencing one or more storage locations.
StorageBlockedLocations []string `pulumi:"storageBlockedLocations"`
// This is the name of the Snowflake Google Service Account created for your account.
StorageGcpServiceAccount *string `pulumi:"storageGcpServiceAccount"`
StorageProvider *string `pulumi:"storageProvider"`
Type *string `pulumi:"type"`
}
type StorageIntegrationState struct {
// The consent URL that is used to create an Azure Snowflake service principle inside your tenant.
AzureConsentUrl pulumi.StringPtrInput
// This is the name of the Snowflake client application created for your account.
AzureMultiTenantAppName pulumi.StringPtrInput
AzureTenantId pulumi.StringPtrInput
Comment pulumi.StringPtrInput
// Date and time when the storage integration was created.
CreatedOn pulumi.StringPtrInput
Enabled pulumi.BoolPtrInput
Name pulumi.StringPtrInput
// Explicitly limits external stages that use the integration to reference one or more storage locations.
StorageAllowedLocations pulumi.StringArrayInput
// The external ID that Snowflake will use when assuming the AWS role.
StorageAwsExternalId pulumi.StringPtrInput
// The Snowflake user that will attempt to assume the AWS role.
StorageAwsIamUserArn pulumi.StringPtrInput
// "bucket-owner-full-control" Enables support for AWS access control lists (ACLs) to grant the bucket owner full control.
StorageAwsObjectAcl pulumi.StringPtrInput
StorageAwsRoleArn pulumi.StringPtrInput
// Explicitly prohibits external stages that use the integration from referencing one or more storage locations.
StorageBlockedLocations pulumi.StringArrayInput
// This is the name of the Snowflake Google Service Account created for your account.
StorageGcpServiceAccount pulumi.StringPtrInput
StorageProvider pulumi.StringPtrInput
Type pulumi.StringPtrInput
}
func (StorageIntegrationState) ElementType() reflect.Type {
return reflect.TypeOf((*storageIntegrationState)(nil)).Elem()
}
type storageIntegrationArgs struct {
AzureTenantId *string `pulumi:"azureTenantId"`
Comment *string `pulumi:"comment"`
Enabled *bool `pulumi:"enabled"`
Name *string `pulumi:"name"`
// Explicitly limits external stages that use the integration to reference one or more storage locations.
StorageAllowedLocations []string `pulumi:"storageAllowedLocations"`
// "bucket-owner-full-control" Enables support for AWS access control lists (ACLs) to grant the bucket owner full control.
StorageAwsObjectAcl *string `pulumi:"storageAwsObjectAcl"`
StorageAwsRoleArn *string `pulumi:"storageAwsRoleArn"`
// Explicitly prohibits external stages that use the integration from referencing one or more storage locations.
StorageBlockedLocations []string `pulumi:"storageBlockedLocations"`
StorageProvider string `pulumi:"storageProvider"`
Type *string `pulumi:"type"`
}
// The set of arguments for constructing a StorageIntegration resource.
type StorageIntegrationArgs struct {
AzureTenantId pulumi.StringPtrInput
Comment pulumi.StringPtrInput
Enabled pulumi.BoolPtrInput
Name pulumi.StringPtrInput
// Explicitly limits external stages that use the integration to reference one or more storage locations.
StorageAllowedLocations pulumi.StringArrayInput
// "bucket-owner-full-control" Enables support for AWS access control lists (ACLs) to grant the bucket owner full control.
StorageAwsObjectAcl pulumi.StringPtrInput
StorageAwsRoleArn pulumi.StringPtrInput
// Explicitly prohibits external stages that use the integration from referencing one or more storage locations.
StorageBlockedLocations pulumi.StringArrayInput
StorageProvider pulumi.StringInput
Type pulumi.StringPtrInput
}
func (StorageIntegrationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*storageIntegrationArgs)(nil)).Elem()
}
type StorageIntegrationInput interface {
pulumi.Input
ToStorageIntegrationOutput() StorageIntegrationOutput
ToStorageIntegrationOutputWithContext(ctx context.Context) StorageIntegrationOutput
}
func (*StorageIntegration) ElementType() reflect.Type {
return reflect.TypeOf((**StorageIntegration)(nil)).Elem()
}
func (i *StorageIntegration) ToStorageIntegrationOutput() StorageIntegrationOutput {
return i.ToStorageIntegrationOutputWithContext(context.Background())
}
func (i *StorageIntegration) ToStorageIntegrationOutputWithContext(ctx context.Context) StorageIntegrationOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageIntegrationOutput)
}
// StorageIntegrationArrayInput is an input type that accepts StorageIntegrationArray and StorageIntegrationArrayOutput values.
// You can construct a concrete instance of `StorageIntegrationArrayInput` via:
//
// StorageIntegrationArray{ StorageIntegrationArgs{...} }
type StorageIntegrationArrayInput interface {
pulumi.Input
ToStorageIntegrationArrayOutput() StorageIntegrationArrayOutput
ToStorageIntegrationArrayOutputWithContext(context.Context) StorageIntegrationArrayOutput
}
type StorageIntegrationArray []StorageIntegrationInput
func (StorageIntegrationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StorageIntegration)(nil)).Elem()
}
func (i StorageIntegrationArray) ToStorageIntegrationArrayOutput() StorageIntegrationArrayOutput {
return i.ToStorageIntegrationArrayOutputWithContext(context.Background())
}
func (i StorageIntegrationArray) ToStorageIntegrationArrayOutputWithContext(ctx context.Context) StorageIntegrationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageIntegrationArrayOutput)
}
// StorageIntegrationMapInput is an input type that accepts StorageIntegrationMap and StorageIntegrationMapOutput values.
// You can construct a concrete instance of `StorageIntegrationMapInput` via:
//
// StorageIntegrationMap{ "key": StorageIntegrationArgs{...} }
type StorageIntegrationMapInput interface {
pulumi.Input
ToStorageIntegrationMapOutput() StorageIntegrationMapOutput
ToStorageIntegrationMapOutputWithContext(context.Context) StorageIntegrationMapOutput
}
type StorageIntegrationMap map[string]StorageIntegrationInput
func (StorageIntegrationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StorageIntegration)(nil)).Elem()
}
func (i StorageIntegrationMap) ToStorageIntegrationMapOutput() StorageIntegrationMapOutput {
return i.ToStorageIntegrationMapOutputWithContext(context.Background())
}
func (i StorageIntegrationMap) ToStorageIntegrationMapOutputWithContext(ctx context.Context) StorageIntegrationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageIntegrationMapOutput)
}
type StorageIntegrationOutput struct{ *pulumi.OutputState }
func (StorageIntegrationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StorageIntegration)(nil)).Elem()
}
func (o StorageIntegrationOutput) ToStorageIntegrationOutput() StorageIntegrationOutput {
return o
}
func (o StorageIntegrationOutput) ToStorageIntegrationOutputWithContext(ctx context.Context) StorageIntegrationOutput {
return o
}
type StorageIntegrationArrayOutput struct{ *pulumi.OutputState }
func (StorageIntegrationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StorageIntegration)(nil)).Elem()
}
func (o StorageIntegrationArrayOutput) ToStorageIntegrationArrayOutput() StorageIntegrationArrayOutput {
return o
}
func (o StorageIntegrationArrayOutput) ToStorageIntegrationArrayOutputWithContext(ctx context.Context) StorageIntegrationArrayOutput {
return o
}
func (o StorageIntegrationArrayOutput) Index(i pulumi.IntInput) StorageIntegrationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StorageIntegration {
return vs[0].([]*StorageIntegration)[vs[1].(int)]
}).(StorageIntegrationOutput)
}
type StorageIntegrationMapOutput struct{ *pulumi.OutputState }
func (StorageIntegrationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StorageIntegration)(nil)).Elem()
}
func (o StorageIntegrationMapOutput) ToStorageIntegrationMapOutput() StorageIntegrationMapOutput {
return o
}
func (o StorageIntegrationMapOutput) ToStorageIntegrationMapOutputWithContext(ctx context.Context) StorageIntegrationMapOutput {
return o
}
func (o StorageIntegrationMapOutput) MapIndex(k pulumi.StringInput) StorageIntegrationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StorageIntegration {
return vs[0].(map[string]*StorageIntegration)[vs[1].(string)]
}).(StorageIntegrationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StorageIntegrationInput)(nil)).Elem(), &StorageIntegration{})
pulumi.RegisterInputType(reflect.TypeOf((*StorageIntegrationArrayInput)(nil)).Elem(), StorageIntegrationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StorageIntegrationMapInput)(nil)).Elem(), StorageIntegrationMap{})
pulumi.RegisterOutputType(StorageIntegrationOutput{})
pulumi.RegisterOutputType(StorageIntegrationArrayOutput{})
pulumi.RegisterOutputType(StorageIntegrationMapOutput{})
}