oraclebmc 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +82 -0
  3. data/README.md +220 -0
  4. data/lib/oraclebmc/api_client.rb +349 -0
  5. data/lib/oraclebmc/config.rb +80 -0
  6. data/lib/oraclebmc/config_file_loader.rb +85 -0
  7. data/lib/oraclebmc/core/blockstorage_client.rb +459 -0
  8. data/lib/oraclebmc/core/compute_client.rb +1053 -0
  9. data/lib/oraclebmc/core/core.rb +82 -0
  10. data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +179 -0
  11. data/lib/oraclebmc/core/models/attach_volume_details.rb +206 -0
  12. data/lib/oraclebmc/core/models/capture_console_history_details.rb +162 -0
  13. data/lib/oraclebmc/core/models/console_history.rb +252 -0
  14. data/lib/oraclebmc/core/models/cpe.rb +209 -0
  15. data/lib/oraclebmc/core/models/create_cpe_details.rb +187 -0
  16. data/lib/oraclebmc/core/models/create_dhcp_details.rb +195 -0
  17. data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +184 -0
  18. data/lib/oraclebmc/core/models/create_drg_details.rb +173 -0
  19. data/lib/oraclebmc/core/models/create_image_details.rb +188 -0
  20. data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +195 -0
  21. data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +210 -0
  22. data/lib/oraclebmc/core/models/create_route_table_details.rb +195 -0
  23. data/lib/oraclebmc/core/models/create_security_list_details.rb +206 -0
  24. data/lib/oraclebmc/core/models/create_subnet_details.rb +253 -0
  25. data/lib/oraclebmc/core/models/create_vcn_details.rb +187 -0
  26. data/lib/oraclebmc/core/models/create_volume_backup_details.rb +173 -0
  27. data/lib/oraclebmc/core/models/create_volume_details.rb +211 -0
  28. data/lib/oraclebmc/core/models/dhcp_dns_option.rb +203 -0
  29. data/lib/oraclebmc/core/models/dhcp_option.rb +171 -0
  30. data/lib/oraclebmc/core/models/dhcp_options.rb +246 -0
  31. data/lib/oraclebmc/core/models/drg.rb +224 -0
  32. data/lib/oraclebmc/core/models/drg_attachment.rb +246 -0
  33. data/lib/oraclebmc/core/models/egress_security_rule.rb +240 -0
  34. data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +254 -0
  35. data/lib/oraclebmc/core/models/icmp_options.rb +173 -0
  36. data/lib/oraclebmc/core/models/image.rb +282 -0
  37. data/lib/oraclebmc/core/models/ingress_security_rule.rb +240 -0
  38. data/lib/oraclebmc/core/models/instance.rb +326 -0
  39. data/lib/oraclebmc/core/models/internet_gateway.rb +248 -0
  40. data/lib/oraclebmc/core/models/ip_sec_connection.rb +261 -0
  41. data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +195 -0
  42. data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +198 -0
  43. data/lib/oraclebmc/core/models/launch_instance_details.rb +327 -0
  44. data/lib/oraclebmc/core/models/port_range.rb +175 -0
  45. data/lib/oraclebmc/core/models/route_rule.rb +177 -0
  46. data/lib/oraclebmc/core/models/route_table.rb +246 -0
  47. data/lib/oraclebmc/core/models/security_list.rb +257 -0
  48. data/lib/oraclebmc/core/models/shape.rb +164 -0
  49. data/lib/oraclebmc/core/models/subnet.rb +325 -0
  50. data/lib/oraclebmc/core/models/tcp_options.rb +177 -0
  51. data/lib/oraclebmc/core/models/tunnel_config.rb +193 -0
  52. data/lib/oraclebmc/core/models/tunnel_status.rb +218 -0
  53. data/lib/oraclebmc/core/models/udp_options.rb +177 -0
  54. data/lib/oraclebmc/core/models/update_cpe_details.rb +162 -0
  55. data/lib/oraclebmc/core/models/update_dhcp_details.rb +172 -0
  56. data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +162 -0
  57. data/lib/oraclebmc/core/models/update_drg_details.rb +162 -0
  58. data/lib/oraclebmc/core/models/update_image_details.rb +165 -0
  59. data/lib/oraclebmc/core/models/update_instance_details.rb +165 -0
  60. data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +173 -0
  61. data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +162 -0
  62. data/lib/oraclebmc/core/models/update_route_table_details.rb +173 -0
  63. data/lib/oraclebmc/core/models/update_security_list_details.rb +184 -0
  64. data/lib/oraclebmc/core/models/update_subnet_details.rb +162 -0
  65. data/lib/oraclebmc/core/models/update_vcn_details.rb +162 -0
  66. data/lib/oraclebmc/core/models/update_volume_backup_details.rb +162 -0
  67. data/lib/oraclebmc/core/models/update_volume_details.rb +163 -0
  68. data/lib/oraclebmc/core/models/vcn.rb +272 -0
  69. data/lib/oraclebmc/core/models/vnic.rb +274 -0
  70. data/lib/oraclebmc/core/models/vnic_attachment.rb +271 -0
  71. data/lib/oraclebmc/core/models/volume.rb +249 -0
  72. data/lib/oraclebmc/core/models/volume_attachment.rb +284 -0
  73. data/lib/oraclebmc/core/models/volume_backup.rb +273 -0
  74. data/lib/oraclebmc/core/util.rb +1 -0
  75. data/lib/oraclebmc/core/virtual_network_client.rb +2263 -0
  76. data/lib/oraclebmc/errors.rb +62 -0
  77. data/lib/oraclebmc/global_context.rb +21 -0
  78. data/lib/oraclebmc/identity/identity.rb +38 -0
  79. data/lib/oraclebmc/identity/identity_client.rb +1462 -0
  80. data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +173 -0
  81. data/lib/oraclebmc/identity/models/api_key.rb +251 -0
  82. data/lib/oraclebmc/identity/models/availability_domain.rb +173 -0
  83. data/lib/oraclebmc/identity/models/compartment.rb +251 -0
  84. data/lib/oraclebmc/identity/models/create_api_key_details.rb +162 -0
  85. data/lib/oraclebmc/identity/models/create_compartment_details.rb +187 -0
  86. data/lib/oraclebmc/identity/models/create_group_details.rb +186 -0
  87. data/lib/oraclebmc/identity/models/create_policy_details.rb +215 -0
  88. data/lib/oraclebmc/identity/models/create_swift_password_details.rb +163 -0
  89. data/lib/oraclebmc/identity/models/create_user_details.rb +186 -0
  90. data/lib/oraclebmc/identity/models/group.rb +251 -0
  91. data/lib/oraclebmc/identity/models/policy.rb +277 -0
  92. data/lib/oraclebmc/identity/models/swift_password.rb +266 -0
  93. data/lib/oraclebmc/identity/models/ui_password.rb +227 -0
  94. data/lib/oraclebmc/identity/models/update_compartment_details.rb +162 -0
  95. data/lib/oraclebmc/identity/models/update_group_details.rb +162 -0
  96. data/lib/oraclebmc/identity/models/update_policy_details.rb +190 -0
  97. data/lib/oraclebmc/identity/models/update_state_details.rb +163 -0
  98. data/lib/oraclebmc/identity/models/update_swift_password_details.rb +162 -0
  99. data/lib/oraclebmc/identity/models/update_user_details.rb +162 -0
  100. data/lib/oraclebmc/identity/models/user.rb +257 -0
  101. data/lib/oraclebmc/identity/models/user_group_membership.rb +249 -0
  102. data/lib/oraclebmc/identity/util.rb +1 -0
  103. data/lib/oraclebmc/load_balancer/load_balancer.rb +45 -0
  104. data/lib/oraclebmc/load_balancer/load_balancer_client.rb +1218 -0
  105. data/lib/oraclebmc/load_balancer/models/backend.rb +262 -0
  106. data/lib/oraclebmc/load_balancer/models/backend_details.rb +248 -0
  107. data/lib/oraclebmc/load_balancer/models/backend_set.rb +211 -0
  108. data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +197 -0
  109. data/lib/oraclebmc/load_balancer/models/certificate.rb +209 -0
  110. data/lib/oraclebmc/load_balancer/models/certificate_details.rb +245 -0
  111. data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +248 -0
  112. data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +210 -0
  113. data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +245 -0
  114. data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +216 -0
  115. data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +233 -0
  116. data/lib/oraclebmc/load_balancer/models/health_checker.rb +265 -0
  117. data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +264 -0
  118. data/lib/oraclebmc/load_balancer/models/ip_address.rb +165 -0
  119. data/lib/oraclebmc/load_balancer/models/listener.rb +216 -0
  120. data/lib/oraclebmc/load_balancer/models/listener_details.rb +202 -0
  121. data/lib/oraclebmc/load_balancer/models/load_balancer.rb +296 -0
  122. data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +162 -0
  123. data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +162 -0
  124. data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +162 -0
  125. data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +195 -0
  126. data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +195 -0
  127. data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +220 -0
  128. data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +197 -0
  129. data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +263 -0
  130. data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +202 -0
  131. data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +165 -0
  132. data/lib/oraclebmc/load_balancer/models/work_request.rb +269 -0
  133. data/lib/oraclebmc/load_balancer/models/work_request_error.rb +185 -0
  134. data/lib/oraclebmc/load_balancer/util.rb +55 -0
  135. data/lib/oraclebmc/regions.rb +41 -0
  136. data/lib/oraclebmc/response.rb +86 -0
  137. data/lib/oraclebmc/signer.rb +119 -0
  138. data/lib/oraclebmc/version.rb +5 -0
  139. data/lib/oraclebmc/waiter.rb +111 -0
  140. data/lib/oraclebmc.rb +20 -0
  141. metadata +265 -0
@@ -0,0 +1,1218 @@
1
+ # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require "uri"
4
+ require "logger"
5
+
6
+ module OracleBMC
7
+
8
+ class LoadBalancer::LoadBalancerClient
9
+
10
+ # Client used to make HTTP requests.
11
+ # @return [OracleBMC::ApiClient]
12
+ attr_reader :api_client
13
+
14
+ # Fully qualified endpoint URL
15
+ # @return [String]
16
+ attr_reader :endpoint
17
+
18
+ # The region, which will usually correspond to a value in {OracleBMC::Regions::REGION_ENUM}.
19
+ # @return [String]
20
+ attr_accessor :region
21
+
22
+ # Creates a new LoadBalancerClient.
23
+ # If a config is not specified, then the global OracleBMC.config will be used.
24
+ #
25
+ # A region must be specified in either the config or the region parameter. If specified
26
+ # in both, then the region parameter will be used.
27
+ #
28
+ # @param [Config] config A Config object.
29
+ # @param [String] region A region used to determine the service endpoint. This will usually
30
+ # correspond to a value in {OracleBMC::Regions::REGION_ENUM}, but may be an arbitrary string.
31
+ #
32
+ def initialize(config:nil, region:nil)
33
+ config ||= OracleBMC.config
34
+ signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase)
35
+ @api_client = ApiClient.new(config, signer)
36
+
37
+ region ||= config.region
38
+ self.region = region
39
+ end
40
+
41
+ # Set the region that will be used to determine the service endpoint.
42
+ # This will usually correspond to a value in {OracleBMC::Regions::REGION_ENUM},
43
+ # but may be an arbitrary string.
44
+ def region=(r)
45
+ @region = r
46
+
47
+ fail 'A region must be specified.' unless @region
48
+
49
+ if not OracleBMC::Regions.valid_region? region
50
+ logger.info "Unknown region '#{@region}', falling back to default endpoint format." if logger
51
+ end
52
+
53
+ @endpoint = OracleBMC::Regions.get_service_endpoint(@region, :LoadBalancerClient) + '/20170115'
54
+ logger.info "LoadBalancerClient endpoint set to '#{endpoint}'." if logger
55
+ end
56
+
57
+ # @return [Logger] The logger for this client. May be nil.
58
+ def logger
59
+ @api_client.config.logger
60
+ end
61
+
62
+
63
+ # Adds a backend server to a backend set.
64
+ # @param [CreateBackendDetails] create_backend_details The details to add a backend server to a backend set.
65
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and servers.
66
+ # @param [String] backend_set_name The name of the backend set to add the backend server to.
67
+ #
68
+ # Example: `My backend set`
69
+ #
70
+ # @param [Hash] opts the optional parameters
71
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
72
+ # particular request, please provide the request ID.
73
+ # (default to )
74
+ # @return [Response] A Response object with data of type nil
75
+ def create_backend(create_backend_details, load_balancer_id, backend_set_name, opts = {})
76
+ logger.debug "Calling operation LoadBalancerClient#create_backend." if logger
77
+
78
+ fail "Missing the required parameter 'create_backend_details' when calling create_backend." if create_backend_details.nil?
79
+ fail "Missing the required parameter 'load_balancer_id' when calling create_backend." if load_balancer_id.nil?
80
+ fail "Missing the required parameter 'backend_set_name' when calling create_backend." if backend_set_name.nil?
81
+
82
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
83
+
84
+ # Query Params
85
+ query_params = {}
86
+
87
+ # Header Params
88
+ header_params = {}
89
+ header_params['accept'] = 'application/json'
90
+ header_params['content-type'] = 'application/json'
91
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
92
+
93
+ post_body = @api_client.object_to_http_body(create_backend_details)
94
+
95
+ return @api_client.call_api(
96
+ :POST,
97
+ path,
98
+ endpoint,
99
+ :header_params => header_params,
100
+ :query_params => query_params,
101
+ :body => post_body)
102
+ end
103
+
104
+ # Adds a backend set to a load balancer.
105
+ # @param [CreateBackendSetDetails] create_backend_set_details The details for adding a backend set.
106
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set.
107
+ # @param [Hash] opts the optional parameters
108
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
109
+ # particular request, please provide the request ID.
110
+ # (default to )
111
+ # @return [Response] A Response object with data of type nil
112
+ def create_backend_set(create_backend_set_details, load_balancer_id, opts = {})
113
+ logger.debug "Calling operation LoadBalancerClient#create_backend_set." if logger
114
+
115
+ fail "Missing the required parameter 'create_backend_set_details' when calling create_backend_set." if create_backend_set_details.nil?
116
+ fail "Missing the required parameter 'load_balancer_id' when calling create_backend_set." if load_balancer_id.nil?
117
+
118
+ path = "/loadBalancers/{loadBalancerId}/backendSets".sub('{loadBalancerId}', load_balancer_id.to_s)
119
+
120
+ # Query Params
121
+ query_params = {}
122
+
123
+ # Header Params
124
+ header_params = {}
125
+ header_params['accept'] = 'application/json'
126
+ header_params['content-type'] = 'application/json'
127
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
128
+
129
+ post_body = @api_client.object_to_http_body(create_backend_set_details)
130
+
131
+ return @api_client.call_api(
132
+ :POST,
133
+ path,
134
+ endpoint,
135
+ :header_params => header_params,
136
+ :query_params => query_params,
137
+ :body => post_body)
138
+ end
139
+
140
+ # Creates an asynchronous request to add an SSL certificate.
141
+ # @param [CreateCertificateDetails] create_certificate_details The details of the certificate to add.
142
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add the certificate.
143
+ # @param [Hash] opts the optional parameters
144
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
145
+ # particular request, please provide the request ID.
146
+ # (default to )
147
+ # @return [Response] A Response object with data of type nil
148
+ def create_certificate(create_certificate_details, load_balancer_id, opts = {})
149
+ logger.debug "Calling operation LoadBalancerClient#create_certificate." if logger
150
+
151
+ fail "Missing the required parameter 'create_certificate_details' when calling create_certificate." if create_certificate_details.nil?
152
+ fail "Missing the required parameter 'load_balancer_id' when calling create_certificate." if load_balancer_id.nil?
153
+
154
+ path = "/loadBalancers/{loadBalancerId}/certificates".sub('{loadBalancerId}', load_balancer_id.to_s)
155
+
156
+ # Query Params
157
+ query_params = {}
158
+
159
+ # Header Params
160
+ header_params = {}
161
+ header_params['accept'] = 'application/json'
162
+ header_params['content-type'] = 'application/json'
163
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
164
+
165
+ post_body = @api_client.object_to_http_body(create_certificate_details)
166
+
167
+ return @api_client.call_api(
168
+ :POST,
169
+ path,
170
+ endpoint,
171
+ :header_params => header_params,
172
+ :query_params => query_params,
173
+ :body => post_body)
174
+ end
175
+
176
+ # Adds a listener to a load balancer.
177
+ # @param [CreateListenerDetails] create_listener_details Details to add a listener.
178
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a listener.
179
+ # @param [Hash] opts the optional parameters
180
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
181
+ # particular request, please provide the request ID.
182
+ # (default to )
183
+ # @return [Response] A Response object with data of type nil
184
+ def create_listener(create_listener_details, load_balancer_id, opts = {})
185
+ logger.debug "Calling operation LoadBalancerClient#create_listener." if logger
186
+
187
+ fail "Missing the required parameter 'create_listener_details' when calling create_listener." if create_listener_details.nil?
188
+ fail "Missing the required parameter 'load_balancer_id' when calling create_listener." if load_balancer_id.nil?
189
+
190
+ path = "/loadBalancers/{loadBalancerId}/listeners".sub('{loadBalancerId}', load_balancer_id.to_s)
191
+
192
+ # Query Params
193
+ query_params = {}
194
+
195
+ # Header Params
196
+ header_params = {}
197
+ header_params['accept'] = 'application/json'
198
+ header_params['content-type'] = 'application/json'
199
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
200
+
201
+ post_body = @api_client.object_to_http_body(create_listener_details)
202
+
203
+ return @api_client.call_api(
204
+ :POST,
205
+ path,
206
+ endpoint,
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :body => post_body)
210
+ end
211
+
212
+ # Creates a new load balancer in the specified compartment. For general information about load balancers,
213
+ # see [Overview of the Load Balancing Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Concepts/balanceoverview.htm).
214
+ #
215
+ # For the purposes of access control, you must provide the OCID of the compartment where you want
216
+ # the load balancer to reside. Notice that the load balancer doesn't have to be in the same compartment as the VCN
217
+ # or backend set. If you're not sure which compartment to use, put the load balancer in the same compartment as the VCN.
218
+ # For information about access control and compartments, see
219
+ # [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
220
+ #
221
+ # You must specify a display name for the load balancer. It does not have to be unique, and you can change it.
222
+ #
223
+ # To successfully create a load balancer within your Virtual Cloud Network (VCN), you must specify two
224
+ # subnets. Each subnet must reside in a separate Availability Domain.
225
+ #
226
+ # For information about Availability Domains, see
227
+ # [Regions and Availability Domains](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm).
228
+ # To get a list of Availability Domains, use the `ListAvailabilityDomains` operation
229
+ # in the Identity and Access Management Service API.
230
+ #
231
+ # All Oracle Bare Metal Cloud Services resources, including load balancers, get an Oracle-assigned,
232
+ # unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID
233
+ # in the response. You can also retrieve a resource's OCID by using a List API operation on that resource type,
234
+ # or by viewing the resource in the Console. Fore more information, see
235
+ # [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
236
+ #
237
+ # After you send your request, the new object's state will temporarily be PROVISIONING. Before using the
238
+ # object, first make sure its state has changed to RUNNING.
239
+ #
240
+ # When you create a load balancer, the system issues a public IP address.
241
+ # To get the IP address, use the {#get_load_balancer get_load_balancer} operation.
242
+ #
243
+ # @param [CreateLoadBalancerDetails] create_load_balancer_details The configuration details for creating a load balancer.
244
+ # @param [Hash] opts the optional parameters
245
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
246
+ # particular request, please provide the request ID.
247
+ # (default to )
248
+ # @return [Response] A Response object with data of type nil
249
+ def create_load_balancer(create_load_balancer_details, opts = {})
250
+ logger.debug "Calling operation LoadBalancerClient#create_load_balancer." if logger
251
+
252
+ fail "Missing the required parameter 'create_load_balancer_details' when calling create_load_balancer." if create_load_balancer_details.nil?
253
+
254
+ path = "/loadBalancers"
255
+
256
+ # Query Params
257
+ query_params = {}
258
+
259
+ # Header Params
260
+ header_params = {}
261
+ header_params['accept'] = 'application/json'
262
+ header_params['content-type'] = 'application/json'
263
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
264
+
265
+ post_body = @api_client.object_to_http_body(create_load_balancer_details)
266
+
267
+ return @api_client.call_api(
268
+ :POST,
269
+ path,
270
+ endpoint,
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :body => post_body)
274
+ end
275
+
276
+ # Removes a backend server from a given load balancer and backend set.
277
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server.
278
+ # @param [String] backend_set_name The name of the backend set associated with the backend server.
279
+ #
280
+ # Example: `My backend set`
281
+ #
282
+ # @param [String] backend_name The name of the backend server to remove.
283
+ #
284
+ # Example: `My backend server`
285
+ #
286
+ # @param [Hash] opts the optional parameters
287
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
288
+ # particular request, please provide the request ID.
289
+ # (default to )
290
+ # @return [Response] A Response object with data of type nil
291
+ def delete_backend(load_balancer_id, backend_set_name, backend_name, opts = {})
292
+ logger.debug "Calling operation LoadBalancerClient#delete_backend." if logger
293
+
294
+ fail "Missing the required parameter 'load_balancer_id' when calling delete_backend." if load_balancer_id.nil?
295
+ fail "Missing the required parameter 'backend_set_name' when calling delete_backend." if backend_set_name.nil?
296
+ fail "Missing the required parameter 'backend_name' when calling delete_backend." if backend_name.nil?
297
+
298
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s).sub('{backendName}', backend_name.to_s)
299
+
300
+ # Query Params
301
+ query_params = {}
302
+
303
+ # Header Params
304
+ header_params = {}
305
+ header_params['accept'] = 'application/json'
306
+ header_params['content-type'] = 'application/json'
307
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
308
+
309
+ post_body = nil
310
+
311
+ return @api_client.call_api(
312
+ :DELETE,
313
+ path,
314
+ endpoint,
315
+ :header_params => header_params,
316
+ :query_params => query_params,
317
+ :body => post_body)
318
+ end
319
+
320
+ # Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the load balancer.
321
+ #
322
+ # Before you can delete a backend set, you must remove it from any active listeners.
323
+ #
324
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set.
325
+ # @param [String] backend_set_name The name of the backend set to delete.
326
+ #
327
+ # Example: `My backend set`
328
+ #
329
+ # @param [Hash] opts the optional parameters
330
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
331
+ # particular request, please provide the request ID.
332
+ # (default to )
333
+ # @return [Response] A Response object with data of type nil
334
+ def delete_backend_set(load_balancer_id, backend_set_name, opts = {})
335
+ logger.debug "Calling operation LoadBalancerClient#delete_backend_set." if logger
336
+
337
+ fail "Missing the required parameter 'load_balancer_id' when calling delete_backend_set." if load_balancer_id.nil?
338
+ fail "Missing the required parameter 'backend_set_name' when calling delete_backend_set." if backend_set_name.nil?
339
+
340
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
341
+
342
+ # Query Params
343
+ query_params = {}
344
+
345
+ # Header Params
346
+ header_params = {}
347
+ header_params['accept'] = 'application/json'
348
+ header_params['content-type'] = 'application/json'
349
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
350
+
351
+ post_body = nil
352
+
353
+ return @api_client.call_api(
354
+ :DELETE,
355
+ path,
356
+ endpoint,
357
+ :header_params => header_params,
358
+ :query_params => query_params,
359
+ :body => post_body)
360
+ end
361
+
362
+ # Deletes an SSL certificate from a load balancer.
363
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificate to be deleted.
364
+ # @param [String] certificate_name The name of the certificate to delete.
365
+ #
366
+ # Example: `My certificate`
367
+ #
368
+ # @param [Hash] opts the optional parameters
369
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
370
+ # particular request, please provide the request ID.
371
+ # (default to )
372
+ # @return [Response] A Response object with data of type nil
373
+ def delete_certificate(load_balancer_id, certificate_name, opts = {})
374
+ logger.debug "Calling operation LoadBalancerClient#delete_certificate." if logger
375
+
376
+ fail "Missing the required parameter 'load_balancer_id' when calling delete_certificate." if load_balancer_id.nil?
377
+ fail "Missing the required parameter 'certificate_name' when calling delete_certificate." if certificate_name.nil?
378
+
379
+ path = "/loadBalancers/{loadBalancerId}/certificates/{certificateName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{certificateName}', certificate_name.to_s)
380
+
381
+ # Query Params
382
+ query_params = {}
383
+
384
+ # Header Params
385
+ header_params = {}
386
+ header_params['accept'] = 'application/json'
387
+ header_params['content-type'] = 'application/json'
388
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
389
+
390
+ post_body = nil
391
+
392
+ return @api_client.call_api(
393
+ :DELETE,
394
+ path,
395
+ endpoint,
396
+ :header_params => header_params,
397
+ :query_params => query_params,
398
+ :body => post_body)
399
+ end
400
+
401
+ # Deletes a listener from a load balancer.
402
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the listener to delete.
403
+ # @param [String] listener_name The name of the listener to delete.
404
+ #
405
+ # Example: `My listener`
406
+ #
407
+ # @param [Hash] opts the optional parameters
408
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
409
+ # particular request, please provide the request ID.
410
+ # (default to )
411
+ # @return [Response] A Response object with data of type nil
412
+ def delete_listener(load_balancer_id, listener_name, opts = {})
413
+ logger.debug "Calling operation LoadBalancerClient#delete_listener." if logger
414
+
415
+ fail "Missing the required parameter 'load_balancer_id' when calling delete_listener." if load_balancer_id.nil?
416
+ fail "Missing the required parameter 'listener_name' when calling delete_listener." if listener_name.nil?
417
+
418
+ path = "/loadBalancers/{loadBalancerId}/listeners/{listenerName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{listenerName}', listener_name.to_s)
419
+
420
+ # Query Params
421
+ query_params = {}
422
+
423
+ # Header Params
424
+ header_params = {}
425
+ header_params['accept'] = 'application/json'
426
+ header_params['content-type'] = 'application/json'
427
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
428
+
429
+ post_body = nil
430
+
431
+ return @api_client.call_api(
432
+ :DELETE,
433
+ path,
434
+ endpoint,
435
+ :header_params => header_params,
436
+ :query_params => query_params,
437
+ :body => post_body)
438
+ end
439
+
440
+ # Stops a load balancer and removes it from service.
441
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to delete.
442
+ # @param [Hash] opts the optional parameters
443
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
444
+ # particular request, please provide the request ID.
445
+ # (default to )
446
+ # @return [Response] A Response object with data of type nil
447
+ def delete_load_balancer(load_balancer_id, opts = {})
448
+ logger.debug "Calling operation LoadBalancerClient#delete_load_balancer." if logger
449
+
450
+ fail "Missing the required parameter 'load_balancer_id' when calling delete_load_balancer." if load_balancer_id.nil?
451
+
452
+ path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)
453
+
454
+ # Query Params
455
+ query_params = {}
456
+
457
+ # Header Params
458
+ header_params = {}
459
+ header_params['accept'] = 'application/json'
460
+ header_params['content-type'] = 'application/json'
461
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
462
+
463
+ post_body = nil
464
+
465
+ return @api_client.call_api(
466
+ :DELETE,
467
+ path,
468
+ endpoint,
469
+ :header_params => header_params,
470
+ :query_params => query_params,
471
+ :body => post_body)
472
+ end
473
+
474
+ # Gets the specified backend server's configuration information.
475
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server.
476
+ # @param [String] backend_set_name The name of the backend set that includes the backend server.
477
+ #
478
+ # Example: `My backend set`
479
+ #
480
+ # @param [String] backend_name The name of the backend server to retrieve.
481
+ #
482
+ # Example: `My backend server`
483
+ #
484
+ # @param [Hash] opts the optional parameters
485
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
486
+ # particular request, please provide the request ID.
487
+ # (default to )
488
+ # @return [Response] A Response object with data of type OracleBMC::LoadBalancer::Models::Backend
489
+ def get_backend(load_balancer_id, backend_set_name, backend_name, opts = {})
490
+ logger.debug "Calling operation LoadBalancerClient#get_backend." if logger
491
+
492
+ fail "Missing the required parameter 'load_balancer_id' when calling get_backend." if load_balancer_id.nil?
493
+ fail "Missing the required parameter 'backend_set_name' when calling get_backend." if backend_set_name.nil?
494
+ fail "Missing the required parameter 'backend_name' when calling get_backend." if backend_name.nil?
495
+
496
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s).sub('{backendName}', backend_name.to_s)
497
+
498
+ # Query Params
499
+ query_params = {}
500
+
501
+ # Header Params
502
+ header_params = {}
503
+ header_params['accept'] = 'application/json'
504
+ header_params['content-type'] = 'application/json'
505
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
506
+
507
+ post_body = nil
508
+
509
+ return @api_client.call_api(
510
+ :GET,
511
+ path,
512
+ endpoint,
513
+ :header_params => header_params,
514
+ :query_params => query_params,
515
+ :body => post_body,
516
+ :return_type => 'OracleBMC::LoadBalancer::Models::Backend')
517
+ end
518
+
519
+ # Gets the specified backend set's configuration information.
520
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the specified load balancer.
521
+ # @param [String] backend_set_name The name of the backend set to retrieve.
522
+ #
523
+ # Example: `My backend set`
524
+ #
525
+ # @param [Hash] opts the optional parameters
526
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
527
+ # particular request, please provide the request ID.
528
+ # (default to )
529
+ # @return [Response] A Response object with data of type OracleBMC::LoadBalancer::Models::BackendSet
530
+ def get_backend_set(load_balancer_id, backend_set_name, opts = {})
531
+ logger.debug "Calling operation LoadBalancerClient#get_backend_set." if logger
532
+
533
+ fail "Missing the required parameter 'load_balancer_id' when calling get_backend_set." if load_balancer_id.nil?
534
+ fail "Missing the required parameter 'backend_set_name' when calling get_backend_set." if backend_set_name.nil?
535
+
536
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
537
+
538
+ # Query Params
539
+ query_params = {}
540
+
541
+ # Header Params
542
+ header_params = {}
543
+ header_params['accept'] = 'application/json'
544
+ header_params['content-type'] = 'application/json'
545
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
546
+
547
+ post_body = nil
548
+
549
+ return @api_client.call_api(
550
+ :GET,
551
+ path,
552
+ endpoint,
553
+ :header_params => header_params,
554
+ :query_params => query_params,
555
+ :body => post_body,
556
+ :return_type => 'OracleBMC::LoadBalancer::Models::BackendSet')
557
+ end
558
+
559
+ # Gets the health check policy information for a given load balancer and backend set.
560
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the health check policy to be retrieved.
561
+ # @param [String] backend_set_name The name of the backend associated with the health check policy to be retrieved.
562
+ #
563
+ # Example: `My backend set`
564
+ #
565
+ # @param [Hash] opts the optional parameters
566
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
567
+ # particular request, please provide the request ID.
568
+ # (default to )
569
+ # @return [Response] A Response object with data of type OracleBMC::LoadBalancer::Models::HealthChecker
570
+ def get_health_checker(load_balancer_id, backend_set_name, opts = {})
571
+ logger.debug "Calling operation LoadBalancerClient#get_health_checker." if logger
572
+
573
+ fail "Missing the required parameter 'load_balancer_id' when calling get_health_checker." if load_balancer_id.nil?
574
+ fail "Missing the required parameter 'backend_set_name' when calling get_health_checker." if backend_set_name.nil?
575
+
576
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
577
+
578
+ # Query Params
579
+ query_params = {}
580
+
581
+ # Header Params
582
+ header_params = {}
583
+ header_params['accept'] = 'application/json'
584
+ header_params['content-type'] = 'application/json'
585
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
586
+
587
+ post_body = nil
588
+
589
+ return @api_client.call_api(
590
+ :GET,
591
+ path,
592
+ endpoint,
593
+ :header_params => header_params,
594
+ :query_params => query_params,
595
+ :body => post_body,
596
+ :return_type => 'OracleBMC::LoadBalancer::Models::HealthChecker')
597
+ end
598
+
599
+ # Gets the specified load balancer's configuration information.
600
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to retrieve.
601
+ # @param [Hash] opts the optional parameters
602
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
603
+ # particular request, please provide the request ID.
604
+ # (default to )
605
+ # @return [Response] A Response object with data of type OracleBMC::LoadBalancer::Models::LoadBalancer
606
+ def get_load_balancer(load_balancer_id, opts = {})
607
+ logger.debug "Calling operation LoadBalancerClient#get_load_balancer." if logger
608
+
609
+ fail "Missing the required parameter 'load_balancer_id' when calling get_load_balancer." if load_balancer_id.nil?
610
+
611
+ path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)
612
+
613
+ # Query Params
614
+ query_params = {}
615
+
616
+ # Header Params
617
+ header_params = {}
618
+ header_params['accept'] = 'application/json'
619
+ header_params['content-type'] = 'application/json'
620
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
621
+
622
+ post_body = nil
623
+
624
+ return @api_client.call_api(
625
+ :GET,
626
+ path,
627
+ endpoint,
628
+ :header_params => header_params,
629
+ :query_params => query_params,
630
+ :body => post_body,
631
+ :return_type => 'OracleBMC::LoadBalancer::Models::LoadBalancer')
632
+ end
633
+
634
+ # Gets the details of a work request.
635
+ # @param [String] work_request_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request to retrieve.
636
+ # @param [Hash] opts the optional parameters
637
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
638
+ # particular request, please provide the request ID.
639
+ # (default to )
640
+ # @return [Response] A Response object with data of type OracleBMC::LoadBalancer::Models::WorkRequest
641
+ def get_work_request(work_request_id, opts = {})
642
+ logger.debug "Calling operation LoadBalancerClient#get_work_request." if logger
643
+
644
+ fail "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
645
+
646
+ path = "/loadBalancerWorkRequests/{workRequestId}".sub('{workRequestId}', work_request_id.to_s)
647
+
648
+ # Query Params
649
+ query_params = {}
650
+
651
+ # Header Params
652
+ header_params = {}
653
+ header_params['accept'] = 'application/json'
654
+ header_params['content-type'] = 'application/json'
655
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
656
+
657
+ post_body = nil
658
+
659
+ return @api_client.call_api(
660
+ :GET,
661
+ path,
662
+ endpoint,
663
+ :header_params => header_params,
664
+ :query_params => query_params,
665
+ :body => post_body,
666
+ :return_type => 'OracleBMC::LoadBalancer::Models::WorkRequest')
667
+ end
668
+
669
+ # Lists all backend sets associated with a given load balancer.
670
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend sets to retrieve.
671
+ # @param [Hash] opts the optional parameters
672
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
673
+ # particular request, please provide the request ID.
674
+ # (default to )
675
+ # @return [Response] A Response object with data of type Array<OracleBMC::LoadBalancer::Models::BackendSet>
676
+ def list_backend_sets(load_balancer_id, opts = {})
677
+ logger.debug "Calling operation LoadBalancerClient#list_backend_sets." if logger
678
+
679
+ fail "Missing the required parameter 'load_balancer_id' when calling list_backend_sets." if load_balancer_id.nil?
680
+
681
+ path = "/loadBalancers/{loadBalancerId}/backendSets".sub('{loadBalancerId}', load_balancer_id.to_s)
682
+
683
+ # Query Params
684
+ query_params = {}
685
+
686
+ # Header Params
687
+ header_params = {}
688
+ header_params['accept'] = 'application/json'
689
+ header_params['content-type'] = 'application/json'
690
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
691
+
692
+ post_body = nil
693
+
694
+ return @api_client.call_api(
695
+ :GET,
696
+ path,
697
+ endpoint,
698
+ :header_params => header_params,
699
+ :query_params => query_params,
700
+ :body => post_body,
701
+ :return_type => 'Array<OracleBMC::LoadBalancer::Models::BackendSet>')
702
+ end
703
+
704
+ # Lists the backend servers for a given load balancer and backend set.
705
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and servers.
706
+ # @param [String] backend_set_name The name of the backend set associated with the backend servers.
707
+ #
708
+ # Example: `My backend set`
709
+ #
710
+ # @param [Hash] opts the optional parameters
711
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
712
+ # particular request, please provide the request ID.
713
+ # (default to )
714
+ # @return [Response] A Response object with data of type Array<OracleBMC::LoadBalancer::Models::Backend>
715
+ def list_backends(load_balancer_id, backend_set_name, opts = {})
716
+ logger.debug "Calling operation LoadBalancerClient#list_backends." if logger
717
+
718
+ fail "Missing the required parameter 'load_balancer_id' when calling list_backends." if load_balancer_id.nil?
719
+ fail "Missing the required parameter 'backend_set_name' when calling list_backends." if backend_set_name.nil?
720
+
721
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
722
+
723
+ # Query Params
724
+ query_params = {}
725
+
726
+ # Header Params
727
+ header_params = {}
728
+ header_params['accept'] = 'application/json'
729
+ header_params['content-type'] = 'application/json'
730
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
731
+
732
+ post_body = nil
733
+
734
+ return @api_client.call_api(
735
+ :GET,
736
+ path,
737
+ endpoint,
738
+ :header_params => header_params,
739
+ :query_params => query_params,
740
+ :body => post_body,
741
+ :return_type => 'Array<OracleBMC::LoadBalancer::Models::Backend>')
742
+ end
743
+
744
+ # Lists all SSL certificates associated with a given load balancer.
745
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificates to be listed.
746
+ # @param [Hash] opts the optional parameters
747
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
748
+ # particular request, please provide the request ID.
749
+ # (default to )
750
+ # @return [Response] A Response object with data of type Array<OracleBMC::LoadBalancer::Models::Certificate>
751
+ def list_certificates(load_balancer_id, opts = {})
752
+ logger.debug "Calling operation LoadBalancerClient#list_certificates." if logger
753
+
754
+ fail "Missing the required parameter 'load_balancer_id' when calling list_certificates." if load_balancer_id.nil?
755
+
756
+ path = "/loadBalancers/{loadBalancerId}/certificates".sub('{loadBalancerId}', load_balancer_id.to_s)
757
+
758
+ # Query Params
759
+ query_params = {}
760
+
761
+ # Header Params
762
+ header_params = {}
763
+ header_params['accept'] = 'application/json'
764
+ header_params['content-type'] = 'application/json'
765
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
766
+
767
+ post_body = nil
768
+
769
+ return @api_client.call_api(
770
+ :GET,
771
+ path,
772
+ endpoint,
773
+ :header_params => header_params,
774
+ :query_params => query_params,
775
+ :body => post_body,
776
+ :return_type => 'Array<OracleBMC::LoadBalancer::Models::Certificate>')
777
+ end
778
+
779
+ # Lists all load balancers in the specified compartment.
780
+ # @param [String] compartment_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancers to list.
781
+ # @param [Hash] opts the optional parameters
782
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
783
+ # particular request, please provide the request ID.
784
+ # (default to )
785
+ # @option opts [Integer] :limit The maximum number of items to return in a paginated \&quot;List\&quot; call.
786
+ #
787
+ # Example: `500`
788
+ # (default to 10)
789
+ # @option opts [String] :page The value of the `opc-next-page` response header from the previous \&quot;List\&quot; call.
790
+ #
791
+ # Example: `3`
792
+ #
793
+ # @option opts [String] :detail The level of detail to return for each result. Can be `full` or `simple`.
794
+ #
795
+ # Example: `full`
796
+ # (default to full)
797
+ # @return [Response] A Response object with data of type Array<OracleBMC::LoadBalancer::Models::LoadBalancer>
798
+ def list_load_balancers(compartment_id, opts = {})
799
+ logger.debug "Calling operation LoadBalancerClient#list_load_balancers." if logger
800
+
801
+ fail "Missing the required parameter 'compartment_id' when calling list_load_balancers." if compartment_id.nil?
802
+
803
+ path = "/loadBalancers"
804
+
805
+ # Query Params
806
+ query_params = {}
807
+ query_params[:'compartmentId'] = compartment_id
808
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
809
+ query_params[:'page'] = opts[:'page'] if opts[:'page']
810
+ query_params[:'detail'] = opts[:'detail'] if opts[:'detail']
811
+
812
+ # Header Params
813
+ header_params = {}
814
+ header_params['accept'] = 'application/json'
815
+ header_params['content-type'] = 'application/json'
816
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
817
+
818
+ post_body = nil
819
+
820
+ return @api_client.call_api(
821
+ :GET,
822
+ path,
823
+ endpoint,
824
+ :header_params => header_params,
825
+ :query_params => query_params,
826
+ :body => post_body,
827
+ :return_type => 'Array<OracleBMC::LoadBalancer::Models::LoadBalancer>')
828
+ end
829
+
830
+ # Lists the available load balancer policies.
831
+ # @param [String] compartment_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer policies to list.
832
+ # @param [Hash] opts the optional parameters
833
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
834
+ # particular request, please provide the request ID.
835
+ # (default to )
836
+ # @option opts [Integer] :limit The maximum number of items to return in a paginated \&quot;List\&quot; call.
837
+ #
838
+ # Example: `500`
839
+ # (default to 16)
840
+ # @option opts [String] :page The value of the `opc-next-page` response header from the previous \&quot;List\&quot; call.
841
+ #
842
+ # Example: `3`
843
+ #
844
+ # @return [Response] A Response object with data of type Array<OracleBMC::LoadBalancer::Models::LoadBalancerPolicy>
845
+ def list_policies(compartment_id, opts = {})
846
+ logger.debug "Calling operation LoadBalancerClient#list_policies." if logger
847
+
848
+ fail "Missing the required parameter 'compartment_id' when calling list_policies." if compartment_id.nil?
849
+
850
+ path = "/loadBalancerPolicies"
851
+
852
+ # Query Params
853
+ query_params = {}
854
+ query_params[:'compartmentId'] = compartment_id
855
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
856
+ query_params[:'page'] = opts[:'page'] if opts[:'page']
857
+
858
+ # Header Params
859
+ header_params = {}
860
+ header_params['accept'] = 'application/json'
861
+ header_params['content-type'] = 'application/json'
862
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
863
+
864
+ post_body = nil
865
+
866
+ return @api_client.call_api(
867
+ :GET,
868
+ path,
869
+ endpoint,
870
+ :header_params => header_params,
871
+ :query_params => query_params,
872
+ :body => post_body,
873
+ :return_type => 'Array<OracleBMC::LoadBalancer::Models::LoadBalancerPolicy>')
874
+ end
875
+
876
+ # Lists all supported traffic protocols.
877
+ # @param [String] compartment_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer protocols to list.
878
+ # @param [Hash] opts the optional parameters
879
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
880
+ # particular request, please provide the request ID.
881
+ # (default to )
882
+ # @option opts [Integer] :limit The maximum number of items to return in a paginated \&quot;List\&quot; call.
883
+ #
884
+ # Example: `500`
885
+ # (default to 16)
886
+ # @option opts [String] :page The value of the `opc-next-page` response header from the previous \&quot;List\&quot; call.
887
+ #
888
+ # Example: `3`
889
+ #
890
+ # @return [Response] A Response object with data of type Array<OracleBMC::LoadBalancer::Models::LoadBalancerProtocol>
891
+ def list_protocols(compartment_id, opts = {})
892
+ logger.debug "Calling operation LoadBalancerClient#list_protocols." if logger
893
+
894
+ fail "Missing the required parameter 'compartment_id' when calling list_protocols." if compartment_id.nil?
895
+
896
+ path = "/loadBalancerProtocols"
897
+
898
+ # Query Params
899
+ query_params = {}
900
+ query_params[:'compartmentId'] = compartment_id
901
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
902
+ query_params[:'page'] = opts[:'page'] if opts[:'page']
903
+
904
+ # Header Params
905
+ header_params = {}
906
+ header_params['accept'] = 'application/json'
907
+ header_params['content-type'] = 'application/json'
908
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
909
+
910
+ post_body = nil
911
+
912
+ return @api_client.call_api(
913
+ :GET,
914
+ path,
915
+ endpoint,
916
+ :header_params => header_params,
917
+ :query_params => query_params,
918
+ :body => post_body,
919
+ :return_type => 'Array<OracleBMC::LoadBalancer::Models::LoadBalancerProtocol>')
920
+ end
921
+
922
+ # Lists the valid load balancer shapes.
923
+ # @param [String] compartment_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer shapes to list.
924
+ # @param [Hash] opts the optional parameters
925
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
926
+ # particular request, please provide the request ID.
927
+ # (default to )
928
+ # @option opts [Integer] :limit The maximum number of items to return in a paginated \&quot;List\&quot; call.
929
+ #
930
+ # Example: `500`
931
+ # (default to 16)
932
+ # @option opts [String] :page The value of the `opc-next-page` response header from the previous \&quot;List\&quot; call.
933
+ #
934
+ # Example: `3`
935
+ #
936
+ # @return [Response] A Response object with data of type Array<OracleBMC::LoadBalancer::Models::LoadBalancerShape>
937
+ def list_shapes(compartment_id, opts = {})
938
+ logger.debug "Calling operation LoadBalancerClient#list_shapes." if logger
939
+
940
+ fail "Missing the required parameter 'compartment_id' when calling list_shapes." if compartment_id.nil?
941
+
942
+ path = "/loadBalancerShapes"
943
+
944
+ # Query Params
945
+ query_params = {}
946
+ query_params[:'compartmentId'] = compartment_id
947
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
948
+ query_params[:'page'] = opts[:'page'] if opts[:'page']
949
+
950
+ # Header Params
951
+ header_params = {}
952
+ header_params['accept'] = 'application/json'
953
+ header_params['content-type'] = 'application/json'
954
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
955
+
956
+ post_body = nil
957
+
958
+ return @api_client.call_api(
959
+ :GET,
960
+ path,
961
+ endpoint,
962
+ :header_params => header_params,
963
+ :query_params => query_params,
964
+ :body => post_body,
965
+ :return_type => 'Array<OracleBMC::LoadBalancer::Models::LoadBalancerShape>')
966
+ end
967
+
968
+ # Lists the work requests for a given load balancer.
969
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the work requests to retrieve.
970
+ # @param [Hash] opts the optional parameters
971
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
972
+ # particular request, please provide the request ID.
973
+ # (default to )
974
+ # @option opts [Integer] :limit The maximum number of items to return in a paginated \&quot;List\&quot; call.
975
+ #
976
+ # Example: `500`
977
+ # (default to 100)
978
+ # @option opts [String] :page The value of the `opc-next-page` response header from the previous \&quot;List\&quot; call.
979
+ #
980
+ # Example: `3`
981
+ #
982
+ # @return [Response] A Response object with data of type Array<OracleBMC::LoadBalancer::Models::WorkRequest>
983
+ def list_work_requests(load_balancer_id, opts = {})
984
+ logger.debug "Calling operation LoadBalancerClient#list_work_requests." if logger
985
+
986
+ fail "Missing the required parameter 'load_balancer_id' when calling list_work_requests." if load_balancer_id.nil?
987
+
988
+ path = "/loadBalancers/{loadBalancerId}/workRequests".sub('{loadBalancerId}', load_balancer_id.to_s)
989
+
990
+ # Query Params
991
+ query_params = {}
992
+ query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
993
+ query_params[:'page'] = opts[:'page'] if opts[:'page']
994
+
995
+ # Header Params
996
+ header_params = {}
997
+ header_params['accept'] = 'application/json'
998
+ header_params['content-type'] = 'application/json'
999
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
1000
+
1001
+ post_body = nil
1002
+
1003
+ return @api_client.call_api(
1004
+ :GET,
1005
+ path,
1006
+ endpoint,
1007
+ :header_params => header_params,
1008
+ :query_params => query_params,
1009
+ :body => post_body,
1010
+ :return_type => 'Array<OracleBMC::LoadBalancer::Models::WorkRequest>')
1011
+ end
1012
+
1013
+ # Updates the configuration of a backend server within the specified backend set.
1014
+ # @param [UpdateBackendDetails] update_backend_details Details for updating a backend server.
1015
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server.
1016
+ # @param [String] backend_set_name The name of the backend set associated with the backend server.
1017
+ #
1018
+ # Example: `My backend set`
1019
+ #
1020
+ # @param [String] backend_name The name of the backend server to update.
1021
+ #
1022
+ # Example: `My backend server`
1023
+ #
1024
+ # @param [Hash] opts the optional parameters
1025
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
1026
+ # particular request, please provide the request ID.
1027
+ # (default to )
1028
+ # @return [Response] A Response object with data of type nil
1029
+ def update_backend(update_backend_details, load_balancer_id, backend_set_name, backend_name, opts = {})
1030
+ logger.debug "Calling operation LoadBalancerClient#update_backend." if logger
1031
+
1032
+ fail "Missing the required parameter 'update_backend_details' when calling update_backend." if update_backend_details.nil?
1033
+ fail "Missing the required parameter 'load_balancer_id' when calling update_backend." if load_balancer_id.nil?
1034
+ fail "Missing the required parameter 'backend_set_name' when calling update_backend." if backend_set_name.nil?
1035
+ fail "Missing the required parameter 'backend_name' when calling update_backend." if backend_name.nil?
1036
+
1037
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s).sub('{backendName}', backend_name.to_s)
1038
+
1039
+ # Query Params
1040
+ query_params = {}
1041
+
1042
+ # Header Params
1043
+ header_params = {}
1044
+ header_params['accept'] = 'application/json'
1045
+ header_params['content-type'] = 'application/json'
1046
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
1047
+
1048
+ post_body = @api_client.object_to_http_body(update_backend_details)
1049
+
1050
+ return @api_client.call_api(
1051
+ :PUT,
1052
+ path,
1053
+ endpoint,
1054
+ :header_params => header_params,
1055
+ :query_params => query_params,
1056
+ :body => post_body)
1057
+ end
1058
+
1059
+ # Updates a backend set.
1060
+ # @param [UpdateBackendSetDetails] update_backend_set_details The details to update a backend set.
1061
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set.
1062
+ # @param [String] backend_set_name The name of the backend set to update.
1063
+ #
1064
+ # Example: `My backend set`
1065
+ #
1066
+ # @param [Hash] opts the optional parameters
1067
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
1068
+ # particular request, please provide the request ID.
1069
+ # (default to )
1070
+ # @return [Response] A Response object with data of type nil
1071
+ def update_backend_set(update_backend_set_details, load_balancer_id, backend_set_name, opts = {})
1072
+ logger.debug "Calling operation LoadBalancerClient#update_backend_set." if logger
1073
+
1074
+ fail "Missing the required parameter 'update_backend_set_details' when calling update_backend_set." if update_backend_set_details.nil?
1075
+ fail "Missing the required parameter 'load_balancer_id' when calling update_backend_set." if load_balancer_id.nil?
1076
+ fail "Missing the required parameter 'backend_set_name' when calling update_backend_set." if backend_set_name.nil?
1077
+
1078
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
1079
+
1080
+ # Query Params
1081
+ query_params = {}
1082
+
1083
+ # Header Params
1084
+ header_params = {}
1085
+ header_params['accept'] = 'application/json'
1086
+ header_params['content-type'] = 'application/json'
1087
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
1088
+
1089
+ post_body = @api_client.object_to_http_body(update_backend_set_details)
1090
+
1091
+ return @api_client.call_api(
1092
+ :PUT,
1093
+ path,
1094
+ endpoint,
1095
+ :header_params => header_params,
1096
+ :query_params => query_params,
1097
+ :body => post_body)
1098
+ end
1099
+
1100
+ # Updates the health check policy for a given load balancer and backend set.
1101
+ # @param [UpdateHealthCheckerDetails] health_checker The health check policy configuration details.
1102
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the health check policy to be updated.
1103
+ # @param [String] backend_set_name The name of the backend set associated with the health check policy to be retrieved.
1104
+ #
1105
+ # Example: `My backend set`
1106
+ #
1107
+ # @param [Hash] opts the optional parameters
1108
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
1109
+ # particular request, please provide the request ID.
1110
+ # (default to )
1111
+ # @return [Response] A Response object with data of type nil
1112
+ def update_health_checker(health_checker, load_balancer_id, backend_set_name, opts = {})
1113
+ logger.debug "Calling operation LoadBalancerClient#update_health_checker." if logger
1114
+
1115
+ fail "Missing the required parameter 'health_checker' when calling update_health_checker." if health_checker.nil?
1116
+ fail "Missing the required parameter 'load_balancer_id' when calling update_health_checker." if load_balancer_id.nil?
1117
+ fail "Missing the required parameter 'backend_set_name' when calling update_health_checker." if backend_set_name.nil?
1118
+
1119
+ path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
1120
+
1121
+ # Query Params
1122
+ query_params = {}
1123
+
1124
+ # Header Params
1125
+ header_params = {}
1126
+ header_params['accept'] = 'application/json'
1127
+ header_params['content-type'] = 'application/json'
1128
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
1129
+
1130
+ post_body = @api_client.object_to_http_body(health_checker)
1131
+
1132
+ return @api_client.call_api(
1133
+ :PUT,
1134
+ path,
1135
+ endpoint,
1136
+ :header_params => header_params,
1137
+ :query_params => query_params,
1138
+ :body => post_body)
1139
+ end
1140
+
1141
+ # Updates a listener for a given load balancer.
1142
+ # @param [UpdateListenerDetails] update_listener_details Details to update a listener.
1143
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the listener to update.
1144
+ # @param [String] listener_name The name of the listener to update.
1145
+ #
1146
+ # Example: `My listener`
1147
+ #
1148
+ # @param [Hash] opts the optional parameters
1149
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
1150
+ # particular request, please provide the request ID.
1151
+ # (default to )
1152
+ # @return [Response] A Response object with data of type nil
1153
+ def update_listener(update_listener_details, load_balancer_id, listener_name, opts = {})
1154
+ logger.debug "Calling operation LoadBalancerClient#update_listener." if logger
1155
+
1156
+ fail "Missing the required parameter 'update_listener_details' when calling update_listener." if update_listener_details.nil?
1157
+ fail "Missing the required parameter 'load_balancer_id' when calling update_listener." if load_balancer_id.nil?
1158
+ fail "Missing the required parameter 'listener_name' when calling update_listener." if listener_name.nil?
1159
+
1160
+ path = "/loadBalancers/{loadBalancerId}/listeners/{listenerName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{listenerName}', listener_name.to_s)
1161
+
1162
+ # Query Params
1163
+ query_params = {}
1164
+
1165
+ # Header Params
1166
+ header_params = {}
1167
+ header_params['accept'] = 'application/json'
1168
+ header_params['content-type'] = 'application/json'
1169
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
1170
+
1171
+ post_body = @api_client.object_to_http_body(update_listener_details)
1172
+
1173
+ return @api_client.call_api(
1174
+ :PUT,
1175
+ path,
1176
+ endpoint,
1177
+ :header_params => header_params,
1178
+ :query_params => query_params,
1179
+ :body => post_body)
1180
+ end
1181
+
1182
+ # Updates a load balancer's configuration.
1183
+ # @param [UpdateLoadBalancerDetails] update_load_balancer_details The details for updating a load balancer&#39;s configuration.
1184
+ # @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to update.
1185
+ # @param [Hash] opts the optional parameters
1186
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
1187
+ # particular request, please provide the request ID.
1188
+ # (default to )
1189
+ # @return [Response] A Response object with data of type nil
1190
+ def update_load_balancer(update_load_balancer_details, load_balancer_id, opts = {})
1191
+ logger.debug "Calling operation LoadBalancerClient#update_load_balancer." if logger
1192
+
1193
+ fail "Missing the required parameter 'update_load_balancer_details' when calling update_load_balancer." if update_load_balancer_details.nil?
1194
+ fail "Missing the required parameter 'load_balancer_id' when calling update_load_balancer." if load_balancer_id.nil?
1195
+
1196
+ path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)
1197
+
1198
+ # Query Params
1199
+ query_params = {}
1200
+
1201
+ # Header Params
1202
+ header_params = {}
1203
+ header_params['accept'] = 'application/json'
1204
+ header_params['content-type'] = 'application/json'
1205
+ header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
1206
+
1207
+ post_body = @api_client.object_to_http_body(update_load_balancer_details)
1208
+
1209
+ return @api_client.call_api(
1210
+ :PUT,
1211
+ path,
1212
+ endpoint,
1213
+ :header_params => header_params,
1214
+ :query_params => query_params,
1215
+ :body => post_body)
1216
+ end
1217
+ end
1218
+ end