Class: Azure::ARM::Network::Models::InboundNatRulePropertiesFormat
- Inherits:
-
Object
- Object
- Azure::ARM::Network::Models::InboundNatRulePropertiesFormat
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb
Overview
Properties of Inbound NAT rule
Instance Attribute Summary collapse
-
#backend_ipconfiguration ⇒ SubResource
defined on a NetworkInterface of a VM.
-
#backend_port ⇒ Integer
the endpoint.
-
#enable_floating_ip ⇒ Boolean
floating IP capability required to configure a SQL AlwaysOn availability Group.
-
#frontend_ipconfiguration ⇒ SubResource
Gets or sets a reference to frontend IP Addresses.
-
#frontend_port ⇒ Integer
can spcify any port number you choose, but the port numbers specified for each role in the service must be unique.
-
#idle_timeout_in_minutes ⇒ Integer
connection.
-
#protocol ⇒ TransportProtocol
external endpoint.
-
#provisioning_state ⇒ String
resource Updating/Deleting/Failed.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ InboundNatRulePropertiesFormat
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#backend_ipconfiguration ⇒ SubResource
defined on a NetworkInterface of a VM. Traffic sent to frontendPort of each of the frontendIPConfigurations is forwarded to the backed IP
21 22 23 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 21 def backend_ipconfiguration @backend_ipconfiguration end |
#backend_port ⇒ Integer
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
42 43 44 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 42 def backend_port @backend_port end |
#enable_floating_ip ⇒ Boolean
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
55 56 57 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 55 def enable_floating_ip @enable_floating_ip end |
#frontend_ipconfiguration ⇒ SubResource
Returns Gets or sets a reference to frontend IP Addresses.
16 17 18 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 16 def frontend_ipconfiguration @frontend_ipconfiguration end |
#frontend_port ⇒ Integer
can spcify 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
32 33 34 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 32 def frontend_port @frontend_port end |
#idle_timeout_in_minutes ⇒ Integer
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
48 49 50 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 48 def idle_timeout_in_minutes @idle_timeout_in_minutes end |
#protocol ⇒ TransportProtocol
external endpoint. Possible values are Udp or Tcp. Possible values for this property include: ‘Udp’, ‘Tcp’.
26 27 28 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 26 def protocol @protocol end |
#provisioning_state ⇒ String
resource Updating/Deleting/Failed
59 60 61 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 59 def provisioning_state @provisioning_state end |
Class Method Details
.deserialize_object(object) ⇒ InboundNatRulePropertiesFormat
Deserializes given Ruby Hash into Model object.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 116 def self.deserialize_object(object) return if object.nil? output_object = InboundNatRulePropertiesFormat.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['backendIPConfiguration'] unless deserialized_property.nil? deserialized_property = SubResource.deserialize_object(deserialized_property) end output_object.backend_ipconfiguration = 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['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.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 74 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_ipconfiguration unless serialized_property.nil? serialized_property = SubResource.serialize_object(serialized_property) end output_object['backendIPConfiguration'] = serialized_property unless serialized_property.nil? serialized_property = object.protocol output_object['protocol'] = 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
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
64 65 66 67 |
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 64 def validate @frontend_ipconfiguration.validate unless @frontend_ipconfiguration.nil? @backend_ipconfiguration.validate unless @backend_ipconfiguration.nil? end |