Class: Azure::ARM::Network::Models::InboundNatRulePropertiesFormat

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backend_ipconfigurationSubResource

defined on a NetworkInterface of a VM. Traffic sent to frontendPort of each of the frontendIPConfigurations is forwarded to the backed IP

Returns:

  • (SubResource)

    Gets or sets a reference to a private ip address



21
22
23
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 21

def backend_ipconfiguration
  @backend_ipconfiguration
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



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_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



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_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/inbound_nat_rule_properties_format.rb', line 16

def frontend_ipconfiguration
  @frontend_ipconfiguration
end

#frontend_portInteger

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

Returns:

  • (Integer)

    Gets or sets the port for the external endpoint. You



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_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



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

#protocolTransportProtocol

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

Returns:



26
27
28
# File 'lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb', line 26

def protocol
  @protocol
end

#provisioning_stateString

resource Updating/Deleting/Failed

Returns:

  • (String)

    Gets or sets Provisioning state of the PublicIP



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.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of 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

#validateObject

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