/
credentialUserManagedIdentity.go
281 lines (230 loc) · 12.2 KB
/
credentialUserManagedIdentity.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
// 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 datafactory
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type CredentialUserManagedIdentity struct {
pulumi.CustomResourceState
// (Optional) List of string annotations.
Annotations pulumi.StringArrayOutput `pulumi:"annotations"`
// The resource ID of the parent Data Factory
DataFactoryId pulumi.StringOutput `pulumi:"dataFactoryId"`
// (Optional) Short text description
Description pulumi.StringPtrOutput `pulumi:"description"`
// The resource ID of the User Assigned Managed Identity
IdentityId pulumi.StringOutput `pulumi:"identityId"`
// The desired name of the credential resource
Name pulumi.StringOutput `pulumi:"name"`
}
// NewCredentialUserManagedIdentity registers a new resource with the given unique name, arguments, and options.
func NewCredentialUserManagedIdentity(ctx *pulumi.Context,
name string, args *CredentialUserManagedIdentityArgs, opts ...pulumi.ResourceOption) (*CredentialUserManagedIdentity, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DataFactoryId == nil {
return nil, errors.New("invalid value for required argument 'DataFactoryId'")
}
if args.IdentityId == nil {
return nil, errors.New("invalid value for required argument 'IdentityId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CredentialUserManagedIdentity
err := ctx.RegisterResource("azure:datafactory/credentialUserManagedIdentity:CredentialUserManagedIdentity", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCredentialUserManagedIdentity gets an existing CredentialUserManagedIdentity 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 GetCredentialUserManagedIdentity(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CredentialUserManagedIdentityState, opts ...pulumi.ResourceOption) (*CredentialUserManagedIdentity, error) {
var resource CredentialUserManagedIdentity
err := ctx.ReadResource("azure:datafactory/credentialUserManagedIdentity:CredentialUserManagedIdentity", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CredentialUserManagedIdentity resources.
type credentialUserManagedIdentityState struct {
// (Optional) List of string annotations.
Annotations []string `pulumi:"annotations"`
// The resource ID of the parent Data Factory
DataFactoryId *string `pulumi:"dataFactoryId"`
// (Optional) Short text description
Description *string `pulumi:"description"`
// The resource ID of the User Assigned Managed Identity
IdentityId *string `pulumi:"identityId"`
// The desired name of the credential resource
Name *string `pulumi:"name"`
}
type CredentialUserManagedIdentityState struct {
// (Optional) List of string annotations.
Annotations pulumi.StringArrayInput
// The resource ID of the parent Data Factory
DataFactoryId pulumi.StringPtrInput
// (Optional) Short text description
Description pulumi.StringPtrInput
// The resource ID of the User Assigned Managed Identity
IdentityId pulumi.StringPtrInput
// The desired name of the credential resource
Name pulumi.StringPtrInput
}
func (CredentialUserManagedIdentityState) ElementType() reflect.Type {
return reflect.TypeOf((*credentialUserManagedIdentityState)(nil)).Elem()
}
type credentialUserManagedIdentityArgs struct {
// (Optional) List of string annotations.
Annotations []string `pulumi:"annotations"`
// The resource ID of the parent Data Factory
DataFactoryId string `pulumi:"dataFactoryId"`
// (Optional) Short text description
Description *string `pulumi:"description"`
// The resource ID of the User Assigned Managed Identity
IdentityId string `pulumi:"identityId"`
// The desired name of the credential resource
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a CredentialUserManagedIdentity resource.
type CredentialUserManagedIdentityArgs struct {
// (Optional) List of string annotations.
Annotations pulumi.StringArrayInput
// The resource ID of the parent Data Factory
DataFactoryId pulumi.StringInput
// (Optional) Short text description
Description pulumi.StringPtrInput
// The resource ID of the User Assigned Managed Identity
IdentityId pulumi.StringInput
// The desired name of the credential resource
Name pulumi.StringPtrInput
}
func (CredentialUserManagedIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*credentialUserManagedIdentityArgs)(nil)).Elem()
}
type CredentialUserManagedIdentityInput interface {
pulumi.Input
ToCredentialUserManagedIdentityOutput() CredentialUserManagedIdentityOutput
ToCredentialUserManagedIdentityOutputWithContext(ctx context.Context) CredentialUserManagedIdentityOutput
}
func (*CredentialUserManagedIdentity) ElementType() reflect.Type {
return reflect.TypeOf((**CredentialUserManagedIdentity)(nil)).Elem()
}
func (i *CredentialUserManagedIdentity) ToCredentialUserManagedIdentityOutput() CredentialUserManagedIdentityOutput {
return i.ToCredentialUserManagedIdentityOutputWithContext(context.Background())
}
func (i *CredentialUserManagedIdentity) ToCredentialUserManagedIdentityOutputWithContext(ctx context.Context) CredentialUserManagedIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(CredentialUserManagedIdentityOutput)
}
// CredentialUserManagedIdentityArrayInput is an input type that accepts CredentialUserManagedIdentityArray and CredentialUserManagedIdentityArrayOutput values.
// You can construct a concrete instance of `CredentialUserManagedIdentityArrayInput` via:
//
// CredentialUserManagedIdentityArray{ CredentialUserManagedIdentityArgs{...} }
type CredentialUserManagedIdentityArrayInput interface {
pulumi.Input
ToCredentialUserManagedIdentityArrayOutput() CredentialUserManagedIdentityArrayOutput
ToCredentialUserManagedIdentityArrayOutputWithContext(context.Context) CredentialUserManagedIdentityArrayOutput
}
type CredentialUserManagedIdentityArray []CredentialUserManagedIdentityInput
func (CredentialUserManagedIdentityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CredentialUserManagedIdentity)(nil)).Elem()
}
func (i CredentialUserManagedIdentityArray) ToCredentialUserManagedIdentityArrayOutput() CredentialUserManagedIdentityArrayOutput {
return i.ToCredentialUserManagedIdentityArrayOutputWithContext(context.Background())
}
func (i CredentialUserManagedIdentityArray) ToCredentialUserManagedIdentityArrayOutputWithContext(ctx context.Context) CredentialUserManagedIdentityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CredentialUserManagedIdentityArrayOutput)
}
// CredentialUserManagedIdentityMapInput is an input type that accepts CredentialUserManagedIdentityMap and CredentialUserManagedIdentityMapOutput values.
// You can construct a concrete instance of `CredentialUserManagedIdentityMapInput` via:
//
// CredentialUserManagedIdentityMap{ "key": CredentialUserManagedIdentityArgs{...} }
type CredentialUserManagedIdentityMapInput interface {
pulumi.Input
ToCredentialUserManagedIdentityMapOutput() CredentialUserManagedIdentityMapOutput
ToCredentialUserManagedIdentityMapOutputWithContext(context.Context) CredentialUserManagedIdentityMapOutput
}
type CredentialUserManagedIdentityMap map[string]CredentialUserManagedIdentityInput
func (CredentialUserManagedIdentityMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CredentialUserManagedIdentity)(nil)).Elem()
}
func (i CredentialUserManagedIdentityMap) ToCredentialUserManagedIdentityMapOutput() CredentialUserManagedIdentityMapOutput {
return i.ToCredentialUserManagedIdentityMapOutputWithContext(context.Background())
}
func (i CredentialUserManagedIdentityMap) ToCredentialUserManagedIdentityMapOutputWithContext(ctx context.Context) CredentialUserManagedIdentityMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CredentialUserManagedIdentityMapOutput)
}
type CredentialUserManagedIdentityOutput struct{ *pulumi.OutputState }
func (CredentialUserManagedIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CredentialUserManagedIdentity)(nil)).Elem()
}
func (o CredentialUserManagedIdentityOutput) ToCredentialUserManagedIdentityOutput() CredentialUserManagedIdentityOutput {
return o
}
func (o CredentialUserManagedIdentityOutput) ToCredentialUserManagedIdentityOutputWithContext(ctx context.Context) CredentialUserManagedIdentityOutput {
return o
}
// (Optional) List of string annotations.
func (o CredentialUserManagedIdentityOutput) Annotations() pulumi.StringArrayOutput {
return o.ApplyT(func(v *CredentialUserManagedIdentity) pulumi.StringArrayOutput { return v.Annotations }).(pulumi.StringArrayOutput)
}
// The resource ID of the parent Data Factory
func (o CredentialUserManagedIdentityOutput) DataFactoryId() pulumi.StringOutput {
return o.ApplyT(func(v *CredentialUserManagedIdentity) pulumi.StringOutput { return v.DataFactoryId }).(pulumi.StringOutput)
}
// (Optional) Short text description
func (o CredentialUserManagedIdentityOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CredentialUserManagedIdentity) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The resource ID of the User Assigned Managed Identity
func (o CredentialUserManagedIdentityOutput) IdentityId() pulumi.StringOutput {
return o.ApplyT(func(v *CredentialUserManagedIdentity) pulumi.StringOutput { return v.IdentityId }).(pulumi.StringOutput)
}
// The desired name of the credential resource
func (o CredentialUserManagedIdentityOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CredentialUserManagedIdentity) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type CredentialUserManagedIdentityArrayOutput struct{ *pulumi.OutputState }
func (CredentialUserManagedIdentityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CredentialUserManagedIdentity)(nil)).Elem()
}
func (o CredentialUserManagedIdentityArrayOutput) ToCredentialUserManagedIdentityArrayOutput() CredentialUserManagedIdentityArrayOutput {
return o
}
func (o CredentialUserManagedIdentityArrayOutput) ToCredentialUserManagedIdentityArrayOutputWithContext(ctx context.Context) CredentialUserManagedIdentityArrayOutput {
return o
}
func (o CredentialUserManagedIdentityArrayOutput) Index(i pulumi.IntInput) CredentialUserManagedIdentityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CredentialUserManagedIdentity {
return vs[0].([]*CredentialUserManagedIdentity)[vs[1].(int)]
}).(CredentialUserManagedIdentityOutput)
}
type CredentialUserManagedIdentityMapOutput struct{ *pulumi.OutputState }
func (CredentialUserManagedIdentityMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CredentialUserManagedIdentity)(nil)).Elem()
}
func (o CredentialUserManagedIdentityMapOutput) ToCredentialUserManagedIdentityMapOutput() CredentialUserManagedIdentityMapOutput {
return o
}
func (o CredentialUserManagedIdentityMapOutput) ToCredentialUserManagedIdentityMapOutputWithContext(ctx context.Context) CredentialUserManagedIdentityMapOutput {
return o
}
func (o CredentialUserManagedIdentityMapOutput) MapIndex(k pulumi.StringInput) CredentialUserManagedIdentityOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CredentialUserManagedIdentity {
return vs[0].(map[string]*CredentialUserManagedIdentity)[vs[1].(string)]
}).(CredentialUserManagedIdentityOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CredentialUserManagedIdentityInput)(nil)).Elem(), &CredentialUserManagedIdentity{})
pulumi.RegisterInputType(reflect.TypeOf((*CredentialUserManagedIdentityArrayInput)(nil)).Elem(), CredentialUserManagedIdentityArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CredentialUserManagedIdentityMapInput)(nil)).Elem(), CredentialUserManagedIdentityMap{})
pulumi.RegisterOutputType(CredentialUserManagedIdentityOutput{})
pulumi.RegisterOutputType(CredentialUserManagedIdentityArrayOutput{})
pulumi.RegisterOutputType(CredentialUserManagedIdentityMapOutput{})
}