/
iamApplication.go
329 lines (276 loc) · 11.6 KB
/
iamApplication.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
// 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 scaleway
import (
"context"
"reflect"
"github.com/dirien/pulumi-scaleway/sdk/v2/go/scaleway/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates and manages Scaleway IAM Applications. For more information, see [the documentation](https://developers.scaleway.com/en/products/iam/api/v1alpha1/#applications-83ce5e).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/dirien/pulumi-scaleway/sdk/v2/go/scaleway"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := scaleway.NewIamApplication(ctx, "main", &scaleway.IamApplicationArgs{
// Description: pulumi.String("a description"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Applications can be imported using the `{id}`, e.g. bash
//
// ```sh
//
// $ pulumi import scaleway:index/iamApplication:IamApplication main 11111111-1111-1111-1111-111111111111
//
// ```
type IamApplication struct {
pulumi.CustomResourceState
// The date and time of the creation of the application.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// The description of the iam application.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Whether the application is editable.
Editable pulumi.BoolOutput `pulumi:"editable"`
// The name of the iam application.
Name pulumi.StringOutput `pulumi:"name"`
// `organizationId`) The ID of the organization the application is associated with.
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
// The tags associated with the application.
Tags pulumi.StringArrayOutput `pulumi:"tags"`
// The date and time of the last update of the application.
UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"`
}
// NewIamApplication registers a new resource with the given unique name, arguments, and options.
func NewIamApplication(ctx *pulumi.Context,
name string, args *IamApplicationArgs, opts ...pulumi.ResourceOption) (*IamApplication, error) {
if args == nil {
args = &IamApplicationArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource IamApplication
err := ctx.RegisterResource("scaleway:index/iamApplication:IamApplication", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIamApplication gets an existing IamApplication 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 GetIamApplication(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IamApplicationState, opts ...pulumi.ResourceOption) (*IamApplication, error) {
var resource IamApplication
err := ctx.ReadResource("scaleway:index/iamApplication:IamApplication", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IamApplication resources.
type iamApplicationState struct {
// The date and time of the creation of the application.
CreatedAt *string `pulumi:"createdAt"`
// The description of the iam application.
Description *string `pulumi:"description"`
// Whether the application is editable.
Editable *bool `pulumi:"editable"`
// The name of the iam application.
Name *string `pulumi:"name"`
// `organizationId`) The ID of the organization the application is associated with.
OrganizationId *string `pulumi:"organizationId"`
// The tags associated with the application.
Tags []string `pulumi:"tags"`
// The date and time of the last update of the application.
UpdatedAt *string `pulumi:"updatedAt"`
}
type IamApplicationState struct {
// The date and time of the creation of the application.
CreatedAt pulumi.StringPtrInput
// The description of the iam application.
Description pulumi.StringPtrInput
// Whether the application is editable.
Editable pulumi.BoolPtrInput
// The name of the iam application.
Name pulumi.StringPtrInput
// `organizationId`) The ID of the organization the application is associated with.
OrganizationId pulumi.StringPtrInput
// The tags associated with the application.
Tags pulumi.StringArrayInput
// The date and time of the last update of the application.
UpdatedAt pulumi.StringPtrInput
}
func (IamApplicationState) ElementType() reflect.Type {
return reflect.TypeOf((*iamApplicationState)(nil)).Elem()
}
type iamApplicationArgs struct {
// The description of the iam application.
Description *string `pulumi:"description"`
// The name of the iam application.
Name *string `pulumi:"name"`
// `organizationId`) The ID of the organization the application is associated with.
OrganizationId *string `pulumi:"organizationId"`
// The tags associated with the application.
Tags []string `pulumi:"tags"`
}
// The set of arguments for constructing a IamApplication resource.
type IamApplicationArgs struct {
// The description of the iam application.
Description pulumi.StringPtrInput
// The name of the iam application.
Name pulumi.StringPtrInput
// `organizationId`) The ID of the organization the application is associated with.
OrganizationId pulumi.StringPtrInput
// The tags associated with the application.
Tags pulumi.StringArrayInput
}
func (IamApplicationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*iamApplicationArgs)(nil)).Elem()
}
type IamApplicationInput interface {
pulumi.Input
ToIamApplicationOutput() IamApplicationOutput
ToIamApplicationOutputWithContext(ctx context.Context) IamApplicationOutput
}
func (*IamApplication) ElementType() reflect.Type {
return reflect.TypeOf((**IamApplication)(nil)).Elem()
}
func (i *IamApplication) ToIamApplicationOutput() IamApplicationOutput {
return i.ToIamApplicationOutputWithContext(context.Background())
}
func (i *IamApplication) ToIamApplicationOutputWithContext(ctx context.Context) IamApplicationOutput {
return pulumi.ToOutputWithContext(ctx, i).(IamApplicationOutput)
}
// IamApplicationArrayInput is an input type that accepts IamApplicationArray and IamApplicationArrayOutput values.
// You can construct a concrete instance of `IamApplicationArrayInput` via:
//
// IamApplicationArray{ IamApplicationArgs{...} }
type IamApplicationArrayInput interface {
pulumi.Input
ToIamApplicationArrayOutput() IamApplicationArrayOutput
ToIamApplicationArrayOutputWithContext(context.Context) IamApplicationArrayOutput
}
type IamApplicationArray []IamApplicationInput
func (IamApplicationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IamApplication)(nil)).Elem()
}
func (i IamApplicationArray) ToIamApplicationArrayOutput() IamApplicationArrayOutput {
return i.ToIamApplicationArrayOutputWithContext(context.Background())
}
func (i IamApplicationArray) ToIamApplicationArrayOutputWithContext(ctx context.Context) IamApplicationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IamApplicationArrayOutput)
}
// IamApplicationMapInput is an input type that accepts IamApplicationMap and IamApplicationMapOutput values.
// You can construct a concrete instance of `IamApplicationMapInput` via:
//
// IamApplicationMap{ "key": IamApplicationArgs{...} }
type IamApplicationMapInput interface {
pulumi.Input
ToIamApplicationMapOutput() IamApplicationMapOutput
ToIamApplicationMapOutputWithContext(context.Context) IamApplicationMapOutput
}
type IamApplicationMap map[string]IamApplicationInput
func (IamApplicationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IamApplication)(nil)).Elem()
}
func (i IamApplicationMap) ToIamApplicationMapOutput() IamApplicationMapOutput {
return i.ToIamApplicationMapOutputWithContext(context.Background())
}
func (i IamApplicationMap) ToIamApplicationMapOutputWithContext(ctx context.Context) IamApplicationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IamApplicationMapOutput)
}
type IamApplicationOutput struct{ *pulumi.OutputState }
func (IamApplicationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IamApplication)(nil)).Elem()
}
func (o IamApplicationOutput) ToIamApplicationOutput() IamApplicationOutput {
return o
}
func (o IamApplicationOutput) ToIamApplicationOutputWithContext(ctx context.Context) IamApplicationOutput {
return o
}
// The date and time of the creation of the application.
func (o IamApplicationOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *IamApplication) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// The description of the iam application.
func (o IamApplicationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IamApplication) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Whether the application is editable.
func (o IamApplicationOutput) Editable() pulumi.BoolOutput {
return o.ApplyT(func(v *IamApplication) pulumi.BoolOutput { return v.Editable }).(pulumi.BoolOutput)
}
// The name of the iam application.
func (o IamApplicationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *IamApplication) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// `organizationId`) The ID of the organization the application is associated with.
func (o IamApplicationOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v *IamApplication) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput)
}
// The tags associated with the application.
func (o IamApplicationOutput) Tags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *IamApplication) pulumi.StringArrayOutput { return v.Tags }).(pulumi.StringArrayOutput)
}
// The date and time of the last update of the application.
func (o IamApplicationOutput) UpdatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *IamApplication) pulumi.StringOutput { return v.UpdatedAt }).(pulumi.StringOutput)
}
type IamApplicationArrayOutput struct{ *pulumi.OutputState }
func (IamApplicationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IamApplication)(nil)).Elem()
}
func (o IamApplicationArrayOutput) ToIamApplicationArrayOutput() IamApplicationArrayOutput {
return o
}
func (o IamApplicationArrayOutput) ToIamApplicationArrayOutputWithContext(ctx context.Context) IamApplicationArrayOutput {
return o
}
func (o IamApplicationArrayOutput) Index(i pulumi.IntInput) IamApplicationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IamApplication {
return vs[0].([]*IamApplication)[vs[1].(int)]
}).(IamApplicationOutput)
}
type IamApplicationMapOutput struct{ *pulumi.OutputState }
func (IamApplicationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IamApplication)(nil)).Elem()
}
func (o IamApplicationMapOutput) ToIamApplicationMapOutput() IamApplicationMapOutput {
return o
}
func (o IamApplicationMapOutput) ToIamApplicationMapOutputWithContext(ctx context.Context) IamApplicationMapOutput {
return o
}
func (o IamApplicationMapOutput) MapIndex(k pulumi.StringInput) IamApplicationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IamApplication {
return vs[0].(map[string]*IamApplication)[vs[1].(string)]
}).(IamApplicationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IamApplicationInput)(nil)).Elem(), &IamApplication{})
pulumi.RegisterInputType(reflect.TypeOf((*IamApplicationArrayInput)(nil)).Elem(), IamApplicationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IamApplicationMapInput)(nil)).Elem(), IamApplicationMap{})
pulumi.RegisterOutputType(IamApplicationOutput{})
pulumi.RegisterOutputType(IamApplicationArrayOutput{})
pulumi.RegisterOutputType(IamApplicationMapOutput{})
}