fog-azure-rm 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.arclint +8 -0
- data/CHANGELOG.md +10 -0
- data/CONTRIBUTORS.md +4 -0
- data/lib/fog/azurerm/compute.rb +1 -0
- data/lib/fog/azurerm/docs/application_gateway.md +6 -7
- data/lib/fog/azurerm/docs/compute.md +45 -11
- data/lib/fog/azurerm/docs/dns.md +4 -1
- data/lib/fog/azurerm/docs/key_vault.md +3 -0
- data/lib/fog/azurerm/docs/network.md +18 -13
- data/lib/fog/azurerm/docs/resources.md +11 -8
- data/lib/fog/azurerm/docs/sql.md +18 -16
- data/lib/fog/azurerm/docs/storage.md +13 -78
- data/lib/fog/azurerm/docs/traffic_manager.md +7 -6
- data/lib/fog/azurerm/models/application_gateway/gateway.rb +5 -1
- data/lib/fog/azurerm/models/compute/availability_set.rb +4 -1
- data/lib/fog/azurerm/models/compute/creation_data.rb +4 -2
- data/lib/fog/azurerm/models/compute/data_disk.rb +26 -0
- data/lib/fog/azurerm/models/compute/managed_disk.rb +4 -4
- data/lib/fog/azurerm/models/compute/server.rb +31 -5
- data/lib/fog/azurerm/models/key_vault/vault.rb +3 -1
- data/lib/fog/azurerm/models/network/load_balancer.rb +3 -1
- data/lib/fog/azurerm/models/network/local_network_gateway.rb +3 -1
- data/lib/fog/azurerm/models/network/network_interface.rb +3 -1
- data/lib/fog/azurerm/models/network/network_security_group.rb +4 -2
- data/lib/fog/azurerm/models/network/public_ip.rb +4 -2
- data/lib/fog/azurerm/models/network/virtual_network.rb +4 -2
- data/lib/fog/azurerm/models/resources/resource_group.rb +3 -1
- data/lib/fog/azurerm/models/sql/sql_database.rb +3 -3
- data/lib/fog/azurerm/models/sql/sql_server.rb +3 -2
- data/lib/fog/azurerm/models/storage/storage_account.rb +4 -1
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +3 -1
- data/lib/fog/azurerm/requests/application_gateway/create_or_update_application_gateway.rb +1 -0
- data/lib/fog/azurerm/requests/compute/attach_data_disk_to_vm.rb +49 -13
- data/lib/fog/azurerm/requests/compute/create_availability_set.rb +4 -2
- data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +38 -36
- data/lib/fog/azurerm/requests/compute/detach_data_disk_from_vm.rb +1 -2
- data/lib/fog/azurerm/requests/dns/create_or_update_zone.rb +1 -2
- data/lib/fog/azurerm/requests/key_vault/create_or_update_vault.rb +1 -0
- data/lib/fog/azurerm/requests/network/check_express_route_cir_auth_exists.rb +1 -1
- data/lib/fog/azurerm/requests/network/create_load_balancer.rb +4 -4
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit.rb +1 -1
- data/lib/fog/azurerm/requests/network/create_or_update_local_network_gateway.rb +1 -2
- data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +4 -3
- data/lib/fog/azurerm/requests/network/create_or_update_network_security_group.rb +4 -3
- data/lib/fog/azurerm/requests/network/create_or_update_public_ip.rb +5 -3
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +4 -3
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway_connection.rb +1 -1
- data/lib/fog/azurerm/requests/resources/check_azure_resource_exists.rb +1 -1
- data/lib/fog/azurerm/requests/resources/create_resource_group.rb +2 -1
- data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +4 -4
- data/lib/fog/azurerm/requests/resources/tag_resource.rb +4 -4
- data/lib/fog/azurerm/requests/sql/create_or_update_database.rb +13 -10
- data/lib/fog/azurerm/requests/sql/create_or_update_sql_server.rb +8 -5
- data/lib/fog/azurerm/requests/storage/create_storage_account.rb +4 -2
- data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_profile.rb +13 -3
- data/lib/fog/azurerm/storage.rb +0 -19
- data/lib/fog/azurerm/version.rb +1 -1
- data/test/api_stub.rb +0 -2
- data/test/api_stub/models/compute/server.rb +62 -0
- data/test/api_stub/requests/compute/virtual_machine.rb +75 -0
- data/test/api_stub/requests/resources/resource_group.rb +1 -1
- data/test/integration/application_gateway.rb +8 -1
- data/test/integration/availability_set.rb +9 -2
- data/test/integration/external_load_balancer.rb +2 -1
- data/test/integration/internal_load_balancer.rb +2 -1
- data/test/integration/key_vault.rb +2 -1
- data/test/integration/managed_disk.rb +10 -5
- data/test/integration/network_interface.rb +2 -1
- data/test/integration/network_security_group.rb +2 -1
- data/test/integration/public_ip.rb +2 -1
- data/test/integration/resource_group.rb +5 -2
- data/test/integration/resource_tag.rb +4 -2
- data/test/integration/server.rb +81 -3
- data/test/integration/sql_server.rb +10 -2
- data/test/integration/storage_account.rb +32 -20
- data/test/integration/traffic_manager.rb +6 -1
- data/test/integration/virtual_network.rb +2 -1
- data/test/integration/virtual_network_gateway_connection.rb +3 -3
- data/test/models/application_gateway/test_gateway.rb +2 -1
- data/test/models/compute/test_availability_set.rb +2 -1
- data/test/models/{storage → compute}/test_data_disk.rb +2 -2
- data/test/models/compute/test_managed_disk.rb +2 -1
- data/test/models/compute/test_server.rb +31 -2
- data/test/models/dns/test_zone.rb +2 -1
- data/test/models/key_vault/test_vault.rb +2 -1
- data/test/models/network/test_load_balancer.rb +2 -1
- data/test/models/network/test_network_interface.rb +2 -1
- data/test/models/network/test_network_security_group.rb +2 -1
- data/test/models/network/test_public_ip.rb +2 -1
- data/test/models/network/test_virtual_network.rb +2 -1
- data/test/models/resources/test_resource_group.rb +2 -1
- data/test/models/sql/test_database.rb +2 -1
- data/test/models/sql/test_sql_server.rb +2 -1
- data/test/models/storage/test_storage_account.rb +2 -1
- data/test/models/traffic_manager/test_traffic_manager_profile.rb +2 -1
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +21 -6
- data/test/requests/network/test_check_express_route_cir_auth_exists.rb +1 -1
- data/test/requests/network/test_create_load_balancer.rb +3 -2
- data/test/requests/network/test_create_network_interface.rb +4 -3
- data/test/requests/network/test_create_or_update_network_security_group.rb +3 -2
- data/test/requests/network/test_create_or_update_virtual_network.rb +5 -3
- data/test/requests/network/test_create_public_ip.rb +3 -2
- data/test/requests/network/test_update_public_ip.rb +3 -2
- data/test/requests/resources/test_create_resource_group.rb +3 -2
- data/test/requests/resources/test_delete_resource_tag.rb +3 -3
- data/test/requests/resources/test_tag_resource.rb +3 -3
- data/test/test_helper.rb +0 -14
- metadata +5 -36
- data/lib/fog/azurerm/models/storage/data_disk.rb +0 -27
- data/lib/fog/azurerm/models/storage/recovery_vault.rb +0 -50
- data/lib/fog/azurerm/models/storage/recovery_vaults.rb +0 -27
- data/lib/fog/azurerm/requests/storage/create_or_update_recovery_vault.rb +0 -54
- data/lib/fog/azurerm/requests/storage/delete_recovery_vault.rb +0 -35
- data/lib/fog/azurerm/requests/storage/disable_backup_protection.rb +0 -60
- data/lib/fog/azurerm/requests/storage/enable_backup_protection.rb +0 -61
- data/lib/fog/azurerm/requests/storage/get_all_backup_jobs.rb +0 -56
- data/lib/fog/azurerm/requests/storage/get_backup_container.rb +0 -53
- data/lib/fog/azurerm/requests/storage/get_backup_item.rb +0 -58
- data/lib/fog/azurerm/requests/storage/get_backup_job_for_vm.rb +0 -53
- data/lib/fog/azurerm/requests/storage/get_backup_protection_policy.rb +0 -64
- data/lib/fog/azurerm/requests/storage/get_recovery_vault.rb +0 -49
- data/lib/fog/azurerm/requests/storage/list_recovery_vaults.rb +0 -48
- data/lib/fog/azurerm/requests/storage/set_recovery_vault_context.rb +0 -36
- data/lib/fog/azurerm/requests/storage/start_backup.rb +0 -54
- data/test/api_stub/models/storage/recovery_vault.rb +0 -23
- data/test/api_stub/requests/storage/recovery_vault.rb +0 -189
- data/test/models/storage/test_recovery_vault.rb +0 -61
- data/test/models/storage/test_recovery_vaults.rb +0 -47
- data/test/requests/storage/test_create_recovery_vault.rb +0 -35
- data/test/requests/storage/test_delete_recovery_vault.rb +0 -34
- data/test/requests/storage/test_disable_backup_protection.rb +0 -52
- data/test/requests/storage/test_enable_backup_protection.rb +0 -66
- data/test/requests/storage/test_get_all_backup_jobs.rb +0 -35
- data/test/requests/storage/test_get_backup_container.rb +0 -35
- data/test/requests/storage/test_get_backup_item.rb +0 -35
- data/test/requests/storage/test_get_backup_job_for_vm.rb +0 -26
- data/test/requests/storage/test_get_backup_protection_policy.rb +0 -35
- data/test/requests/storage/test_get_recovery_vault.rb +0 -35
- data/test/requests/storage/test_list_recovery_vault.rb +0 -35
- data/test/requests/storage/test_set_recovery_vault_context.rb +0 -34
- data/test/requests/storage/test_start_backup.rb +0 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86a3f0c7c485417833dbbad2fad9b5aab150e503
|
4
|
+
data.tar.gz: 2b323fe0537e530cc54d7a5a1b0e985b387649bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c60ea047820659f91d09c395f5b7930fbbbaf0d47dfea3e4b0d36c508650add4d5a3a62803a1a516c19f77611fa3055c20a64cff240dd69f2f5a07cbbf24534b
|
7
|
+
data.tar.gz: 2b9f9a22a6bafd848d8ef9aab6f213fb3768e0bc7fcaea12bd09db444d310fd8f0fb5f1f1bd0b27d787e39253c2dbb4ec923a3162a4f0c2e81594c155b3670e8
|
data/.arclint
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 0.3.4
|
2
|
+
|
3
|
+
**Added:**
|
4
|
+
- Compute Service - Added support for custom OS disk size during VM creation
|
5
|
+
- Compute Service - Added support to attach Managed Disk to VM
|
6
|
+
- Added resource tagging support on creation
|
7
|
+
|
8
|
+
**Removed:**
|
9
|
+
- Recovery Vault Support
|
10
|
+
|
1
11
|
## 0.3.3
|
2
12
|
|
3
13
|
**Added:**
|
data/CONTRIBUTORS.md
CHANGED
@@ -6,3 +6,7 @@
|
|
6
6
|
* Haider Ali <haider.ali@confiz.com>
|
7
7
|
* Waqar Haider <waqar.haider@confiz.com>
|
8
8
|
* Bilal Naeem <bilal.naeem@confiz.com>
|
9
|
+
* Azeem Sajid <azeem.sajid@confiz.com>
|
10
|
+
* Maham Nazir <maham.nazir@confiz.com>
|
11
|
+
* Muhammad Asad <muhammad.asad@confiz.com>
|
12
|
+
* Muhammad Abbas Sheikh <abbas.sheikh@confiz.com>
|
data/lib/fog/azurerm/compute.rb
CHANGED
@@ -15,11 +15,11 @@ Next, create a connection to the Application Gateway Service:
|
|
15
15
|
|
16
16
|
```ruby
|
17
17
|
azure_application_gateway_service = Fog::ApplicationGateway::AzureRM.new(
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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.
|
23
23
|
)
|
24
24
|
```
|
25
25
|
|
@@ -38,6 +38,7 @@ Create a new Application Gateway.
|
|
38
38
|
name: '<Gateway Name>',
|
39
39
|
location: 'eastus',
|
40
40
|
resource_group: '<Resource Group name>',
|
41
|
+
tags: { key1: "value1", key2: "value2", keyN: "valueN" }, # [Optional]
|
41
42
|
sku_name: 'Standard_Medium',
|
42
43
|
sku_tier: 'Standard',
|
43
44
|
sku_capacity: '2',
|
@@ -107,8 +108,6 @@ Create a new Application Gateway.
|
|
107
108
|
url_path_map: ''
|
108
109
|
}
|
109
110
|
]
|
110
|
-
|
111
|
-
|
112
111
|
)
|
113
112
|
```
|
114
113
|
|
@@ -16,12 +16,12 @@ Next, create a connection to the Compute Service:
|
|
16
16
|
|
17
17
|
```ruby
|
18
18
|
azure_compute_service = Fog::Compute.new(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
provider: 'AzureRM',
|
20
|
+
tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
|
21
|
+
client_id: '<Clientid>', # Client id of Azure Active Directory Application
|
22
|
+
client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
|
23
|
+
subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
|
24
|
+
environment: '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
|
25
25
|
)
|
26
26
|
```
|
27
27
|
|
@@ -61,7 +61,8 @@ When using **managed_disk_storage_type** you should not pass the **vhd_path** as
|
|
61
61
|
vhd_path: '<Path of VHD>', # Optional, if you want to create the VM from a custom image.
|
62
62
|
custom_data: 'echo customData', # Optional, if you want to add custom data in this VM.
|
63
63
|
os_disk_caching: Fog::ARM::Compute::Models::CachingTypes::None, # Optional, can be one of None, ReadOnly, ReadWrite
|
64
|
-
managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS # Optional, can be StandardLRS or PremiumLRS
|
64
|
+
managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS, # Optional, can be StandardLRS or PremiumLRS
|
65
|
+
os_disk_size: <Disk Size> # Optional, size of the os disk in GB (upto 1023)
|
65
66
|
)
|
66
67
|
```
|
67
68
|
|
@@ -85,8 +86,9 @@ Create a new windows server
|
|
85
86
|
version: 'latest', # Not required if custom image is being used
|
86
87
|
platform: 'Windows',
|
87
88
|
vhd_path: '<Path of VHD>', # Optional, if you want to create the VM from a custom image.
|
88
|
-
custom_data: 'echo customData',
|
89
|
-
managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS # Optional, can be StandardLRS or PremiumLRS
|
89
|
+
custom_data: 'echo customData', # Optional, if you want to add custom data in this VM.
|
90
|
+
managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS, # Optional, can be StandardLRS or PremiumLRS
|
91
|
+
os_disk_size: <Disk Size> # Optional, size of the os disk in GB (upto 1023)
|
90
92
|
)
|
91
93
|
```
|
92
94
|
|
@@ -114,7 +116,8 @@ Create a new linux server asynchronously
|
|
114
116
|
vhd_path: '<Path of VHD>', # Optional, if you want to create the VM from a custom image.
|
115
117
|
custom_data: 'echo customData', # Optional, if you want to add custom data in this VM.
|
116
118
|
os_disk_caching: Fog::ARM::Compute::Models::CachingTypes::None, # Optional, can be one of None, ReadOnly, ReadWrite
|
117
|
-
managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS # Optional, can be StandardLRS or PremiumLRS
|
119
|
+
managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS, # Optional, can be StandardLRS or PremiumLRS
|
120
|
+
os_disk_size: <Disk Size> # Optional, size of the os disk in GB (upto 1023)
|
118
121
|
)
|
119
122
|
```
|
120
123
|
Following methods are available to handle async respoonse:
|
@@ -188,6 +191,22 @@ Get the server object and detach a Data Disk from it.
|
|
188
191
|
server.detach_data_disk('<Disk Name>')
|
189
192
|
```
|
190
193
|
|
194
|
+
## Attach a Managed Data Disk to Server
|
195
|
+
|
196
|
+
Get the server object and attach a Data Disk to it.
|
197
|
+
|
198
|
+
```ruby
|
199
|
+
server.attach_managed_disk('<Disk Name>', '<Disk Resource Group Name>')
|
200
|
+
```
|
201
|
+
|
202
|
+
## Detach a Managed Data Disk from Server
|
203
|
+
|
204
|
+
Get the server object and detach a Data Disk from it.
|
205
|
+
|
206
|
+
```ruby
|
207
|
+
server.detach_managed_disk('<Disk Name>')
|
208
|
+
```
|
209
|
+
|
191
210
|
## Get a Server's status
|
192
211
|
|
193
212
|
Check the status of a Server
|
@@ -320,7 +339,7 @@ Destroy the given extension from the virtual machine
|
|
320
339
|
|
321
340
|
## Create Managed Disk
|
322
341
|
|
323
|
-
Create a new Managed Disk
|
342
|
+
Create a new Premium Managed Disk
|
324
343
|
|
325
344
|
```ruby
|
326
345
|
azure_compute_service.managed_disks.create(
|
@@ -335,6 +354,21 @@ Create a new Managed Disk
|
|
335
354
|
)
|
336
355
|
```
|
337
356
|
|
357
|
+
Create a new Standard Managed Disk
|
358
|
+
|
359
|
+
```ruby
|
360
|
+
azure_compute_service.managed_disks.create(
|
361
|
+
name: 'disk_name',
|
362
|
+
location: 'east us',
|
363
|
+
resource_group_name: 'resource_group_name',
|
364
|
+
account_type: 'Standard_LRS',
|
365
|
+
disk_size_gb: 1023,
|
366
|
+
creation_data: {
|
367
|
+
create_option: 'Empty'
|
368
|
+
}
|
369
|
+
)
|
370
|
+
```
|
371
|
+
|
338
372
|
## List Managed Disks in a Resource Group
|
339
373
|
|
340
374
|
List managed disks in a resource group
|
data/lib/fog/azurerm/docs/dns.md
CHANGED
@@ -48,7 +48,8 @@ Optional parameters for Subnet: network_security_group_id, route_table_id & addr
|
|
48
48
|
route_table_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/routeTables/<Route Table Name>'
|
49
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']
|
51
|
+
address_prefixes: ['10.1.0.0/16','10.2.0.0/16'],
|
52
|
+
tags: { key: 'value' } # Optional
|
52
53
|
)
|
53
54
|
```
|
54
55
|
|
@@ -253,7 +254,8 @@ Create a new network interface. Skip public_ip_address_id parameter to create ne
|
|
253
254
|
subnet_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network name>/subnets/<Subnet name>',
|
254
255
|
public_ip_address_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/publicIPAddresses/<Public IP name>',
|
255
256
|
ip_configuration_name: '<Ip Configuration Name>',
|
256
|
-
private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic
|
257
|
+
private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic,
|
258
|
+
tags: { key: 'value' } # Optional
|
257
259
|
)
|
258
260
|
```
|
259
261
|
|
@@ -333,7 +335,8 @@ Create a new public IP. The parameter, type can be Dynamic or Static.
|
|
333
335
|
name: '<Public IP name>',
|
334
336
|
resource_group: '<Resource Group name>',
|
335
337
|
location: 'westus',
|
336
|
-
public_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Static
|
338
|
+
public_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Static,
|
339
|
+
tags: { key: 'value' } # Optional
|
337
340
|
)
|
338
341
|
```
|
339
342
|
|
@@ -412,7 +415,8 @@ Network security group requires a resource group to create.
|
|
412
415
|
access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
|
413
416
|
priority: '100',
|
414
417
|
direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
|
415
|
-
}]
|
418
|
+
}],
|
419
|
+
tags: { key: 'value' } # Optional
|
416
420
|
)
|
417
421
|
```
|
418
422
|
|
@@ -606,15 +610,15 @@ Create a new load balancer.
|
|
606
610
|
frontend_port: 3389,
|
607
611
|
backend_port: 3389
|
608
612
|
}
|
609
|
-
]
|
613
|
+
],
|
614
|
+
tags: { key: 'value' } # Optional
|
610
615
|
)
|
611
616
|
```
|
612
617
|
|
613
618
|
## Create Internal Load Balancer
|
614
619
|
|
615
620
|
```ruby
|
616
|
-
|
617
|
-
lb = azure_network_service.load_balancers.create(
|
621
|
+
lb = azure_network_service.load_balancers.create(
|
618
622
|
name: '<Load Balancer name>',
|
619
623
|
resource_group: '<Resource Group name>',
|
620
624
|
location: 'westus',
|
@@ -670,8 +674,9 @@ Create a new load balancer.
|
|
670
674
|
interval_in_seconds: 15,
|
671
675
|
number_of_probes: 2
|
672
676
|
}
|
673
|
-
]
|
674
|
-
|
677
|
+
],
|
678
|
+
tags: { key: 'value' } # Optional
|
679
|
+
)
|
675
680
|
```
|
676
681
|
|
677
682
|
## List Load Balancers
|
@@ -729,7 +734,7 @@ Create a new Virtual Network Gateway.
|
|
729
734
|
network_gateway = network.virtual_network_gateways.create(
|
730
735
|
name: '<Virtual Network Gateway Name>',
|
731
736
|
location: 'eastus',
|
732
|
-
tags: {
|
737
|
+
tags: { # Optional
|
733
738
|
key1: 'value1',
|
734
739
|
key2: 'value2'
|
735
740
|
},
|
@@ -816,7 +821,7 @@ Create a new Local Network Gateway.
|
|
816
821
|
local_network_gateway = network.local_network_gateways.create(
|
817
822
|
name: "<Local Network Gateway Name>",
|
818
823
|
location: "eastus",
|
819
|
-
tags: {
|
824
|
+
tags: { # Optional
|
820
825
|
key1: "value1",
|
821
826
|
key2: "value2"
|
822
827
|
},
|
@@ -881,7 +886,7 @@ Create a new Express Route Circuit.
|
|
881
886
|
"name": "<Circuit Name>",
|
882
887
|
"location": "eastus",
|
883
888
|
"resource_group": "<Resource Group Name>",
|
884
|
-
"tags": {
|
889
|
+
"tags": { # Optional
|
885
890
|
"key1": 'value1',
|
886
891
|
"key2": 'value2'
|
887
892
|
},
|
@@ -1060,7 +1065,7 @@ Create a new Virtual Network Gateway Connection.
|
|
1060
1065
|
gateway_connection = network.virtual_network_gateway_connections.create(
|
1061
1066
|
name: '<Virtual Network Gateway Connection Name>',
|
1062
1067
|
location: 'eastus',
|
1063
|
-
tags: {
|
1068
|
+
tags: { # Optional
|
1064
1069
|
key1: 'value1',
|
1065
1070
|
key2: 'value2'
|
1066
1071
|
},
|
@@ -16,11 +16,11 @@ Next, create a connection to the Resources Service:
|
|
16
16
|
|
17
17
|
```ruby
|
18
18
|
azure_resources_service = Fog::Resources::AzureRM.new(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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.
|
24
24
|
)
|
25
25
|
```
|
26
26
|
|
@@ -37,7 +37,8 @@ Create a new resource group
|
|
37
37
|
```ruby
|
38
38
|
azure_resources_service.resource_groups.create(
|
39
39
|
name: '<Resource Group name>',
|
40
|
-
location: '
|
40
|
+
location: '<Location>',
|
41
|
+
tags: { key1: "value1", key2: "value2", keyN: "valueN" } # [Optional]
|
41
42
|
)
|
42
43
|
```
|
43
44
|
## List Resource Groups
|
@@ -75,7 +76,8 @@ You can tag a Resource as following:
|
|
75
76
|
azure_resources_service.tag_resource(
|
76
77
|
'<Resource-ID>',
|
77
78
|
'<Tag-Key>',
|
78
|
-
'<Tag-Value>'
|
79
|
+
'<Tag-Value>',
|
80
|
+
'<API-Version>'
|
79
81
|
)
|
80
82
|
```
|
81
83
|
|
@@ -114,7 +116,8 @@ Remove tag from a resource as following:
|
|
114
116
|
azure_resources_service.delete_resource_tag(
|
115
117
|
'<Resource-ID>',
|
116
118
|
'<Tag-Key>',
|
117
|
-
'<Tag-Value>'
|
119
|
+
'<Tag-Value>',
|
120
|
+
'<API-Version>'
|
118
121
|
)
|
119
122
|
```
|
120
123
|
|
data/lib/fog/azurerm/docs/sql.md
CHANGED
@@ -16,11 +16,11 @@ Next, create a connection to the SQL Service:
|
|
16
16
|
|
17
17
|
```ruby
|
18
18
|
azure_sql_service = Fog::Sql::AzureRM.new(
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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.
|
24
24
|
)
|
25
25
|
```
|
26
26
|
|
@@ -36,9 +36,10 @@ Create a new Server
|
|
36
36
|
name: '<Unique Server Name>',
|
37
37
|
resource_group: '<Resource Group Name>',
|
38
38
|
location: 'East US',
|
39
|
-
version: '2.0',
|
40
|
-
administrator_login: 'testserveradmin',
|
41
|
-
administrator_login_password: 'svr@admin123'
|
39
|
+
version: '2.0', # Specifies the version of the Azure server. The acceptable value are: '2.0' or '12.0'
|
40
|
+
administrator_login: 'testserveradmin', # Specifies the name of the SQL administrator.
|
41
|
+
administrator_login_password: 'svr@admin123', # Specifies the password of the SQL administrator.
|
42
|
+
tags: { key1: "value1", key2: "value2", keyN: "valueN" } # [Optional]
|
42
43
|
)
|
43
44
|
```
|
44
45
|
For more information, see link: https://msdn.microsoft.com/en-us/library/azure/mt297738.aspx
|
@@ -84,14 +85,15 @@ If parameter {edition} is set to DataWarehouse, the acceptable values for parame
|
|
84
85
|
location: 'East US',
|
85
86
|
server_name: '<Server Name>',
|
86
87
|
name: '<Database Name>',
|
87
|
-
create_mode: '<Create Mode>',
|
88
|
-
edition: '<Edition>',
|
89
|
-
source_database_id: '<URI>',
|
90
|
-
collation: '<Collation>',
|
91
|
-
max_size_bytes: '<Size>',
|
92
|
-
requested_service_objective_name: '<Name>'
|
93
|
-
elastic_pool_name: '<Pool Name>',
|
94
|
-
requested_service_objective_id: '<GUID>'
|
88
|
+
create_mode: '<Create Mode>', # Optional. Specifies the type of database to create. The default value is Default. The acceptable values are: [Copy, Default, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, PointInTimeRestore, Restore]
|
89
|
+
edition: '<Edition>', # Conditional. Specifies the edition of the database. If createMode is set to Default, then this value must be specified. The acceptable value are: [Basic, Standard, Premium, DataWarehouse]
|
90
|
+
source_database_id: '<URI>', # Conditional. Specifies the URI of the source database. If createMode is not set to Default, then this value must be specified.
|
91
|
+
collation: '<Collation>', # Conditional. Specifies the name of the collation. If createMode is set to Default, then this value must be specified.
|
92
|
+
max_size_bytes: '<Size>', # Conditional. Specifies the maximum size to which the database may grow. If createMode is set to Default, then this value must be specified.
|
93
|
+
requested_service_objective_name: '<Name>', # Conditional. Specifies the requested service level of the database. If requestedServiceObjectiveId is specified, then this value must not be specified. The acceptable value are: [Basic, S0, S1, S2, S3, P1, P2, P4, P6, P11, ElasticPool]
|
94
|
+
elastic_pool_name: '<Pool Name>', # Conditional. Specifies the name of the elastic database pool. If requestedServiceObjectiveId or requestedServiceObjectiveName is set to ElasticPool, then this value must be specified.
|
95
|
+
requested_service_objective_id: '<GUID>', # Conditional. Specifies the identifier of the requested service level. If requestedServiceObjectiveName is specified, then this value must not be specified.
|
96
|
+
tags: { key1: "value1", key2: "value2", keyN: "valueN" } # [Optional]
|
95
97
|
)
|
96
98
|
```
|
97
99
|
For more information see link: https://msdn.microsoft.com/en-us/library/azure/mt163685.aspx
|
@@ -31,12 +31,12 @@ If you only want to manage the storage accounts, you can create the connection w
|
|
31
31
|
|
32
32
|
```ruby
|
33
33
|
azure_storage_service = Fog::Storage.new(
|
34
|
-
:
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
34
|
+
provider: 'AzureRM',
|
35
|
+
tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
|
36
|
+
client_id: '<Clientid>', # Client id of Azure Active Directory Application
|
37
|
+
client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
|
38
|
+
subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
|
39
|
+
environment: '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
|
40
40
|
)
|
41
41
|
```
|
42
42
|
|
@@ -78,12 +78,13 @@ Premium: LRS (Premium Locally-redundant storage)
|
|
78
78
|
|
79
79
|
```ruby
|
80
80
|
azure_storage_service.storage_accounts.create(
|
81
|
-
:
|
82
|
-
:
|
83
|
-
:
|
84
|
-
:
|
85
|
-
:
|
86
|
-
:
|
81
|
+
name: '<Storage Account name>',
|
82
|
+
location: '<Location>',
|
83
|
+
resource_group: '<Resource Group name>',
|
84
|
+
account_type: '<Standard/Premium>', # [Optional] Default value 'Standard'. Allowed values can only be Standard or Premium
|
85
|
+
replication: 'LRS', # [Optional] Default value 'LRS'
|
86
|
+
encryption: true, # [Optional] Enables encryption. Default is false.
|
87
|
+
tags: { key1: "value1", key2: "value2", keyN: "valueN" } # [Optional]
|
87
88
|
)
|
88
89
|
```
|
89
90
|
Premium Storage account store data on solid state drives (SSDs). For more details on standard and premium storage accounts, see [Introduction to Microsoft Azure Storage](https://azure.microsoft.com/en-us/documentation/articles/storage-introduction/) and [Premium Storage: High-Performance Storage for Azure Virtual Machine Workloads](https://azure.microsoft.com/en-us/documentation/articles/storage-premium-storage/).
|
@@ -389,72 +390,6 @@ directory.metadata = {
|
|
389
390
|
directory.save(is_create: false)
|
390
391
|
```
|
391
392
|
|
392
|
-
### Create Recovery Vault
|
393
|
-
|
394
|
-
Create a new Recovery Vault object
|
395
|
-
|
396
|
-
```ruby
|
397
|
-
azure_storage_service.recovery_vaults.create(
|
398
|
-
name: '<vault_name>',
|
399
|
-
location: '<location>',
|
400
|
-
resource_group: '<resource_group_name>'
|
401
|
-
```
|
402
|
-
|
403
|
-
### Get Recovery Vault
|
404
|
-
|
405
|
-
Retrieves a Recovery Vault object
|
406
|
-
|
407
|
-
```ruby
|
408
|
-
recovery_vault = azure_storage_service.recovery_vaults.get(
|
409
|
-
'Vault Name',
|
410
|
-
'Vault Resource Group'
|
411
|
-
)
|
412
|
-
```
|
413
|
-
|
414
|
-
### List Recovery Vaults
|
415
|
-
|
416
|
-
List the Recovery Vaults in a resource group
|
417
|
-
|
418
|
-
```ruby
|
419
|
-
azure_storage_service.recovery_vaults('Resource Group Name').each do |recovery_vault|
|
420
|
-
puts recovery_vault.inspect
|
421
|
-
end
|
422
|
-
```
|
423
|
-
|
424
|
-
### Enable Backup Protection
|
425
|
-
|
426
|
-
Enables backup protection for a virtual machine in the recovery vault. Backup protection for a virtual machine must be enabled before running backup.
|
427
|
-
|
428
|
-
```ruby
|
429
|
-
recovery_vault.enable_backup_protection('Virtual Machine Name', 'Virtual Machine Resource Group')
|
430
|
-
```
|
431
|
-
|
432
|
-
### Disable Backup Protection
|
433
|
-
|
434
|
-
Disables backup protection for a virtual machine in the recovery vault.
|
435
|
-
|
436
|
-
```ruby
|
437
|
-
recovery_vault.disable_backup_protection('Virtual Machine Name', 'Virtual Machine Resource Group')
|
438
|
-
```
|
439
|
-
|
440
|
-
### Start Backup
|
441
|
-
|
442
|
-
Starts the backup process for a given virtual machine
|
443
|
-
|
444
|
-
```ruby
|
445
|
-
recovery_vault.start_backup('Virtual Machine Name', 'Virtual Machine Resource Group')
|
446
|
-
```
|
447
|
-
|
448
|
-
### Destroy Recovery Vault
|
449
|
-
|
450
|
-
Destroys the Recovery Vault
|
451
|
-
|
452
|
-
```ruby
|
453
|
-
recovery_vault.destroy
|
454
|
-
```
|
455
|
-
|
456
|
-
Note that a Recovery Vault must not contain any backup protectable items or tasks running in order for you to delete it. If any item is present, it must be deleted from the portal first before running this command.
|
457
|
-
|
458
393
|
## Support and Feedback
|
459
394
|
Your feedback is appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.
|
460
395
|
|