-
Notifications
You must be signed in to change notification settings - Fork 52
/
apiConfig.go
503 lines (445 loc) · 22.8 KB
/
apiConfig.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
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
// 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 apigateway
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// An API Configuration is an association of an API Controller Config and a Gateway Config
//
// To get more information about ApiConfig, see:
//
// * [API documentation](https://cloud.google.com/api-gateway/docs/reference/rest/v1beta/projects.locations.apis.configs)
// * How-to Guides
// - [Official Documentation](https://cloud.google.com/api-gateway/docs/creating-api-config)
//
// ## Example Usage
// ### Apigateway Api Config Basic
//
// ```go
// package main
//
// import (
//
// "encoding/base64"
// "io/ioutil"
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/apigateway"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func filebase64OrPanic(path string) pulumi.StringPtrInput {
// if fileData, err := ioutil.ReadFile(path); err == nil {
// return pulumi.String(base64.StdEncoding.EncodeToString(fileData[:]))
// } else {
// panic(err.Error())
// }
// }
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// apiCfgApi, err := apigateway.NewApi(ctx, "apiCfgApi", &apigateway.ApiArgs{
// ApiId: pulumi.String("api-cfg"),
// }, pulumi.Provider(google_beta))
// if err != nil {
// return err
// }
// _, err = apigateway.NewApiConfig(ctx, "apiCfgApiConfig", &apigateway.ApiConfigArgs{
// Api: apiCfgApi.ApiId,
// ApiConfigId: pulumi.String("cfg"),
// OpenapiDocuments: apigateway.ApiConfigOpenapiDocumentArray{
// &apigateway.ApiConfigOpenapiDocumentArgs{
// Document: &apigateway.ApiConfigOpenapiDocumentDocumentArgs{
// Path: pulumi.String("spec.yaml"),
// Contents: filebase64OrPanic("test-fixtures/apigateway/openapi.yaml"),
// },
// },
// },
// }, pulumi.Provider(google_beta))
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// # ApiConfig can be imported using any of these accepted formats
//
// ```sh
//
// $ pulumi import gcp:apigateway/apiConfig:ApiConfig default projects/{{project}}/locations/global/apis/{{api}}/configs/{{api_config_id}}
//
// ```
//
// ```sh
//
// $ pulumi import gcp:apigateway/apiConfig:ApiConfig default {{project}}/{{api}}/{{api_config_id}}
//
// ```
//
// ```sh
//
// $ pulumi import gcp:apigateway/apiConfig:ApiConfig default {{api}}/{{api_config_id}}
//
// ```
type ApiConfig struct {
pulumi.CustomResourceState
// The API to attach the config to.
Api pulumi.StringOutput `pulumi:"api"`
// Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
ApiConfigId pulumi.StringOutput `pulumi:"apiConfigId"`
// Creates a unique name beginning with the
// specified prefix. If this and apiConfigId are unspecified, a random value is chosen for the name.
ApiConfigIdPrefix pulumi.StringOutput `pulumi:"apiConfigIdPrefix"`
// A user-visible name for the API.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// Immutable. Gateway specific configuration.
// If not specified, backend authentication will be set to use OIDC authentication using the default compute service account
// Structure is documented below.
GatewayConfig ApiConfigGatewayConfigPtrOutput `pulumi:"gatewayConfig"`
// gRPC service definition files. If specified, openapiDocuments must not be included.
// Structure is documented below.
GrpcServices ApiConfigGrpcServiceArrayOutput `pulumi:"grpcServices"`
// Resource labels to represent user-provided metadata.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents.
// If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields.
// Structure is documented below.
ManagedServiceConfigs ApiConfigManagedServiceConfigArrayOutput `pulumi:"managedServiceConfigs"`
// The resource name of the API Config.
Name pulumi.StringOutput `pulumi:"name"`
// OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included.
// Structure is documented below.
OpenapiDocuments ApiConfigOpenapiDocumentArrayOutput `pulumi:"openapiDocuments"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
ServiceConfigId pulumi.StringOutput `pulumi:"serviceConfigId"`
}
// NewApiConfig registers a new resource with the given unique name, arguments, and options.
func NewApiConfig(ctx *pulumi.Context,
name string, args *ApiConfigArgs, opts ...pulumi.ResourceOption) (*ApiConfig, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Api == nil {
return nil, errors.New("invalid value for required argument 'Api'")
}
var resource ApiConfig
err := ctx.RegisterResource("gcp:apigateway/apiConfig:ApiConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiConfig gets an existing ApiConfig 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 GetApiConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiConfigState, opts ...pulumi.ResourceOption) (*ApiConfig, error) {
var resource ApiConfig
err := ctx.ReadResource("gcp:apigateway/apiConfig:ApiConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiConfig resources.
type apiConfigState struct {
// The API to attach the config to.
Api *string `pulumi:"api"`
// Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
ApiConfigId *string `pulumi:"apiConfigId"`
// Creates a unique name beginning with the
// specified prefix. If this and apiConfigId are unspecified, a random value is chosen for the name.
ApiConfigIdPrefix *string `pulumi:"apiConfigIdPrefix"`
// A user-visible name for the API.
DisplayName *string `pulumi:"displayName"`
// Immutable. Gateway specific configuration.
// If not specified, backend authentication will be set to use OIDC authentication using the default compute service account
// Structure is documented below.
GatewayConfig *ApiConfigGatewayConfig `pulumi:"gatewayConfig"`
// gRPC service definition files. If specified, openapiDocuments must not be included.
// Structure is documented below.
GrpcServices []ApiConfigGrpcService `pulumi:"grpcServices"`
// Resource labels to represent user-provided metadata.
Labels map[string]string `pulumi:"labels"`
// Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents.
// If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields.
// Structure is documented below.
ManagedServiceConfigs []ApiConfigManagedServiceConfig `pulumi:"managedServiceConfigs"`
// The resource name of the API Config.
Name *string `pulumi:"name"`
// OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included.
// Structure is documented below.
OpenapiDocuments []ApiConfigOpenapiDocument `pulumi:"openapiDocuments"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
ServiceConfigId *string `pulumi:"serviceConfigId"`
}
type ApiConfigState struct {
// The API to attach the config to.
Api pulumi.StringPtrInput
// Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
ApiConfigId pulumi.StringPtrInput
// Creates a unique name beginning with the
// specified prefix. If this and apiConfigId are unspecified, a random value is chosen for the name.
ApiConfigIdPrefix pulumi.StringPtrInput
// A user-visible name for the API.
DisplayName pulumi.StringPtrInput
// Immutable. Gateway specific configuration.
// If not specified, backend authentication will be set to use OIDC authentication using the default compute service account
// Structure is documented below.
GatewayConfig ApiConfigGatewayConfigPtrInput
// gRPC service definition files. If specified, openapiDocuments must not be included.
// Structure is documented below.
GrpcServices ApiConfigGrpcServiceArrayInput
// Resource labels to represent user-provided metadata.
Labels pulumi.StringMapInput
// Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents.
// If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields.
// Structure is documented below.
ManagedServiceConfigs ApiConfigManagedServiceConfigArrayInput
// The resource name of the API Config.
Name pulumi.StringPtrInput
// OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included.
// Structure is documented below.
OpenapiDocuments ApiConfigOpenapiDocumentArrayInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
ServiceConfigId pulumi.StringPtrInput
}
func (ApiConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*apiConfigState)(nil)).Elem()
}
type apiConfigArgs struct {
// The API to attach the config to.
Api string `pulumi:"api"`
// Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
ApiConfigId *string `pulumi:"apiConfigId"`
// Creates a unique name beginning with the
// specified prefix. If this and apiConfigId are unspecified, a random value is chosen for the name.
ApiConfigIdPrefix *string `pulumi:"apiConfigIdPrefix"`
// A user-visible name for the API.
DisplayName *string `pulumi:"displayName"`
// Immutable. Gateway specific configuration.
// If not specified, backend authentication will be set to use OIDC authentication using the default compute service account
// Structure is documented below.
GatewayConfig *ApiConfigGatewayConfig `pulumi:"gatewayConfig"`
// gRPC service definition files. If specified, openapiDocuments must not be included.
// Structure is documented below.
GrpcServices []ApiConfigGrpcService `pulumi:"grpcServices"`
// Resource labels to represent user-provided metadata.
Labels map[string]string `pulumi:"labels"`
// Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents.
// If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields.
// Structure is documented below.
ManagedServiceConfigs []ApiConfigManagedServiceConfig `pulumi:"managedServiceConfigs"`
// OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included.
// Structure is documented below.
OpenapiDocuments []ApiConfigOpenapiDocument `pulumi:"openapiDocuments"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
}
// The set of arguments for constructing a ApiConfig resource.
type ApiConfigArgs struct {
// The API to attach the config to.
Api pulumi.StringInput
// Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
ApiConfigId pulumi.StringPtrInput
// Creates a unique name beginning with the
// specified prefix. If this and apiConfigId are unspecified, a random value is chosen for the name.
ApiConfigIdPrefix pulumi.StringPtrInput
// A user-visible name for the API.
DisplayName pulumi.StringPtrInput
// Immutable. Gateway specific configuration.
// If not specified, backend authentication will be set to use OIDC authentication using the default compute service account
// Structure is documented below.
GatewayConfig ApiConfigGatewayConfigPtrInput
// gRPC service definition files. If specified, openapiDocuments must not be included.
// Structure is documented below.
GrpcServices ApiConfigGrpcServiceArrayInput
// Resource labels to represent user-provided metadata.
Labels pulumi.StringMapInput
// Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents.
// If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields.
// Structure is documented below.
ManagedServiceConfigs ApiConfigManagedServiceConfigArrayInput
// OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included.
// Structure is documented below.
OpenapiDocuments ApiConfigOpenapiDocumentArrayInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
}
func (ApiConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiConfigArgs)(nil)).Elem()
}
type ApiConfigInput interface {
pulumi.Input
ToApiConfigOutput() ApiConfigOutput
ToApiConfigOutputWithContext(ctx context.Context) ApiConfigOutput
}
func (*ApiConfig) ElementType() reflect.Type {
return reflect.TypeOf((**ApiConfig)(nil)).Elem()
}
func (i *ApiConfig) ToApiConfigOutput() ApiConfigOutput {
return i.ToApiConfigOutputWithContext(context.Background())
}
func (i *ApiConfig) ToApiConfigOutputWithContext(ctx context.Context) ApiConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiConfigOutput)
}
// ApiConfigArrayInput is an input type that accepts ApiConfigArray and ApiConfigArrayOutput values.
// You can construct a concrete instance of `ApiConfigArrayInput` via:
//
// ApiConfigArray{ ApiConfigArgs{...} }
type ApiConfigArrayInput interface {
pulumi.Input
ToApiConfigArrayOutput() ApiConfigArrayOutput
ToApiConfigArrayOutputWithContext(context.Context) ApiConfigArrayOutput
}
type ApiConfigArray []ApiConfigInput
func (ApiConfigArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiConfig)(nil)).Elem()
}
func (i ApiConfigArray) ToApiConfigArrayOutput() ApiConfigArrayOutput {
return i.ToApiConfigArrayOutputWithContext(context.Background())
}
func (i ApiConfigArray) ToApiConfigArrayOutputWithContext(ctx context.Context) ApiConfigArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiConfigArrayOutput)
}
// ApiConfigMapInput is an input type that accepts ApiConfigMap and ApiConfigMapOutput values.
// You can construct a concrete instance of `ApiConfigMapInput` via:
//
// ApiConfigMap{ "key": ApiConfigArgs{...} }
type ApiConfigMapInput interface {
pulumi.Input
ToApiConfigMapOutput() ApiConfigMapOutput
ToApiConfigMapOutputWithContext(context.Context) ApiConfigMapOutput
}
type ApiConfigMap map[string]ApiConfigInput
func (ApiConfigMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiConfig)(nil)).Elem()
}
func (i ApiConfigMap) ToApiConfigMapOutput() ApiConfigMapOutput {
return i.ToApiConfigMapOutputWithContext(context.Background())
}
func (i ApiConfigMap) ToApiConfigMapOutputWithContext(ctx context.Context) ApiConfigMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiConfigMapOutput)
}
type ApiConfigOutput struct{ *pulumi.OutputState }
func (ApiConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiConfig)(nil)).Elem()
}
func (o ApiConfigOutput) ToApiConfigOutput() ApiConfigOutput {
return o
}
func (o ApiConfigOutput) ToApiConfigOutputWithContext(ctx context.Context) ApiConfigOutput {
return o
}
// The API to attach the config to.
func (o ApiConfigOutput) Api() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConfig) pulumi.StringOutput { return v.Api }).(pulumi.StringOutput)
}
// Identifier to assign to the API Config. Must be unique within scope of the parent resource(api).
func (o ApiConfigOutput) ApiConfigId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConfig) pulumi.StringOutput { return v.ApiConfigId }).(pulumi.StringOutput)
}
// Creates a unique name beginning with the
// specified prefix. If this and apiConfigId are unspecified, a random value is chosen for the name.
func (o ApiConfigOutput) ApiConfigIdPrefix() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConfig) pulumi.StringOutput { return v.ApiConfigIdPrefix }).(pulumi.StringOutput)
}
// A user-visible name for the API.
func (o ApiConfigOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConfig) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// Immutable. Gateway specific configuration.
// If not specified, backend authentication will be set to use OIDC authentication using the default compute service account
// Structure is documented below.
func (o ApiConfigOutput) GatewayConfig() ApiConfigGatewayConfigPtrOutput {
return o.ApplyT(func(v *ApiConfig) ApiConfigGatewayConfigPtrOutput { return v.GatewayConfig }).(ApiConfigGatewayConfigPtrOutput)
}
// gRPC service definition files. If specified, openapiDocuments must not be included.
// Structure is documented below.
func (o ApiConfigOutput) GrpcServices() ApiConfigGrpcServiceArrayOutput {
return o.ApplyT(func(v *ApiConfig) ApiConfigGrpcServiceArrayOutput { return v.GrpcServices }).(ApiConfigGrpcServiceArrayOutput)
}
// Resource labels to represent user-provided metadata.
func (o ApiConfigOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v *ApiConfig) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput)
}
// Optional. Service Configuration files. At least one must be included when using gRPC service definitions. See https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview for the expected file contents.
// If multiple files are specified, the files are merged with the following rules: * All singular scalar fields are merged using "last one wins" semantics in the order of the files uploaded. * Repeated fields are concatenated. * Singular embedded messages are merged using these rules for nested fields.
// Structure is documented below.
func (o ApiConfigOutput) ManagedServiceConfigs() ApiConfigManagedServiceConfigArrayOutput {
return o.ApplyT(func(v *ApiConfig) ApiConfigManagedServiceConfigArrayOutput { return v.ManagedServiceConfigs }).(ApiConfigManagedServiceConfigArrayOutput)
}
// The resource name of the API Config.
func (o ApiConfigOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConfig) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// OpenAPI specification documents. If specified, grpcServices and managedServiceConfigs must not be included.
// Structure is documented below.
func (o ApiConfigOutput) OpenapiDocuments() ApiConfigOpenapiDocumentArrayOutput {
return o.ApplyT(func(v *ApiConfig) ApiConfigOpenapiDocumentArrayOutput { return v.OpenapiDocuments }).(ApiConfigOpenapiDocumentArrayOutput)
}
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
func (o ApiConfigOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConfig) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The ID of the associated Service Config (https://cloud.google.com/service-infrastructure/docs/glossary#config).
func (o ApiConfigOutput) ServiceConfigId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConfig) pulumi.StringOutput { return v.ServiceConfigId }).(pulumi.StringOutput)
}
type ApiConfigArrayOutput struct{ *pulumi.OutputState }
func (ApiConfigArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiConfig)(nil)).Elem()
}
func (o ApiConfigArrayOutput) ToApiConfigArrayOutput() ApiConfigArrayOutput {
return o
}
func (o ApiConfigArrayOutput) ToApiConfigArrayOutputWithContext(ctx context.Context) ApiConfigArrayOutput {
return o
}
func (o ApiConfigArrayOutput) Index(i pulumi.IntInput) ApiConfigOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiConfig {
return vs[0].([]*ApiConfig)[vs[1].(int)]
}).(ApiConfigOutput)
}
type ApiConfigMapOutput struct{ *pulumi.OutputState }
func (ApiConfigMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiConfig)(nil)).Elem()
}
func (o ApiConfigMapOutput) ToApiConfigMapOutput() ApiConfigMapOutput {
return o
}
func (o ApiConfigMapOutput) ToApiConfigMapOutputWithContext(ctx context.Context) ApiConfigMapOutput {
return o
}
func (o ApiConfigMapOutput) MapIndex(k pulumi.StringInput) ApiConfigOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiConfig {
return vs[0].(map[string]*ApiConfig)[vs[1].(string)]
}).(ApiConfigOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiConfigInput)(nil)).Elem(), &ApiConfig{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiConfigArrayInput)(nil)).Elem(), ApiConfigArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiConfigMapInput)(nil)).Elem(), ApiConfigMap{})
pulumi.RegisterOutputType(ApiConfigOutput{})
pulumi.RegisterOutputType(ApiConfigArrayOutput{})
pulumi.RegisterOutputType(ApiConfigMapOutput{})
}