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