fog-azure-rm-temp 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/.arclint +8 -0
  3. data/.travis.yml +28 -14
  4. data/CHANGELOG.md +77 -0
  5. data/CONTRIBUTORS.md +4 -0
  6. data/fog-azure-rm.gemspec +3 -2
  7. data/lib/fog/azurerm.rb +1 -0
  8. data/lib/fog/azurerm/async_response.rb +9 -1
  9. data/lib/fog/azurerm/compute.rb +3 -1
  10. data/lib/fog/azurerm/constants.rb +11 -3
  11. data/lib/fog/azurerm/dns.rb +3 -1
  12. data/lib/fog/azurerm/docs/application_gateway.md +119 -117
  13. data/lib/fog/azurerm/docs/compute.md +299 -202
  14. data/lib/fog/azurerm/docs/dns.md +44 -43
  15. data/lib/fog/azurerm/docs/key_vault.md +31 -28
  16. data/lib/fog/azurerm/docs/network.md +407 -404
  17. data/lib/fog/azurerm/docs/resources.md +52 -49
  18. data/lib/fog/azurerm/docs/sql.md +56 -54
  19. data/lib/fog/azurerm/docs/storage.md +92 -157
  20. data/lib/fog/azurerm/docs/traffic_manager.md +55 -53
  21. data/lib/fog/azurerm/models/application_gateway/gateway.rb +5 -1
  22. data/lib/fog/azurerm/models/compute/availability_set.rb +4 -1
  23. data/lib/fog/azurerm/models/compute/managed_disk.rb +0 -1
  24. data/lib/fog/azurerm/models/compute/server.rb +61 -11
  25. data/lib/fog/azurerm/models/compute/servers.rb +2 -2
  26. data/lib/fog/azurerm/models/dns/a_record.rb +15 -0
  27. data/lib/fog/azurerm/models/dns/cname_record.rb +15 -0
  28. data/lib/fog/azurerm/models/dns/record_set.rb +20 -8
  29. data/lib/fog/azurerm/models/key_vault/vault.rb +3 -1
  30. data/lib/fog/azurerm/models/network/load_balancer.rb +3 -1
  31. data/lib/fog/azurerm/models/network/local_network_gateway.rb +3 -1
  32. data/lib/fog/azurerm/models/network/network_interface.rb +3 -1
  33. data/lib/fog/azurerm/models/network/network_security_group.rb +4 -2
  34. data/lib/fog/azurerm/models/network/public_ip.rb +4 -2
  35. data/lib/fog/azurerm/models/network/virtual_network.rb +4 -2
  36. data/lib/fog/azurerm/models/resources/resource_group.rb +3 -1
  37. data/lib/fog/azurerm/models/sql/sql_database.rb +3 -3
  38. data/lib/fog/azurerm/models/sql/sql_server.rb +3 -2
  39. data/lib/fog/azurerm/models/storage/directories.rb +6 -1
  40. data/lib/fog/azurerm/models/storage/file.rb +2 -0
  41. data/lib/fog/azurerm/models/storage/storage_account.rb +4 -1
  42. data/lib/fog/azurerm/models/storage/storage_accounts.rb +7 -0
  43. data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +3 -1
  44. data/lib/fog/azurerm/requests/application_gateway/check_ag_exists.rb +1 -1
  45. data/lib/fog/azurerm/requests/application_gateway/create_or_update_application_gateway.rb +1 -0
  46. data/lib/fog/azurerm/requests/compute/attach_data_disk_to_vm.rb +2 -2
  47. data/lib/fog/azurerm/requests/compute/check_availability_set_exists.rb +1 -1
  48. data/lib/fog/azurerm/requests/compute/check_managed_disk_exists.rb +1 -1
  49. data/lib/fog/azurerm/requests/compute/check_vm_exists.rb +1 -1
  50. data/lib/fog/azurerm/requests/compute/check_vm_extension_exists.rb +2 -2
  51. data/lib/fog/azurerm/requests/compute/create_availability_set.rb +4 -2
  52. data/lib/fog/azurerm/requests/compute/create_image.rb +68 -0
  53. data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +302 -135
  54. data/lib/fog/azurerm/requests/compute/delete_image.rb +29 -0
  55. data/lib/fog/azurerm/requests/compute/get_image.rb +45 -0
  56. data/lib/fog/azurerm/requests/compute/get_virtual_machine.rb +4 -2
  57. data/lib/fog/azurerm/requests/dns/check_record_set_exists.rb +1 -1
  58. data/lib/fog/azurerm/requests/dns/check_zone_exists.rb +3 -2
  59. data/lib/fog/azurerm/requests/dns/create_or_update_record_set.rb +3 -2
  60. data/lib/fog/azurerm/requests/dns/create_or_update_zone.rb +1 -2
  61. data/lib/fog/azurerm/requests/key_vault/check_vault_exists.rb +1 -1
  62. data/lib/fog/azurerm/requests/key_vault/create_or_update_vault.rb +1 -0
  63. data/lib/fog/azurerm/requests/network/check_express_route_cir_auth_exists.rb +1 -1
  64. data/lib/fog/azurerm/requests/network/check_express_route_circuit_exists.rb +1 -1
  65. data/lib/fog/azurerm/requests/network/check_load_balancer_exists.rb +1 -1
  66. data/lib/fog/azurerm/requests/network/check_local_net_gateway_exists.rb +1 -1
  67. data/lib/fog/azurerm/requests/network/check_net_sec_group_exists.rb +1 -1
  68. data/lib/fog/azurerm/requests/network/check_net_sec_rule_exists.rb +1 -1
  69. data/lib/fog/azurerm/requests/network/check_network_interface_exists.rb +1 -1
  70. data/lib/fog/azurerm/requests/network/check_public_ip_exists.rb +1 -1
  71. data/lib/fog/azurerm/requests/network/check_subnet_exists.rb +1 -1
  72. data/lib/fog/azurerm/requests/network/check_virtual_network_exists.rb +1 -1
  73. data/lib/fog/azurerm/requests/network/check_vnet_gateway_connection_exists.rb +1 -1
  74. data/lib/fog/azurerm/requests/network/check_vnet_gateway_exists.rb +1 -1
  75. data/lib/fog/azurerm/requests/network/create_load_balancer.rb +4 -4
  76. data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit.rb +1 -1
  77. data/lib/fog/azurerm/requests/network/create_or_update_local_network_gateway.rb +1 -2
  78. data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +4 -3
  79. data/lib/fog/azurerm/requests/network/create_or_update_network_security_group.rb +4 -3
  80. data/lib/fog/azurerm/requests/network/create_or_update_public_ip.rb +5 -3
  81. data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +4 -3
  82. data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway_connection.rb +1 -1
  83. data/lib/fog/azurerm/requests/resources/check_azure_resource_exists.rb +4 -4
  84. data/lib/fog/azurerm/requests/resources/create_resource_group.rb +2 -1
  85. data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +4 -4
  86. data/lib/fog/azurerm/requests/resources/tag_resource.rb +4 -4
  87. data/lib/fog/azurerm/requests/sql/create_or_update_database.rb +13 -10
  88. data/lib/fog/azurerm/requests/sql/create_or_update_sql_server.rb +8 -5
  89. data/lib/fog/azurerm/requests/storage/check_storage_account_exists.rb +1 -1
  90. data/lib/fog/azurerm/requests/storage/create_storage_account.rb +4 -2
  91. data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_endpoint_exists.rb +1 -1
  92. data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_profile_exists.rb +1 -1
  93. data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_profile.rb +13 -3
  94. data/lib/fog/azurerm/storage.rb +0 -18
  95. data/lib/fog/azurerm/utilities/general.rb +21 -10
  96. data/lib/fog/azurerm/version.rb +1 -1
  97. data/rake-script.sh +7 -1
  98. data/rakefile +1 -1
  99. data/test/api_stub.rb +19 -2
  100. data/test/api_stub/models/compute/server.rb +21 -5
  101. data/test/api_stub/requests/compute/image.rb +41 -0
  102. data/test/api_stub/requests/compute/virtual_machine.rb +60 -62
  103. data/test/api_stub/requests/resources/resource_group.rb +1 -1
  104. data/test/integration/application_gateway.rb +8 -1
  105. data/test/integration/availability_set.rb +9 -2
  106. data/test/integration/external_load_balancer.rb +2 -1
  107. data/test/integration/internal_load_balancer.rb +2 -1
  108. data/test/integration/key_vault.rb +2 -1
  109. data/test/integration/managed_disk.rb +10 -5
  110. data/test/integration/network_interface.rb +2 -1
  111. data/test/integration/network_security_group.rb +2 -1
  112. data/test/integration/public_ip.rb +2 -1
  113. data/test/integration/record_set.rb +5 -5
  114. data/test/integration/resource_group.rb +5 -2
  115. data/test/integration/resource_tag.rb +4 -2
  116. data/test/integration/server.rb +113 -23
  117. data/test/integration/server_custom_image.rb +120 -20
  118. data/test/integration/sql_server.rb +10 -2
  119. data/test/integration/storage_account.rb +32 -20
  120. data/test/integration/traffic_manager.rb +6 -1
  121. data/test/integration/virtual_network.rb +2 -1
  122. data/test/integration/virtual_network_gateway_connection.rb +3 -3
  123. data/test/models/application_gateway/test_gateway.rb +2 -1
  124. data/test/models/compute/test_availability_set.rb +2 -1
  125. data/test/models/compute/test_managed_disk.rb +2 -1
  126. data/test/models/compute/test_server.rb +13 -4
  127. data/test/models/dns/test_zone.rb +2 -1
  128. data/test/models/key_vault/test_vault.rb +2 -1
  129. data/test/models/network/test_load_balancer.rb +2 -1
  130. data/test/models/network/test_network_interface.rb +2 -1
  131. data/test/models/network/test_network_security_group.rb +2 -1
  132. data/test/models/network/test_public_ip.rb +2 -1
  133. data/test/models/network/test_virtual_network.rb +2 -1
  134. data/test/models/resources/test_resource_group.rb +2 -1
  135. data/test/models/sql/test_database.rb +2 -1
  136. data/test/models/sql/test_sql_server.rb +2 -1
  137. data/test/models/storage/test_storage_account.rb +2 -1
  138. data/test/models/traffic_manager/test_traffic_manager_profile.rb +2 -1
  139. data/test/requests/application_gateway/test_check_ag_exists.rb +11 -4
  140. data/test/requests/compute/test_attach_data_disk_to_vm.rb +2 -2
  141. data/test/requests/compute/test_check_availability_set_exists.rb +9 -2
  142. data/test/requests/compute/test_check_managed_disk_exists.rb +9 -2
  143. data/test/requests/compute/test_check_vm_exists.rb +9 -2
  144. data/test/requests/compute/test_check_vm_extension_exists.rb +9 -2
  145. data/test/requests/compute/test_create_image.rb +27 -0
  146. data/test/requests/compute/test_create_virtual_machine.rb +41 -17
  147. data/test/requests/compute/test_delete_image.rb +23 -0
  148. data/test/requests/compute/test_get_image.rb +23 -0
  149. data/test/requests/dns/test_check_record_set_exists.rb +9 -2
  150. data/test/requests/dns/test_check_zone_exists.rb +16 -2
  151. data/test/requests/key_vault/test_check_vault_exists.rb +9 -2
  152. data/test/requests/network/test_check_express_route_cir_auth_exists.rb +9 -2
  153. data/test/requests/network/test_check_express_route_circuit_exists.rb +9 -2
  154. data/test/requests/network/test_check_load_balancer_exists.rb +9 -2
  155. data/test/requests/network/test_check_local_net_gateway_exists.rb +11 -4
  156. data/test/requests/network/test_check_net_sec_group_exists.rb +9 -2
  157. data/test/requests/network/test_check_net_sec_rule_exists.rb +9 -2
  158. data/test/requests/network/test_check_network_interface_exists.rb +9 -2
  159. data/test/requests/network/test_check_public_ip_exists.rb +9 -2
  160. data/test/requests/network/test_check_subnet_exists.rb +9 -2
  161. data/test/requests/network/test_check_virtual_network_exists.rb +10 -4
  162. data/test/requests/network/test_check_vnet_gateway_connection_exists.rb +9 -2
  163. data/test/requests/network/test_check_vnet_gateway_exists.rb +9 -2
  164. data/test/requests/network/test_create_load_balancer.rb +3 -2
  165. data/test/requests/network/test_create_network_interface.rb +4 -3
  166. data/test/requests/network/test_create_or_update_network_security_group.rb +3 -2
  167. data/test/requests/network/test_create_or_update_virtual_network.rb +5 -3
  168. data/test/requests/network/test_create_public_ip.rb +3 -2
  169. data/test/requests/network/test_update_public_ip.rb +3 -2
  170. data/test/requests/resources/test_create_resource_group.rb +3 -2
  171. data/test/requests/resources/test_delete_resource_tag.rb +3 -3
  172. data/test/requests/resources/test_tag_resource.rb +3 -3
  173. data/test/requests/storage/test_check_storage_account_exists.rb +8 -1
  174. data/test/requests/traffic_manager/test_check_traffic_manager_endpoint_exists.rb +9 -2
  175. data/test/requests/traffic_manager/test_check_traffic_manager_profile_exists.rb +9 -2
  176. data/test/test_helper.rb +5 -14
  177. metadata +67 -75
  178. data/lib/fog/azurerm/models/storage/recovery_vault.rb +0 -50
  179. data/lib/fog/azurerm/models/storage/recovery_vaults.rb +0 -27
  180. data/lib/fog/azurerm/requests/storage/create_or_update_recovery_vault.rb +0 -54
  181. data/lib/fog/azurerm/requests/storage/delete_recovery_vault.rb +0 -35
  182. data/lib/fog/azurerm/requests/storage/disable_backup_protection.rb +0 -60
  183. data/lib/fog/azurerm/requests/storage/enable_backup_protection.rb +0 -61
  184. data/lib/fog/azurerm/requests/storage/get_all_backup_jobs.rb +0 -56
  185. data/lib/fog/azurerm/requests/storage/get_backup_container.rb +0 -53
  186. data/lib/fog/azurerm/requests/storage/get_backup_item.rb +0 -58
  187. data/lib/fog/azurerm/requests/storage/get_backup_job_for_vm.rb +0 -53
  188. data/lib/fog/azurerm/requests/storage/get_backup_protection_policy.rb +0 -64
  189. data/lib/fog/azurerm/requests/storage/get_recovery_vault.rb +0 -49
  190. data/lib/fog/azurerm/requests/storage/list_recovery_vaults.rb +0 -48
  191. data/lib/fog/azurerm/requests/storage/set_recovery_vault_context.rb +0 -36
  192. data/lib/fog/azurerm/requests/storage/start_backup.rb +0 -54
  193. data/test/api_stub/models/storage/recovery_vault.rb +0 -23
  194. data/test/api_stub/requests/storage/recovery_vault.rb +0 -189
  195. data/test/models/storage/test_recovery_vault.rb +0 -61
  196. data/test/models/storage/test_recovery_vaults.rb +0 -47
  197. data/test/requests/storage/test_create_recovery_vault.rb +0 -35
  198. data/test/requests/storage/test_delete_recovery_vault.rb +0 -34
  199. data/test/requests/storage/test_disable_backup_protection.rb +0 -52
  200. data/test/requests/storage/test_enable_backup_protection.rb +0 -66
  201. data/test/requests/storage/test_get_all_backup_jobs.rb +0 -35
  202. data/test/requests/storage/test_get_backup_container.rb +0 -35
  203. data/test/requests/storage/test_get_backup_item.rb +0 -35
  204. data/test/requests/storage/test_get_backup_job_for_vm.rb +0 -26
  205. data/test/requests/storage/test_get_backup_protection_policy.rb +0 -35
  206. data/test/requests/storage/test_get_recovery_vault.rb +0 -35
  207. data/test/requests/storage/test_list_recovery_vault.rb +0 -35
  208. data/test/requests/storage/test_set_recovery_vault_context.rb +0 -34
  209. data/test/requests/storage/test_start_backup.rb +0 -55
@@ -1,4 +1,4 @@
1
- #DNS
1
+ # DNS
2
2
 
3
3
  This document explains how to get started using Azure DNS Service with Fog.
4
4
 
@@ -15,19 +15,19 @@ require 'fog/azurerm'
15
15
  Next, create a connection to the DNS Service:
16
16
 
17
17
  ```ruby
18
- azure_dns_service = Fog::DNS::AzureRM.new(
19
- tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
20
- client_id: '<Clientid>', # Client id of Azure Active Directory Application
21
- client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
22
- subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
23
- :environment => '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
18
+ fog_dns_service = Fog::DNS::AzureRM.new(
19
+ tenant_id: '<Tenant Id>', # Tenant Id of Azure Active Directory Application
20
+ client_id: '<Client Id>', # Client Id of Azure Active Directory Application
21
+ client_secret: '<Client Secret>', # Client Secret of Azure Active Directory Application
22
+ subscription_id: '<Subscription Id>', # Subscription Id of an Azure Account
23
+ environment: '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
24
24
  )
25
25
  ```
26
26
 
27
27
  ## Check Zone Existence
28
28
 
29
29
  ```ruby
30
- azure_dns_service.zones.check_zone_exists(<Resource Group name>, <Zone name>)
30
+ fog_dns_service.zones.check_zone_exists('<Resource Group Name>', '<Zone Name>')
31
31
  ```
32
32
 
33
33
  ## Create Zone
@@ -35,18 +35,21 @@ azure_dns_service.zones.check_zone_exists(<Resource Group name>, <Zone name>)
35
35
  Create a new Zone
36
36
 
37
37
  ```ruby
38
- azure_dns_service.zones.create(
39
- name: '<Zone name>',
40
- resource_group: '<Resource Group name>'
41
- )
38
+ fog_dns_service.zones.create(
39
+ name: '<Zone Name>',
40
+ resource_group: '<Resource Group Name>',
41
+ tags: {
42
+ key: 'value' # [Optional]
43
+ }
44
+ )
42
45
  ```
43
46
  ## List Zones
44
47
 
45
48
  ```ruby
46
- azure_dns_service.zones.each do |zone|
47
- puts "#{zone.name}"
48
- puts "#{zone.resource_group}"
49
- end
49
+ fog_dns_service.zones.each do |zone|
50
+ puts "#{zone.name}"
51
+ puts "#{zone.resource_group}"
52
+ end
50
53
  ```
51
54
 
52
55
  ## Retrieve a single Zone
@@ -54,10 +57,10 @@ Create a new Zone
54
57
  Get a single record of Zone
55
58
 
56
59
  ```ruby
57
- zone = azure_dns_service
58
- .zones
59
- .get('<Resource Group name>', '<Zone name>')
60
- puts "#{zone.name}"
60
+ zone = fog_dns_service
61
+ .zones
62
+ .get('<Resource Group Name>', '<Zone Name>')
63
+ puts "#{zone.name}"
61
64
  ```
62
65
 
63
66
  ## Destroy a single Zone
@@ -65,13 +68,13 @@ Get a single record of Zone
65
68
  Get Zone object from the get method(described above) and then destroy that Zone.
66
69
 
67
70
  ```ruby
68
- zone.destroy
71
+ zone.destroy
69
72
  ```
70
73
 
71
74
  ## Check Record Set Existence
72
75
 
73
76
  ```ruby
74
- azure_dns_service.record_sets.check_record_set_exists(<Resource Group name>, <Record Set name>, <Zone name>, <Record Type(A/CNAME)>)
77
+ fog_dns_service.record_sets.check_record_set_exists('<Resource Group Name>', '<Record Set Name>', '<Zone Name>', '<Record Type(A/CNAME)>')
75
78
  ```
76
79
 
77
80
  ## Create Record Set
@@ -79,26 +82,26 @@ azure_dns_service.record_sets.check_record_set_exists(<Resource Group name>, <Re
79
82
  Create a new Record Set
80
83
 
81
84
  ```ruby
82
- azure_dns_service.record_sets.create(
83
- name: '<Record Set name>',
84
- resource_group: '<Resource Group name>',
85
+ fog_dns_service.record_sets.create(
86
+ name: '<Record Set Name>',
87
+ resource_group: '<Resource Group Name>',
85
88
  zone_name: '<Zone Name>',
86
- records: <String array of Records>,
87
- type: '<Record Type(A/CNAME)>',
88
- ttl: <Time to live(Integer)>
89
- )
89
+ records: '<String Array of Records>',
90
+ type: '<Record Type (A/CNAME)>',
91
+ ttl: <TTL>
92
+ )
90
93
  ```
91
94
 
92
95
  ## List Record Sets
93
96
 
94
97
  ```ruby
95
- azure_dns_service.record_sets(
98
+ fog_dns_service.record_sets(
96
99
  resource_group: '<Resource Group Name>',
97
100
  zone_name: '<Zone Name>'
98
- ).each do |record_set|
101
+ ).each do |record_set|
99
102
  puts "#{record_set.name}"
100
103
  puts "#{record_set.resource_group}"
101
- end
104
+ end
102
105
  ```
103
106
 
104
107
  ## Retrieve a single Record Set
@@ -106,10 +109,10 @@ Create a new Record Set
106
109
  Get a single record of Record Set
107
110
 
108
111
  ```ruby
109
- record_set = azure_dns_service
110
- .record_sets
111
- .get('<Resource Group Name>', '<Record Set name>', '<Zone Name>', '<Record Type>')
112
- puts "#{record_set.name}"
112
+ record_set = fog_dns_service
113
+ .record_sets
114
+ .get('<Resource Group Name>', '<Record Set Name>', '<Zone Name>', '<Record Type>')
115
+ puts "#{record_set.name}"
113
116
  ```
114
117
 
115
118
  ## Update TTL
@@ -117,9 +120,7 @@ Get a single record of Record Set
117
120
  Get an object of record set and then update TTL
118
121
 
119
122
  ```ruby
120
- record_set.update_ttl(
121
- ttl: '<Time to live(Integer)>,
122
- )
123
+ record_set.update_ttl(ttl: <Time to live (Integer)>)
123
124
  ```
124
125
 
125
126
  ## Add/Remove Record set in Existing Record sets
@@ -127,13 +128,13 @@ Get an object of record set and then update TTL
127
128
  Add a record by giving the value of record set in the form of string.
128
129
 
129
130
  ```ruby
130
- record_set.add_a_type_record('<Record>')
131
+ record_set.add_a_type_record('<Record>')
131
132
  ```
132
133
 
133
134
  Remove record from existing records by giving its value in the form of string.
134
135
 
135
136
  ```ruby
136
- record_set.remove_a_type_record('<Record>')
137
+ record_set.remove_a_type_record('<Record>')
137
138
  ```
138
139
 
139
140
  ## Destroy a single Record Set
@@ -141,8 +142,8 @@ Remove record from existing records by giving its value in the form of string.
141
142
  Get Record Set object from the get method(described above) and then destroy that Record Set.
142
143
 
143
144
  ```ruby
144
- record_set.destroy
145
+ record_set.destroy
145
146
  ```
146
147
 
147
148
  ## Support and Feedback
148
- Your feedback is appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.
149
+ Your feedback is appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.
@@ -1,6 +1,6 @@
1
1
  # Key Vault
2
2
 
3
- This document explains how to get started using Azure Key Vault Service with Fog to manage Vault. With this gem you can create/list/delete Vault.
3
+ This document explains how to get started using Azure Key Vault Service with Fog to manage Vault. With this gem you can create, list or delete Vault.
4
4
 
5
5
  ## Usage
6
6
 
@@ -14,18 +14,18 @@ require 'fog/azurerm'
14
14
  Next, create a connection to the Key Vault Service:
15
15
 
16
16
  ```ruby
17
- azure_key_vault_service = Fog::KeyVault::AzureRM.new(
18
- tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
19
- client_id: '<Clientid>', # Client id of Azure Active Directory Application
20
- client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
21
- subscription_id: '<Subscriptionid>' # Subscription id of an Azure Account
17
+ fog_key_vault_service = Fog::KeyVault::AzureRM.new(
18
+ tenant_id: '<Tenant Id>', # Tenant Id of Azure Active Directory Application
19
+ client_id: '<Client Id>', # Client Id of Azure Active Directory Application
20
+ client_secret: '<Client Secret>', # Client Secret of Azure Active Directory Application
21
+ subscription_id: '<Subscription Id>' # Subscription Id of an Azure Account
22
22
  )
23
23
  ```
24
24
 
25
25
  ## Check Vault Existence
26
26
 
27
27
  ```ruby
28
- azure_key_vault_service.vaults.check_vault_exists(<Resource Group name>, <Vault Name>)
28
+ fog_key_vault_service.vaults.check_vault_exists('<Resource Group Name>', '<Vault Name>')
29
29
  ```
30
30
 
31
31
  ## Create Vault
@@ -33,25 +33,28 @@ Next, create a connection to the Key Vault Service:
33
33
  Create a new Vault.
34
34
 
35
35
  ```ruby
36
- vault = azure_key_vault_service.vaults.create(
36
+ vault = fog_key_vault_service.vaults.create(
37
37
  name: '<Vault Name>',
38
- location: 'eastus',
39
- resource_group: '<Resource Group name>',
40
- tenant_id: <Tenantid>,
41
- sku_family: 'A',
42
- sku_name: 'standard',
38
+ location: '<Location>',
39
+ resource_group: '<Resource Group Name>',
40
+ tenant_id: '<Tenant Id>',
41
+ sku_family: '<SKU Family>',
42
+ sku_name: '<SKU Name>',
43
43
  access_policies: [
44
44
  {
45
- tenant_id: <Tenantid>,
46
- object_id: <Tenantid>,
45
+ tenant_id: '<Tenant Id>',
46
+ object_id: '<Tenant Id>',
47
47
  permissions: {
48
- keys: ['all'],
49
- secrets: ['all']
48
+ keys: ['<Key Permissions>'],
49
+ secrets: ['<Secret Permissions>']
50
50
  }
51
51
  }
52
- ]
52
+ ],
53
+ tags: {
54
+ key: 'value' # [Optional]
55
+ }
53
56
 
54
- )
57
+ )
55
58
  ```
56
59
 
57
60
  ## List Vaults
@@ -59,10 +62,10 @@ Create a new Vault.
59
62
  List all vaults in a resource group
60
63
 
61
64
  ```ruby
62
- vaults = azure_key_vault_service.vaults(resource_group: '<Resource Group Name>')
63
- vaults.each do |vault|
64
- puts "#{vault.name}"
65
- end
65
+ vaults = fog_key_vault_service.vaults(resource_group: '<Resource Group Name>')
66
+ vaults.each do |vault|
67
+ puts "#{vault.name}"
68
+ end
66
69
  ```
67
70
 
68
71
  ## Retrieve a single Vault
@@ -70,10 +73,10 @@ List all vaults in a resource group
70
73
  Get a single record of Vault
71
74
 
72
75
  ```ruby
73
- vault = azure_key_vault_service
74
- .vaults
75
- .get('<Resource Group name>', '<Vault Name>')
76
- puts "#{vault.name}"
76
+ vault = fog_key_vault_service
77
+ .vaults
78
+ .get('<Resource Group Name>', '<Vault Name>')
79
+ puts "#{vault.name}"
77
80
  ```
78
81
 
79
82
  ## Destroy a single Vault
@@ -81,7 +84,7 @@ Get a single record of Vault
81
84
  Get a vault object from the get method and then destroy that vault.
82
85
 
83
86
  ```ruby
84
- vault.destroy
87
+ vault.destroy
85
88
  ```
86
89
 
87
90
  ## Support and Feedback
@@ -1,6 +1,6 @@
1
1
  # Network
2
2
 
3
- This document explains how to get started using Azure Network Service with Fog. With this gem you can create/update/list/delete virtual networks, subnets, public IPs and network interfaces.
3
+ This document explains how to get started using Azure Network Service with Fog. With this gem you can create, update, list or delete virtual networks, subnets, public IPs and network interfaces.
4
4
 
5
5
  ## Usage
6
6
 
@@ -14,42 +14,44 @@ require 'fog/azurerm'
14
14
  Next, create a connection to the Network Service:
15
15
 
16
16
  ```ruby
17
- azure_network_service = Fog::Network::AzureRM.new(
18
- tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
19
- client_id: '<Clientid>', # Client id of Azure Active Directory Application
20
- client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
21
- subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
22
- :environment => '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
17
+ fog_network_service = Fog::Network::AzureRM.new(
18
+ tenant_id: '<Tenant Id>', # Tenant Id of Azure Active Directory Application
19
+ client_id: '<Client Id>', # Client Id of Azure Active Directory Application
20
+ client_secret: '<Client Secret>', # Client Secret of Azure Active Directory Application
21
+ subscription_id: '<Subscription Id>', # Subscription Id of an Azure Account
22
+ environment: '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
23
23
  )
24
24
  ```
25
25
 
26
26
  ## Check Virtual Network Existence
27
27
 
28
28
  ```ruby
29
- azure_network_service.virtual_networks.check_virtual_network_exists(<Resource Group name>, <Virtual Network Name>)
29
+ fog_network_service.virtual_networks.check_virtual_network_exists('<Resource Group Name>', '<Virtual Network Name>')
30
30
  ```
31
31
 
32
32
  ## Create Virtual Network
33
33
 
34
34
  Create a new virtual network
35
35
 
36
- Optional parameters for Virtual Network: subnets, dns_servers & address_prefixes
37
- Optional parameters for Subnet: network_security_group_id, route_table_id & address_prefix
36
+ **Optional parameters for Virtual Network**: subnets, dns_servers & address_prefixes
37
+
38
+ **Optional parameters for Subnet**: network_security_group_id, route_table_id & address_prefix
38
39
 
39
40
  ```ruby
40
- vnet = azure_network_service.virtual_networks.create(
41
+ vnet = fog_network_service.virtual_networks.create(
41
42
  name: '<Virtual Network Name>',
42
- location: 'westus',
43
+ location: '<Location>',
43
44
  resource_group: '<Resource Group Name>',
44
45
  subnets: [{
45
46
  name: '<Subnet Name>',
46
- address_prefix: '10.1.0.0/24',
47
- network_security_group_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/networkSecurityGroups/<Network Security Group Name>',
48
- route_table_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/routeTables/<Route Table Name>'
47
+ address_prefix: '<Subnet IP Range>',
48
+ network_security_group_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/networkSecurityGroups/<Network Security Group Name>',
49
+ route_table_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/routeTables/<Route Table Name>'
49
50
  }],
50
- dns_servers: ['10.1.0.0','10.2.0.0'],
51
- address_prefixes: ['10.1.0.0/16','10.2.0.0/16']
52
- )
51
+ dns_servers: ['<IP Address>','<IP Address>'],
52
+ address_prefixes: ['<IP Address Range>','<IP Address Range>'],
53
+ tags: { key: 'value' } # [Optional]
54
+ )
53
55
  ```
54
56
 
55
57
  ## List Virtual Networks in Resource Group
@@ -57,11 +59,11 @@ Optional parameters for Subnet: network_security_group_id, route_table_id & addr
57
59
  List all virtual networks in a resource group
58
60
 
59
61
  ```ruby
60
- vnets = azure_network_service.virtual_networks(resource_group: '<Resource Group Name>')
61
- vnets.each do |vnet|
62
+ vnets = fog_network_service.virtual_networks(resource_group: '<Resource Group Name>')
63
+ vnets.each do |vnet|
62
64
  puts "#{vnet.name}"
63
65
  puts "#{vnet.location}"
64
- end
66
+ end
65
67
  ```
66
68
 
67
69
  ## List Virtual Networks in Subscription
@@ -69,11 +71,11 @@ List all virtual networks in a resource group
69
71
  List all virtual networks in a subscription
70
72
 
71
73
  ```ruby
72
- vnets = azure_network_service.virtual_networks
73
- vnets.each do |vnet|
74
+ vnets = fog_network_service.virtual_networks
75
+ vnets.each do |vnet|
74
76
  puts "#{vnet.name}"
75
77
  puts "#{vnet.location}"
76
- end
78
+ end
77
79
  ```
78
80
 
79
81
  ## Retrieve a single Virtual Network
@@ -81,8 +83,8 @@ List all virtual networks in a subscription
81
83
  Get a single record of virtual network
82
84
 
83
85
  ```ruby
84
- vnet = azure_network_service.virtual_networks.get('<Resource Group Name>', '<Virtual Network name>')
85
- puts "#{vnet.name}"
86
+ vnet = fog_network_service.virtual_networks.get('<Resource Group Name>', '<Virtual Network Name>')
87
+ puts "#{vnet.name}"
86
88
  ```
87
89
 
88
90
  ## Add/Remove DNS Servers to/from Virtual Network
@@ -90,8 +92,8 @@ Get a single record of virtual network
90
92
  Add/Remove DNS Servers to/from Virtual Network
91
93
 
92
94
  ```ruby
93
- vnet.add_dns_servers(['10.3.0.0','10.4.0.0'])
94
- vnet.remove_dns_servers(['10.3.0.0','10.4.0.0'])
95
+ vnet.add_dns_servers(['<IP Address>','<IP Address>'])
96
+ vnet.remove_dns_servers(['10.3.0.0','10.4.0.0'])
95
97
  ```
96
98
 
97
99
  ## Add/Remove Address Prefixes to/from Virtual Network
@@ -99,8 +101,8 @@ Add/Remove DNS Servers to/from Virtual Network
99
101
  Add/Remove Address Prefixes to/from Virtual Network
100
102
 
101
103
  ```ruby
102
- vnet.add_address_prefixes(['10.2.0.0/16', '10.3.0.0/16'])
103
- vnet.remove_address_prefixes(['10.2.0.0/16'])
104
+ vnet.add_address_prefixes(['<IP Address Range>', '<IP Address Range>'])
105
+ vnet.remove_address_prefixes(['<IP Address Range>'])
104
106
  ```
105
107
 
106
108
  ## Add/Remove Subnets to/from Virtual Network
@@ -108,12 +110,12 @@ Add/Remove Address Prefixes to/from Virtual Network
108
110
  Add/Remove Subnets to/from Virtual Network
109
111
 
110
112
  ```ruby
111
- vnet.add_subnets([{
112
- name: 'test-subnet',
113
- address_prefix: '10.3.0.0/24'
114
- }])
113
+ vnet.add_subnets([{
114
+ name: '<Subnet Name>',
115
+ address_prefix: '<Subnet Range>'
116
+ }])
115
117
 
116
- vnet.remove_subnets(['test-subnet'])
118
+ vnet.remove_subnets(['<Subnet Name>'])
117
119
  ```
118
120
 
119
121
  ## Update Virtual Network
@@ -121,13 +123,13 @@ Add/Remove Subnets to/from Virtual Network
121
123
  Update Virtual Network
122
124
 
123
125
  ```ruby
124
- vnet.update({
126
+ vnet.update({
125
127
  subnets:[{
126
- name: 'fog-subnet',
127
- address_prefix: '10.3.0.0/16'
128
+ name: '<Subnet Name>',
129
+ address_prefix: '<Subnet Range>'
128
130
  }],
129
- dns_servers: ['10.3.0.0','10.4.0.0']
130
- })
131
+ dns_servers: ['<IP Address>','<IP Address>']
132
+ })
131
133
  ```
132
134
 
133
135
  ## Destroy a single virtual network
@@ -135,13 +137,13 @@ Update Virtual Network
135
137
  Get virtual network object from the get method and then destroy that virtual network.
136
138
 
137
139
  ```ruby
138
- vnet.destroy
140
+ vnet.destroy
139
141
  ```
140
142
 
141
143
  ## Check Subnet Existence
142
144
 
143
145
  ```ruby
144
- azure_network_service.subnets.check_subnet_exists(<Resource Group name>, <Virtual Network Name>, <Subnet Name>)
146
+ fog_network_service.subnets.check_subnet_exists('<Resource Group Name>', '<Virtual Network Name>', '<Subnet Name>')
145
147
  ```
146
148
 
147
149
  ## Create Subnet
@@ -151,14 +153,14 @@ Create a new Subnet
151
153
  Optional parameters: network_security_group_id, route_table_id & address_prefix
152
154
 
153
155
  ```ruby
154
- subnet = azure_network_service.subnets.create(
156
+ subnet = fog_network_service.subnets.create(
155
157
  name: '<Subnet Name>',
156
158
  resource_group: '<Resource Group Name>',
157
159
  virtual_network_name: '<Virtual Network Name>',
158
- address_prefix: '10.0.0.0/24',
160
+ address_prefix: '<Subnet Range>',
159
161
  network_security_group_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/networkSecurityGroups/<Network Security Group Name>',
160
162
  route_table_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/routeTables/<Route Table Name>'
161
- )
163
+ )
162
164
  ```
163
165
 
164
166
  ## List Subnets
@@ -166,10 +168,10 @@ Optional parameters: network_security_group_id, route_table_id & address_prefix
166
168
  List subnets in a resource group and a virtual network
167
169
 
168
170
  ```ruby
169
- subnets = azure_network_service.subnets(resource_group: '<Resource Group name>', virtual_network_name: '<Virtual Network name>')
170
- subnets.each do |subnet|
171
+ subnets = fog_network_service.subnets(resource_group: '<Resource Group Name>', virtual_network_name: '<Virtual Network Name>')
172
+ subnets.each do |subnet|
171
173
  puts "#{subnet.name}"
172
- end
174
+ end
173
175
  ```
174
176
 
175
177
  ## Retrieve a single Subnet
@@ -177,10 +179,10 @@ List subnets in a resource group and a virtual network
177
179
  Get a single record of Subnet
178
180
 
179
181
  ```ruby
180
- subnet = azure_network_service
181
- .subnets
182
- .get('<Resource Group name>', '<Virtual Network name>', '<Subnet name>')
183
- puts "#{subnet.name}"
182
+ subnet = fog_network_service
183
+ .subnets
184
+ .get('<Resource Group Name>', '<Virtual Network Name>', '<Subnet Name>')
185
+ puts "#{subnet.name}"
184
186
  ```
185
187
 
186
188
  ## Attach Network Security Group to Subnet
@@ -188,8 +190,8 @@ Get a single record of Subnet
188
190
  Attach Network Security Group to Subnet
189
191
 
190
192
  ```ruby
191
- subnet = azure_network_service.attach_network_security_group('/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/networkSecurityGroups/<Network Security Group Name>')
192
- puts "#{subnet.network_security_group_id}"
193
+ subnet = fog_network_service.attach_network_security_group('/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/networkSecurityGroups/<Network Security Group Name>')
194
+ puts "#{subnet.network_security_group_id}"
193
195
  ```
194
196
 
195
197
  ## Detach Network Security Group from Subnet
@@ -197,8 +199,8 @@ Attach Network Security Group to Subnet
197
199
  Detach Network Security Group from Subnet
198
200
 
199
201
  ```ruby
200
- subnet = azure_network_service.detach_network_security_group
201
- puts "#{subnet.network_security_group_id}"
202
+ subnet = fog_network_service.detach_network_security_group
203
+ puts "#{subnet.network_security_group_id}"
202
204
  ```
203
205
 
204
206
  ## Attach Route Table to Subnet
@@ -206,8 +208,8 @@ Detach Network Security Group from Subnet
206
208
  Attach Route Table to Subnet
207
209
 
208
210
  ```ruby
209
- subnet = azure_network_service.attach_route_table('/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/routeTables/<Route Table Name>')
210
- puts "#{subnet.route_table_id}"
211
+ subnet = fog_network_service.attach_route_table('/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/routeTables/<Route Table Name>')
212
+ puts "#{subnet.route_table_id}"
211
213
  ```
212
214
 
213
215
  ## Detach Route Table from Subnet
@@ -215,8 +217,8 @@ Attach Route Table to Subnet
215
217
  Detach Route Table from Subnet
216
218
 
217
219
  ```ruby
218
- subnet = azure_network_service.detach_route_table
219
- puts "#{subnet.route_table_id}"
220
+ subnet = fog_network_service.detach_route_table
221
+ puts "#{subnet.route_table_id}"
220
222
  ```
221
223
 
222
224
  ## List Number of Available IP Addresses in Subnet
@@ -224,7 +226,7 @@ Detach Route Table from Subnet
224
226
  The parameter is a boolean which checks if the Virtual Network the Subnet belongs to is attached to an Express Route Circuit or not
225
227
 
226
228
  ```ruby
227
- puts "#{subnet.get_available_ipaddresses_count(false)}"
229
+ puts "#{subnet.get_available_ipaddresses_count(<True/False>)}"
228
230
  ```
229
231
 
230
232
  ## Destroy a single Subnet
@@ -232,13 +234,13 @@ The parameter is a boolean which checks if the Virtual Network the Subnet belong
232
234
  Get a subnet object from the get method and then destroy that subnet.
233
235
 
234
236
  ```ruby
235
- subnet.destroy
237
+ subnet.destroy
236
238
  ```
237
239
 
238
240
  ## Check Network Interface Card Existence
239
241
 
240
242
  ```ruby
241
- azure_network_service.network_interfaces.check_network_interface_exists(<Resource Group name>, <Network Interface name>)
243
+ fog_network_service.network_interfaces.check_network_interface_exists('<Resource Group Name>', '<Network Interface Name>')
242
244
  ```
243
245
 
244
246
  ## Create Network Interface Card
@@ -246,15 +248,16 @@ Get a subnet object from the get method and then destroy that subnet.
246
248
  Create a new network interface. Skip public_ip_address_id parameter to create network interface without PublicIP. The parameter, private_ip_allocation_method can be Dynamic or Static.
247
249
 
248
250
  ```ruby
249
- nic = azure_network_service.network_interfaces.create(
250
- name: '<Network Interface name>',
251
- resource_group: '<Resource Group name>',
252
- location: 'eastus',
253
- subnet_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network name>/subnets/<Subnet name>',
254
- public_ip_address_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/publicIPAddresses/<Public IP name>',
255
- ip_configuration_name: '<Ip Configuration Name>',
256
- private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic
257
- )
251
+ nic = fog_network_service.network_interfaces.create(
252
+ name: '<Network Interface Name>',
253
+ resource_group: '<Resource Group Name>',
254
+ location: '<Location>',
255
+ subnet_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network Name>/subnets/<Subnet Name>',
256
+ public_ip_address_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Name>',
257
+ ip_configuration_name: '<IP Configuration Name>',
258
+ private_ip_allocation_method: '<IP Allocation Method Name>',
259
+ tags: { key: 'value' } # [Optional]
260
+ )
258
261
  ```
259
262
 
260
263
  ## List Network Interface Cards
@@ -262,10 +265,10 @@ Create a new network interface. Skip public_ip_address_id parameter to create ne
262
265
  List network interfaces in a resource group
263
266
 
264
267
  ```ruby
265
- nics = azure_network_service.network_interfaces(resource_group: '<Resource Group name>')
266
- nics.each do |nic|
268
+ nics = fog_network_service.network_interfaces(resource_group: '<Resource Group Name>')
269
+ nics.each do |nic|
267
270
  puts "#{nic.name}"
268
- end
271
+ end
269
272
  ```
270
273
 
271
274
  ## Retrieve a single Network Interface Card
@@ -273,10 +276,10 @@ List network interfaces in a resource group
273
276
  Get a single record of Network Interface
274
277
 
275
278
  ```ruby
276
- nic = azure_network_service
279
+ nic = fog_network_service
277
280
  .network_interfaces
278
- .get('<Resource Group name>', '<Network Interface name>')
279
- puts "#{nic.name}"
281
+ .get('<Resource Group Name>', '<Network Interface Name>')
282
+ puts "#{nic.name}"
280
283
  ```
281
284
 
282
285
  ## Update Network Interface Card
@@ -284,29 +287,27 @@ Get a single record of Network Interface
284
287
  You can update network interface by passing only updated attributes, in the form of hash.
285
288
  For example,
286
289
  ```ruby
287
- nic.update(private_ip_allocation_method: 'Static', private_ip_address: '10.0.0.0')
290
+ nic.update(private_ip_allocation_method: '<IP Allocation Method Name>', private_ip_address: '<Private IP Address>')
288
291
  ```
289
292
  ## Attach/Detach resources to Network Interface Card
290
293
 
291
294
  Attach Subnet, Public-IP or Network-Security-Group as following
292
295
  ```ruby
293
- subnet_id = "<NEW-SUBNET-ID>"
294
- nic.attach_subnet(subnet_id)
296
+ subnet_id = '<Subnet Id>'
297
+ nic.attach_subnet(subnet_id)
295
298
 
296
- public_ip_id = "<NEW-PUBLIC_IP-ID>"
297
- nic.attach_public_ip(public_ip_id)
299
+ public_ip_id = '<Public IP Id>'
300
+ nic.attach_public_ip(public_ip_id)
298
301
 
299
- nsg_id = "<NEW-NSG-ID>"
300
- nic.attach_network_security_group(nsg_id)
301
-
302
+ nsg_id = '<NSG Id>'
303
+ nic.attach_network_security_group(nsg_id)
302
304
  ```
303
305
  Detach Public-IP or Network-Security-Group as following
304
306
 
305
307
  ```ruby
306
- nic.detach_public_ip
307
-
308
- nic.detach_network_security_group
308
+ nic.detach_public_ip
309
309
 
310
+ nic.detach_network_security_group
310
311
  ```
311
312
  `Note: You can't detach subnet from Network Interface.`
312
313
 
@@ -315,13 +316,13 @@ Detach Public-IP or Network-Security-Group as following
315
316
  Get a network interface object from the get method and then destroy that network interface.
316
317
 
317
318
  ```ruby
318
- nic.destroy
319
+ nic.destroy
319
320
  ```
320
321
 
321
322
  ## Check Public IP Existence
322
323
 
323
324
  ```ruby
324
- azure_network_service.public_ips.check_public_ip_exists(<Resource Group name>, <Public IP name>>)
325
+ fog_network_service.public_ips.check_public_ip_exists('<Resource Group Name>', '<Public IP Name>')
325
326
  ```
326
327
 
327
328
  ## Create Public IP
@@ -329,12 +330,13 @@ Get a network interface object from the get method and then destroy that network
329
330
  Create a new public IP. The parameter, type can be Dynamic or Static.
330
331
 
331
332
  ```ruby
332
- pubip = azure_network_service.public_ips.create(
333
+ public_ip = fog_network_service.public_ips.create(
333
334
  name: '<Public IP name>',
334
- resource_group: '<Resource Group name>',
335
- location: 'westus',
336
- public_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Static
337
- )
335
+ resource_group: '<Resource Group Name>',
336
+ location: '<Location>',
337
+ public_ip_allocation_method: '<IP Allocation Method Name>',
338
+ tags: { key: 'value' } # [Optional]
339
+ )
338
340
  ```
339
341
 
340
342
  ## Check for Public IP
@@ -342,7 +344,7 @@ Create a new public IP. The parameter, type can be Dynamic or Static.
342
344
  Checks if the Public IP already exists or not.
343
345
 
344
346
  ```ruby
345
- azure_network_service.public_ips.check_if_exists('<Public IP name>', '<Resource Group name>')
347
+ fog_network_service.public_ips.check_if_exists('<Public IP Name>', '<Resource Group Name>')
346
348
  ```
347
349
 
348
350
  ## List Public IPs
@@ -350,47 +352,47 @@ Checks if the Public IP already exists or not.
350
352
  List network interfaces in a resource group
351
353
 
352
354
  ```ruby
353
- pubips = azure_network_service.public_ips(resource_group: '<Resource Group name>')
354
- pubips.each do |pubip|
355
- puts "#{pubip.name}"
356
- end
355
+ public_ips = fog_network_service.public_ips(resource_group: '<Resource Group Name>')
356
+ public_ips.each do |pubip|
357
+ puts "#{public_ip.name}"
358
+ end
357
359
  ```
358
360
 
359
- ## Retrieve a single Public Ip
361
+ ## Retrieve a single Public IP
360
362
 
361
- Get a single record of Public Ip
363
+ Get a single record of Public IP
362
364
 
363
365
  ```ruby
364
- pubip = azure_network_service
366
+ public_ip = fog_network_service
365
367
  .public_ips
366
- .get('<Resource Group name>', '<Public IP name>')
367
- puts "#{pubip.name}"
368
+ .get('<Resource Group Name>', '<Public IP Name>')
369
+ puts "#{public_ip.name}"
368
370
  ```
369
371
 
370
- ## Update Public Ip
372
+ ## Update Public IP
371
373
 
372
374
  Get a Public IP object from the get method and then update that public IP. You can update the Public IP by passing the modifiable attributes in the form of a hash.
373
375
 
374
376
  ```ruby
375
- pubip.update(
376
- public_ip_allocation_method: '<IP Allocation Method>',
377
- idle_timeout_in_minutes: '<Idle Timeout In Minutes>',
377
+ public_ip.update(
378
+ public_ip_allocation_method: '<IP Allocation Method Name>',
379
+ idle_timeout_in_minutes: '<Idle Timeout in Minutes>',
378
380
  domain_name_label: '<Domain Name Label>'
379
- )
381
+ )
380
382
  ```
381
383
 
382
- ## Destroy a single Public Ip
384
+ ## Destroy a single Public IP
383
385
 
384
386
  Get a Public IP object from the get method and then destroy that public IP.
385
387
 
386
388
  ```ruby
387
- pubip.destroy
389
+ public_ip.destroy
388
390
  ```
389
391
 
390
392
  ## Check Network Security Group Existence
391
393
 
392
394
  ```ruby
393
- azure_network_service.network_security_groups.check_net_sec_group_exists(<Resource Group name>, <Network Security Group name>)
395
+ fog_network_service.network_security_groups.check_net_sec_group_exists('<Resource Group Name>', '<Network Security Group Name>')
394
396
  ```
395
397
 
396
398
  ## Create Network Security Group
@@ -398,22 +400,23 @@ Get a Public IP object from the get method and then destroy that public IP.
398
400
  Network security group requires a resource group to create.
399
401
 
400
402
  ```ruby
401
- azure_network_service.network_security_groups.create(
402
- name: '<Network Security Group name>',
403
- resource_group: '<Resource Group name>',
404
- location: 'eastus',
403
+ fog_network_service.network_security_groups.create(
404
+ name: '<Network Security Group Name>',
405
+ resource_group: '<Resource Group Name>',
406
+ location: '<Location>',
405
407
  security_rules: [{
406
- name: '<Security Rule name>',
407
- protocol: Fog::ARM::Network::Models::SecurityRuleProtocol::Tcp,
408
- source_port_range: '22',
409
- destination_port_range: '22',
410
- source_address_prefix: '0.0.0.0/0',
411
- destination_address_prefix: '0.0.0.0/0',
412
- access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
413
- priority: '100',
414
- direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
415
- }]
416
- )
408
+ name: '<Security Rule Name>',
409
+ protocol: '<Protocol Name>',
410
+ source_port_range: '<Source Port Range>',
411
+ destination_port_range: '<Destination Port Range>',
412
+ source_address_prefix: '<Source IP Address Range>',
413
+ destination_address_prefix: 'Destination IP Address Range',
414
+ access: '<Security Rule Access Type>',
415
+ priority: '<Priority Number>',
416
+ direction: '<Security Rule Direction>'
417
+ }],
418
+ tags: { key: 'value' } # [Optional]
419
+ )
417
420
  ```
418
421
 
419
422
  ## List Network Security Groups
@@ -421,10 +424,10 @@ Network security group requires a resource group to create.
421
424
  List all the network security groups in a resource group
422
425
 
423
426
  ```ruby
424
- network_security_groups = azure_network_service.network_security_groups(resource_group: '<Resource Group name>')
425
- network_security_groups.each do |nsg|
427
+ network_security_groups = fog_network_service.network_security_groups(resource_group: '<Resource Group Name>')
428
+ network_security_groups.each do |nsg|
426
429
  puts "#{nsg.name}"
427
- end
430
+ end
428
431
  ```
429
432
 
430
433
  ## Retrieve a single Network Security Group
@@ -432,10 +435,10 @@ List all the network security groups in a resource group
432
435
  Get a single record of Network Security Group
433
436
 
434
437
  ```ruby
435
- nsg = azure_network_service
438
+ nsg = fog_network_service
436
439
  .network_security_groups
437
- .get('<Resource Group Name>','<Network Security Group name>')
438
- puts "#{nsg.name}"
440
+ .get('<Resource Group Name>','<Network Security Group Name>')
441
+ puts "#{nsg.name}"
439
442
  ```
440
443
 
441
444
  ## Update Security Rules
@@ -443,22 +446,22 @@ Get a single record of Network Security Group
443
446
  You can update security rules by passing the modified attributes in the form of hash.
444
447
 
445
448
  ```ruby
446
- nsg.update_security_rules(
449
+ nsg.update_security_rules(
447
450
  security_rules:
448
- [
451
+ [
449
452
  {
450
- name: '<Security Rule name>',
451
- protocol: Fog::ARM::Network::Models::SecurityRuleProtocol::Tcp,
452
- source_port_range: '*',
453
- destination_port_range: '*',
454
- source_address_prefix: '0.0.0.0/0',
455
- destination_address_prefix: '0.0.0.0/0',
456
- access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
457
- priority: '100',
458
- direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
453
+ name: '<Security Rule Name>',
454
+ protocol: '<Security Rule Protocol>',
455
+ source_port_range: '<Port Range>',
456
+ destination_port_range: '<Port Range>',
457
+ source_address_prefix: '<Source IP Address Range>',
458
+ destination_address_prefix: '<Destination IP Address Range>',
459
+ access: '<Security Rule Access Type>',
460
+ priority: '<Priority Number>',
461
+ direction: '<Security Rule Direction>'
459
462
  }
460
- ]
461
- )
463
+ ]
464
+ )
462
465
  ```
463
466
  `Note: You can't modify Name of a security rule.`
464
467
 
@@ -467,27 +470,27 @@ You can update security rules by passing the modified attributes in the form of
467
470
  Add array of security rules in the form of hash.
468
471
 
469
472
  ```ruby
470
- nsg.add_security_rules(
471
- [
473
+ nsg.add_security_rules(
474
+ [
472
475
  {
473
- name: '<Security Rule name>',
474
- protocol: Fog::ARM::Network::Models::SecurityRuleProtocol::Tcp,
475
- source_port_range: '3389',
476
- destination_port_range: '3389',
477
- source_address_prefix: '0.0.0.0/0',
478
- destination_address_prefix: '0.0.0.0/0',
479
- access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
480
- priority: '102',
481
- direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
476
+ name: '<Security Rule Name>',
477
+ protocol: '<Security Rule Protocol>',
478
+ source_port_range: '<Port Range>',
479
+ destination_port_range: '<Port Range>',
480
+ source_address_prefix: '<Source IP Address Range>',
481
+ destination_address_prefix: '<Destination IP Address Range>',
482
+ access: '<Security Rule Access Type>',
483
+ priority: '<Priority Number>',
484
+ direction: '<Security Rule Direction>'
482
485
  }
483
- ]
484
- )
486
+ ]
487
+ )
485
488
  ```
486
489
 
487
490
  Delete security rule by providing its name.
488
491
 
489
492
  ```ruby
490
- nsg.remove_security_rule('<Security Rule name>')
493
+ nsg.remove_security_rule('<Security Rule Name>')
491
494
  ```
492
495
 
493
496
  ## Destroy a Network Security Group
@@ -495,13 +498,13 @@ Delete security rule by providing its name.
495
498
  Get a network security group object from the get method and then destroy that network security group.
496
499
 
497
500
  ```ruby
498
- nsg.destroy
501
+ nsg.destroy
499
502
  ```
500
503
 
501
504
  ## Check Network Security Rule Existence
502
505
 
503
506
  ```ruby
504
- azure_network_service.network_security_rules.check_net_sec_rule_exists(<Resource Group name>, <Network Security Group name>, <Security Rule name>)
507
+ fog_network_service.network_security_rules.check_net_sec_rule_exists('<Resource Group Name>', '<Network Security Group Name>', '<Security Rule Name>')
505
508
  ```
506
509
 
507
510
  ## Create Network Security Rule
@@ -509,19 +512,19 @@ Get a network security group object from the get method and then destroy that ne
509
512
  Network security rule requires a resource group and network security group to create.
510
513
 
511
514
  ```ruby
512
- azure_network_service.network_security_rules.create(
513
- name: '<Security Rule name>',
514
- resource_group: '<Resource Group name>',
515
- protocol: Fog::ARM::Network::Models::SecurityRuleProtocol::Tcp,
516
- network_security_group_name: '<Network Security Group name>',
517
- source_port_range: '22',
518
- destination_port_range: '22',
519
- source_address_prefix: '0.0.0.0/0',
520
- destination_address_prefix: '0.0.0.0/0',
521
- access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
522
- priority: '100',
523
- direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
524
- )
515
+ fog_network_service.network_security_rules.create(
516
+ name: '<Security Rule Name>',
517
+ resource_group: '<Resource Group Name>',
518
+ protocol: '<Security Rule Protocol>',
519
+ network_security_group_name: '<Network Security Group Name>',
520
+ source_port_range: '<Source Port Range>',
521
+ destination_port_range: '<Destination Port Range>',
522
+ source_address_prefix: 'Source IP Address Range',
523
+ destination_address_prefix: 'Destination IP Address Range',
524
+ access: '<Security Rule Access Type>',
525
+ priority: '<Priority Number>',
526
+ direction: '<Security Rule Direction>'
527
+ )
525
528
  ```
526
529
 
527
530
  ## List Network Security Rules
@@ -529,11 +532,10 @@ Network security rule requires a resource group and network security group to cr
529
532
  List all the network security rules in a resource group and network security group
530
533
 
531
534
  ```ruby
532
- network_security_rules = azure_network_service.network_security_rules(resource_group: '<Resource Group name>',
533
- network_security_group_name: '<Network Security Group name>')
534
- network_security_rules.each do |network_security_rule|
535
+ network_security_rules = fog_network_service.network_security_rules(resource_group: '<Resource Group Name>', network_security_group_name: '<Network Security Group Name>')
536
+ network_security_rules.each do |network_security_rule|
535
537
  puts network_security_rule.name
536
- end
538
+ end
537
539
  ```
538
540
 
539
541
  ## Retrieve a single Network Security Rule
@@ -541,10 +543,10 @@ List all the network security rules in a resource group and network security gro
541
543
  Get a single record of Network Security Rule
542
544
 
543
545
  ```ruby
544
- network_security_rule = azure_network_service
546
+ network_security_rule = fog_network_service
545
547
  .network_security_rules
546
- .get(<Resource Group Name>','<Network Security Group name>', '<Security Rule name>')
547
- puts "#{network_security_rule.name}"
548
+ .get('<Resource Group Name>','<Network Security Group Name>', '<Security Rule Name>')
549
+ puts "#{network_security_rule.name}"
548
550
  ```
549
551
 
550
552
  ## Destroy a Network Security Rule
@@ -552,13 +554,13 @@ Get a single record of Network Security Rule
552
554
  Get a network security rule object from the get method and then destroy that network security rule.
553
555
 
554
556
  ```ruby
555
- network_security_rule.destroy
557
+ network_security_rule.destroy
556
558
  ```
557
559
 
558
560
  ## Check External Load Balancer Existence
559
561
 
560
562
  ```ruby
561
- azure_network_service.load_balancers.check_load_balancer_exists(<Resource Group name>, <Load Balancer name>)
563
+ fog_network_service.load_balancers.check_load_balancer_exists('<Resource Group Name>', '<Load Balancer Name>')
562
564
  ```
563
565
 
564
566
  ## Create External Load Balancer
@@ -566,112 +568,113 @@ Get a network security rule object from the get method and then destroy that net
566
568
  Create a new load balancer.
567
569
 
568
570
  ```ruby
569
- lb = azure_network_service.load_balancers.create(
570
- name: '<Load Balancer name>',
571
- resource_group: '<Resource Group name>',
572
- location: 'westus',
573
-
574
- frontend_ip_configurations:
571
+ lb = fog_network_service.load_balancers.create(
572
+ name: '<Load Balancer Name>',
573
+ resource_group: '<Resource Group Name>',
574
+ location: '<Location>',
575
+ frontend_ip_configurations:
575
576
  [
576
577
  {
577
- name: 'fic',
578
- private_ipallocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic,
579
- public_ipaddress_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/publicIPAddresses/<Public-IP-Name>'
578
+ name: '<Frontend IP Config Name>',
579
+ private_ipallocation_method: '<Private IP Allocation Method>',
580
+ public_ipaddress_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Name>'
580
581
  }
581
582
  ],
582
- backend_address_pool_names:
583
+ backend_address_pool_names:
583
584
  [
584
- 'pool1'
585
+ '<Backend Address Pool Name>'
585
586
  ],
586
- load_balancing_rules:
587
+ load_balancing_rules:
587
588
  [
588
589
  {
589
- name: 'lb_rule_1',
590
- frontend_ip_configuration_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load Balancer name>/frontendIPConfigurations/fic',
591
- backend_address_pool_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load Balancer name>/backendAddressPools/pool1',
592
- protocol: 'Tcp',
593
- frontend_port: '80',
594
- backend_port: '8080',
595
- enable_floating_ip: false,
596
- idle_timeout_in_minutes: 4,
597
- load_distribution: "Default"
590
+ name: '<Rule Name>',
591
+ frontend_ip_configuration_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/loadBalancers/<Load Balancer Name>/frontendIPConfigurations/<Frontend IP Config Name>',
592
+ backend_address_pool_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/loadBalancers/<Load Balancer Name>/backendAddressPools/<Backend Address Pool Name>',
593
+ protocol: '<Protocol Name>',
594
+ frontend_port: '<Frontend Port Number>',
595
+ backend_port: '<Backend Port Number>',
596
+ enable_floating_ip: <True/False>,
597
+ idle_timeout_in_minutes: <Timeout in Minutes>,
598
+ load_distribution: '<Load Distribution Value>'
598
599
  }
599
600
  ],
600
- inbound_nat_rules:
601
+ inbound_nat_rules:
601
602
  [
602
603
  {
603
- name: 'RDP-Traffic',
604
- frontend_ip_configuration_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load Balancer name>/frontendIPConfigurations/fic',
605
- protocol: 'Tcp',
606
- frontend_port: 3389,
607
- backend_port: 3389
604
+ name: 'NAT Rule Name',
605
+ frontend_ip_configuration_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/loadBalancers/<Load Balancer name>/frontendIPConfigurations/<Frontend IP Config Name>',
606
+ protocol: '<Protocol Name>',
607
+ frontend_port: '<Frontend Port Number>',
608
+ backend_port: '<Backend Port Number>'
608
609
  }
609
- ]
610
+ ],
611
+ tags: { key: 'value' } # [Optional]
610
612
  )
611
613
  ```
612
614
 
613
615
  ## Create Internal Load Balancer
614
616
 
615
617
  ```ruby
616
-
617
- lb = azure_network_service.load_balancers.create(
618
- name: '<Load Balancer name>',
619
- resource_group: '<Resource Group name>',
620
- location: 'westus',
618
+ lb = fog_network_service.load_balancers.create(
619
+ name: '<Load Balancer Name>',
620
+ resource_group: '<Resource Group Name>',
621
+ location: '<Location>',
621
622
  frontend_ip_configurations:
622
623
  [
623
- {
624
- name: 'LB-Frontend',
625
- private_ipallocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Static,
626
- private_ipaddress: '10.1.2.5',
627
- subnet_id: subnet.id
628
- }
624
+ {
625
+ name: '<Frontend IP Config Name>',
626
+ private_ipallocation_method: '<Private IP Allocation Method>',
627
+ private_ipaddress: 'IP Address',
628
+ subnet_id: '<Subnet Id>'
629
+ }
629
630
  ],
630
631
  backend_address_pool_names:
631
632
  [
632
- 'LB-backend'
633
+ '<Backend Address Pool Name>'
633
634
  ],
634
635
  load_balancing_rules:
635
636
  [
636
- {
637
- name: 'HTTP',
638
- frontend_ip_configuration_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load-Balancer-Name>/frontendIPConfigurations/LB-Frontend",
639
- backend_address_pool_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load-Balancer-Name>/backendAddressPools/LB-backend",
640
- probe_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers<Load-Balancer-Name>lb/probes/HealthProbe",
641
- protocol: 'Tcp',
642
- frontend_port: '80',
643
- backend_port: '80'
644
- }
637
+ {
638
+ name: 'Rule Name',
639
+ frontend_ip_configuration_id: "/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/loadBalancers/<Load Balancer Name>/frontendIPConfigurations/<Frontend IP Config Name>",
640
+ backend_address_pool_id: "/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/loadBalancers/<Load Balancer Name>/backendAddressPools/<Backend Address Pool Name>",
641
+ probe_id: "/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/loadBalancers<Load Balancer Name>lb/probes/<Probe Name>",
642
+ protocol: '<Protocol Name>',
643
+ frontend_port: '<Frontend Port Number>',
644
+ backend_port: '<Backend Port Number>'
645
+ }
645
646
  ],
646
647
  inbound_nat_rules:
647
648
  [
648
- {
649
- name: 'RDP1',
650
- frontend_ip_configuration_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load-Balancer-Name>/frontendIPConfigurations/LB-Frontend",
651
- protocol: 'Tcp',
652
- frontend_port: 3441,
653
- backend_port: 3389
654
- },
655
- {
656
- name: 'RDP2',
657
- frontend_ip_configuration_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load-Balancer-Name>/frontendIPConfigurations/LB-Frontend",
658
- protocol: 'Tcp',
659
- frontend_port: 3442,
660
- backend_port: 3389
661
- }
649
+ {
650
+ name: '<Rule Name>',
651
+ frontend_ip_configuration_id: "/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/loadBalancers/<Load Balancer Name>/frontendIPConfigurations/<Frontend IP Config Name>",
652
+ protocol: '<Protocol Name>',
653
+ frontend_port: '<Frontend Port Number>',
654
+ backend_port: '<Backend Port Number>'
655
+ },
656
+
657
+ {
658
+ name: '<Rule Name>',
659
+ frontend_ip_configuration_id: "/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/loadBalancers/<Load Balancer Name>/frontendIPConfigurations/<Frontend IP Config Name>",
660
+ protocol: '<Protocol Name>',
661
+ frontend_port: '<Frontend Port Number>',
662
+ backend_port: '<Backend Port Number>'
663
+ }
662
664
  ],
663
665
  probes:
664
666
  [
665
667
  {
666
- name: 'HealthProbe',
667
- protocol: 'http',
668
- request_path: 'HealthProbe.aspx',
669
- port: '80',
670
- interval_in_seconds: 15,
671
- number_of_probes: 2
668
+ name: '<Probe Name>',
669
+ protocol: '<Protocol Name>',
670
+ request_path: '<Probe Request Path>',
671
+ port: '<Port Number>',
672
+ interval_in_seconds: <Interval in Seconds>,
673
+ number_of_probes: <Number of Probes>
672
674
  }
673
- ]
674
- )
675
+ ],
676
+ tags: { key: 'value' } # [Optional]
677
+ )
675
678
  ```
676
679
 
677
680
  ## List Load Balancers
@@ -679,10 +682,10 @@ Create a new load balancer.
679
682
  List all load balancers in a resource group
680
683
 
681
684
  ```ruby
682
- lbs = azure_network_service.load_balancers(resource_group: '<Resource Group name>')
683
- lbs.each do |lb|
685
+ lbs = fog_network_service.load_balancers(resource_group: '<Resource Group Name>')
686
+ lbs.each do |lb|
684
687
  puts "#{lb.name}"
685
- end
688
+ end
686
689
  ```
687
690
 
688
691
  ## List Load Balancers in subscription
@@ -690,10 +693,10 @@ List all load balancers in a resource group
690
693
  List all load balancers in a subscription
691
694
 
692
695
  ```ruby
693
- lbs = azure_network_service.load_balancers
694
- lbs.each do |lb|
696
+ lbs = fog_network_service.load_balancers
697
+ lbs.each do |lb|
695
698
  puts "#{lb.name}"
696
- end
699
+ end
697
700
  ```
698
701
 
699
702
  ## Retrieve a single Load Balancer
@@ -701,10 +704,10 @@ List all load balancers in a subscription
701
704
  Get a single record of Load Balancer
702
705
 
703
706
  ```ruby
704
- lb = azure_network_service
707
+ lb = fog_network_service
705
708
  .load_balancers
706
- .get('<Resource Group name>', '<Load Balancer name>')
707
- puts "#{lb.name}"
709
+ .get('<Resource Group Name>', '<Load Balancer Name>')
710
+ puts "#{lb.name}"
708
711
  ```
709
712
 
710
713
  ## Destroy a Load Balancer
@@ -712,13 +715,13 @@ Get a single record of Load Balancer
712
715
  Get a load balancer object from the get method and then destroy that load balancer.
713
716
 
714
717
  ```ruby
715
- lb.destroy
718
+ lb.destroy
716
719
  ```
717
720
 
718
721
  ## Check Virtual Network Gateway Existence
719
722
 
720
723
  ```ruby
721
- azure_network_service.virtual_network_gateways.check_vnet_gateway_exists(<Resource Group name>, <Virtual Network Gateway Name>)
724
+ fog_network_service.virtual_network_gateways.check_vnet_gateway_exists('<Resource Group Name>', '<Virtual Network Gateway Name>')
722
725
  ```
723
726
 
724
727
  ## Create Virtual Network Gateway
@@ -726,50 +729,50 @@ Get a load balancer object from the get method and then destroy that load balanc
726
729
  Create a new Virtual Network Gateway.
727
730
 
728
731
  ```ruby
729
- network_gateway = network.virtual_network_gateways.create(
732
+ network_gateway = network.virtual_network_gateways.create(
730
733
  name: '<Virtual Network Gateway Name>',
731
- location: 'eastus',
732
- tags: {
733
- key1: 'value1',
734
- key2: 'value2'
735
- },
734
+ location: '<Location>',
736
735
  ip_configurations: [
737
736
  {
738
- name: 'default',
739
- private_ipallocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic,
740
- public_ipaddress_id: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Network/publicIPAddresses/{public_ip_name}',
741
- subnet_id: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Network/virtualNetworks/{virtual_network_name}/subnets/{subnet_name}',
742
- private_ipaddress: nil
737
+ name: '<IP Config Name>',
738
+ private_ipallocation_method:'<Private IP Allocation Method>',
739
+ public_ipaddress_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Name>',
740
+ subnet_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network Name>/subnets/<Subnet Name>',
741
+ private_ipaddress: <IP Address Value> # could be 'nil'
743
742
  }
744
743
  ],
745
- resource_group: 'learn_fog',
746
- sku_name: 'Standard',
747
- sku_tier: 'Standard',
748
- sku_capacity: 2,
749
- gateway_type: 'ExpressRoute',
750
- enable_bgp: true,
751
- gateway_size: nil,
752
- asn: 100,
753
- bgp_peering_address: nil,
754
- peer_weight: 3,
755
- vpn_type: 'RouteBased',
744
+ resource_group: '<Resource Group Name>',
745
+ sku_name: '<SKU Name>',
746
+ sku_tier: '<SKU Tier>',
747
+ sku_capacity: <SKU Capacity>,
748
+ gateway_type: '<Gateway Type>',
749
+ enable_bgp: <True/False>,
750
+ gateway_size: <Gateway Size>,
751
+ asn: <ASN Value>,
752
+ bgp_peering_address: <Peering Address>,
753
+ peer_weight: <Peer Weight>,
754
+ vpn_type: '<VPN Type>',
756
755
  vpn_client_address_pool: [],
757
- gateway_default_site: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Network/localNetworkGateways/{local_network_gateway_name}',
756
+ gateway_default_site: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/localNetworkGateways/<Local Network Gateway Name>',
758
757
  default_sites: [],
759
758
  vpn_client_configuration: {
760
- address_pool: ['192.168.0.4', '192.168.0.5'],
759
+ address_pool: ['<IP Address>', '<IP Address>'],
761
760
  root_certificates: [
762
761
  {
763
- name: 'root',
764
- public_cert_data: 'certificate data'
762
+ name: '<Certificate Name>',
763
+ public_cert_data: '<Certificate Data>'
765
764
  }
766
765
  ],
767
766
  revoked_certificates: [
768
767
  {
769
- name: 'revoked',
770
- thumbprint: 'thumb print detail'
768
+ name: '<Certificate Name>',
769
+ thumbprint: '<Thumb Print Detail>'
771
770
  }
772
771
  ]
772
+ },
773
+ tags: { # [Optional]
774
+ key1: 'value1',
775
+ key2: 'value2'
773
776
  }
774
777
  )
775
778
  ```
@@ -779,10 +782,10 @@ Create a new Virtual Network Gateway.
779
782
  List all virtual network gateways in a resource group
780
783
 
781
784
  ```ruby
782
- network_gateways = network.virtual_network_gateways(resource_group: '<Resource Group Name>')
783
- network_gateways.each do |gateway|
785
+ network_gateways = network.virtual_network_gateways(resource_group: '<Resource Group Name>')
786
+ network_gateways.each do |gateway|
784
787
  puts "#{gateway.name}"
785
- end
788
+ end
786
789
  ```
787
790
 
788
791
  ## Retrieve single Virtual Network Gateway
@@ -790,8 +793,8 @@ List all virtual network gateways in a resource group
790
793
  Get single record of Virtual Network Gateway
791
794
 
792
795
  ```ruby
793
- network_gateway = network.virtual_network_gateways.get('<Resource Group Name>', '<Virtual Network Gateway Name>')
794
- puts "#{network_gateway.name}"
796
+ network_gateway = network.virtual_network_gateways.get('<Resource Group Name>', '<Virtual Network Gateway Name>')
797
+ puts "#{network_gateway.name}"
795
798
  ```
796
799
 
797
800
  ## Destroy single Virtual Network Gateway
@@ -799,13 +802,13 @@ Get single record of Virtual Network Gateway
799
802
  Get a virtual network gateway object from the get method and then destroy that virtual network gateway.
800
803
 
801
804
  ```ruby
802
- network_gateway.destroy
805
+ network_gateway.destroy
803
806
  ```
804
807
 
805
808
  ## Check Local Network Gateway Existence
806
809
 
807
810
  ```ruby
808
- azure_network_service.local_network_gateways.check_local_net_gateway_exists(<Resource Group name>, <Local Network Gateway Name>)
811
+ fog_network_service.local_network_gateways.check_local_net_gateway_exists('<Resource Group Name>', '<Local Network Gateway Name>')
809
812
  ```
810
813
 
811
814
  ## Create Local Network Gateway
@@ -813,20 +816,20 @@ Get a virtual network gateway object from the get method and then destroy that v
813
816
  Create a new Local Network Gateway.
814
817
 
815
818
  ```ruby
816
- local_network_gateway = network.local_network_gateways.create(
819
+ local_network_gateway = network.local_network_gateways.create(
817
820
  name: "<Local Network Gateway Name>",
818
- location: "eastus",
819
- tags: {
820
- key1: "value1",
821
- key2: "value2"
822
- },
821
+ location: '<Location>',
823
822
  resource_group: "<Resource Group Name>",
824
- gateway_ip_address: '192.168.1.1',
823
+ gateway_ip_address: '<IP Address>',
825
824
  local_network_address_space_prefixes: [],
826
- asn: 100,
827
- bgp_peering_address: '192.168.1.2',
828
- peer_weight: 3
829
- )
825
+ asn: <ASN Value>,
826
+ bgp_peering_address: '<Peering IP Address>',
827
+ peer_weight: <Peer Weight>,
828
+ tags: { # [Optional]
829
+ key1: 'value1',
830
+ key2: 'value2'
831
+ },
832
+ )
830
833
  ```
831
834
 
832
835
  ## List Local Network Gateways
@@ -834,10 +837,10 @@ Create a new Local Network Gateway.
834
837
  List all local network gateways in a resource group
835
838
 
836
839
  ```ruby
837
- local_network_gateways = network.local_network_gateways(resource_group: '<Resource Group Name>')
838
- local_network_gateways.each do |gateway|
840
+ local_network_gateways = network.local_network_gateways(resource_group: '<Resource Group Name>')
841
+ local_network_gateways.each do |gateway|
839
842
  puts "#{gateway.name}"
840
- end
843
+ end
841
844
  ```
842
845
 
843
846
  ## Retrieve single Local Network Gateway
@@ -845,8 +848,8 @@ List all local network gateways in a resource group
845
848
  Get single record of Local Network Gateway
846
849
 
847
850
  ```ruby
848
- local_network_gateway = network.local_network_gateways.get('<Resource Group Name>', '<Local Network Gateway Name>')
849
- puts "#{local_network_gateway.name}"
851
+ local_network_gateway = network.local_network_gateways.get('<Resource Group Name>', '<Local Network Gateway Name>')
852
+ puts "#{local_network_gateway.name}"
850
853
  ```
851
854
 
852
855
  ## Destroy single Local Network Gateway
@@ -854,10 +857,10 @@ Get single record of Local Network Gateway
854
857
  Get a local network gateway object from the get method and then destroy that local network gateway.
855
858
 
856
859
  ```ruby
857
- local_network_gateway.destroy
860
+ local_network_gateway.destroy
858
861
  ```
859
862
 
860
- ## Express Route
863
+ # Express Route
861
864
 
862
865
  Microsoft Azure ExpressRoute lets you extend your on-premises networks into the Microsoft cloud over a dedicated private connection facilitated by a connectivity provider.
863
866
  For more details about express route [click here](https://azure.microsoft.com/en-us/documentation/articles/expressroute-introduction/).
@@ -869,7 +872,7 @@ The Circuit represents the entity created by customer to register with an expres
869
872
  ## Check Express Route Circuit Existence
870
873
 
871
874
  ```ruby
872
- azure_network_service.express_route_circuits.check_express_route_circuit_exists(<Resource Group name>, <Circuit Name>)
875
+ fog_network_service.express_route_circuits.check_express_route_circuit_exists('<Resource Group Name>', '<Circuit Name>')
873
876
  ```
874
877
 
875
878
  ## Create an Express Route Circuit
@@ -877,31 +880,31 @@ The Circuit represents the entity created by customer to register with an expres
877
880
  Create a new Express Route Circuit.
878
881
 
879
882
  ```ruby
880
- circuit = network.express_route_circuits.create(
881
- "name": "<Circuit Name>",
882
- "location": "eastus",
883
- "resource_group": "<Resource Group Name>",
884
- "tags": {
885
- "key1": 'value1',
886
- "key2": 'value2'
887
- },
888
- "sku_name": "Standard_MeteredData",
889
- "sku_tier": "Standard",
890
- "sku_family": "MeteredData",
891
- "service_provider_name": "Telenor",
892
- "peering_location": "London",
893
- "bandwidth_in_mbps": 100,
894
- "peerings": [
883
+ circuit = network.express_route_circuits.create(
884
+ name: '<Circuit Name>',
885
+ location: '<Location>',
886
+ resource_group: '<Resource Group Name>',
887
+ sku_name: '<SKU Name>',
888
+ sku_tier: '<SKU Tier>',
889
+ sku_family: '<SKU Family>',
890
+ service_provider_name: '<Security Provider Name>',
891
+ peering_location: '<Peering Location Name>',
892
+ bandwidth_in_mbps: <Bandwidth Value>,
893
+ peerings: [
895
894
  {
896
- "name": "AzurePublicPeering",
897
- "peering_type": "AzurePublicPeering",
898
- "peer_asn": 100,
899
- "primary_peer_address_prefix": "192.168.1.0/30",
900
- "secondary_peer_address_prefix": "192.168.2.0/30",
901
- "vlan_id": 200
895
+ name: '<Peering Name>',
896
+ peering_type: '<Peering Type>',
897
+ peer_asn: <ASN Value>,
898
+ primary_peer_address_prefix: '<Primary Peer IP Address Range>',
899
+ secondary_peer_address_prefix: '<Secondary Peer IP Address Range>',
900
+ vlan_id: <VLAN Id>
902
901
  }
903
- ]
904
- )
902
+ ],
903
+ tags: { # [Optional]
904
+ key1: 'value1',
905
+ key2: 'value2'
906
+ }
907
+ )
905
908
  ```
906
909
 
907
910
  ## List Express Route Circuits
@@ -909,10 +912,10 @@ Create a new Express Route Circuit.
909
912
  List all express route circuits in a resource group
910
913
 
911
914
  ```ruby
912
- circuits = network.express_route_circuits(resource_group: '<Resource Group Name>')
913
- circuits.each do |circuit|
915
+ circuits = network.express_route_circuits(resource_group: '<Resource Group Name>')
916
+ circuits.each do |circuit|
914
917
  puts "#{circuit.name}"
915
- end
918
+ end
916
919
  ```
917
920
 
918
921
  ## Retrieve a single Express Route Circuit
@@ -920,8 +923,8 @@ List all express route circuits in a resource group
920
923
  Get a single record of Express Route Circuit
921
924
 
922
925
  ```ruby
923
- circuit = network.express_route_circuits.get("<Resource Group Name>", "<Circuit Name>")
924
- puts "#{circuit.name}"
926
+ circuit = network.express_route_circuits.get('<Resource Group Name>', '<Circuit Name>')
927
+ puts "#{circuit.name}"
925
928
  ```
926
929
 
927
930
  ## Destroy a single Express Route Circuit
@@ -929,7 +932,7 @@ Get a single record of Express Route Circuit
929
932
  Get an express route circuit object from the get method and then destroy that express route circuit.
930
933
 
931
934
  ```ruby
932
- circuit.destroy
935
+ circuit.destroy
933
936
  ```
934
937
  # Express Route Authorization
935
938
 
@@ -938,7 +941,7 @@ Authorization is part of Express Route circuit.
938
941
  ## Check Express Route Circuit Authorization Existence
939
942
 
940
943
  ```ruby
941
- azure_network_service.express_route_circuit_authorizations.check_express_route_cir_auth_exists(<Resource Group name>, <Circuit Name>, <Authorization-Name>)
944
+ fog_network_service.express_route_circuit_authorizations.check_express_route_cir_auth_exists('<Resource Group Name>', '<Circuit Name>', '<Authorization Name>')
942
945
  ```
943
946
 
944
947
  ## Create an Express Route Circuit Authorization
@@ -946,13 +949,13 @@ Authorization is part of Express Route circuit.
946
949
  Create a new Express Route Circuit Authorization. Parameter 'authorization_status' can be 'Available' or 'InUse'.
947
950
 
948
951
  ```ruby
949
- authorization = network.express_route_circuit_authorizations.create(
950
- "resource_group": "<Resourse Group Name>",
951
- "name": "<Resource-Unique-Name>",
952
- "circuit_name": "<Circuit Name>",
953
- "authorization_status": "Available",
954
- "authorization_name": "<Authorization-Name>",
955
- )
952
+ authorization = network.express_route_circuit_authorizations.create(
953
+ resource_group: '<Resourse Group Name>',
954
+ name: '<Resource Unique Name>',
955
+ circuit_name: '<Circuit Name>',
956
+ authorization_status: '<Status Value>',
957
+ authorization_name: '<Authorization Name>'
958
+ )
956
959
  ```
957
960
 
958
961
  ## List Express Route Circuit Authorizations
@@ -960,10 +963,10 @@ Create a new Express Route Circuit Authorization. Parameter 'authorization_statu
960
963
  List all express route circuit authorizations in a resource group.
961
964
 
962
965
  ```ruby
963
- authorizations = network.express_route_circuit_authorizations(resource_group: '<Resource Group Name>', circuit_name: '<Circuit Name>')
964
- authorizations.each do |authorization|
966
+ authorizations = network.express_route_circuit_authorizations(resource_group: '<Resource Group Name>', circuit_name: '<Circuit Name>')
967
+ authorizations.each do |authorization|
965
968
  puts "#{authorization.name}"
966
- end
969
+ end
967
970
  ```
968
971
 
969
972
  ## Retrieve single Express Route Circuit Authorization
@@ -971,8 +974,8 @@ List all express route circuit authorizations in a resource group.
971
974
  Get a single record of Express Route Circuit Authorization.
972
975
 
973
976
  ```ruby
974
- authorization = network.express_route_circuit_authorizations.get("<Resource Group Name>", "Circuit Name", "Authorization Name")
975
- puts "#{authorization.name}"
977
+ authorization = network.express_route_circuit_authorizations.get('<Resource Group Name>', '<Circuit Name>', '<Authorization Name>')
978
+ puts "#{authorization.name}"
976
979
  ```
977
980
 
978
981
  ## Destroy single Express Route Circuit Authorization
@@ -980,7 +983,7 @@ Get a single record of Express Route Circuit Authorization.
980
983
  Get an express route circuit authorization object from the get method and then destroy that express route circuit authorization.
981
984
 
982
985
  ```ruby
983
- authorization.destroy
986
+ authorization.destroy
984
987
  ```
985
988
 
986
989
 
@@ -993,16 +996,16 @@ BGP Peering is part of Express Route circuit and defines the type of connectivit
993
996
  Create a new Express Route Circuit Peering.
994
997
 
995
998
  ```ruby
996
- peering = network.express_route_circuit_peerings.create(
997
- "name": "AzurePrivatePeering",
998
- "circuit_name": "<Circuit Name>",
999
- "resource_group": "<Resourse Group Name>",
1000
- "peering_type": "AzurePrivatePeering",
1001
- "peer_asn": 100,
1002
- "primary_peer_address_prefix": "192.168.3.0/30",
1003
- "secondary_peer_address_prefix": "192.168.4.0/30",
1004
- "vlan_id": 200
1005
- )
999
+ peering = network.express_route_circuit_peerings.create(
1000
+ name: '<Peering Name>',
1001
+ circuit_name: '<Circuit Name>',
1002
+ resource_group: '<Resourse Group Name>',
1003
+ peering_type: '<Peering Type>',
1004
+ peer_asn: <ASN Value>,
1005
+ primary_peer_address_prefix: '<Primary Peer IP Address Range>',
1006
+ secondary_peer_address_prefix:'<Secondary Peer IP Address Range>',
1007
+ vlan_id: <VLAN Id>
1008
+ )
1006
1009
  ```
1007
1010
 
1008
1011
  ## List Express Route Circuit Peerings
@@ -1010,10 +1013,10 @@ Create a new Express Route Circuit Peering.
1010
1013
  List all express route circuit peerings in a resource group
1011
1014
 
1012
1015
  ```ruby
1013
- peerings = network.express_route_circuit_peerings(resource_group: '<Resource Group Name>', circuit_name: '<Circuit Name>')
1014
- peerings.each do |peering|
1016
+ peerings = network.express_route_circuit_peerings(resource_group: '<Resource Group Name>', circuit_name: '<Circuit Name>')
1017
+ peerings.each do |peering|
1015
1018
  puts "#{peering.name}"
1016
- end
1019
+ end
1017
1020
  ```
1018
1021
 
1019
1022
  ## Retrieve single Express Route Circuit Peering
@@ -1021,8 +1024,8 @@ List all express route circuit peerings in a resource group
1021
1024
  Get a single record of Express Route Circuit Peering
1022
1025
 
1023
1026
  ```ruby
1024
- peering = network.express_route_circuit_peerings.get("<Resource Group Name>", "<Peering Name>", "Circuit Name")
1025
- puts "#{peering.peering_type}"
1027
+ peering = network.express_route_circuit_peerings.get('<Resource Group Name>', '<Peering Name>', '<Circuit Name>')
1028
+ puts "#{peering.peering_type}"
1026
1029
  ```
1027
1030
 
1028
1031
  ## Destroy single Express Route Circuit Peering
@@ -1030,7 +1033,7 @@ Get a single record of Express Route Circuit Peering
1030
1033
  Get an express route circuit peering object from the get method and then destroy that express route circuit peering.
1031
1034
 
1032
1035
  ```ruby
1033
- peering.destroy
1036
+ peering.destroy
1034
1037
  ```
1035
1038
 
1036
1039
  # Express Route Service Provider
@@ -1042,14 +1045,14 @@ Express Route Service Providers are telcos and exchange providers who are approv
1042
1045
  List all express route service providers
1043
1046
 
1044
1047
  ```ruby
1045
- service_providers = network.express_route_service_providers
1046
- puts service_providers
1048
+ service_providers = network.express_route_service_providers
1049
+ puts service_providers
1047
1050
  ```
1048
1051
 
1049
1052
  ## Check Virtual Network Gateway Connection Existence
1050
1053
 
1051
1054
  ```ruby
1052
- azure_network_service.virtual_network_gateway_connections.check_vnet_gateway_connection_exists(<Resource Group name>, <Virtual Network Gateway Connection Name>)
1055
+ fog_network_service.virtual_network_gateway_connections.check_vnet_gateway_connection_exists('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
1053
1056
  ```
1054
1057
 
1055
1058
  ## Create Virtual Network Gateway Connection
@@ -1057,24 +1060,24 @@ List all express route service providers
1057
1060
  Create a new Virtual Network Gateway Connection.
1058
1061
 
1059
1062
  ```ruby
1060
- gateway_connection = network.virtual_network_gateway_connections.create(
1063
+ gateway_connection = network.virtual_network_gateway_connections.create(
1061
1064
  name: '<Virtual Network Gateway Connection Name>',
1062
- location: 'eastus',
1063
- tags: {
1064
- key1: 'value1',
1065
- key2: 'value2'
1066
- },
1065
+ location: '<Location>',
1067
1066
  resource_group: '<Resource Group Name>',
1068
1067
  virtual_network_gateway1: {
1069
- name: 'firstgateway',
1068
+ name: '<VN Gateway Name>',
1070
1069
  resource_group: '<Resource Group Name>'
1071
1070
  },
1072
1071
  virtual_network_gateway2: {
1073
- name: 'secondgateway',
1072
+ name: '<VN Gateway Name>',
1074
1073
  resource_group: '<Resource Group Name>'
1075
1074
  }
1076
- connection_type: 'VNet-to-VNet'
1077
- )
1075
+ connection_type: '<Connection Type>',
1076
+ tags: { # [Optional]
1077
+ key1: 'value1',
1078
+ key2: 'value2'
1079
+ },
1080
+ )
1078
1081
  ```
1079
1082
 
1080
1083
  ## List Virtual Network Gateway Connections
@@ -1082,10 +1085,10 @@ Create a new Virtual Network Gateway Connection.
1082
1085
  List all virtual network gateway connections in a resource group
1083
1086
 
1084
1087
  ```ruby
1085
- gateway_connections = network.virtual_network_gateway_connections(resource_group: '<Resource Group Name>')
1086
- gateway_connections.each do |connection|
1088
+ gateway_connections = network.virtual_network_gateway_connections(resource_group: '<Resource Group Name>')
1089
+ gateway_connections.each do |connection|
1087
1090
  puts "#{connection.name}"
1088
- end
1091
+ end
1089
1092
  ```
1090
1093
 
1091
1094
  ## Retrieve single Virtual Network Gateway Connection
@@ -1093,8 +1096,8 @@ List all virtual network gateway connections in a resource group
1093
1096
  Get single record of Virtual Network Gateway Connection
1094
1097
 
1095
1098
  ```ruby
1096
- gateway_connection = network.virtual_network_gateway_connections.get('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
1097
- puts "#{gateway_connection.name}"
1099
+ gateway_connection = network.virtual_network_gateway_connections.get('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
1100
+ puts "#{gateway_connection.name}"
1098
1101
  ```
1099
1102
 
1100
1103
  ## Destroy single Virtual Network Gateway Connection
@@ -1102,26 +1105,26 @@ Get single record of Virtual Network Gateway Connection
1102
1105
  Get a virtual network gateway connection object from the get method and then destroy that virtual network gateway connection.
1103
1106
 
1104
1107
  ```ruby
1105
- gateway_connection.destroy
1108
+ gateway_connection.destroy
1106
1109
  ```
1107
1110
 
1108
1111
  ## Get the shared key for a connection
1109
1112
 
1110
1113
  ```ruby
1111
- shared_key = network.get_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
1112
- puts gateway_connection
1114
+ shared_key = network.get_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
1115
+ puts gateway_connection
1113
1116
  ```
1114
1117
 
1115
1118
  ## Set the shared key for a connection
1116
1119
 
1117
1120
  ```ruby
1118
- network.set_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>', 'Value')
1121
+ network.set_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>', 'Value')
1119
1122
  ```
1120
1123
 
1121
1124
  ## Reset the shared key for a connection
1122
1125
 
1123
1126
  ```ruby
1124
- network.reset_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>', <Key Length in Integer>)
1127
+ network.reset_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>', '<Key Length In Integer>')
1125
1128
  ```
1126
1129
 
1127
1130