Class: Azure::ARM::Network::Models::LoadBalancingRulePropertiesFormat

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb

Overview

Properties of the load balancer

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backend_address_poolSubResource

Inbound traffic is randomly load balanced across IPs in the backend IPs

Returns:

  • (SubResource)

    Gets or sets a reference to a pool of DIPs.



21
22
23
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 21

def backend_address_pool
  @backend_address_pool
end

#backend_portInteger

the endpoint. The localPort attribute maps the eternal port of the endpoint to an internal port on a role. This is useful in scenarios where a role must communicate to an internal compotnent on a port that is different from the one that is exposed externally. If not specified, the value of localPort is the same as the port attribute. Set the value of localPort to ‘*’ to automatically assign an unallocated port that is discoverable using the runtime API

Returns:

  • (Integer)

    Gets or sets a port used for internal connections on



51
52
53
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 51

def backend_port
  @backend_port
end

#enable_floating_ipBoolean

floating IP capability required to configure a SQL AlwaysOn availability Group. This setting is required when using the SQL Always ON availability Groups in SQL server. This setting can’t be changed after you create the endpoint

Returns:

  • (Boolean)

    Configures a virtual machine’s endpoint for the



64
65
66
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 64

def enable_floating_ip
  @enable_floating_ip
end

#frontend_ipconfigurationSubResource

Returns Gets or sets a reference to frontend IP Addresses.

Returns:

  • (SubResource)

    Gets or sets a reference to frontend IP Addresses



16
17
18
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 16

def frontend_ipconfiguration
  @frontend_ipconfiguration
end

#frontend_portInteger

can specify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive

Returns:

  • (Integer)

    Gets or sets the port for the external endpoint. You



41
42
43
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 41

def frontend_port
  @frontend_port
end

#idle_timeout_in_minutesInteger

connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This emlement is only used when the protocol is set to Tcp

Returns:

  • (Integer)

    Gets or sets the timeout for the Tcp idle



57
58
59
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 57

def idle_timeout_in_minutes
  @idle_timeout_in_minutes
end

#load_distributionLoadDistribution

for this rule. Possible values for this property include: ‘Default’, ‘SourceIP’, ‘SourceIPProtocol’.

Returns:



35
36
37
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 35

def load_distribution
  @load_distribution
end

#probeSubResource

probe used by the Load Balancing rule.

Returns:

  • (SubResource)

    Gets or sets the reference of the load balancer



25
26
27
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 25

def probe
  @probe
end

#protocolTransportProtocol

the external endpoint. Possible values are Udp or Tcp. Possible values for this property include: ‘Udp’, ‘Tcp’.

Returns:



30
31
32
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 30

def protocol
  @protocol
end

#provisioning_stateString

resource Updating/Deleting/Failed

Returns:

  • (String)

    Gets or sets Provisioning state of the PublicIP



68
69
70
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 68

def provisioning_state
  @provisioning_state
end

Class Method Details

.deserialize_object(object) ⇒ LoadBalancingRulePropertiesFormat

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 135

def self.deserialize_object(object)
  return if object.nil?
  output_object = LoadBalancingRulePropertiesFormat.new

  deserialized_property = object['frontendIPConfiguration']
  unless deserialized_property.nil?
    deserialized_property = SubResource.deserialize_object(deserialized_property)
  end
  output_object.frontend_ipconfiguration = deserialized_property

  deserialized_property = object['backendAddressPool']
  unless deserialized_property.nil?
    deserialized_property = SubResource.deserialize_object(deserialized_property)
  end
  output_object.backend_address_pool = deserialized_property

  deserialized_property = object['probe']
  unless deserialized_property.nil?
    deserialized_property = SubResource.deserialize_object(deserialized_property)
  end
  output_object.probe = deserialized_property

  deserialized_property = object['protocol']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = TransportProtocol.constants.any? { |e| TransportProtocol.const_get(e).to_s.downcase == deserialized_property.downcase }
    fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
  end
  output_object.protocol = deserialized_property

  deserialized_property = object['loadDistribution']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = LoadDistribution.constants.any? { |e| LoadDistribution.const_get(e).to_s.downcase == deserialized_property.downcase }
    fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
  end
  output_object.load_distribution = deserialized_property

  deserialized_property = object['frontendPort']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.frontend_port = deserialized_property

  deserialized_property = object['backendPort']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.backend_port = deserialized_property

  deserialized_property = object['idleTimeoutInMinutes']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.idle_timeout_in_minutes = deserialized_property

  deserialized_property = object['enableFloatingIP']
  output_object.enable_floating_ip = deserialized_property

  deserialized_property = object['provisioningState']
  output_object.provisioning_state = deserialized_property

  output_object.validate

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 84

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.frontend_ipconfiguration
  unless serialized_property.nil?
    serialized_property = SubResource.serialize_object(serialized_property)
  end
  output_object['frontendIPConfiguration'] = serialized_property unless serialized_property.nil?

  serialized_property = object.backend_address_pool
  unless serialized_property.nil?
    serialized_property = SubResource.serialize_object(serialized_property)
  end
  output_object['backendAddressPool'] = serialized_property unless serialized_property.nil?

  serialized_property = object.probe
  unless serialized_property.nil?
    serialized_property = SubResource.serialize_object(serialized_property)
  end
  output_object['probe'] = serialized_property unless serialized_property.nil?

  serialized_property = object.protocol
  output_object['protocol'] = serialized_property unless serialized_property.nil?

  serialized_property = object.load_distribution
  output_object['loadDistribution'] = serialized_property unless serialized_property.nil?

  serialized_property = object.frontend_port
  output_object['frontendPort'] = serialized_property unless serialized_property.nil?

  serialized_property = object.backend_port
  output_object['backendPort'] = serialized_property unless serialized_property.nil?

  serialized_property = object.idle_timeout_in_minutes
  output_object['idleTimeoutInMinutes'] = serialized_property unless serialized_property.nil?

  serialized_property = object.enable_floating_ip
  output_object['enableFloatingIP'] = serialized_property unless serialized_property.nil?

  serialized_property = object.provisioning_state
  output_object['provisioningState'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



73
74
75
76
77
# File 'lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb', line 73

def validate
  @frontend_ipconfiguration.validate unless @frontend_ipconfiguration.nil?
  @backend_address_pool.validate unless @backend_address_pool.nil?
  @probe.validate unless @probe.nil?
end