/
keystoresAliasesKeyCertFile.go
435 lines (374 loc) · 17.1 KB
/
keystoresAliasesKeyCertFile.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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
// 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 apigee
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
)
// An alias from a key/certificate pair.
//
// To get more information about KeystoresAliasesKeyCertFile, see:
//
// * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases)
// * How-to Guides
// - [Keystores Aliases](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases)
//
// ## Import
//
// # KeystoresAliasesKeyCertFile can be imported using any of these accepted formats
//
// ```sh
//
// $ pulumi import gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile default organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}}
//
// ```
//
// ```sh
//
// $ pulumi import gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile default {{org_id}}/{{environment}}/{{keystore}}/{{alias}}
//
// ```
type KeystoresAliasesKeyCertFile struct {
pulumi.CustomResourceState
// Alias Name
Alias pulumi.StringOutput `pulumi:"alias"`
// Cert content
//
// ***
Cert pulumi.StringOutput `pulumi:"cert"`
// Chain of certificates under this alias.
// Structure is documented below.
CertsInfo KeystoresAliasesKeyCertFileCertsInfoOutput `pulumi:"certsInfo"`
// Environment associated with the alias
Environment pulumi.StringOutput `pulumi:"environment"`
// Private Key content, omit if uploading to truststore
Key pulumi.StringPtrOutput `pulumi:"key"`
// Keystore Name
Keystore pulumi.StringOutput `pulumi:"keystore"`
// Organization ID associated with the alias, without organization/ prefix
OrgId pulumi.StringOutput `pulumi:"orgId"`
// Password for the Private Key if it's encrypted
Password pulumi.StringPtrOutput `pulumi:"password"`
// Optional.Type of Alias
Type pulumi.StringOutput `pulumi:"type"`
}
// NewKeystoresAliasesKeyCertFile registers a new resource with the given unique name, arguments, and options.
func NewKeystoresAliasesKeyCertFile(ctx *pulumi.Context,
name string, args *KeystoresAliasesKeyCertFileArgs, opts ...pulumi.ResourceOption) (*KeystoresAliasesKeyCertFile, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Alias == nil {
return nil, errors.New("invalid value for required argument 'Alias'")
}
if args.Cert == nil {
return nil, errors.New("invalid value for required argument 'Cert'")
}
if args.Environment == nil {
return nil, errors.New("invalid value for required argument 'Environment'")
}
if args.Keystore == nil {
return nil, errors.New("invalid value for required argument 'Keystore'")
}
if args.OrgId == nil {
return nil, errors.New("invalid value for required argument 'OrgId'")
}
if args.Key != nil {
args.Key = pulumi.ToSecret(args.Key).(pulumi.StringPtrInput)
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"key",
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource KeystoresAliasesKeyCertFile
err := ctx.RegisterResource("gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetKeystoresAliasesKeyCertFile gets an existing KeystoresAliasesKeyCertFile 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 GetKeystoresAliasesKeyCertFile(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *KeystoresAliasesKeyCertFileState, opts ...pulumi.ResourceOption) (*KeystoresAliasesKeyCertFile, error) {
var resource KeystoresAliasesKeyCertFile
err := ctx.ReadResource("gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering KeystoresAliasesKeyCertFile resources.
type keystoresAliasesKeyCertFileState struct {
// Alias Name
Alias *string `pulumi:"alias"`
// Cert content
//
// ***
Cert *string `pulumi:"cert"`
// Chain of certificates under this alias.
// Structure is documented below.
CertsInfo *KeystoresAliasesKeyCertFileCertsInfo `pulumi:"certsInfo"`
// Environment associated with the alias
Environment *string `pulumi:"environment"`
// Private Key content, omit if uploading to truststore
Key *string `pulumi:"key"`
// Keystore Name
Keystore *string `pulumi:"keystore"`
// Organization ID associated with the alias, without organization/ prefix
OrgId *string `pulumi:"orgId"`
// Password for the Private Key if it's encrypted
Password *string `pulumi:"password"`
// Optional.Type of Alias
Type *string `pulumi:"type"`
}
type KeystoresAliasesKeyCertFileState struct {
// Alias Name
Alias pulumi.StringPtrInput
// Cert content
//
// ***
Cert pulumi.StringPtrInput
// Chain of certificates under this alias.
// Structure is documented below.
CertsInfo KeystoresAliasesKeyCertFileCertsInfoPtrInput
// Environment associated with the alias
Environment pulumi.StringPtrInput
// Private Key content, omit if uploading to truststore
Key pulumi.StringPtrInput
// Keystore Name
Keystore pulumi.StringPtrInput
// Organization ID associated with the alias, without organization/ prefix
OrgId pulumi.StringPtrInput
// Password for the Private Key if it's encrypted
Password pulumi.StringPtrInput
// Optional.Type of Alias
Type pulumi.StringPtrInput
}
func (KeystoresAliasesKeyCertFileState) ElementType() reflect.Type {
return reflect.TypeOf((*keystoresAliasesKeyCertFileState)(nil)).Elem()
}
type keystoresAliasesKeyCertFileArgs struct {
// Alias Name
Alias string `pulumi:"alias"`
// Cert content
//
// ***
Cert string `pulumi:"cert"`
// Chain of certificates under this alias.
// Structure is documented below.
CertsInfo *KeystoresAliasesKeyCertFileCertsInfo `pulumi:"certsInfo"`
// Environment associated with the alias
Environment string `pulumi:"environment"`
// Private Key content, omit if uploading to truststore
Key *string `pulumi:"key"`
// Keystore Name
Keystore string `pulumi:"keystore"`
// Organization ID associated with the alias, without organization/ prefix
OrgId string `pulumi:"orgId"`
// Password for the Private Key if it's encrypted
Password *string `pulumi:"password"`
}
// The set of arguments for constructing a KeystoresAliasesKeyCertFile resource.
type KeystoresAliasesKeyCertFileArgs struct {
// Alias Name
Alias pulumi.StringInput
// Cert content
//
// ***
Cert pulumi.StringInput
// Chain of certificates under this alias.
// Structure is documented below.
CertsInfo KeystoresAliasesKeyCertFileCertsInfoPtrInput
// Environment associated with the alias
Environment pulumi.StringInput
// Private Key content, omit if uploading to truststore
Key pulumi.StringPtrInput
// Keystore Name
Keystore pulumi.StringInput
// Organization ID associated with the alias, without organization/ prefix
OrgId pulumi.StringInput
// Password for the Private Key if it's encrypted
Password pulumi.StringPtrInput
}
func (KeystoresAliasesKeyCertFileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*keystoresAliasesKeyCertFileArgs)(nil)).Elem()
}
type KeystoresAliasesKeyCertFileInput interface {
pulumi.Input
ToKeystoresAliasesKeyCertFileOutput() KeystoresAliasesKeyCertFileOutput
ToKeystoresAliasesKeyCertFileOutputWithContext(ctx context.Context) KeystoresAliasesKeyCertFileOutput
}
func (*KeystoresAliasesKeyCertFile) ElementType() reflect.Type {
return reflect.TypeOf((**KeystoresAliasesKeyCertFile)(nil)).Elem()
}
func (i *KeystoresAliasesKeyCertFile) ToKeystoresAliasesKeyCertFileOutput() KeystoresAliasesKeyCertFileOutput {
return i.ToKeystoresAliasesKeyCertFileOutputWithContext(context.Background())
}
func (i *KeystoresAliasesKeyCertFile) ToKeystoresAliasesKeyCertFileOutputWithContext(ctx context.Context) KeystoresAliasesKeyCertFileOutput {
return pulumi.ToOutputWithContext(ctx, i).(KeystoresAliasesKeyCertFileOutput)
}
func (i *KeystoresAliasesKeyCertFile) ToOutput(ctx context.Context) pulumix.Output[*KeystoresAliasesKeyCertFile] {
return pulumix.Output[*KeystoresAliasesKeyCertFile]{
OutputState: i.ToKeystoresAliasesKeyCertFileOutputWithContext(ctx).OutputState,
}
}
// KeystoresAliasesKeyCertFileArrayInput is an input type that accepts KeystoresAliasesKeyCertFileArray and KeystoresAliasesKeyCertFileArrayOutput values.
// You can construct a concrete instance of `KeystoresAliasesKeyCertFileArrayInput` via:
//
// KeystoresAliasesKeyCertFileArray{ KeystoresAliasesKeyCertFileArgs{...} }
type KeystoresAliasesKeyCertFileArrayInput interface {
pulumi.Input
ToKeystoresAliasesKeyCertFileArrayOutput() KeystoresAliasesKeyCertFileArrayOutput
ToKeystoresAliasesKeyCertFileArrayOutputWithContext(context.Context) KeystoresAliasesKeyCertFileArrayOutput
}
type KeystoresAliasesKeyCertFileArray []KeystoresAliasesKeyCertFileInput
func (KeystoresAliasesKeyCertFileArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*KeystoresAliasesKeyCertFile)(nil)).Elem()
}
func (i KeystoresAliasesKeyCertFileArray) ToKeystoresAliasesKeyCertFileArrayOutput() KeystoresAliasesKeyCertFileArrayOutput {
return i.ToKeystoresAliasesKeyCertFileArrayOutputWithContext(context.Background())
}
func (i KeystoresAliasesKeyCertFileArray) ToKeystoresAliasesKeyCertFileArrayOutputWithContext(ctx context.Context) KeystoresAliasesKeyCertFileArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(KeystoresAliasesKeyCertFileArrayOutput)
}
func (i KeystoresAliasesKeyCertFileArray) ToOutput(ctx context.Context) pulumix.Output[[]*KeystoresAliasesKeyCertFile] {
return pulumix.Output[[]*KeystoresAliasesKeyCertFile]{
OutputState: i.ToKeystoresAliasesKeyCertFileArrayOutputWithContext(ctx).OutputState,
}
}
// KeystoresAliasesKeyCertFileMapInput is an input type that accepts KeystoresAliasesKeyCertFileMap and KeystoresAliasesKeyCertFileMapOutput values.
// You can construct a concrete instance of `KeystoresAliasesKeyCertFileMapInput` via:
//
// KeystoresAliasesKeyCertFileMap{ "key": KeystoresAliasesKeyCertFileArgs{...} }
type KeystoresAliasesKeyCertFileMapInput interface {
pulumi.Input
ToKeystoresAliasesKeyCertFileMapOutput() KeystoresAliasesKeyCertFileMapOutput
ToKeystoresAliasesKeyCertFileMapOutputWithContext(context.Context) KeystoresAliasesKeyCertFileMapOutput
}
type KeystoresAliasesKeyCertFileMap map[string]KeystoresAliasesKeyCertFileInput
func (KeystoresAliasesKeyCertFileMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*KeystoresAliasesKeyCertFile)(nil)).Elem()
}
func (i KeystoresAliasesKeyCertFileMap) ToKeystoresAliasesKeyCertFileMapOutput() KeystoresAliasesKeyCertFileMapOutput {
return i.ToKeystoresAliasesKeyCertFileMapOutputWithContext(context.Background())
}
func (i KeystoresAliasesKeyCertFileMap) ToKeystoresAliasesKeyCertFileMapOutputWithContext(ctx context.Context) KeystoresAliasesKeyCertFileMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(KeystoresAliasesKeyCertFileMapOutput)
}
func (i KeystoresAliasesKeyCertFileMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*KeystoresAliasesKeyCertFile] {
return pulumix.Output[map[string]*KeystoresAliasesKeyCertFile]{
OutputState: i.ToKeystoresAliasesKeyCertFileMapOutputWithContext(ctx).OutputState,
}
}
type KeystoresAliasesKeyCertFileOutput struct{ *pulumi.OutputState }
func (KeystoresAliasesKeyCertFileOutput) ElementType() reflect.Type {
return reflect.TypeOf((**KeystoresAliasesKeyCertFile)(nil)).Elem()
}
func (o KeystoresAliasesKeyCertFileOutput) ToKeystoresAliasesKeyCertFileOutput() KeystoresAliasesKeyCertFileOutput {
return o
}
func (o KeystoresAliasesKeyCertFileOutput) ToKeystoresAliasesKeyCertFileOutputWithContext(ctx context.Context) KeystoresAliasesKeyCertFileOutput {
return o
}
func (o KeystoresAliasesKeyCertFileOutput) ToOutput(ctx context.Context) pulumix.Output[*KeystoresAliasesKeyCertFile] {
return pulumix.Output[*KeystoresAliasesKeyCertFile]{
OutputState: o.OutputState,
}
}
// Alias Name
func (o KeystoresAliasesKeyCertFileOutput) Alias() pulumi.StringOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) pulumi.StringOutput { return v.Alias }).(pulumi.StringOutput)
}
// Cert content
//
// ***
func (o KeystoresAliasesKeyCertFileOutput) Cert() pulumi.StringOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) pulumi.StringOutput { return v.Cert }).(pulumi.StringOutput)
}
// Chain of certificates under this alias.
// Structure is documented below.
func (o KeystoresAliasesKeyCertFileOutput) CertsInfo() KeystoresAliasesKeyCertFileCertsInfoOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) KeystoresAliasesKeyCertFileCertsInfoOutput { return v.CertsInfo }).(KeystoresAliasesKeyCertFileCertsInfoOutput)
}
// Environment associated with the alias
func (o KeystoresAliasesKeyCertFileOutput) Environment() pulumi.StringOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) pulumi.StringOutput { return v.Environment }).(pulumi.StringOutput)
}
// Private Key content, omit if uploading to truststore
func (o KeystoresAliasesKeyCertFileOutput) Key() pulumi.StringPtrOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) pulumi.StringPtrOutput { return v.Key }).(pulumi.StringPtrOutput)
}
// Keystore Name
func (o KeystoresAliasesKeyCertFileOutput) Keystore() pulumi.StringOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) pulumi.StringOutput { return v.Keystore }).(pulumi.StringOutput)
}
// Organization ID associated with the alias, without organization/ prefix
func (o KeystoresAliasesKeyCertFileOutput) OrgId() pulumi.StringOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) pulumi.StringOutput { return v.OrgId }).(pulumi.StringOutput)
}
// Password for the Private Key if it's encrypted
func (o KeystoresAliasesKeyCertFileOutput) Password() pulumi.StringPtrOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput)
}
// Optional.Type of Alias
func (o KeystoresAliasesKeyCertFileOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *KeystoresAliasesKeyCertFile) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
type KeystoresAliasesKeyCertFileArrayOutput struct{ *pulumi.OutputState }
func (KeystoresAliasesKeyCertFileArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*KeystoresAliasesKeyCertFile)(nil)).Elem()
}
func (o KeystoresAliasesKeyCertFileArrayOutput) ToKeystoresAliasesKeyCertFileArrayOutput() KeystoresAliasesKeyCertFileArrayOutput {
return o
}
func (o KeystoresAliasesKeyCertFileArrayOutput) ToKeystoresAliasesKeyCertFileArrayOutputWithContext(ctx context.Context) KeystoresAliasesKeyCertFileArrayOutput {
return o
}
func (o KeystoresAliasesKeyCertFileArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*KeystoresAliasesKeyCertFile] {
return pulumix.Output[[]*KeystoresAliasesKeyCertFile]{
OutputState: o.OutputState,
}
}
func (o KeystoresAliasesKeyCertFileArrayOutput) Index(i pulumi.IntInput) KeystoresAliasesKeyCertFileOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *KeystoresAliasesKeyCertFile {
return vs[0].([]*KeystoresAliasesKeyCertFile)[vs[1].(int)]
}).(KeystoresAliasesKeyCertFileOutput)
}
type KeystoresAliasesKeyCertFileMapOutput struct{ *pulumi.OutputState }
func (KeystoresAliasesKeyCertFileMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*KeystoresAliasesKeyCertFile)(nil)).Elem()
}
func (o KeystoresAliasesKeyCertFileMapOutput) ToKeystoresAliasesKeyCertFileMapOutput() KeystoresAliasesKeyCertFileMapOutput {
return o
}
func (o KeystoresAliasesKeyCertFileMapOutput) ToKeystoresAliasesKeyCertFileMapOutputWithContext(ctx context.Context) KeystoresAliasesKeyCertFileMapOutput {
return o
}
func (o KeystoresAliasesKeyCertFileMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*KeystoresAliasesKeyCertFile] {
return pulumix.Output[map[string]*KeystoresAliasesKeyCertFile]{
OutputState: o.OutputState,
}
}
func (o KeystoresAliasesKeyCertFileMapOutput) MapIndex(k pulumi.StringInput) KeystoresAliasesKeyCertFileOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *KeystoresAliasesKeyCertFile {
return vs[0].(map[string]*KeystoresAliasesKeyCertFile)[vs[1].(string)]
}).(KeystoresAliasesKeyCertFileOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*KeystoresAliasesKeyCertFileInput)(nil)).Elem(), &KeystoresAliasesKeyCertFile{})
pulumi.RegisterInputType(reflect.TypeOf((*KeystoresAliasesKeyCertFileArrayInput)(nil)).Elem(), KeystoresAliasesKeyCertFileArray{})
pulumi.RegisterInputType(reflect.TypeOf((*KeystoresAliasesKeyCertFileMapInput)(nil)).Elem(), KeystoresAliasesKeyCertFileMap{})
pulumi.RegisterOutputType(KeystoresAliasesKeyCertFileOutput{})
pulumi.RegisterOutputType(KeystoresAliasesKeyCertFileArrayOutput{})
pulumi.RegisterOutputType(KeystoresAliasesKeyCertFileMapOutput{})
}