generated from pulumi/pulumi-tf-provider-boilerplate
/
backendSet.go
605 lines (550 loc) · 39 KB
/
backendSet.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
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
// 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 loadbalancer
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This resource provides the Backend Set resource in Oracle Cloud Infrastructure Load Balancer service.
//
// Adds a backend set to a load balancer.
//
// ## Supported Aliases
//
// * `ociLoadBalancerBackendset`
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/LoadBalancer"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := LoadBalancer.NewBackendSet(ctx, "test_backend_set", &LoadBalancer.BackendSetArgs{
// HealthChecker: &loadbalancer.BackendSetHealthCheckerArgs{
// Protocol: pulumi.Any(backendSetHealthCheckerProtocol),
// IntervalMs: pulumi.Any(backendSetHealthCheckerIntervalMs),
// IsForcePlainText: pulumi.Any(backendSetHealthCheckerIsForcePlainText),
// Port: pulumi.Any(backendSetHealthCheckerPort),
// ResponseBodyRegex: pulumi.Any(backendSetHealthCheckerResponseBodyRegex),
// Retries: pulumi.Any(backendSetHealthCheckerRetries),
// ReturnCode: pulumi.Any(backendSetHealthCheckerReturnCode),
// TimeoutInMillis: pulumi.Any(backendSetHealthCheckerTimeoutInMillis),
// UrlPath: pulumi.Any(backendSetHealthCheckerUrlPath),
// },
// LoadBalancerId: pulumi.Any(testLoadBalancer.Id),
// Name: pulumi.Any(backendSetName),
// Policy: pulumi.Any(backendSetPolicy),
// LbCookieSessionPersistenceConfiguration: &loadbalancer.BackendSetLbCookieSessionPersistenceConfigurationArgs{
// CookieName: pulumi.Any(backendSetLbCookieSessionPersistenceConfigurationCookieName),
// DisableFallback: pulumi.Any(backendSetLbCookieSessionPersistenceConfigurationDisableFallback),
// Domain: pulumi.Any(backendSetLbCookieSessionPersistenceConfigurationDomain),
// IsHttpOnly: pulumi.Any(backendSetLbCookieSessionPersistenceConfigurationIsHttpOnly),
// IsSecure: pulumi.Any(backendSetLbCookieSessionPersistenceConfigurationIsSecure),
// MaxAgeInSeconds: pulumi.Any(backendSetLbCookieSessionPersistenceConfigurationMaxAgeInSeconds),
// Path: pulumi.Any(backendSetLbCookieSessionPersistenceConfigurationPath),
// },
// SessionPersistenceConfiguration: &loadbalancer.BackendSetSessionPersistenceConfigurationArgs{
// CookieName: pulumi.Any(backendSetSessionPersistenceConfigurationCookieName),
// DisableFallback: pulumi.Any(backendSetSessionPersistenceConfigurationDisableFallback),
// },
// SslConfiguration: &loadbalancer.BackendSetSslConfigurationArgs{
// CertificateIds: pulumi.Any(backendSetSslConfigurationCertificateIds),
// CertificateName: pulumi.Any(testCertificate.Name),
// CipherSuiteName: pulumi.Any(backendSetSslConfigurationCipherSuiteName),
// Protocols: pulumi.Any(backendSetSslConfigurationProtocols),
// ServerOrderPreference: pulumi.Any(backendSetSslConfigurationServerOrderPreference),
// TrustedCertificateAuthorityIds: pulumi.Any(backendSetSslConfigurationTrustedCertificateAuthorityIds),
// VerifyDepth: pulumi.Any(backendSetSslConfigurationVerifyDepth),
// VerifyPeerCertificate: pulumi.Any(backendSetSslConfigurationVerifyPeerCertificate),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// **Note:** The `sessionPersistenceConfiguration` (application cookie stickiness) and `lbCookieSessionPersistenceConfiguration`
//
// (LB cookie stickiness) attributes are mutually exclusive. To avoid returning an error, configure only one of these two
// attributes per backend set.
//
// ## Import
//
// BackendSets can be imported using the `id`, e.g.
//
// ```sh
// $ pulumi import oci:LoadBalancer/backendSet:BackendSet test_backend_set "loadBalancers/{loadBalancerId}/backendSets/{backendSetName}"
// ```
type BackendSet struct {
pulumi.CustomResourceState
Backends BackendSetBackendArrayOutput `pulumi:"backends"`
// (Updatable) The health check policy's configuration details.
HealthChecker BackendSetHealthCheckerOutput `pulumi:"healthChecker"`
// (Updatable) The configuration details for implementing load balancer cookie session persistence (LB cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct all requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// When you configure LB cookie stickiness, the load balancer inserts a cookie into the response. The parameters configured in the cookie enable session stickiness. This method is useful when you have applications and Web backend services that cannot generate their own cookies.
//
// Path route rules take precedence to determine the target backend server. The load balancer verifies that session stickiness is enabled for the backend server and that the cookie configuration (domain, path, and cookie hash) is valid for the target. The system ignores invalid cookies.
//
// To disable LB cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `LBCookieSessionPersistenceConfigurationDetails` object.
//
// Example: `LBCookieSessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
LbCookieSessionPersistenceConfiguration BackendSetLbCookieSessionPersistenceConfigurationOutput `pulumi:"lbCookieSessionPersistenceConfiguration"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set.
LoadBalancerId pulumi.StringOutput `pulumi:"loadBalancerId"`
// A friendly name for the backend set. It must be unique and it cannot be changed.
//
// Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot contain spaces. Avoid entering confidential information.
//
// Example: `exampleBackendSet`
Name pulumi.StringOutput `pulumi:"name"`
// (Updatable) The load balancer policy for the backend set. To get a list of available policies, use the [ListPolicies](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/LoadBalancerPolicy/ListPolicies) operation. Example: `LEAST_CONNECTIONS`
Policy pulumi.StringOutput `pulumi:"policy"`
// (Updatable) The configuration details for implementing session persistence based on a user-specified cookie name (application cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct any number of requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// With application cookie stickiness, the load balancer enables session persistence only when the response from a backend application server includes a `Set-cookie` header with the user-specified cookie name.
//
// To disable application cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `SessionPersistenceConfigurationDetails` object.
//
// Example: `SessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SessionPersistenceConfiguration BackendSetSessionPersistenceConfigurationOutput `pulumi:"sessionPersistenceConfiguration"`
// (Updatable) The load balancer's SSL handling configuration details.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SslConfiguration BackendSetSslConfigurationPtrOutput `pulumi:"sslConfiguration"`
State pulumi.StringOutput `pulumi:"state"`
}
// NewBackendSet registers a new resource with the given unique name, arguments, and options.
func NewBackendSet(ctx *pulumi.Context,
name string, args *BackendSetArgs, opts ...pulumi.ResourceOption) (*BackendSet, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.HealthChecker == nil {
return nil, errors.New("invalid value for required argument 'HealthChecker'")
}
if args.LoadBalancerId == nil {
return nil, errors.New("invalid value for required argument 'LoadBalancerId'")
}
if args.Policy == nil {
return nil, errors.New("invalid value for required argument 'Policy'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackendSet
err := ctx.RegisterResource("oci:LoadBalancer/backendSet:BackendSet", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackendSet gets an existing BackendSet 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 GetBackendSet(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackendSetState, opts ...pulumi.ResourceOption) (*BackendSet, error) {
var resource BackendSet
err := ctx.ReadResource("oci:LoadBalancer/backendSet:BackendSet", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackendSet resources.
type backendSetState struct {
Backends []BackendSetBackend `pulumi:"backends"`
// (Updatable) The health check policy's configuration details.
HealthChecker *BackendSetHealthChecker `pulumi:"healthChecker"`
// (Updatable) The configuration details for implementing load balancer cookie session persistence (LB cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct all requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// When you configure LB cookie stickiness, the load balancer inserts a cookie into the response. The parameters configured in the cookie enable session stickiness. This method is useful when you have applications and Web backend services that cannot generate their own cookies.
//
// Path route rules take precedence to determine the target backend server. The load balancer verifies that session stickiness is enabled for the backend server and that the cookie configuration (domain, path, and cookie hash) is valid for the target. The system ignores invalid cookies.
//
// To disable LB cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `LBCookieSessionPersistenceConfigurationDetails` object.
//
// Example: `LBCookieSessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
LbCookieSessionPersistenceConfiguration *BackendSetLbCookieSessionPersistenceConfiguration `pulumi:"lbCookieSessionPersistenceConfiguration"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set.
LoadBalancerId *string `pulumi:"loadBalancerId"`
// A friendly name for the backend set. It must be unique and it cannot be changed.
//
// Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot contain spaces. Avoid entering confidential information.
//
// Example: `exampleBackendSet`
Name *string `pulumi:"name"`
// (Updatable) The load balancer policy for the backend set. To get a list of available policies, use the [ListPolicies](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/LoadBalancerPolicy/ListPolicies) operation. Example: `LEAST_CONNECTIONS`
Policy *string `pulumi:"policy"`
// (Updatable) The configuration details for implementing session persistence based on a user-specified cookie name (application cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct any number of requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// With application cookie stickiness, the load balancer enables session persistence only when the response from a backend application server includes a `Set-cookie` header with the user-specified cookie name.
//
// To disable application cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `SessionPersistenceConfigurationDetails` object.
//
// Example: `SessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SessionPersistenceConfiguration *BackendSetSessionPersistenceConfiguration `pulumi:"sessionPersistenceConfiguration"`
// (Updatable) The load balancer's SSL handling configuration details.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SslConfiguration *BackendSetSslConfiguration `pulumi:"sslConfiguration"`
State *string `pulumi:"state"`
}
type BackendSetState struct {
Backends BackendSetBackendArrayInput
// (Updatable) The health check policy's configuration details.
HealthChecker BackendSetHealthCheckerPtrInput
// (Updatable) The configuration details for implementing load balancer cookie session persistence (LB cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct all requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// When you configure LB cookie stickiness, the load balancer inserts a cookie into the response. The parameters configured in the cookie enable session stickiness. This method is useful when you have applications and Web backend services that cannot generate their own cookies.
//
// Path route rules take precedence to determine the target backend server. The load balancer verifies that session stickiness is enabled for the backend server and that the cookie configuration (domain, path, and cookie hash) is valid for the target. The system ignores invalid cookies.
//
// To disable LB cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `LBCookieSessionPersistenceConfigurationDetails` object.
//
// Example: `LBCookieSessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
LbCookieSessionPersistenceConfiguration BackendSetLbCookieSessionPersistenceConfigurationPtrInput
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set.
LoadBalancerId pulumi.StringPtrInput
// A friendly name for the backend set. It must be unique and it cannot be changed.
//
// Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot contain spaces. Avoid entering confidential information.
//
// Example: `exampleBackendSet`
Name pulumi.StringPtrInput
// (Updatable) The load balancer policy for the backend set. To get a list of available policies, use the [ListPolicies](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/LoadBalancerPolicy/ListPolicies) operation. Example: `LEAST_CONNECTIONS`
Policy pulumi.StringPtrInput
// (Updatable) The configuration details for implementing session persistence based on a user-specified cookie name (application cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct any number of requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// With application cookie stickiness, the load balancer enables session persistence only when the response from a backend application server includes a `Set-cookie` header with the user-specified cookie name.
//
// To disable application cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `SessionPersistenceConfigurationDetails` object.
//
// Example: `SessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SessionPersistenceConfiguration BackendSetSessionPersistenceConfigurationPtrInput
// (Updatable) The load balancer's SSL handling configuration details.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SslConfiguration BackendSetSslConfigurationPtrInput
State pulumi.StringPtrInput
}
func (BackendSetState) ElementType() reflect.Type {
return reflect.TypeOf((*backendSetState)(nil)).Elem()
}
type backendSetArgs struct {
// (Updatable) The health check policy's configuration details.
HealthChecker BackendSetHealthChecker `pulumi:"healthChecker"`
// (Updatable) The configuration details for implementing load balancer cookie session persistence (LB cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct all requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// When you configure LB cookie stickiness, the load balancer inserts a cookie into the response. The parameters configured in the cookie enable session stickiness. This method is useful when you have applications and Web backend services that cannot generate their own cookies.
//
// Path route rules take precedence to determine the target backend server. The load balancer verifies that session stickiness is enabled for the backend server and that the cookie configuration (domain, path, and cookie hash) is valid for the target. The system ignores invalid cookies.
//
// To disable LB cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `LBCookieSessionPersistenceConfigurationDetails` object.
//
// Example: `LBCookieSessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
LbCookieSessionPersistenceConfiguration *BackendSetLbCookieSessionPersistenceConfiguration `pulumi:"lbCookieSessionPersistenceConfiguration"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set.
LoadBalancerId string `pulumi:"loadBalancerId"`
// A friendly name for the backend set. It must be unique and it cannot be changed.
//
// Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot contain spaces. Avoid entering confidential information.
//
// Example: `exampleBackendSet`
Name *string `pulumi:"name"`
// (Updatable) The load balancer policy for the backend set. To get a list of available policies, use the [ListPolicies](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/LoadBalancerPolicy/ListPolicies) operation. Example: `LEAST_CONNECTIONS`
Policy string `pulumi:"policy"`
// (Updatable) The configuration details for implementing session persistence based on a user-specified cookie name (application cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct any number of requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// With application cookie stickiness, the load balancer enables session persistence only when the response from a backend application server includes a `Set-cookie` header with the user-specified cookie name.
//
// To disable application cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `SessionPersistenceConfigurationDetails` object.
//
// Example: `SessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SessionPersistenceConfiguration *BackendSetSessionPersistenceConfiguration `pulumi:"sessionPersistenceConfiguration"`
// (Updatable) The load balancer's SSL handling configuration details.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SslConfiguration *BackendSetSslConfiguration `pulumi:"sslConfiguration"`
}
// The set of arguments for constructing a BackendSet resource.
type BackendSetArgs struct {
// (Updatable) The health check policy's configuration details.
HealthChecker BackendSetHealthCheckerInput
// (Updatable) The configuration details for implementing load balancer cookie session persistence (LB cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct all requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// When you configure LB cookie stickiness, the load balancer inserts a cookie into the response. The parameters configured in the cookie enable session stickiness. This method is useful when you have applications and Web backend services that cannot generate their own cookies.
//
// Path route rules take precedence to determine the target backend server. The load balancer verifies that session stickiness is enabled for the backend server and that the cookie configuration (domain, path, and cookie hash) is valid for the target. The system ignores invalid cookies.
//
// To disable LB cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `LBCookieSessionPersistenceConfigurationDetails` object.
//
// Example: `LBCookieSessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
LbCookieSessionPersistenceConfiguration BackendSetLbCookieSessionPersistenceConfigurationPtrInput
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set.
LoadBalancerId pulumi.StringInput
// A friendly name for the backend set. It must be unique and it cannot be changed.
//
// Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot contain spaces. Avoid entering confidential information.
//
// Example: `exampleBackendSet`
Name pulumi.StringPtrInput
// (Updatable) The load balancer policy for the backend set. To get a list of available policies, use the [ListPolicies](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/LoadBalancerPolicy/ListPolicies) operation. Example: `LEAST_CONNECTIONS`
Policy pulumi.StringInput
// (Updatable) The configuration details for implementing session persistence based on a user-specified cookie name (application cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct any number of requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// With application cookie stickiness, the load balancer enables session persistence only when the response from a backend application server includes a `Set-cookie` header with the user-specified cookie name.
//
// To disable application cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `SessionPersistenceConfigurationDetails` object.
//
// Example: `SessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SessionPersistenceConfiguration BackendSetSessionPersistenceConfigurationPtrInput
// (Updatable) The load balancer's SSL handling configuration details.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
SslConfiguration BackendSetSslConfigurationPtrInput
}
func (BackendSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backendSetArgs)(nil)).Elem()
}
type BackendSetInput interface {
pulumi.Input
ToBackendSetOutput() BackendSetOutput
ToBackendSetOutputWithContext(ctx context.Context) BackendSetOutput
}
func (*BackendSet) ElementType() reflect.Type {
return reflect.TypeOf((**BackendSet)(nil)).Elem()
}
func (i *BackendSet) ToBackendSetOutput() BackendSetOutput {
return i.ToBackendSetOutputWithContext(context.Background())
}
func (i *BackendSet) ToBackendSetOutputWithContext(ctx context.Context) BackendSetOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackendSetOutput)
}
// BackendSetArrayInput is an input type that accepts BackendSetArray and BackendSetArrayOutput values.
// You can construct a concrete instance of `BackendSetArrayInput` via:
//
// BackendSetArray{ BackendSetArgs{...} }
type BackendSetArrayInput interface {
pulumi.Input
ToBackendSetArrayOutput() BackendSetArrayOutput
ToBackendSetArrayOutputWithContext(context.Context) BackendSetArrayOutput
}
type BackendSetArray []BackendSetInput
func (BackendSetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackendSet)(nil)).Elem()
}
func (i BackendSetArray) ToBackendSetArrayOutput() BackendSetArrayOutput {
return i.ToBackendSetArrayOutputWithContext(context.Background())
}
func (i BackendSetArray) ToBackendSetArrayOutputWithContext(ctx context.Context) BackendSetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackendSetArrayOutput)
}
// BackendSetMapInput is an input type that accepts BackendSetMap and BackendSetMapOutput values.
// You can construct a concrete instance of `BackendSetMapInput` via:
//
// BackendSetMap{ "key": BackendSetArgs{...} }
type BackendSetMapInput interface {
pulumi.Input
ToBackendSetMapOutput() BackendSetMapOutput
ToBackendSetMapOutputWithContext(context.Context) BackendSetMapOutput
}
type BackendSetMap map[string]BackendSetInput
func (BackendSetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackendSet)(nil)).Elem()
}
func (i BackendSetMap) ToBackendSetMapOutput() BackendSetMapOutput {
return i.ToBackendSetMapOutputWithContext(context.Background())
}
func (i BackendSetMap) ToBackendSetMapOutputWithContext(ctx context.Context) BackendSetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackendSetMapOutput)
}
type BackendSetOutput struct{ *pulumi.OutputState }
func (BackendSetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackendSet)(nil)).Elem()
}
func (o BackendSetOutput) ToBackendSetOutput() BackendSetOutput {
return o
}
func (o BackendSetOutput) ToBackendSetOutputWithContext(ctx context.Context) BackendSetOutput {
return o
}
func (o BackendSetOutput) Backends() BackendSetBackendArrayOutput {
return o.ApplyT(func(v *BackendSet) BackendSetBackendArrayOutput { return v.Backends }).(BackendSetBackendArrayOutput)
}
// (Updatable) The health check policy's configuration details.
func (o BackendSetOutput) HealthChecker() BackendSetHealthCheckerOutput {
return o.ApplyT(func(v *BackendSet) BackendSetHealthCheckerOutput { return v.HealthChecker }).(BackendSetHealthCheckerOutput)
}
// (Updatable) The configuration details for implementing load balancer cookie session persistence (LB cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct all requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// When you configure LB cookie stickiness, the load balancer inserts a cookie into the response. The parameters configured in the cookie enable session stickiness. This method is useful when you have applications and Web backend services that cannot generate their own cookies.
//
// Path route rules take precedence to determine the target backend server. The load balancer verifies that session stickiness is enabled for the backend server and that the cookie configuration (domain, path, and cookie hash) is valid for the target. The system ignores invalid cookies.
//
// To disable LB cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `LBCookieSessionPersistenceConfigurationDetails` object.
//
// Example: `LBCookieSessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
func (o BackendSetOutput) LbCookieSessionPersistenceConfiguration() BackendSetLbCookieSessionPersistenceConfigurationOutput {
return o.ApplyT(func(v *BackendSet) BackendSetLbCookieSessionPersistenceConfigurationOutput {
return v.LbCookieSessionPersistenceConfiguration
}).(BackendSetLbCookieSessionPersistenceConfigurationOutput)
}
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set.
func (o BackendSetOutput) LoadBalancerId() pulumi.StringOutput {
return o.ApplyT(func(v *BackendSet) pulumi.StringOutput { return v.LoadBalancerId }).(pulumi.StringOutput)
}
// A friendly name for the backend set. It must be unique and it cannot be changed.
//
// Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot contain spaces. Avoid entering confidential information.
//
// Example: `exampleBackendSet`
func (o BackendSetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackendSet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// (Updatable) The load balancer policy for the backend set. To get a list of available policies, use the [ListPolicies](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/LoadBalancerPolicy/ListPolicies) operation. Example: `LEAST_CONNECTIONS`
func (o BackendSetOutput) Policy() pulumi.StringOutput {
return o.ApplyT(func(v *BackendSet) pulumi.StringOutput { return v.Policy }).(pulumi.StringOutput)
}
// (Updatable) The configuration details for implementing session persistence based on a user-specified cookie name (application cookie stickiness).
//
// Session persistence enables the Load Balancing service to direct any number of requests that originate from a single logical client to a single backend web server. For more information, see [Session Persistence](https://docs.cloud.oracle.com/iaas/Content/Balance/Reference/sessionpersistence.htm).
//
// With application cookie stickiness, the load balancer enables session persistence only when the response from a backend application server includes a `Set-cookie` header with the user-specified cookie name.
//
// To disable application cookie stickiness on a running load balancer, use the [UpdateBackendSet](https://docs.cloud.oracle.com/iaas/api/#/en/loadbalancer/20170115/BackendSet/UpdateBackendSet) operation and specify `null` for the `SessionPersistenceConfigurationDetails` object.
//
// Example: `SessionPersistenceConfigurationDetails: null`
//
// **Note:** `SessionPersistenceConfigurationDetails` (application cookie stickiness) and `LBCookieSessionPersistenceConfigurationDetails` (LB cookie stickiness) are mutually exclusive. An error results if you try to enable both types of session persistence.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
func (o BackendSetOutput) SessionPersistenceConfiguration() BackendSetSessionPersistenceConfigurationOutput {
return o.ApplyT(func(v *BackendSet) BackendSetSessionPersistenceConfigurationOutput {
return v.SessionPersistenceConfiguration
}).(BackendSetSessionPersistenceConfigurationOutput)
}
// (Updatable) The load balancer's SSL handling configuration details.
//
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
func (o BackendSetOutput) SslConfiguration() BackendSetSslConfigurationPtrOutput {
return o.ApplyT(func(v *BackendSet) BackendSetSslConfigurationPtrOutput { return v.SslConfiguration }).(BackendSetSslConfigurationPtrOutput)
}
func (o BackendSetOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *BackendSet) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
type BackendSetArrayOutput struct{ *pulumi.OutputState }
func (BackendSetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackendSet)(nil)).Elem()
}
func (o BackendSetArrayOutput) ToBackendSetArrayOutput() BackendSetArrayOutput {
return o
}
func (o BackendSetArrayOutput) ToBackendSetArrayOutputWithContext(ctx context.Context) BackendSetArrayOutput {
return o
}
func (o BackendSetArrayOutput) Index(i pulumi.IntInput) BackendSetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackendSet {
return vs[0].([]*BackendSet)[vs[1].(int)]
}).(BackendSetOutput)
}
type BackendSetMapOutput struct{ *pulumi.OutputState }
func (BackendSetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackendSet)(nil)).Elem()
}
func (o BackendSetMapOutput) ToBackendSetMapOutput() BackendSetMapOutput {
return o
}
func (o BackendSetMapOutput) ToBackendSetMapOutputWithContext(ctx context.Context) BackendSetMapOutput {
return o
}
func (o BackendSetMapOutput) MapIndex(k pulumi.StringInput) BackendSetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackendSet {
return vs[0].(map[string]*BackendSet)[vs[1].(string)]
}).(BackendSetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackendSetInput)(nil)).Elem(), &BackendSet{})
pulumi.RegisterInputType(reflect.TypeOf((*BackendSetArrayInput)(nil)).Elem(), BackendSetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackendSetMapInput)(nil)).Elem(), BackendSetMap{})
pulumi.RegisterOutputType(BackendSetOutput{})
pulumi.RegisterOutputType(BackendSetArrayOutput{})
pulumi.RegisterOutputType(BackendSetMapOutput{})
}