Class: Azure::Network::Mgmt::V2017_09_01::Models::SecurityRule

Inherits:
SubResource
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb

Overview

Network security rule.

Instance Attribute Summary collapse

Attributes inherited from SubResource

#id

Class Method Summary collapse

Instance Attribute Details

#accessSecurityRuleAccess

Possible values are: ‘Allow’ and ‘Deny’. Possible values include: ‘Allow’, ‘Deny’

Returns:



67
68
69
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 67

def access
  @access
end

#descriptionString

Returns A description for this rule. Restricted to 140 chars.

Returns:

  • (String)

    A description for this rule. Restricted to 140 chars.



16
17
18
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 16

def description
  @description
end

#destination_address_prefixString

range. Asterix ‘*’ can also be used to match all source IPs. Default tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.

Returns:

  • (String)

    The destination address prefix. CIDR or destination IP



48
49
50
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 48

def destination_address_prefix
  @destination_address_prefix
end

#destination_address_prefixesArray<String>

destination IP ranges.

Returns:

  • (Array<String>)

    The destination address prefixes. CIDR or



52
53
54
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 52

def destination_address_prefixes
  @destination_address_prefixes
end

#destination_application_security_groupsArray<ApplicationSecurityGroup>

group specified as destination.

Returns:



56
57
58
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 56

def destination_application_security_groups
  @destination_application_security_groups
end

#destination_port_rangeString

between 0 and 65535. Asterix ‘*’ can also be used to match all ports.

Returns:

  • (String)

    The destination port or range. Integer or range



29
30
31
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 29

def destination_port_range
  @destination_port_range
end

#destination_port_rangesArray<String>

Returns The destination port ranges.

Returns:

  • (Array<String>)

    The destination port ranges.



62
63
64
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 62

def destination_port_ranges
  @destination_port_ranges
end

#directionSecurityRuleDirection

direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: ‘Inbound’ and ‘Outbound’. Possible values include: ‘Inbound’, ‘Outbound’

Returns:



79
80
81
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 79

def direction
  @direction
end

#etagString

resource is updated.

Returns:

  • (String)

    A unique read-only string that changes whenever the



91
92
93
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 91

def etag
  @etag
end

#nameString

resource group. This name can be used to access the resource.

Returns:

  • (String)

    The name of the resource that is unique within a



87
88
89
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 87

def name
  @name
end

#priorityInteger

100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

Returns:

  • (Integer)

    The priority of the rule. The value can be between



73
74
75
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 73

def priority
  @priority
end

#protocolSecurityRuleProtocol

Possible values are ‘Tcp’, ‘Udp’, and ‘*’. Possible values include: ‘Tcp’, ‘Udp’, ‘*’

Returns:



21
22
23
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 21

def protocol
  @protocol
end

#provisioning_stateString

Possible values are: ‘Updating’, ‘Deleting’, and ‘Failed’.

Returns:

  • (String)

    The provisioning state of the public IP resource.



83
84
85
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 83

def provisioning_state
  @provisioning_state
end

#source_address_prefixString

used to match all source IPs. Default tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. If this is an ingress rule, specifies where network traffic originates from.

Returns:

  • (String)

    The CIDR or source IP range. Asterix ‘*’ can also be



35
36
37
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 35

def source_address_prefix
  @source_address_prefix
end

#source_address_prefixesArray<String>

Returns The CIDR or source IP ranges.

Returns:

  • (Array<String>)

    The CIDR or source IP ranges.



38
39
40
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 38

def source_address_prefixes
  @source_address_prefixes
end

#source_application_security_groupsArray<ApplicationSecurityGroup>

group specified as source.

Returns:



42
43
44
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 42

def source_application_security_groups
  @source_application_security_groups
end

#source_port_rangeString

and 65535. Asterix ‘*’ can also be used to match all ports.

Returns:

  • (String)

    The source port or range. Integer or range between 0



25
26
27
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 25

def source_port_range
  @source_port_range
end

#source_port_rangesArray<String>

Returns The source port ranges.

Returns:

  • (Array<String>)

    The source port ranges.



59
60
61
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 59

def source_port_ranges
  @source_port_ranges
end

Class Method Details

.mapperObject

Mapper for SecurityRule class as Ruby Hash. This will be used for serialization/deserialization.



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
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
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
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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/2017-09-01/generated/azure_mgmt_network/models/security_rule.rb', line 98

def self.mapper()
  {
    required: false,
    serialized_name: 'SecurityRule',
    type: {
      name: 'Composite',
      class_name: 'SecurityRule',
      model_properties: {
        id: {
          required: false,
          serialized_name: 'id',
          type: {
            name: 'String'
          }
        },
        description: {
          required: false,
          serialized_name: 'properties.description',
          type: {
            name: 'String'
          }
        },
        protocol: {
          required: true,
          serialized_name: 'properties.protocol',
          type: {
            name: 'String'
          }
        },
        source_port_range: {
          required: false,
          serialized_name: 'properties.sourcePortRange',
          type: {
            name: 'String'
          }
        },
        destination_port_range: {
          required: false,
          serialized_name: 'properties.destinationPortRange',
          type: {
            name: 'String'
          }
        },
        source_address_prefix: {
          required: false,
          serialized_name: 'properties.sourceAddressPrefix',
          type: {
            name: 'String'
          }
        },
        source_address_prefixes: {
          required: false,
          serialized_name: 'properties.sourceAddressPrefixes',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        source_application_security_groups: {
          required: false,
          serialized_name: 'properties.sourceApplicationSecurityGroups',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'ApplicationSecurityGroupElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ApplicationSecurityGroup'
                }
            }
          }
        },
        destination_address_prefix: {
          required: false,
          serialized_name: 'properties.destinationAddressPrefix',
          type: {
            name: 'String'
          }
        },
        destination_address_prefixes: {
          required: false,
          serialized_name: 'properties.destinationAddressPrefixes',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        destination_application_security_groups: {
          required: false,
          serialized_name: 'properties.destinationApplicationSecurityGroups',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'ApplicationSecurityGroupElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ApplicationSecurityGroup'
                }
            }
          }
        },
        source_port_ranges: {
          required: false,
          serialized_name: 'properties.sourcePortRanges',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        destination_port_ranges: {
          required: false,
          serialized_name: 'properties.destinationPortRanges',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        access: {
          required: true,
          serialized_name: 'properties.access',
          type: {
            name: 'String'
          }
        },
        priority: {
          required: false,
          serialized_name: 'properties.priority',
          type: {
            name: 'Number'
          }
        },
        direction: {
          required: true,
          serialized_name: 'properties.direction',
          type: {
            name: 'String'
          }
        },
        provisioning_state: {
          required: false,
          serialized_name: 'properties.provisioningState',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          serialized_name: 'name',
          type: {
            name: 'String'
          }
        },
        etag: {
          required: false,
          serialized_name: 'etag',
          type: {
            name: 'String'
          }
        }
      }
    }
  }
end