Class: OCI::LoadBalancer::Models::UpdateLoadBalancerDetails
- Inherits:
-
Object
- Object
- OCI::LoadBalancer::Models::UpdateLoadBalancerDetails
- Defined in:
- lib/oci/load_balancer/models/update_load_balancer_details.rb
Overview
Configuration details to update a load balancer.
Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.
Constant Summary collapse
- IP_MODE_ENUM =
[ IP_MODE_IPV4 = 'IPV4'.freeze, IP_MODE_IPV6 = 'IPV6'.freeze ].freeze
Instance Attribute Summary collapse
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
The user-friendly display name for the load balancer.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#ip_mode ⇒ String
Whether the load balancer has an IPv4 or IPv6 IP address.
-
#ipv6_subnet_cidr ⇒ String
Used to disambiguate which subnet prefix should be used to create an IPv6 LB.
-
#is_delete_protection_enabled ⇒ BOOLEAN
Whether or not the load balancer has delete protection enabled.
-
#is_request_id_enabled ⇒ BOOLEAN
Whether or not the load balancer has the Request Id feature enabled for HTTP listeners.
-
#request_id_header ⇒ String
If isRequestIdEnabled is true then this field contains the name of the header field that contains the unique request id that is attached to every request from the load balancer to the load balancer backends and to every response from the load balancer.
-
#reserved_ips ⇒ Array<OCI::LoadBalancer::Models::ReservedIP>
An array of reserved Ips.
-
#security_attributes ⇒ Hash<String, Hash<String, Object>>
Extended Defined tags for ZPR for this resource.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdateLoadBalancerDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UpdateLoadBalancerDetails
Initializes the object
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 173 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.ip_mode = attributes[:'ipMode'] if attributes[:'ipMode'] self.ip_mode = "IPV4" if ip_mode.nil? && !attributes.key?(:'ipMode') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :ipMode and :ip_mode' if attributes.key?(:'ipMode') && attributes.key?(:'ip_mode') self.ip_mode = attributes[:'ip_mode'] if attributes[:'ip_mode'] self.ip_mode = "IPV4" if ip_mode.nil? && !attributes.key?(:'ipMode') && !attributes.key?(:'ip_mode') # rubocop:disable Style/StringLiterals self.ipv6_subnet_cidr = attributes[:'ipv6SubnetCidr'] if attributes[:'ipv6SubnetCidr'] raise 'You cannot provide both :ipv6SubnetCidr and :ipv6_subnet_cidr' if attributes.key?(:'ipv6SubnetCidr') && attributes.key?(:'ipv6_subnet_cidr') self.ipv6_subnet_cidr = attributes[:'ipv6_subnet_cidr'] if attributes[:'ipv6_subnet_cidr'] self.reserved_ips = attributes[:'reservedIps'] if attributes[:'reservedIps'] raise 'You cannot provide both :reservedIps and :reserved_ips' if attributes.key?(:'reservedIps') && attributes.key?(:'reserved_ips') self.reserved_ips = attributes[:'reserved_ips'] if attributes[:'reserved_ips'] self.is_delete_protection_enabled = attributes[:'isDeleteProtectionEnabled'] unless attributes[:'isDeleteProtectionEnabled'].nil? raise 'You cannot provide both :isDeleteProtectionEnabled and :is_delete_protection_enabled' if attributes.key?(:'isDeleteProtectionEnabled') && attributes.key?(:'is_delete_protection_enabled') self.is_delete_protection_enabled = attributes[:'is_delete_protection_enabled'] unless attributes[:'is_delete_protection_enabled'].nil? self.is_request_id_enabled = attributes[:'isRequestIdEnabled'] unless attributes[:'isRequestIdEnabled'].nil? raise 'You cannot provide both :isRequestIdEnabled and :is_request_id_enabled' if attributes.key?(:'isRequestIdEnabled') && attributes.key?(:'is_request_id_enabled') self.is_request_id_enabled = attributes[:'is_request_id_enabled'] unless attributes[:'is_request_id_enabled'].nil? self.request_id_header = attributes[:'requestIdHeader'] if attributes[:'requestIdHeader'] raise 'You cannot provide both :requestIdHeader and :request_id_header' if attributes.key?(:'requestIdHeader') && attributes.key?(:'request_id_header') self.request_id_header = attributes[:'request_id_header'] if attributes[:'request_id_header'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self.security_attributes = attributes[:'securityAttributes'] if attributes[:'securityAttributes'] raise 'You cannot provide both :securityAttributes and :security_attributes' if attributes.key?(:'securityAttributes') && attributes.key?(:'security_attributes') self.security_attributes = attributes[:'security_attributes'] if attributes[:'security_attributes'] end |
Instance Attribute Details
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
112 113 114 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 112 def @defined_tags end |
#display_name ⇒ String
The user-friendly display name for the load balancer. It does not have to be unique, and it is changeable. Avoid entering confidential information.
Example: example_load_balancer
25 26 27 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 25 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {\"Department\": \"Finance\"}
104 105 106 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 104 def @freeform_tags end |
#ip_mode ⇒ String
Whether the load balancer has an IPv4 or IPv6 IP address.
If "IPV4", the service assigns an IPv4 address and the load balancer supports IPv4 traffic.
If "IPV6", the service assigns an IPv6 address and the load balancer supports IPv6 traffic.
Example: "ipMode":"IPV6"
36 37 38 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 36 def ip_mode @ip_mode end |
#ipv6_subnet_cidr ⇒ String
Used to disambiguate which subnet prefix should be used to create an IPv6 LB.
Example: "2002::1234:abcd:ffff:c0a8:101/64"
43 44 45 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 43 def ipv6_subnet_cidr @ipv6_subnet_cidr end |
#is_delete_protection_enabled ⇒ BOOLEAN
Whether or not the load balancer has delete protection enabled.
If "true", the loadbalancer will be protected against deletion if configured to accept traffic.
If "false", the loadbalancer will not be protected against deletion.
If null or unset, the value for delete protection will not be changed.
Example: true
61 62 63 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 61 def is_delete_protection_enabled @is_delete_protection_enabled end |
#is_request_id_enabled ⇒ BOOLEAN
Whether or not the load balancer has the Request Id feature enabled for HTTP listeners.
If "true", the load balancer will attach a unique request id header to every request passed through from the load balancer to load balancer backends. This same request id header also will be added to the response the lb received from the backend handling the request before the load balancer returns the response to the requestor. The name of the unique request id header is set the by value of requestIdHeader.
If "false", the loadbalancer not add this unique request id header to either the request passed through to the load balancer backends nor to the reponse returned to the user.
New load balancers have the Request Id feature enabled unless isRequestIdEnabled is set to False.
Example: true
79 80 81 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 79 def is_request_id_enabled @is_request_id_enabled end |
#request_id_header ⇒ String
If isRequestIdEnabled is true then this field contains the name of the header field that contains the unique request id that is attached to every request from the load balancer to the load balancer backends and to every response from the load balancer.
If a request to the load balancer already contains a header with same name as specified in requestIdHeader then the load balancer will not change the value of that field.
If isRequestIdEnabled is false then this field is ignored.
Notes: * Unless the header name is "" it must start with "X-" prefix. * Setting the header name to "" will set it to the default: X-Request-Id.
96 97 98 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 96 def request_id_header @request_id_header end |
#reserved_ips ⇒ Array<OCI::LoadBalancer::Models::ReservedIP>
An array of reserved Ips.
48 49 50 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 48 def reserved_ips @reserved_ips end |
#security_attributes ⇒ Hash<String, Hash<String, Object>>
Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace.
Example: {\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\":\"42\",\"mode\":\"audit\", \"usagetype\" : \"zpr\"}}}
119 120 121 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 119 def security_attributes @security_attributes end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 122 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'ip_mode': :'ipMode', 'ipv6_subnet_cidr': :'ipv6SubnetCidr', 'reserved_ips': :'reservedIps', 'is_delete_protection_enabled': :'isDeleteProtectionEnabled', 'is_request_id_enabled': :'isRequestIdEnabled', 'request_id_header': :'requestIdHeader', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'security_attributes': :'securityAttributes' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 140 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'ip_mode': :'String', 'ipv6_subnet_cidr': :'String', 'reserved_ips': :'Array<OCI::LoadBalancer::Models::ReservedIP>', 'is_delete_protection_enabled': :'BOOLEAN', 'is_request_id_enabled': :'BOOLEAN', 'request_id_header': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'security_attributes': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 257 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && ip_mode == other.ip_mode && ipv6_subnet_cidr == other.ipv6_subnet_cidr && reserved_ips == other.reserved_ips && is_delete_protection_enabled == other.is_delete_protection_enabled && is_request_id_enabled == other.is_request_id_enabled && request_id_header == other.request_id_header && == other. && == other. && security_attributes == other.security_attributes end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 296 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
276 277 278 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 276 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
285 286 287 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 285 def hash [display_name, ip_mode, ipv6_subnet_cidr, reserved_ips, is_delete_protection_enabled, is_request_id_enabled, request_id_header, , , security_attributes].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
329 330 331 332 333 334 335 336 337 338 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 329 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
323 324 325 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 323 def to_s to_hash.to_s end |