oci 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +82 -0
- data/README.md +262 -0
- data/lib/oci.rb +25 -0
- data/lib/oci/api_client.rb +389 -0
- data/lib/oci/config.rb +118 -0
- data/lib/oci/config_file_loader.rb +96 -0
- data/lib/oci/core/blockstorage_client.rb +462 -0
- data/lib/oci/core/compute_client.rb +1415 -0
- data/lib/oci/core/core.rb +114 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +137 -0
- data/lib/oci/core/models/attach_vnic_details.rb +144 -0
- data/lib/oci/core/models/attach_volume_details.rb +165 -0
- data/lib/oci/core/models/capture_console_history_details.rb +120 -0
- data/lib/oci/core/models/console_history.rb +213 -0
- data/lib/oci/core/models/cpe.rb +169 -0
- data/lib/oci/core/models/create_cpe_details.rb +145 -0
- data/lib/oci/core/models/create_cross_connect_details.rb +204 -0
- data/lib/oci/core/models/create_cross_connect_group_details.rb +133 -0
- data/lib/oci/core/models/create_dhcp_details.rb +153 -0
- data/lib/oci/core/models/create_drg_attachment_details.rb +142 -0
- data/lib/oci/core/models/create_drg_details.rb +131 -0
- data/lib/oci/core/models/create_image_details.rb +159 -0
- data/lib/oci/core/models/create_instance_console_connection_details.rb +131 -0
- data/lib/oci/core/models/create_internet_gateway_details.rb +153 -0
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +168 -0
- data/lib/oci/core/models/create_private_ip_details.rb +173 -0
- data/lib/oci/core/models/create_route_table_details.rb +153 -0
- data/lib/oci/core/models/create_security_list_details.rb +164 -0
- data/lib/oci/core/models/create_subnet_details.rb +257 -0
- data/lib/oci/core/models/create_vcn_details.rb +171 -0
- data/lib/oci/core/models/create_virtual_circuit_details.rb +260 -0
- data/lib/oci/core/models/create_vnic_details.rb +214 -0
- data/lib/oci/core/models/create_volume_backup_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +170 -0
- data/lib/oci/core/models/cross_connect.rb +235 -0
- data/lib/oci/core/models/cross_connect_group.rb +187 -0
- data/lib/oci/core/models/cross_connect_location.rb +134 -0
- data/lib/oci/core/models/cross_connect_mapping.rb +190 -0
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +137 -0
- data/lib/oci/core/models/cross_connect_status.rb +200 -0
- data/lib/oci/core/models/dhcp_dns_option.rb +171 -0
- data/lib/oci/core/models/dhcp_option.rb +135 -0
- data/lib/oci/core/models/dhcp_options.rb +208 -0
- data/lib/oci/core/models/dhcp_search_domain_option.rb +141 -0
- data/lib/oci/core/models/drg.rb +186 -0
- data/lib/oci/core/models/drg_attachment.rb +208 -0
- data/lib/oci/core/models/egress_security_rule.rb +198 -0
- data/lib/oci/core/models/export_image_details.rb +134 -0
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +130 -0
- data/lib/oci/core/models/fast_connect_provider_service.rb +145 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +212 -0
- data/lib/oci/core/models/icmp_options.rb +131 -0
- data/lib/oci/core/models/image.rb +245 -0
- data/lib/oci/core/models/image_source_details.rb +134 -0
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +128 -0
- data/lib/oci/core/models/ingress_security_rule.rb +198 -0
- data/lib/oci/core/models/instance.rb +307 -0
- data/lib/oci/core/models/instance_console_connection.rb +193 -0
- data/lib/oci/core/models/instance_credentials.rb +131 -0
- data/lib/oci/core/models/internet_gateway.rb +210 -0
- data/lib/oci/core/models/ip_sec_connection.rb +223 -0
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +153 -0
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +156 -0
- data/lib/oci/core/models/launch_instance_details.rb +336 -0
- data/lib/oci/core/models/letter_of_authority.rb +194 -0
- data/lib/oci/core/models/port_range.rb +133 -0
- data/lib/oci/core/models/private_ip.rb +248 -0
- data/lib/oci/core/models/route_rule.rb +135 -0
- data/lib/oci/core/models/route_table.rb +208 -0
- data/lib/oci/core/models/security_list.rb +219 -0
- data/lib/oci/core/models/shape.rb +122 -0
- data/lib/oci/core/models/subnet.rb +351 -0
- data/lib/oci/core/models/tcp_options.rb +135 -0
- data/lib/oci/core/models/tunnel_config.rb +151 -0
- data/lib/oci/core/models/tunnel_status.rb +178 -0
- data/lib/oci/core/models/udp_options.rb +135 -0
- data/lib/oci/core/models/update_cpe_details.rb +122 -0
- data/lib/oci/core/models/update_cross_connect_details.rb +138 -0
- data/lib/oci/core/models/update_cross_connect_group_details.rb +122 -0
- data/lib/oci/core/models/update_dhcp_details.rb +132 -0
- data/lib/oci/core/models/update_drg_attachment_details.rb +122 -0
- data/lib/oci/core/models/update_drg_details.rb +122 -0
- data/lib/oci/core/models/update_image_details.rb +124 -0
- data/lib/oci/core/models/update_instance_details.rb +124 -0
- data/lib/oci/core/models/update_internet_gateway_details.rb +133 -0
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +122 -0
- data/lib/oci/core/models/update_private_ip_details.rb +157 -0
- data/lib/oci/core/models/update_route_table_details.rb +133 -0
- data/lib/oci/core/models/update_security_list_details.rb +144 -0
- data/lib/oci/core/models/update_subnet_details.rb +122 -0
- data/lib/oci/core/models/update_vcn_details.rb +122 -0
- data/lib/oci/core/models/update_virtual_circuit_details.rb +240 -0
- data/lib/oci/core/models/update_vnic_details.rb +144 -0
- data/lib/oci/core/models/update_volume_backup_details.rb +122 -0
- data/lib/oci/core/models/update_volume_details.rb +122 -0
- data/lib/oci/core/models/vcn.rb +276 -0
- data/lib/oci/core/models/virtual_circuit.rb +395 -0
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +137 -0
- data/lib/oci/core/models/vnic.rb +287 -0
- data/lib/oci/core/models/vnic_attachment.rb +250 -0
- data/lib/oci/core/models/volume.rb +210 -0
- data/lib/oci/core/models/volume_attachment.rb +246 -0
- data/lib/oci/core/models/volume_backup.rb +235 -0
- data/lib/oci/core/util.rb +1 -0
- data/lib/oci/core/virtual_network_client.rb +3421 -0
- data/lib/oci/errors.rb +78 -0
- data/lib/oci/global_context.rb +20 -0
- data/lib/oci/identity/identity.rb +55 -0
- data/lib/oci/identity/identity_client.rb +2148 -0
- data/lib/oci/identity/models/add_user_to_group_details.rb +131 -0
- data/lib/oci/identity/models/api_key.rb +211 -0
- data/lib/oci/identity/models/availability_domain.rb +131 -0
- data/lib/oci/identity/models/compartment.rb +211 -0
- data/lib/oci/identity/models/create_api_key_details.rb +120 -0
- data/lib/oci/identity/models/create_compartment_details.rb +145 -0
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +121 -0
- data/lib/oci/identity/models/create_group_details.rb +144 -0
- data/lib/oci/identity/models/create_identity_provider_details.rb +215 -0
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +133 -0
- data/lib/oci/identity/models/create_policy_details.rb +173 -0
- data/lib/oci/identity/models/create_region_subscription_details.rb +128 -0
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +154 -0
- data/lib/oci/identity/models/create_swift_password_details.rb +121 -0
- data/lib/oci/identity/models/create_user_details.rb +144 -0
- data/lib/oci/identity/models/customer_secret_key.rb +225 -0
- data/lib/oci/identity/models/customer_secret_key_summary.rb +213 -0
- data/lib/oci/identity/models/group.rb +211 -0
- data/lib/oci/identity/models/identity_provider.rb +261 -0
- data/lib/oci/identity/models/idp_group_mapping.rb +220 -0
- data/lib/oci/identity/models/policy.rb +237 -0
- data/lib/oci/identity/models/region.rb +143 -0
- data/lib/oci/identity/models/region_subscription.rb +180 -0
- data/lib/oci/identity/models/saml2_identity_provider.rb +180 -0
- data/lib/oci/identity/models/swift_password.rb +226 -0
- data/lib/oci/identity/models/tenancy.rb +159 -0
- data/lib/oci/identity/models/ui_password.rb +187 -0
- data/lib/oci/identity/models/update_compartment_details.rb +132 -0
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +120 -0
- data/lib/oci/identity/models/update_group_details.rb +120 -0
- data/lib/oci/identity/models/update_identity_provider_details.rb +160 -0
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +131 -0
- data/lib/oci/identity/models/update_policy_details.rb +148 -0
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +145 -0
- data/lib/oci/identity/models/update_state_details.rb +121 -0
- data/lib/oci/identity/models/update_swift_password_details.rb +120 -0
- data/lib/oci/identity/models/update_user_details.rb +120 -0
- data/lib/oci/identity/models/user.rb +217 -0
- data/lib/oci/identity/models/user_group_membership.rb +209 -0
- data/lib/oci/identity/util.rb +1 -0
- data/lib/oci/internal/internal.rb +10 -0
- data/lib/oci/internal/util.rb +69 -0
- data/lib/oci/load_balancer/load_balancer.rb +51 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +1449 -0
- data/lib/oci/load_balancer/models/backend.rb +220 -0
- data/lib/oci/load_balancer/models/backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/backend_health.rb +158 -0
- data/lib/oci/load_balancer/models/backend_set.rb +182 -0
- data/lib/oci/load_balancer/models/backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/backend_set_health.rb +207 -0
- data/lib/oci/load_balancer/models/certificate.rb +169 -0
- data/lib/oci/load_balancer/models/certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +181 -0
- data/lib/oci/load_balancer/models/create_certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +175 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +220 -0
- data/lib/oci/load_balancer/models/health_check_result.rb +183 -0
- data/lib/oci/load_balancer/models/health_checker.rb +224 -0
- data/lib/oci/load_balancer/models/health_checker_details.rb +223 -0
- data/lib/oci/load_balancer/models/ip_address.rb +139 -0
- data/lib/oci/load_balancer/models/listener.rb +174 -0
- data/lib/oci/load_balancer/models/listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/load_balancer.rb +280 -0
- data/lib/oci/load_balancer/models/load_balancer_health.rb +215 -0
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +168 -0
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +120 -0
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +141 -0
- data/lib/oci/load_balancer/models/ssl_configuration.rb +155 -0
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +155 -0
- data/lib/oci/load_balancer/models/update_backend_details.rb +178 -0
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +222 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +124 -0
- data/lib/oci/load_balancer/models/work_request.rb +229 -0
- data/lib/oci/load_balancer/models/work_request_error.rb +145 -0
- data/lib/oci/load_balancer/util.rb +58 -0
- data/lib/oci/object_storage/models/bucket.rb +216 -0
- data/lib/oci/object_storage/models/bucket_summary.rb +175 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +133 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +131 -0
- data/lib/oci/object_storage/models/create_bucket_details.rb +173 -0
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +166 -0
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +171 -0
- data/lib/oci/object_storage/models/list_objects.rb +146 -0
- data/lib/oci/object_storage/models/multipart_upload.rb +164 -0
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +153 -0
- data/lib/oci/object_storage/models/object_summary.rb +153 -0
- data/lib/oci/object_storage/models/preauthenticated_request.rb +207 -0
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +196 -0
- data/lib/oci/object_storage/models/update_bucket_details.rb +171 -0
- data/lib/oci/object_storage/object_storage.rb +30 -0
- data/lib/oci/object_storage/object_storage_client.rb +1185 -0
- data/lib/oci/object_storage/util.rb +1 -0
- data/lib/oci/regions.rb +43 -0
- data/lib/oci/response.rb +80 -0
- data/lib/oci/response_headers.rb +144 -0
- data/lib/oci/signer.rb +157 -0
- data/lib/oci/version.rb +5 -0
- data/lib/oci/waiter.rb +101 -0
- data/lib/oraclebmc.rb +3 -0
- metadata +375 -0
@@ -0,0 +1,209 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Identity::Models::UserGroupMembership
|
7
|
+
|
8
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
|
9
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
|
10
|
+
LIFECYCLE_STATE_INACTIVE = 'INACTIVE',
|
11
|
+
LIFECYCLE_STATE_DELETING = 'DELETING',
|
12
|
+
LIFECYCLE_STATE_DELETED = 'DELETED',
|
13
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
14
|
+
|
15
|
+
# The OCID of the membership.
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The OCID of the tenancy containing the user, group, and membership object.
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :compartment_id
|
22
|
+
|
23
|
+
# The OCID of the group.
|
24
|
+
# @return [String]
|
25
|
+
attr_accessor :group_id
|
26
|
+
|
27
|
+
# The OCID of the user.
|
28
|
+
# @return [String]
|
29
|
+
attr_accessor :user_id
|
30
|
+
|
31
|
+
# Date and time the membership was created, in the format defined by RFC3339.
|
32
|
+
#
|
33
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
34
|
+
#
|
35
|
+
# @return [DateTime]
|
36
|
+
attr_accessor :time_created
|
37
|
+
|
38
|
+
# The membership's current state. After creating a membership object, make sure its `lifecycleState` changes
|
39
|
+
# from CREATING to ACTIVE before using it.
|
40
|
+
#
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :lifecycle_state
|
43
|
+
|
44
|
+
# The detailed status of INACTIVE lifecycleState.
|
45
|
+
# @return [Integer]
|
46
|
+
attr_accessor :inactive_status
|
47
|
+
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
56
|
+
|
57
|
+
if attributes[:'id']
|
58
|
+
self.id = attributes[:'id']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes[:'compartmentId']
|
62
|
+
self.compartment_id = attributes[:'compartmentId']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes[:'groupId']
|
66
|
+
self.group_id = attributes[:'groupId']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes[:'userId']
|
70
|
+
self.user_id = attributes[:'userId']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes[:'timeCreated']
|
74
|
+
self.time_created = attributes[:'timeCreated']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes[:'lifecycleState']
|
78
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes[:'inactiveStatus']
|
82
|
+
self.inactive_status = attributes[:'inactiveStatus']
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
# Custom attribute writer method checking allowed values (enum).
|
88
|
+
# @param [Object] lifecycle_state Object to be assigned
|
89
|
+
def lifecycle_state=(lifecycle_state)
|
90
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
91
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
92
|
+
else
|
93
|
+
@lifecycle_state = lifecycle_state
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] other_object to be compared
|
99
|
+
def ==(other_object)
|
100
|
+
return true if self.equal?(other_object)
|
101
|
+
self.class == other_object.class &&
|
102
|
+
id == other_object.id &&
|
103
|
+
compartment_id == other_object.compartment_id &&
|
104
|
+
group_id == other_object.group_id &&
|
105
|
+
user_id == other_object.user_id &&
|
106
|
+
time_created == other_object.time_created &&
|
107
|
+
lifecycle_state == other_object.lifecycle_state &&
|
108
|
+
inactive_status == other_object.inactive_status
|
109
|
+
end
|
110
|
+
|
111
|
+
# @see the `==` method
|
112
|
+
# @param [Object] other_object to be compared
|
113
|
+
def eql?(other_object)
|
114
|
+
self == other_object
|
115
|
+
end
|
116
|
+
|
117
|
+
# Calculates hash code according to all attributes.
|
118
|
+
# @return [Fixnum] Hash code
|
119
|
+
def hash
|
120
|
+
[id, compartment_id, group_id, user_id, time_created, lifecycle_state, inactive_status].hash
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def build_from_hash(attributes)
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
128
|
+
self.class.swagger_types.each_pair do |key, type|
|
129
|
+
if type =~ /^Array<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
133
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
134
|
+
end
|
135
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
136
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
137
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
138
|
+
end
|
139
|
+
|
140
|
+
self
|
141
|
+
end
|
142
|
+
|
143
|
+
# Returns the string representation of the object
|
144
|
+
# @return [String] String presentation of the object
|
145
|
+
def to_s
|
146
|
+
to_hash.to_s
|
147
|
+
end
|
148
|
+
|
149
|
+
# Returns the object in the form of hash
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
151
|
+
def to_hash
|
152
|
+
hash = {}
|
153
|
+
self.class.attribute_map.each_pair do |attr, param|
|
154
|
+
value = self.send(attr)
|
155
|
+
next if value.nil?
|
156
|
+
hash[param] = _to_hash(value)
|
157
|
+
end
|
158
|
+
hash
|
159
|
+
end
|
160
|
+
|
161
|
+
private
|
162
|
+
|
163
|
+
# Outputs non-array value in the form of hash
|
164
|
+
# For object, use to_hash. Otherwise, just return the value
|
165
|
+
# @param [Object] value Any valid value
|
166
|
+
# @return [Hash] Returns the value in the form of hash
|
167
|
+
def _to_hash(value)
|
168
|
+
if value.is_a?(Array)
|
169
|
+
value.compact.map{ |v| _to_hash(v) }
|
170
|
+
elsif value.is_a?(Hash)
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
173
|
+
end
|
174
|
+
elsif value.respond_to? :to_hash
|
175
|
+
value.to_hash
|
176
|
+
else
|
177
|
+
value
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
184
|
+
def self.attribute_map
|
185
|
+
{
|
186
|
+
:'id' => :'id',
|
187
|
+
:'compartment_id' => :'compartmentId',
|
188
|
+
:'group_id' => :'groupId',
|
189
|
+
:'user_id' => :'userId',
|
190
|
+
:'time_created' => :'timeCreated',
|
191
|
+
:'lifecycle_state' => :'lifecycleState',
|
192
|
+
:'inactive_status' => :'inactiveStatus'
|
193
|
+
}
|
194
|
+
end
|
195
|
+
|
196
|
+
# Attribute type mapping.
|
197
|
+
def self.swagger_types
|
198
|
+
{
|
199
|
+
:'id' => :'String',
|
200
|
+
:'compartment_id' => :'String',
|
201
|
+
:'group_id' => :'String',
|
202
|
+
:'user_id' => :'String',
|
203
|
+
:'time_created' => :'DateTime',
|
204
|
+
:'lifecycle_state' => :'String',
|
205
|
+
:'inactive_status' => :'Integer'
|
206
|
+
}
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
module OCI
|
4
|
+
module Internal
|
5
|
+
# Utility methods for internal use only.
|
6
|
+
module Util
|
7
|
+
# Convert data to the given type. This is part of the conversion from strings representing
|
8
|
+
# json, where the data that is passed in should already have been converted using JSON.parse.
|
9
|
+
# That will give us arrays and hashes, but will not set the correct data types.
|
10
|
+
#
|
11
|
+
# @param [String] type Type that the data should be converted to
|
12
|
+
# @param [String] data Data in string, array or hash of strings, or raw object format.
|
13
|
+
# @return [Mixed] Data in the specified type
|
14
|
+
def self.convert_to_type(type, data)
|
15
|
+
return nil if data.nil?
|
16
|
+
|
17
|
+
case type.downcase.to_sym
|
18
|
+
when :datetime
|
19
|
+
DateTime.parse(data)
|
20
|
+
when :date
|
21
|
+
Date.parse(data)
|
22
|
+
when :string
|
23
|
+
data.to_s
|
24
|
+
when :integer
|
25
|
+
data.to_i
|
26
|
+
when :float
|
27
|
+
data.to_f
|
28
|
+
when :boolean
|
29
|
+
if data.to_s =~ /^(true|yes|1)$/i
|
30
|
+
true
|
31
|
+
else
|
32
|
+
false
|
33
|
+
end
|
34
|
+
when :object
|
35
|
+
# generic object, return directly
|
36
|
+
data
|
37
|
+
else
|
38
|
+
# The remaining cases might need to match a specific model class, so don't ignore case.
|
39
|
+
case type.to_sym
|
40
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
41
|
+
inner_type = Regexp.last_match[:inner_type]
|
42
|
+
data.map { |v| convert_to_type(inner_type, v) }
|
43
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
44
|
+
k_type = Regexp.last_match[:k_type]
|
45
|
+
v_type = Regexp.last_match[:v_type]
|
46
|
+
{}.tap do |hash|
|
47
|
+
data.each do |k, v|
|
48
|
+
hash[convert_to_type(k_type, k)] = convert_to_type(v_type, v)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
else
|
52
|
+
# Type must be a model.
|
53
|
+
type = OCI.const_get(type.to_s)
|
54
|
+
|
55
|
+
if defined? type.get_subtype
|
56
|
+
# The return type may be an abstract type, in which case
|
57
|
+
# we need to use the discriminator value to get the correct subtype.
|
58
|
+
type = OCI.const_get(type.get_subtype(data))
|
59
|
+
end
|
60
|
+
|
61
|
+
type.new.tap do |model|
|
62
|
+
model.build_from_hash data
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
module OCI
|
4
|
+
module LoadBalancer
|
5
|
+
module Models
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
# Require models
|
11
|
+
require 'oci/load_balancer/models/backend'
|
12
|
+
require 'oci/load_balancer/models/backend_details'
|
13
|
+
require 'oci/load_balancer/models/backend_health'
|
14
|
+
require 'oci/load_balancer/models/backend_set'
|
15
|
+
require 'oci/load_balancer/models/backend_set_details'
|
16
|
+
require 'oci/load_balancer/models/backend_set_health'
|
17
|
+
require 'oci/load_balancer/models/certificate'
|
18
|
+
require 'oci/load_balancer/models/certificate_details'
|
19
|
+
require 'oci/load_balancer/models/create_backend_details'
|
20
|
+
require 'oci/load_balancer/models/create_backend_set_details'
|
21
|
+
require 'oci/load_balancer/models/create_certificate_details'
|
22
|
+
require 'oci/load_balancer/models/create_listener_details'
|
23
|
+
require 'oci/load_balancer/models/create_load_balancer_details'
|
24
|
+
require 'oci/load_balancer/models/health_check_result'
|
25
|
+
require 'oci/load_balancer/models/health_checker'
|
26
|
+
require 'oci/load_balancer/models/health_checker_details'
|
27
|
+
require 'oci/load_balancer/models/ip_address'
|
28
|
+
require 'oci/load_balancer/models/listener'
|
29
|
+
require 'oci/load_balancer/models/listener_details'
|
30
|
+
require 'oci/load_balancer/models/load_balancer'
|
31
|
+
require 'oci/load_balancer/models/load_balancer_health'
|
32
|
+
require 'oci/load_balancer/models/load_balancer_health_summary'
|
33
|
+
require 'oci/load_balancer/models/load_balancer_policy'
|
34
|
+
require 'oci/load_balancer/models/load_balancer_protocol'
|
35
|
+
require 'oci/load_balancer/models/load_balancer_shape'
|
36
|
+
require 'oci/load_balancer/models/ssl_configuration'
|
37
|
+
require 'oci/load_balancer/models/ssl_configuration_details'
|
38
|
+
require 'oci/load_balancer/models/session_persistence_configuration_details'
|
39
|
+
require 'oci/load_balancer/models/update_backend_details'
|
40
|
+
require 'oci/load_balancer/models/update_backend_set_details'
|
41
|
+
require 'oci/load_balancer/models/update_health_checker_details'
|
42
|
+
require 'oci/load_balancer/models/update_listener_details'
|
43
|
+
require 'oci/load_balancer/models/update_load_balancer_details'
|
44
|
+
require 'oci/load_balancer/models/work_request'
|
45
|
+
require 'oci/load_balancer/models/work_request_error'
|
46
|
+
|
47
|
+
# Require generated clients
|
48
|
+
require 'oci/load_balancer/load_balancer_client'
|
49
|
+
|
50
|
+
# Require service utilities
|
51
|
+
require 'oci/load_balancer/util'
|
@@ -0,0 +1,1449 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require "uri"
|
4
|
+
require "logger"
|
5
|
+
|
6
|
+
module OCI
|
7
|
+
|
8
|
+
class LoadBalancer::LoadBalancerClient
|
9
|
+
|
10
|
+
# Client used to make HTTP requests.
|
11
|
+
# @return [OCI::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 {OCI::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 OCI.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 {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
|
31
|
+
#
|
32
|
+
def initialize(config:nil, region:nil)
|
33
|
+
config ||= OCI.config
|
34
|
+
config.validate
|
35
|
+
|
36
|
+
signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content)
|
37
|
+
@api_client = ApiClient.new(config, signer)
|
38
|
+
|
39
|
+
region ||= config.region
|
40
|
+
self.region = region
|
41
|
+
end
|
42
|
+
|
43
|
+
# Set the region that will be used to determine the service endpoint.
|
44
|
+
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
45
|
+
# but may be an arbitrary string.
|
46
|
+
def region=(r)
|
47
|
+
@region = r
|
48
|
+
|
49
|
+
fail 'A region must be specified.' unless @region
|
50
|
+
|
51
|
+
@endpoint = OCI::Regions.get_service_endpoint(@region, :LoadBalancerClient) + '/20170115'
|
52
|
+
logger.info "LoadBalancerClient endpoint set to '#{endpoint}'." if logger
|
53
|
+
end
|
54
|
+
|
55
|
+
# @return [Logger] The logger for this client. May be nil.
|
56
|
+
def logger
|
57
|
+
@api_client.config.logger
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
# Adds a backend server to a backend set.
|
62
|
+
# @param [CreateBackendDetails] create_backend_details The details to add a backend server to a backend set.
|
63
|
+
# @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.
|
64
|
+
# @param [String] backend_set_name The name of the backend set to add the backend server to.
|
65
|
+
#
|
66
|
+
# Example: `My_backend_set`
|
67
|
+
#
|
68
|
+
# @param [Hash] opts the optional parameters
|
69
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
70
|
+
# particular request, please provide the request ID.
|
71
|
+
# (default to )
|
72
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
73
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
74
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
75
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
76
|
+
# may be rejected).
|
77
|
+
#
|
78
|
+
# @return [Response] A Response object with data of type nil
|
79
|
+
def create_backend(create_backend_details, load_balancer_id, backend_set_name, opts = {})
|
80
|
+
logger.debug "Calling operation LoadBalancerClient#create_backend." if logger
|
81
|
+
|
82
|
+
fail "Missing the required parameter 'create_backend_details' when calling create_backend." if create_backend_details.nil?
|
83
|
+
fail "Missing the required parameter 'load_balancer_id' when calling create_backend." if load_balancer_id.nil?
|
84
|
+
fail "Missing the required parameter 'backend_set_name' when calling create_backend." if backend_set_name.nil?
|
85
|
+
|
86
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
|
87
|
+
|
88
|
+
# Query Params
|
89
|
+
query_params = {}
|
90
|
+
|
91
|
+
# Header Params
|
92
|
+
header_params = {}
|
93
|
+
header_params['accept'] = 'application/json'
|
94
|
+
header_params['content-type'] = 'application/json'
|
95
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
96
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
97
|
+
|
98
|
+
post_body = @api_client.object_to_http_body(create_backend_details)
|
99
|
+
|
100
|
+
return @api_client.call_api(
|
101
|
+
:POST,
|
102
|
+
path,
|
103
|
+
endpoint,
|
104
|
+
:header_params => header_params,
|
105
|
+
:query_params => query_params,
|
106
|
+
:body => post_body)
|
107
|
+
end
|
108
|
+
|
109
|
+
# Adds a backend set to a load balancer.
|
110
|
+
# @param [CreateBackendSetDetails] create_backend_set_details The details for adding a backend set.
|
111
|
+
# @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.
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
114
|
+
# particular request, please provide the request ID.
|
115
|
+
# (default to )
|
116
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
117
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
118
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
119
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
120
|
+
# may be rejected).
|
121
|
+
#
|
122
|
+
# @return [Response] A Response object with data of type nil
|
123
|
+
def create_backend_set(create_backend_set_details, load_balancer_id, opts = {})
|
124
|
+
logger.debug "Calling operation LoadBalancerClient#create_backend_set." if logger
|
125
|
+
|
126
|
+
fail "Missing the required parameter 'create_backend_set_details' when calling create_backend_set." if create_backend_set_details.nil?
|
127
|
+
fail "Missing the required parameter 'load_balancer_id' when calling create_backend_set." if load_balancer_id.nil?
|
128
|
+
|
129
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets".sub('{loadBalancerId}', load_balancer_id.to_s)
|
130
|
+
|
131
|
+
# Query Params
|
132
|
+
query_params = {}
|
133
|
+
|
134
|
+
# Header Params
|
135
|
+
header_params = {}
|
136
|
+
header_params['accept'] = 'application/json'
|
137
|
+
header_params['content-type'] = 'application/json'
|
138
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
139
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
140
|
+
|
141
|
+
post_body = @api_client.object_to_http_body(create_backend_set_details)
|
142
|
+
|
143
|
+
return @api_client.call_api(
|
144
|
+
:POST,
|
145
|
+
path,
|
146
|
+
endpoint,
|
147
|
+
:header_params => header_params,
|
148
|
+
:query_params => query_params,
|
149
|
+
:body => post_body)
|
150
|
+
end
|
151
|
+
|
152
|
+
# Creates an asynchronous request to add an SSL certificate.
|
153
|
+
# @param [CreateCertificateDetails] create_certificate_details The details of the certificate to add.
|
154
|
+
# @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.
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
157
|
+
# particular request, please provide the request ID.
|
158
|
+
# (default to )
|
159
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
160
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
161
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
162
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
163
|
+
# may be rejected).
|
164
|
+
#
|
165
|
+
# @return [Response] A Response object with data of type nil
|
166
|
+
def create_certificate(create_certificate_details, load_balancer_id, opts = {})
|
167
|
+
logger.debug "Calling operation LoadBalancerClient#create_certificate." if logger
|
168
|
+
|
169
|
+
fail "Missing the required parameter 'create_certificate_details' when calling create_certificate." if create_certificate_details.nil?
|
170
|
+
fail "Missing the required parameter 'load_balancer_id' when calling create_certificate." if load_balancer_id.nil?
|
171
|
+
|
172
|
+
path = "/loadBalancers/{loadBalancerId}/certificates".sub('{loadBalancerId}', load_balancer_id.to_s)
|
173
|
+
|
174
|
+
# Query Params
|
175
|
+
query_params = {}
|
176
|
+
|
177
|
+
# Header Params
|
178
|
+
header_params = {}
|
179
|
+
header_params['accept'] = 'application/json'
|
180
|
+
header_params['content-type'] = 'application/json'
|
181
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
182
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
183
|
+
|
184
|
+
post_body = @api_client.object_to_http_body(create_certificate_details)
|
185
|
+
|
186
|
+
return @api_client.call_api(
|
187
|
+
:POST,
|
188
|
+
path,
|
189
|
+
endpoint,
|
190
|
+
:header_params => header_params,
|
191
|
+
:query_params => query_params,
|
192
|
+
:body => post_body)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Adds a listener to a load balancer.
|
196
|
+
# @param [CreateListenerDetails] create_listener_details Details to add a listener.
|
197
|
+
# @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.
|
198
|
+
# @param [Hash] opts the optional parameters
|
199
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
200
|
+
# particular request, please provide the request ID.
|
201
|
+
# (default to )
|
202
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
203
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
204
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
205
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
206
|
+
# may be rejected).
|
207
|
+
#
|
208
|
+
# @return [Response] A Response object with data of type nil
|
209
|
+
def create_listener(create_listener_details, load_balancer_id, opts = {})
|
210
|
+
logger.debug "Calling operation LoadBalancerClient#create_listener." if logger
|
211
|
+
|
212
|
+
fail "Missing the required parameter 'create_listener_details' when calling create_listener." if create_listener_details.nil?
|
213
|
+
fail "Missing the required parameter 'load_balancer_id' when calling create_listener." if load_balancer_id.nil?
|
214
|
+
|
215
|
+
path = "/loadBalancers/{loadBalancerId}/listeners".sub('{loadBalancerId}', load_balancer_id.to_s)
|
216
|
+
|
217
|
+
# Query Params
|
218
|
+
query_params = {}
|
219
|
+
|
220
|
+
# Header Params
|
221
|
+
header_params = {}
|
222
|
+
header_params['accept'] = 'application/json'
|
223
|
+
header_params['content-type'] = 'application/json'
|
224
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
225
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
226
|
+
|
227
|
+
post_body = @api_client.object_to_http_body(create_listener_details)
|
228
|
+
|
229
|
+
return @api_client.call_api(
|
230
|
+
:POST,
|
231
|
+
path,
|
232
|
+
endpoint,
|
233
|
+
:header_params => header_params,
|
234
|
+
:query_params => query_params,
|
235
|
+
:body => post_body)
|
236
|
+
end
|
237
|
+
|
238
|
+
# Creates a new load balancer in the specified compartment. For general information about load balancers,
|
239
|
+
# see [Overview of the Load Balancing Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Concepts/balanceoverview.htm).
|
240
|
+
#
|
241
|
+
# For the purposes of access control, you must provide the OCID of the compartment where you want
|
242
|
+
# the load balancer to reside. Notice that the load balancer doesn't have to be in the same compartment as the VCN
|
243
|
+
# or backend set. If you're not sure which compartment to use, put the load balancer in the same compartment as the VCN.
|
244
|
+
# For information about access control and compartments, see
|
245
|
+
# [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
|
246
|
+
#
|
247
|
+
# You must specify a display name for the load balancer. It does not have to be unique, and you can change it.
|
248
|
+
#
|
249
|
+
# For information about Availability Domains, see
|
250
|
+
# [Regions and Availability Domains](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm).
|
251
|
+
# To get a list of Availability Domains, use the `ListAvailabilityDomains` operation
|
252
|
+
# in the Identity and Access Management Service API.
|
253
|
+
#
|
254
|
+
# All Oracle Bare Metal Cloud Services resources, including load balancers, get an Oracle-assigned,
|
255
|
+
# unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID
|
256
|
+
# in the response. You can also retrieve a resource's OCID by using a List API operation on that resource type,
|
257
|
+
# or by viewing the resource in the Console. Fore more information, see
|
258
|
+
# [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
259
|
+
#
|
260
|
+
# After you send your request, the new object's state will temporarily be PROVISIONING. Before using the
|
261
|
+
# object, first make sure its state has changed to RUNNING.
|
262
|
+
#
|
263
|
+
# When you create a load balancer, the system assigns an IP address.
|
264
|
+
# To get the IP address, use the {#get_load_balancer get_load_balancer} operation.
|
265
|
+
#
|
266
|
+
# @param [CreateLoadBalancerDetails] create_load_balancer_details The configuration details for creating a load balancer.
|
267
|
+
# @param [Hash] opts the optional parameters
|
268
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
269
|
+
# particular request, please provide the request ID.
|
270
|
+
# (default to )
|
271
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
272
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
273
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
274
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
275
|
+
# may be rejected).
|
276
|
+
#
|
277
|
+
# @return [Response] A Response object with data of type nil
|
278
|
+
def create_load_balancer(create_load_balancer_details, opts = {})
|
279
|
+
logger.debug "Calling operation LoadBalancerClient#create_load_balancer." if logger
|
280
|
+
|
281
|
+
fail "Missing the required parameter 'create_load_balancer_details' when calling create_load_balancer." if create_load_balancer_details.nil?
|
282
|
+
|
283
|
+
path = "/loadBalancers"
|
284
|
+
|
285
|
+
# Query Params
|
286
|
+
query_params = {}
|
287
|
+
|
288
|
+
# Header Params
|
289
|
+
header_params = {}
|
290
|
+
header_params['accept'] = 'application/json'
|
291
|
+
header_params['content-type'] = 'application/json'
|
292
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
293
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
294
|
+
|
295
|
+
post_body = @api_client.object_to_http_body(create_load_balancer_details)
|
296
|
+
|
297
|
+
return @api_client.call_api(
|
298
|
+
:POST,
|
299
|
+
path,
|
300
|
+
endpoint,
|
301
|
+
:header_params => header_params,
|
302
|
+
:query_params => query_params,
|
303
|
+
:body => post_body)
|
304
|
+
end
|
305
|
+
|
306
|
+
# Removes a backend server from a given load balancer and backend set.
|
307
|
+
# @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.
|
308
|
+
# @param [String] backend_set_name The name of the backend set associated with the backend server.
|
309
|
+
#
|
310
|
+
# Example: `My_backend_set`
|
311
|
+
#
|
312
|
+
# @param [String] backend_name The IP address and port of the backend server to remove.
|
313
|
+
#
|
314
|
+
# Example: `1.1.1.7:42`
|
315
|
+
#
|
316
|
+
# @param [Hash] opts the optional parameters
|
317
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
318
|
+
# particular request, please provide the request ID.
|
319
|
+
# (default to )
|
320
|
+
# @return [Response] A Response object with data of type nil
|
321
|
+
def delete_backend(load_balancer_id, backend_set_name, backend_name, opts = {})
|
322
|
+
logger.debug "Calling operation LoadBalancerClient#delete_backend." if logger
|
323
|
+
|
324
|
+
fail "Missing the required parameter 'load_balancer_id' when calling delete_backend." if load_balancer_id.nil?
|
325
|
+
fail "Missing the required parameter 'backend_set_name' when calling delete_backend." if backend_set_name.nil?
|
326
|
+
fail "Missing the required parameter 'backend_name' when calling delete_backend." if backend_name.nil?
|
327
|
+
|
328
|
+
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)
|
329
|
+
|
330
|
+
# Query Params
|
331
|
+
query_params = {}
|
332
|
+
|
333
|
+
# Header Params
|
334
|
+
header_params = {}
|
335
|
+
header_params['accept'] = 'application/json'
|
336
|
+
header_params['content-type'] = 'application/json'
|
337
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
338
|
+
|
339
|
+
post_body = nil
|
340
|
+
|
341
|
+
return @api_client.call_api(
|
342
|
+
:DELETE,
|
343
|
+
path,
|
344
|
+
endpoint,
|
345
|
+
:header_params => header_params,
|
346
|
+
:query_params => query_params,
|
347
|
+
:body => post_body)
|
348
|
+
end
|
349
|
+
|
350
|
+
# Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the load balancer.
|
351
|
+
#
|
352
|
+
# Before you can delete a backend set, you must remove it from any active listeners.
|
353
|
+
#
|
354
|
+
# @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.
|
355
|
+
# @param [String] backend_set_name The name of the backend set to delete.
|
356
|
+
#
|
357
|
+
# Example: `My_backend_set`
|
358
|
+
#
|
359
|
+
# @param [Hash] opts the optional parameters
|
360
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
361
|
+
# particular request, please provide the request ID.
|
362
|
+
# (default to )
|
363
|
+
# @return [Response] A Response object with data of type nil
|
364
|
+
def delete_backend_set(load_balancer_id, backend_set_name, opts = {})
|
365
|
+
logger.debug "Calling operation LoadBalancerClient#delete_backend_set." if logger
|
366
|
+
|
367
|
+
fail "Missing the required parameter 'load_balancer_id' when calling delete_backend_set." if load_balancer_id.nil?
|
368
|
+
fail "Missing the required parameter 'backend_set_name' when calling delete_backend_set." if backend_set_name.nil?
|
369
|
+
|
370
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
|
371
|
+
|
372
|
+
# Query Params
|
373
|
+
query_params = {}
|
374
|
+
|
375
|
+
# Header Params
|
376
|
+
header_params = {}
|
377
|
+
header_params['accept'] = 'application/json'
|
378
|
+
header_params['content-type'] = 'application/json'
|
379
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
380
|
+
|
381
|
+
post_body = nil
|
382
|
+
|
383
|
+
return @api_client.call_api(
|
384
|
+
:DELETE,
|
385
|
+
path,
|
386
|
+
endpoint,
|
387
|
+
:header_params => header_params,
|
388
|
+
:query_params => query_params,
|
389
|
+
:body => post_body)
|
390
|
+
end
|
391
|
+
|
392
|
+
# Deletes an SSL certificate from a load balancer.
|
393
|
+
# @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.
|
394
|
+
# @param [String] certificate_name The name of the certificate to delete.
|
395
|
+
#
|
396
|
+
# Example: `My_certificate_bundle`
|
397
|
+
#
|
398
|
+
# @param [Hash] opts the optional parameters
|
399
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
400
|
+
# particular request, please provide the request ID.
|
401
|
+
# (default to )
|
402
|
+
# @return [Response] A Response object with data of type nil
|
403
|
+
def delete_certificate(load_balancer_id, certificate_name, opts = {})
|
404
|
+
logger.debug "Calling operation LoadBalancerClient#delete_certificate." if logger
|
405
|
+
|
406
|
+
fail "Missing the required parameter 'load_balancer_id' when calling delete_certificate." if load_balancer_id.nil?
|
407
|
+
fail "Missing the required parameter 'certificate_name' when calling delete_certificate." if certificate_name.nil?
|
408
|
+
|
409
|
+
path = "/loadBalancers/{loadBalancerId}/certificates/{certificateName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{certificateName}', certificate_name.to_s)
|
410
|
+
|
411
|
+
# Query Params
|
412
|
+
query_params = {}
|
413
|
+
|
414
|
+
# Header Params
|
415
|
+
header_params = {}
|
416
|
+
header_params['accept'] = 'application/json'
|
417
|
+
header_params['content-type'] = 'application/json'
|
418
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
419
|
+
|
420
|
+
post_body = nil
|
421
|
+
|
422
|
+
return @api_client.call_api(
|
423
|
+
:DELETE,
|
424
|
+
path,
|
425
|
+
endpoint,
|
426
|
+
:header_params => header_params,
|
427
|
+
:query_params => query_params,
|
428
|
+
:body => post_body)
|
429
|
+
end
|
430
|
+
|
431
|
+
# Deletes a listener from a load balancer.
|
432
|
+
# @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.
|
433
|
+
# @param [String] listener_name The name of the listener to delete.
|
434
|
+
#
|
435
|
+
# Example: `My listener`
|
436
|
+
#
|
437
|
+
# @param [Hash] opts the optional parameters
|
438
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
439
|
+
# particular request, please provide the request ID.
|
440
|
+
# (default to )
|
441
|
+
# @return [Response] A Response object with data of type nil
|
442
|
+
def delete_listener(load_balancer_id, listener_name, opts = {})
|
443
|
+
logger.debug "Calling operation LoadBalancerClient#delete_listener." if logger
|
444
|
+
|
445
|
+
fail "Missing the required parameter 'load_balancer_id' when calling delete_listener." if load_balancer_id.nil?
|
446
|
+
fail "Missing the required parameter 'listener_name' when calling delete_listener." if listener_name.nil?
|
447
|
+
|
448
|
+
path = "/loadBalancers/{loadBalancerId}/listeners/{listenerName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{listenerName}', listener_name.to_s)
|
449
|
+
|
450
|
+
# Query Params
|
451
|
+
query_params = {}
|
452
|
+
|
453
|
+
# Header Params
|
454
|
+
header_params = {}
|
455
|
+
header_params['accept'] = 'application/json'
|
456
|
+
header_params['content-type'] = 'application/json'
|
457
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
458
|
+
|
459
|
+
post_body = nil
|
460
|
+
|
461
|
+
return @api_client.call_api(
|
462
|
+
:DELETE,
|
463
|
+
path,
|
464
|
+
endpoint,
|
465
|
+
:header_params => header_params,
|
466
|
+
:query_params => query_params,
|
467
|
+
:body => post_body)
|
468
|
+
end
|
469
|
+
|
470
|
+
# Stops a load balancer and removes it from service.
|
471
|
+
# @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.
|
472
|
+
# @param [Hash] opts the optional parameters
|
473
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
474
|
+
# particular request, please provide the request ID.
|
475
|
+
# (default to )
|
476
|
+
# @return [Response] A Response object with data of type nil
|
477
|
+
def delete_load_balancer(load_balancer_id, opts = {})
|
478
|
+
logger.debug "Calling operation LoadBalancerClient#delete_load_balancer." if logger
|
479
|
+
|
480
|
+
fail "Missing the required parameter 'load_balancer_id' when calling delete_load_balancer." if load_balancer_id.nil?
|
481
|
+
|
482
|
+
path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)
|
483
|
+
|
484
|
+
# Query Params
|
485
|
+
query_params = {}
|
486
|
+
|
487
|
+
# Header Params
|
488
|
+
header_params = {}
|
489
|
+
header_params['accept'] = 'application/json'
|
490
|
+
header_params['content-type'] = 'application/json'
|
491
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
492
|
+
|
493
|
+
post_body = nil
|
494
|
+
|
495
|
+
return @api_client.call_api(
|
496
|
+
:DELETE,
|
497
|
+
path,
|
498
|
+
endpoint,
|
499
|
+
:header_params => header_params,
|
500
|
+
:query_params => query_params,
|
501
|
+
:body => post_body)
|
502
|
+
end
|
503
|
+
|
504
|
+
# Gets the specified backend server's configuration information.
|
505
|
+
# @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.
|
506
|
+
# @param [String] backend_set_name The name of the backend set that includes the backend server.
|
507
|
+
#
|
508
|
+
# Example: `My_backend_set`
|
509
|
+
#
|
510
|
+
# @param [String] backend_name The IP address and port of the backend server to retrieve.
|
511
|
+
#
|
512
|
+
# Example: `1.1.1.7:42`
|
513
|
+
#
|
514
|
+
# @param [Hash] opts the optional parameters
|
515
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
516
|
+
# particular request, please provide the request ID.
|
517
|
+
# (default to )
|
518
|
+
# @return [Response] A Response object with data of type OCI::LoadBalancer::Models::Backend
|
519
|
+
def get_backend(load_balancer_id, backend_set_name, backend_name, opts = {})
|
520
|
+
logger.debug "Calling operation LoadBalancerClient#get_backend." if logger
|
521
|
+
|
522
|
+
fail "Missing the required parameter 'load_balancer_id' when calling get_backend." if load_balancer_id.nil?
|
523
|
+
fail "Missing the required parameter 'backend_set_name' when calling get_backend." if backend_set_name.nil?
|
524
|
+
fail "Missing the required parameter 'backend_name' when calling get_backend." if backend_name.nil?
|
525
|
+
|
526
|
+
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)
|
527
|
+
|
528
|
+
# Query Params
|
529
|
+
query_params = {}
|
530
|
+
|
531
|
+
# Header Params
|
532
|
+
header_params = {}
|
533
|
+
header_params['accept'] = 'application/json'
|
534
|
+
header_params['content-type'] = 'application/json'
|
535
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
536
|
+
|
537
|
+
post_body = nil
|
538
|
+
|
539
|
+
return @api_client.call_api(
|
540
|
+
:GET,
|
541
|
+
path,
|
542
|
+
endpoint,
|
543
|
+
:header_params => header_params,
|
544
|
+
:query_params => query_params,
|
545
|
+
:body => post_body,
|
546
|
+
:return_type => 'OCI::LoadBalancer::Models::Backend')
|
547
|
+
end
|
548
|
+
|
549
|
+
# Gets the current health status of the specified backend server.
|
550
|
+
# @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 server health status to be retrieved.
|
551
|
+
# @param [String] backend_set_name The name of the backend set associated with the backend server to retrieve the health status for.
|
552
|
+
#
|
553
|
+
# Example: `My_backend_set`
|
554
|
+
#
|
555
|
+
# @param [String] backend_name The IP address and port of the backend server to retrieve the health status for.
|
556
|
+
#
|
557
|
+
# Example: `1.1.1.7:42`
|
558
|
+
#
|
559
|
+
# @param [Hash] opts the optional parameters
|
560
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
561
|
+
# particular request, please provide the request ID.
|
562
|
+
# (default to )
|
563
|
+
# @return [Response] A Response object with data of type OCI::LoadBalancer::Models::BackendHealth
|
564
|
+
def get_backend_health(load_balancer_id, backend_set_name, backend_name, opts = {})
|
565
|
+
logger.debug "Calling operation LoadBalancerClient#get_backend_health." if logger
|
566
|
+
|
567
|
+
fail "Missing the required parameter 'load_balancer_id' when calling get_backend_health." if load_balancer_id.nil?
|
568
|
+
fail "Missing the required parameter 'backend_set_name' when calling get_backend_health." if backend_set_name.nil?
|
569
|
+
fail "Missing the required parameter 'backend_name' when calling get_backend_health." if backend_name.nil?
|
570
|
+
|
571
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}/health".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s).sub('{backendName}', backend_name.to_s)
|
572
|
+
|
573
|
+
# Query Params
|
574
|
+
query_params = {}
|
575
|
+
|
576
|
+
# Header Params
|
577
|
+
header_params = {}
|
578
|
+
header_params['accept'] = 'application/json'
|
579
|
+
header_params['content-type'] = 'application/json'
|
580
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
581
|
+
|
582
|
+
post_body = nil
|
583
|
+
|
584
|
+
return @api_client.call_api(
|
585
|
+
:GET,
|
586
|
+
path,
|
587
|
+
endpoint,
|
588
|
+
:header_params => header_params,
|
589
|
+
:query_params => query_params,
|
590
|
+
:body => post_body,
|
591
|
+
:return_type => 'OCI::LoadBalancer::Models::BackendHealth')
|
592
|
+
end
|
593
|
+
|
594
|
+
# Gets the specified backend set's configuration information.
|
595
|
+
# @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the specified load balancer.
|
596
|
+
# @param [String] backend_set_name The name of the backend set to retrieve.
|
597
|
+
#
|
598
|
+
# Example: `My_backend_set`
|
599
|
+
#
|
600
|
+
# @param [Hash] opts the optional parameters
|
601
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
602
|
+
# particular request, please provide the request ID.
|
603
|
+
# (default to )
|
604
|
+
# @return [Response] A Response object with data of type OCI::LoadBalancer::Models::BackendSet
|
605
|
+
def get_backend_set(load_balancer_id, backend_set_name, opts = {})
|
606
|
+
logger.debug "Calling operation LoadBalancerClient#get_backend_set." if logger
|
607
|
+
|
608
|
+
fail "Missing the required parameter 'load_balancer_id' when calling get_backend_set." if load_balancer_id.nil?
|
609
|
+
fail "Missing the required parameter 'backend_set_name' when calling get_backend_set." if backend_set_name.nil?
|
610
|
+
|
611
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.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 => 'OCI::LoadBalancer::Models::BackendSet')
|
632
|
+
end
|
633
|
+
|
634
|
+
# Gets the health status for the specified backend set.
|
635
|
+
# @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 health status to be retrieved.
|
636
|
+
# @param [String] backend_set_name The name of the backend set to retrieve the health status for.
|
637
|
+
#
|
638
|
+
# Example: `My_backend_set`
|
639
|
+
#
|
640
|
+
# @param [Hash] opts the optional parameters
|
641
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
642
|
+
# particular request, please provide the request ID.
|
643
|
+
# (default to )
|
644
|
+
# @return [Response] A Response object with data of type OCI::LoadBalancer::Models::BackendSetHealth
|
645
|
+
def get_backend_set_health(load_balancer_id, backend_set_name, opts = {})
|
646
|
+
logger.debug "Calling operation LoadBalancerClient#get_backend_set_health." if logger
|
647
|
+
|
648
|
+
fail "Missing the required parameter 'load_balancer_id' when calling get_backend_set_health." if load_balancer_id.nil?
|
649
|
+
fail "Missing the required parameter 'backend_set_name' when calling get_backend_set_health." if backend_set_name.nil?
|
650
|
+
|
651
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/health".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
|
652
|
+
|
653
|
+
# Query Params
|
654
|
+
query_params = {}
|
655
|
+
|
656
|
+
# Header Params
|
657
|
+
header_params = {}
|
658
|
+
header_params['accept'] = 'application/json'
|
659
|
+
header_params['content-type'] = 'application/json'
|
660
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
661
|
+
|
662
|
+
post_body = nil
|
663
|
+
|
664
|
+
return @api_client.call_api(
|
665
|
+
:GET,
|
666
|
+
path,
|
667
|
+
endpoint,
|
668
|
+
:header_params => header_params,
|
669
|
+
:query_params => query_params,
|
670
|
+
:body => post_body,
|
671
|
+
:return_type => 'OCI::LoadBalancer::Models::BackendSetHealth')
|
672
|
+
end
|
673
|
+
|
674
|
+
# Gets the health check policy information for a given load balancer and backend set.
|
675
|
+
# @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.
|
676
|
+
# @param [String] backend_set_name The name of the backend set associated with the health check policy to be retrieved.
|
677
|
+
#
|
678
|
+
# Example: `My_backend_set`
|
679
|
+
#
|
680
|
+
# @param [Hash] opts the optional parameters
|
681
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
682
|
+
# particular request, please provide the request ID.
|
683
|
+
# (default to )
|
684
|
+
# @return [Response] A Response object with data of type OCI::LoadBalancer::Models::HealthChecker
|
685
|
+
def get_health_checker(load_balancer_id, backend_set_name, opts = {})
|
686
|
+
logger.debug "Calling operation LoadBalancerClient#get_health_checker." if logger
|
687
|
+
|
688
|
+
fail "Missing the required parameter 'load_balancer_id' when calling get_health_checker." if load_balancer_id.nil?
|
689
|
+
fail "Missing the required parameter 'backend_set_name' when calling get_health_checker." if backend_set_name.nil?
|
690
|
+
|
691
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
|
692
|
+
|
693
|
+
# Query Params
|
694
|
+
query_params = {}
|
695
|
+
|
696
|
+
# Header Params
|
697
|
+
header_params = {}
|
698
|
+
header_params['accept'] = 'application/json'
|
699
|
+
header_params['content-type'] = 'application/json'
|
700
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
701
|
+
|
702
|
+
post_body = nil
|
703
|
+
|
704
|
+
return @api_client.call_api(
|
705
|
+
:GET,
|
706
|
+
path,
|
707
|
+
endpoint,
|
708
|
+
:header_params => header_params,
|
709
|
+
:query_params => query_params,
|
710
|
+
:body => post_body,
|
711
|
+
:return_type => 'OCI::LoadBalancer::Models::HealthChecker')
|
712
|
+
end
|
713
|
+
|
714
|
+
# Gets the specified load balancer's configuration information.
|
715
|
+
# @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.
|
716
|
+
# @param [Hash] opts the optional parameters
|
717
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
718
|
+
# particular request, please provide the request ID.
|
719
|
+
# (default to )
|
720
|
+
# @return [Response] A Response object with data of type OCI::LoadBalancer::Models::LoadBalancer
|
721
|
+
def get_load_balancer(load_balancer_id, opts = {})
|
722
|
+
logger.debug "Calling operation LoadBalancerClient#get_load_balancer." if logger
|
723
|
+
|
724
|
+
fail "Missing the required parameter 'load_balancer_id' when calling get_load_balancer." if load_balancer_id.nil?
|
725
|
+
|
726
|
+
path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)
|
727
|
+
|
728
|
+
# Query Params
|
729
|
+
query_params = {}
|
730
|
+
|
731
|
+
# Header Params
|
732
|
+
header_params = {}
|
733
|
+
header_params['accept'] = 'application/json'
|
734
|
+
header_params['content-type'] = 'application/json'
|
735
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
736
|
+
|
737
|
+
post_body = nil
|
738
|
+
|
739
|
+
return @api_client.call_api(
|
740
|
+
:GET,
|
741
|
+
path,
|
742
|
+
endpoint,
|
743
|
+
:header_params => header_params,
|
744
|
+
:query_params => query_params,
|
745
|
+
:body => post_body,
|
746
|
+
:return_type => 'OCI::LoadBalancer::Models::LoadBalancer')
|
747
|
+
end
|
748
|
+
|
749
|
+
# Gets the health status for the specified load balancer.
|
750
|
+
# @param [String] load_balancer_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to return health status for.
|
751
|
+
# @param [Hash] opts the optional parameters
|
752
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
753
|
+
# particular request, please provide the request ID.
|
754
|
+
# (default to )
|
755
|
+
# @return [Response] A Response object with data of type OCI::LoadBalancer::Models::LoadBalancerHealth
|
756
|
+
def get_load_balancer_health(load_balancer_id, opts = {})
|
757
|
+
logger.debug "Calling operation LoadBalancerClient#get_load_balancer_health." if logger
|
758
|
+
|
759
|
+
fail "Missing the required parameter 'load_balancer_id' when calling get_load_balancer_health." if load_balancer_id.nil?
|
760
|
+
|
761
|
+
path = "/loadBalancers/{loadBalancerId}/health".sub('{loadBalancerId}', load_balancer_id.to_s)
|
762
|
+
|
763
|
+
# Query Params
|
764
|
+
query_params = {}
|
765
|
+
|
766
|
+
# Header Params
|
767
|
+
header_params = {}
|
768
|
+
header_params['accept'] = 'application/json'
|
769
|
+
header_params['content-type'] = 'application/json'
|
770
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
771
|
+
|
772
|
+
post_body = nil
|
773
|
+
|
774
|
+
return @api_client.call_api(
|
775
|
+
:GET,
|
776
|
+
path,
|
777
|
+
endpoint,
|
778
|
+
:header_params => header_params,
|
779
|
+
:query_params => query_params,
|
780
|
+
:body => post_body,
|
781
|
+
:return_type => 'OCI::LoadBalancer::Models::LoadBalancerHealth')
|
782
|
+
end
|
783
|
+
|
784
|
+
# Gets the details of a work request.
|
785
|
+
# @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.
|
786
|
+
# @param [Hash] opts the optional parameters
|
787
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
788
|
+
# particular request, please provide the request ID.
|
789
|
+
# (default to )
|
790
|
+
# @return [Response] A Response object with data of type OCI::LoadBalancer::Models::WorkRequest
|
791
|
+
def get_work_request(work_request_id, opts = {})
|
792
|
+
logger.debug "Calling operation LoadBalancerClient#get_work_request." if logger
|
793
|
+
|
794
|
+
fail "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
|
795
|
+
|
796
|
+
path = "/loadBalancerWorkRequests/{workRequestId}".sub('{workRequestId}', work_request_id.to_s)
|
797
|
+
|
798
|
+
# Query Params
|
799
|
+
query_params = {}
|
800
|
+
|
801
|
+
# Header Params
|
802
|
+
header_params = {}
|
803
|
+
header_params['accept'] = 'application/json'
|
804
|
+
header_params['content-type'] = 'application/json'
|
805
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
806
|
+
|
807
|
+
post_body = nil
|
808
|
+
|
809
|
+
return @api_client.call_api(
|
810
|
+
:GET,
|
811
|
+
path,
|
812
|
+
endpoint,
|
813
|
+
:header_params => header_params,
|
814
|
+
:query_params => query_params,
|
815
|
+
:body => post_body,
|
816
|
+
:return_type => 'OCI::LoadBalancer::Models::WorkRequest')
|
817
|
+
end
|
818
|
+
|
819
|
+
# Lists all backend sets associated with a given load balancer.
|
820
|
+
# @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.
|
821
|
+
# @param [Hash] opts the optional parameters
|
822
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
823
|
+
# particular request, please provide the request ID.
|
824
|
+
# (default to )
|
825
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::BackendSet>
|
826
|
+
def list_backend_sets(load_balancer_id, opts = {})
|
827
|
+
logger.debug "Calling operation LoadBalancerClient#list_backend_sets." if logger
|
828
|
+
|
829
|
+
fail "Missing the required parameter 'load_balancer_id' when calling list_backend_sets." if load_balancer_id.nil?
|
830
|
+
|
831
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets".sub('{loadBalancerId}', load_balancer_id.to_s)
|
832
|
+
|
833
|
+
# Query Params
|
834
|
+
query_params = {}
|
835
|
+
|
836
|
+
# Header Params
|
837
|
+
header_params = {}
|
838
|
+
header_params['accept'] = 'application/json'
|
839
|
+
header_params['content-type'] = 'application/json'
|
840
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
841
|
+
|
842
|
+
post_body = nil
|
843
|
+
|
844
|
+
return @api_client.call_api(
|
845
|
+
:GET,
|
846
|
+
path,
|
847
|
+
endpoint,
|
848
|
+
:header_params => header_params,
|
849
|
+
:query_params => query_params,
|
850
|
+
:body => post_body,
|
851
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::BackendSet>')
|
852
|
+
end
|
853
|
+
|
854
|
+
# Lists the backend servers for a given load balancer and backend set.
|
855
|
+
# @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.
|
856
|
+
# @param [String] backend_set_name The name of the backend set associated with the backend servers.
|
857
|
+
#
|
858
|
+
# Example: `My_backend_set`
|
859
|
+
#
|
860
|
+
# @param [Hash] opts the optional parameters
|
861
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
862
|
+
# particular request, please provide the request ID.
|
863
|
+
# (default to )
|
864
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::Backend>
|
865
|
+
def list_backends(load_balancer_id, backend_set_name, opts = {})
|
866
|
+
logger.debug "Calling operation LoadBalancerClient#list_backends." if logger
|
867
|
+
|
868
|
+
fail "Missing the required parameter 'load_balancer_id' when calling list_backends." if load_balancer_id.nil?
|
869
|
+
fail "Missing the required parameter 'backend_set_name' when calling list_backends." if backend_set_name.nil?
|
870
|
+
|
871
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
|
872
|
+
|
873
|
+
# Query Params
|
874
|
+
query_params = {}
|
875
|
+
|
876
|
+
# Header Params
|
877
|
+
header_params = {}
|
878
|
+
header_params['accept'] = 'application/json'
|
879
|
+
header_params['content-type'] = 'application/json'
|
880
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
881
|
+
|
882
|
+
post_body = nil
|
883
|
+
|
884
|
+
return @api_client.call_api(
|
885
|
+
:GET,
|
886
|
+
path,
|
887
|
+
endpoint,
|
888
|
+
:header_params => header_params,
|
889
|
+
:query_params => query_params,
|
890
|
+
:body => post_body,
|
891
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::Backend>')
|
892
|
+
end
|
893
|
+
|
894
|
+
# Lists all SSL certificates associated with a given load balancer.
|
895
|
+
# @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.
|
896
|
+
# @param [Hash] opts the optional parameters
|
897
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
898
|
+
# particular request, please provide the request ID.
|
899
|
+
# (default to )
|
900
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::Certificate>
|
901
|
+
def list_certificates(load_balancer_id, opts = {})
|
902
|
+
logger.debug "Calling operation LoadBalancerClient#list_certificates." if logger
|
903
|
+
|
904
|
+
fail "Missing the required parameter 'load_balancer_id' when calling list_certificates." if load_balancer_id.nil?
|
905
|
+
|
906
|
+
path = "/loadBalancers/{loadBalancerId}/certificates".sub('{loadBalancerId}', load_balancer_id.to_s)
|
907
|
+
|
908
|
+
# Query Params
|
909
|
+
query_params = {}
|
910
|
+
|
911
|
+
# Header Params
|
912
|
+
header_params = {}
|
913
|
+
header_params['accept'] = 'application/json'
|
914
|
+
header_params['content-type'] = 'application/json'
|
915
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
916
|
+
|
917
|
+
post_body = nil
|
918
|
+
|
919
|
+
return @api_client.call_api(
|
920
|
+
:GET,
|
921
|
+
path,
|
922
|
+
endpoint,
|
923
|
+
:header_params => header_params,
|
924
|
+
:query_params => query_params,
|
925
|
+
:body => post_body,
|
926
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::Certificate>')
|
927
|
+
end
|
928
|
+
|
929
|
+
# Lists the summary health statuses for all load balancers in the specified compartment.
|
930
|
+
# @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 return health status information for.
|
931
|
+
# @param [Hash] opts the optional parameters
|
932
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
933
|
+
# particular request, please provide the request ID.
|
934
|
+
# (default to )
|
935
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
936
|
+
#
|
937
|
+
# Example: `500`
|
938
|
+
# (default to 10)
|
939
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
940
|
+
#
|
941
|
+
# Example: `3`
|
942
|
+
#
|
943
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancerHealthSummary>
|
944
|
+
def list_load_balancer_healths(compartment_id, opts = {})
|
945
|
+
logger.debug "Calling operation LoadBalancerClient#list_load_balancer_healths." if logger
|
946
|
+
|
947
|
+
fail "Missing the required parameter 'compartment_id' when calling list_load_balancer_healths." if compartment_id.nil?
|
948
|
+
|
949
|
+
path = "/loadBalancerHealths"
|
950
|
+
|
951
|
+
# Query Params
|
952
|
+
query_params = {}
|
953
|
+
query_params[:'compartmentId'] = compartment_id
|
954
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
955
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
956
|
+
|
957
|
+
# Header Params
|
958
|
+
header_params = {}
|
959
|
+
header_params['accept'] = 'application/json'
|
960
|
+
header_params['content-type'] = 'application/json'
|
961
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
962
|
+
|
963
|
+
post_body = nil
|
964
|
+
|
965
|
+
return @api_client.call_api(
|
966
|
+
:GET,
|
967
|
+
path,
|
968
|
+
endpoint,
|
969
|
+
:header_params => header_params,
|
970
|
+
:query_params => query_params,
|
971
|
+
:body => post_body,
|
972
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancerHealthSummary>')
|
973
|
+
end
|
974
|
+
|
975
|
+
# Lists all load balancers in the specified compartment.
|
976
|
+
# @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.
|
977
|
+
# @param [Hash] opts the optional parameters
|
978
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
979
|
+
# particular request, please provide the request ID.
|
980
|
+
# (default to )
|
981
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
982
|
+
#
|
983
|
+
# Example: `500`
|
984
|
+
# (default to 10)
|
985
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
986
|
+
#
|
987
|
+
# Example: `3`
|
988
|
+
#
|
989
|
+
# @option opts [String] :detail The level of detail to return for each result. Can be `full` or `simple`.
|
990
|
+
#
|
991
|
+
# Example: `full`
|
992
|
+
# (default to full)
|
993
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancer>
|
994
|
+
def list_load_balancers(compartment_id, opts = {})
|
995
|
+
logger.debug "Calling operation LoadBalancerClient#list_load_balancers." if logger
|
996
|
+
|
997
|
+
fail "Missing the required parameter 'compartment_id' when calling list_load_balancers." if compartment_id.nil?
|
998
|
+
|
999
|
+
path = "/loadBalancers"
|
1000
|
+
|
1001
|
+
# Query Params
|
1002
|
+
query_params = {}
|
1003
|
+
query_params[:'compartmentId'] = compartment_id
|
1004
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1005
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1006
|
+
query_params[:'detail'] = opts[:'detail'] if opts[:'detail']
|
1007
|
+
|
1008
|
+
# Header Params
|
1009
|
+
header_params = {}
|
1010
|
+
header_params['accept'] = 'application/json'
|
1011
|
+
header_params['content-type'] = 'application/json'
|
1012
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1013
|
+
|
1014
|
+
post_body = nil
|
1015
|
+
|
1016
|
+
return @api_client.call_api(
|
1017
|
+
:GET,
|
1018
|
+
path,
|
1019
|
+
endpoint,
|
1020
|
+
:header_params => header_params,
|
1021
|
+
:query_params => query_params,
|
1022
|
+
:body => post_body,
|
1023
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancer>')
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
# Lists the available load balancer policies.
|
1027
|
+
# @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.
|
1028
|
+
# @param [Hash] opts the optional parameters
|
1029
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1030
|
+
# particular request, please provide the request ID.
|
1031
|
+
# (default to )
|
1032
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1033
|
+
#
|
1034
|
+
# Example: `500`
|
1035
|
+
# (default to 16)
|
1036
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1037
|
+
#
|
1038
|
+
# Example: `3`
|
1039
|
+
#
|
1040
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancerPolicy>
|
1041
|
+
def list_policies(compartment_id, opts = {})
|
1042
|
+
logger.debug "Calling operation LoadBalancerClient#list_policies." if logger
|
1043
|
+
|
1044
|
+
fail "Missing the required parameter 'compartment_id' when calling list_policies." if compartment_id.nil?
|
1045
|
+
|
1046
|
+
path = "/loadBalancerPolicies"
|
1047
|
+
|
1048
|
+
# Query Params
|
1049
|
+
query_params = {}
|
1050
|
+
query_params[:'compartmentId'] = compartment_id
|
1051
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1052
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1053
|
+
|
1054
|
+
# Header Params
|
1055
|
+
header_params = {}
|
1056
|
+
header_params['accept'] = 'application/json'
|
1057
|
+
header_params['content-type'] = 'application/json'
|
1058
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1059
|
+
|
1060
|
+
post_body = nil
|
1061
|
+
|
1062
|
+
return @api_client.call_api(
|
1063
|
+
:GET,
|
1064
|
+
path,
|
1065
|
+
endpoint,
|
1066
|
+
:header_params => header_params,
|
1067
|
+
:query_params => query_params,
|
1068
|
+
:body => post_body,
|
1069
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancerPolicy>')
|
1070
|
+
end
|
1071
|
+
|
1072
|
+
# Lists all supported traffic protocols.
|
1073
|
+
# @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.
|
1074
|
+
# @param [Hash] opts the optional parameters
|
1075
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1076
|
+
# particular request, please provide the request ID.
|
1077
|
+
# (default to )
|
1078
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1079
|
+
#
|
1080
|
+
# Example: `500`
|
1081
|
+
# (default to 16)
|
1082
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1083
|
+
#
|
1084
|
+
# Example: `3`
|
1085
|
+
#
|
1086
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancerProtocol>
|
1087
|
+
def list_protocols(compartment_id, opts = {})
|
1088
|
+
logger.debug "Calling operation LoadBalancerClient#list_protocols." if logger
|
1089
|
+
|
1090
|
+
fail "Missing the required parameter 'compartment_id' when calling list_protocols." if compartment_id.nil?
|
1091
|
+
|
1092
|
+
path = "/loadBalancerProtocols"
|
1093
|
+
|
1094
|
+
# Query Params
|
1095
|
+
query_params = {}
|
1096
|
+
query_params[:'compartmentId'] = compartment_id
|
1097
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1098
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1099
|
+
|
1100
|
+
# Header Params
|
1101
|
+
header_params = {}
|
1102
|
+
header_params['accept'] = 'application/json'
|
1103
|
+
header_params['content-type'] = 'application/json'
|
1104
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1105
|
+
|
1106
|
+
post_body = nil
|
1107
|
+
|
1108
|
+
return @api_client.call_api(
|
1109
|
+
:GET,
|
1110
|
+
path,
|
1111
|
+
endpoint,
|
1112
|
+
:header_params => header_params,
|
1113
|
+
:query_params => query_params,
|
1114
|
+
:body => post_body,
|
1115
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancerProtocol>')
|
1116
|
+
end
|
1117
|
+
|
1118
|
+
# Lists the valid load balancer shapes.
|
1119
|
+
# @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.
|
1120
|
+
# @param [Hash] opts the optional parameters
|
1121
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1122
|
+
# particular request, please provide the request ID.
|
1123
|
+
# (default to )
|
1124
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1125
|
+
#
|
1126
|
+
# Example: `500`
|
1127
|
+
# (default to 16)
|
1128
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1129
|
+
#
|
1130
|
+
# Example: `3`
|
1131
|
+
#
|
1132
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancerShape>
|
1133
|
+
def list_shapes(compartment_id, opts = {})
|
1134
|
+
logger.debug "Calling operation LoadBalancerClient#list_shapes." if logger
|
1135
|
+
|
1136
|
+
fail "Missing the required parameter 'compartment_id' when calling list_shapes." if compartment_id.nil?
|
1137
|
+
|
1138
|
+
path = "/loadBalancerShapes"
|
1139
|
+
|
1140
|
+
# Query Params
|
1141
|
+
query_params = {}
|
1142
|
+
query_params[:'compartmentId'] = compartment_id
|
1143
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1144
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1145
|
+
|
1146
|
+
# Header Params
|
1147
|
+
header_params = {}
|
1148
|
+
header_params['accept'] = 'application/json'
|
1149
|
+
header_params['content-type'] = 'application/json'
|
1150
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1151
|
+
|
1152
|
+
post_body = nil
|
1153
|
+
|
1154
|
+
return @api_client.call_api(
|
1155
|
+
:GET,
|
1156
|
+
path,
|
1157
|
+
endpoint,
|
1158
|
+
:header_params => header_params,
|
1159
|
+
:query_params => query_params,
|
1160
|
+
:body => post_body,
|
1161
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancerShape>')
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# Lists the work requests for a given load balancer.
|
1165
|
+
# @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.
|
1166
|
+
# @param [Hash] opts the optional parameters
|
1167
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1168
|
+
# particular request, please provide the request ID.
|
1169
|
+
# (default to )
|
1170
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1171
|
+
#
|
1172
|
+
# Example: `500`
|
1173
|
+
# (default to 100)
|
1174
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1175
|
+
#
|
1176
|
+
# Example: `3`
|
1177
|
+
#
|
1178
|
+
# @return [Response] A Response object with data of type Array<OCI::LoadBalancer::Models::WorkRequest>
|
1179
|
+
def list_work_requests(load_balancer_id, opts = {})
|
1180
|
+
logger.debug "Calling operation LoadBalancerClient#list_work_requests." if logger
|
1181
|
+
|
1182
|
+
fail "Missing the required parameter 'load_balancer_id' when calling list_work_requests." if load_balancer_id.nil?
|
1183
|
+
|
1184
|
+
path = "/loadBalancers/{loadBalancerId}/workRequests".sub('{loadBalancerId}', load_balancer_id.to_s)
|
1185
|
+
|
1186
|
+
# Query Params
|
1187
|
+
query_params = {}
|
1188
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1189
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1190
|
+
|
1191
|
+
# Header Params
|
1192
|
+
header_params = {}
|
1193
|
+
header_params['accept'] = 'application/json'
|
1194
|
+
header_params['content-type'] = 'application/json'
|
1195
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1196
|
+
|
1197
|
+
post_body = nil
|
1198
|
+
|
1199
|
+
return @api_client.call_api(
|
1200
|
+
:GET,
|
1201
|
+
path,
|
1202
|
+
endpoint,
|
1203
|
+
:header_params => header_params,
|
1204
|
+
:query_params => query_params,
|
1205
|
+
:body => post_body,
|
1206
|
+
:return_type => 'Array<OCI::LoadBalancer::Models::WorkRequest>')
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
# Updates the configuration of a backend server within the specified backend set.
|
1210
|
+
# @param [UpdateBackendDetails] update_backend_details Details for updating a backend server.
|
1211
|
+
# @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.
|
1212
|
+
# @param [String] backend_set_name The name of the backend set associated with the backend server.
|
1213
|
+
#
|
1214
|
+
# Example: `My_backend_set`
|
1215
|
+
#
|
1216
|
+
# @param [String] backend_name The IP address and port of the backend server to update.
|
1217
|
+
#
|
1218
|
+
# Example: `1.1.1.7:42`
|
1219
|
+
#
|
1220
|
+
# @param [Hash] opts the optional parameters
|
1221
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1222
|
+
# particular request, please provide the request ID.
|
1223
|
+
# (default to )
|
1224
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
1225
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
1226
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
1227
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
1228
|
+
# may be rejected).
|
1229
|
+
#
|
1230
|
+
# @return [Response] A Response object with data of type nil
|
1231
|
+
def update_backend(update_backend_details, load_balancer_id, backend_set_name, backend_name, opts = {})
|
1232
|
+
logger.debug "Calling operation LoadBalancerClient#update_backend." if logger
|
1233
|
+
|
1234
|
+
fail "Missing the required parameter 'update_backend_details' when calling update_backend." if update_backend_details.nil?
|
1235
|
+
fail "Missing the required parameter 'load_balancer_id' when calling update_backend." if load_balancer_id.nil?
|
1236
|
+
fail "Missing the required parameter 'backend_set_name' when calling update_backend." if backend_set_name.nil?
|
1237
|
+
fail "Missing the required parameter 'backend_name' when calling update_backend." if backend_name.nil?
|
1238
|
+
|
1239
|
+
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)
|
1240
|
+
|
1241
|
+
# Query Params
|
1242
|
+
query_params = {}
|
1243
|
+
|
1244
|
+
# Header Params
|
1245
|
+
header_params = {}
|
1246
|
+
header_params['accept'] = 'application/json'
|
1247
|
+
header_params['content-type'] = 'application/json'
|
1248
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1249
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
1250
|
+
|
1251
|
+
post_body = @api_client.object_to_http_body(update_backend_details)
|
1252
|
+
|
1253
|
+
return @api_client.call_api(
|
1254
|
+
:PUT,
|
1255
|
+
path,
|
1256
|
+
endpoint,
|
1257
|
+
:header_params => header_params,
|
1258
|
+
:query_params => query_params,
|
1259
|
+
:body => post_body)
|
1260
|
+
end
|
1261
|
+
|
1262
|
+
# Updates a backend set.
|
1263
|
+
# @param [UpdateBackendSetDetails] update_backend_set_details The details to update a backend set.
|
1264
|
+
# @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.
|
1265
|
+
# @param [String] backend_set_name The name of the backend set to update.
|
1266
|
+
#
|
1267
|
+
# Example: `My_backend_set`
|
1268
|
+
#
|
1269
|
+
# @param [Hash] opts the optional parameters
|
1270
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1271
|
+
# particular request, please provide the request ID.
|
1272
|
+
# (default to )
|
1273
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
1274
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
1275
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
1276
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
1277
|
+
# may be rejected).
|
1278
|
+
#
|
1279
|
+
# @return [Response] A Response object with data of type nil
|
1280
|
+
def update_backend_set(update_backend_set_details, load_balancer_id, backend_set_name, opts = {})
|
1281
|
+
logger.debug "Calling operation LoadBalancerClient#update_backend_set." if logger
|
1282
|
+
|
1283
|
+
fail "Missing the required parameter 'update_backend_set_details' when calling update_backend_set." if update_backend_set_details.nil?
|
1284
|
+
fail "Missing the required parameter 'load_balancer_id' when calling update_backend_set." if load_balancer_id.nil?
|
1285
|
+
fail "Missing the required parameter 'backend_set_name' when calling update_backend_set." if backend_set_name.nil?
|
1286
|
+
|
1287
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
|
1288
|
+
|
1289
|
+
# Query Params
|
1290
|
+
query_params = {}
|
1291
|
+
|
1292
|
+
# Header Params
|
1293
|
+
header_params = {}
|
1294
|
+
header_params['accept'] = 'application/json'
|
1295
|
+
header_params['content-type'] = 'application/json'
|
1296
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1297
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
1298
|
+
|
1299
|
+
post_body = @api_client.object_to_http_body(update_backend_set_details)
|
1300
|
+
|
1301
|
+
return @api_client.call_api(
|
1302
|
+
:PUT,
|
1303
|
+
path,
|
1304
|
+
endpoint,
|
1305
|
+
:header_params => header_params,
|
1306
|
+
:query_params => query_params,
|
1307
|
+
:body => post_body)
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
# Updates the health check policy for a given load balancer and backend set.
|
1311
|
+
# @param [UpdateHealthCheckerDetails] health_checker The health check policy configuration details.
|
1312
|
+
# @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.
|
1313
|
+
# @param [String] backend_set_name The name of the backend set associated with the health check policy to be retrieved.
|
1314
|
+
#
|
1315
|
+
# Example: `My_backend_set`
|
1316
|
+
#
|
1317
|
+
# @param [Hash] opts the optional parameters
|
1318
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1319
|
+
# particular request, please provide the request ID.
|
1320
|
+
# (default to )
|
1321
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
1322
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
1323
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
1324
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
1325
|
+
# may be rejected).
|
1326
|
+
#
|
1327
|
+
# @return [Response] A Response object with data of type nil
|
1328
|
+
def update_health_checker(health_checker, load_balancer_id, backend_set_name, opts = {})
|
1329
|
+
logger.debug "Calling operation LoadBalancerClient#update_health_checker." if logger
|
1330
|
+
|
1331
|
+
fail "Missing the required parameter 'health_checker' when calling update_health_checker." if health_checker.nil?
|
1332
|
+
fail "Missing the required parameter 'load_balancer_id' when calling update_health_checker." if load_balancer_id.nil?
|
1333
|
+
fail "Missing the required parameter 'backend_set_name' when calling update_health_checker." if backend_set_name.nil?
|
1334
|
+
|
1335
|
+
path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)
|
1336
|
+
|
1337
|
+
# Query Params
|
1338
|
+
query_params = {}
|
1339
|
+
|
1340
|
+
# Header Params
|
1341
|
+
header_params = {}
|
1342
|
+
header_params['accept'] = 'application/json'
|
1343
|
+
header_params['content-type'] = 'application/json'
|
1344
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1345
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
1346
|
+
|
1347
|
+
post_body = @api_client.object_to_http_body(health_checker)
|
1348
|
+
|
1349
|
+
return @api_client.call_api(
|
1350
|
+
:PUT,
|
1351
|
+
path,
|
1352
|
+
endpoint,
|
1353
|
+
:header_params => header_params,
|
1354
|
+
:query_params => query_params,
|
1355
|
+
:body => post_body)
|
1356
|
+
end
|
1357
|
+
|
1358
|
+
# Updates a listener for a given load balancer.
|
1359
|
+
# @param [UpdateListenerDetails] update_listener_details Details to update a listener.
|
1360
|
+
# @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.
|
1361
|
+
# @param [String] listener_name The name of the listener to update.
|
1362
|
+
#
|
1363
|
+
# Example: `My listener`
|
1364
|
+
#
|
1365
|
+
# @param [Hash] opts the optional parameters
|
1366
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1367
|
+
# particular request, please provide the request ID.
|
1368
|
+
# (default to )
|
1369
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
1370
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
1371
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
1372
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
1373
|
+
# may be rejected).
|
1374
|
+
#
|
1375
|
+
# @return [Response] A Response object with data of type nil
|
1376
|
+
def update_listener(update_listener_details, load_balancer_id, listener_name, opts = {})
|
1377
|
+
logger.debug "Calling operation LoadBalancerClient#update_listener." if logger
|
1378
|
+
|
1379
|
+
fail "Missing the required parameter 'update_listener_details' when calling update_listener." if update_listener_details.nil?
|
1380
|
+
fail "Missing the required parameter 'load_balancer_id' when calling update_listener." if load_balancer_id.nil?
|
1381
|
+
fail "Missing the required parameter 'listener_name' when calling update_listener." if listener_name.nil?
|
1382
|
+
|
1383
|
+
path = "/loadBalancers/{loadBalancerId}/listeners/{listenerName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{listenerName}', listener_name.to_s)
|
1384
|
+
|
1385
|
+
# Query Params
|
1386
|
+
query_params = {}
|
1387
|
+
|
1388
|
+
# Header Params
|
1389
|
+
header_params = {}
|
1390
|
+
header_params['accept'] = 'application/json'
|
1391
|
+
header_params['content-type'] = 'application/json'
|
1392
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1393
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
1394
|
+
|
1395
|
+
post_body = @api_client.object_to_http_body(update_listener_details)
|
1396
|
+
|
1397
|
+
return @api_client.call_api(
|
1398
|
+
:PUT,
|
1399
|
+
path,
|
1400
|
+
endpoint,
|
1401
|
+
:header_params => header_params,
|
1402
|
+
:query_params => query_params,
|
1403
|
+
:body => post_body)
|
1404
|
+
end
|
1405
|
+
|
1406
|
+
# Updates a load balancer's configuration.
|
1407
|
+
# @param [UpdateLoadBalancerDetails] update_load_balancer_details The details for updating a load balancer's configuration.
|
1408
|
+
# @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.
|
1409
|
+
# @param [Hash] opts the optional parameters
|
1410
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1411
|
+
# particular request, please provide the request ID.
|
1412
|
+
# (default to )
|
1413
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
1414
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
1415
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
1416
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
1417
|
+
# may be rejected).
|
1418
|
+
#
|
1419
|
+
# @return [Response] A Response object with data of type nil
|
1420
|
+
def update_load_balancer(update_load_balancer_details, load_balancer_id, opts = {})
|
1421
|
+
logger.debug "Calling operation LoadBalancerClient#update_load_balancer." if logger
|
1422
|
+
|
1423
|
+
fail "Missing the required parameter 'update_load_balancer_details' when calling update_load_balancer." if update_load_balancer_details.nil?
|
1424
|
+
fail "Missing the required parameter 'load_balancer_id' when calling update_load_balancer." if load_balancer_id.nil?
|
1425
|
+
|
1426
|
+
path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)
|
1427
|
+
|
1428
|
+
# Query Params
|
1429
|
+
query_params = {}
|
1430
|
+
|
1431
|
+
# Header Params
|
1432
|
+
header_params = {}
|
1433
|
+
header_params['accept'] = 'application/json'
|
1434
|
+
header_params['content-type'] = 'application/json'
|
1435
|
+
header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
|
1436
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
1437
|
+
|
1438
|
+
post_body = @api_client.object_to_http_body(update_load_balancer_details)
|
1439
|
+
|
1440
|
+
return @api_client.call_api(
|
1441
|
+
:PUT,
|
1442
|
+
path,
|
1443
|
+
endpoint,
|
1444
|
+
:header_params => header_params,
|
1445
|
+
:query_params => query_params,
|
1446
|
+
:body => post_body)
|
1447
|
+
end
|
1448
|
+
end
|
1449
|
+
end
|