fog-azure-rm-temp 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +17 -0
- data/.gitignore +6 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +38 -0
- data/.travis.yml +33 -0
- data/CHANGELOG.md +271 -0
- data/CONTRIBUTING.md +40 -0
- data/CONTRIBUTORS.md +8 -0
- data/Gemfile +3 -0
- data/LICENSE.md +20 -0
- data/README.md +96 -0
- data/fog-azure-rm.gemspec +37 -0
- data/lib/fog/azurerm.rb +89 -0
- data/lib/fog/azurerm/application_gateway.rb +75 -0
- data/lib/fog/azurerm/async_response.rb +36 -0
- data/lib/fog/azurerm/compute.rb +98 -0
- data/lib/fog/azurerm/config.rb +1 -0
- data/lib/fog/azurerm/constants.rb +61 -0
- data/lib/fog/azurerm/credentials.rb +40 -0
- data/lib/fog/azurerm/dns.rb +68 -0
- data/lib/fog/azurerm/docs/application_gateway.md +243 -0
- data/lib/fog/azurerm/docs/compute.md +400 -0
- data/lib/fog/azurerm/docs/dns.md +148 -0
- data/lib/fog/azurerm/docs/key_vault.md +88 -0
- data/lib/fog/azurerm/docs/network.md +1129 -0
- data/lib/fog/azurerm/docs/resources.md +175 -0
- data/lib/fog/azurerm/docs/sql.md +168 -0
- data/lib/fog/azurerm/docs/storage.md +463 -0
- data/lib/fog/azurerm/docs/structure.md +53 -0
- data/lib/fog/azurerm/docs/traffic_manager.md +159 -0
- data/lib/fog/azurerm/key_vault.rb +51 -0
- data/lib/fog/azurerm/models/application_gateway/backend_address_pool.rb +24 -0
- data/lib/fog/azurerm/models/application_gateway/backend_http_setting.rb +28 -0
- data/lib/fog/azurerm/models/application_gateway/frontend_ip_configuration.rb +26 -0
- data/lib/fog/azurerm/models/application_gateway/frontend_port.rb +20 -0
- data/lib/fog/azurerm/models/application_gateway/gateway.rb +613 -0
- data/lib/fog/azurerm/models/application_gateway/gateways.rb +30 -0
- data/lib/fog/azurerm/models/application_gateway/http_listener.rb +30 -0
- data/lib/fog/azurerm/models/application_gateway/ip_configuration.rb +26 -0
- data/lib/fog/azurerm/models/application_gateway/probe.rb +30 -0
- data/lib/fog/azurerm/models/application_gateway/request_routing_rule.rb +27 -0
- data/lib/fog/azurerm/models/application_gateway/ssl_certificate.rb +24 -0
- data/lib/fog/azurerm/models/application_gateway/url_path_map.rb +30 -0
- data/lib/fog/azurerm/models/compute/availability_set.rb +43 -0
- data/lib/fog/azurerm/models/compute/availability_sets.rb +35 -0
- data/lib/fog/azurerm/models/compute/caching_types.rb +13 -0
- data/lib/fog/azurerm/models/compute/creation_data.rb +21 -0
- data/lib/fog/azurerm/models/compute/disk_create_option.rb +16 -0
- data/lib/fog/azurerm/models/compute/disk_create_option_types.rb +13 -0
- data/lib/fog/azurerm/models/compute/encryption_settings.rb +29 -0
- data/lib/fog/azurerm/models/compute/image_disk_reference.rb +15 -0
- data/lib/fog/azurerm/models/compute/managed_disk.rb +77 -0
- data/lib/fog/azurerm/models/compute/managed_disks.rb +43 -0
- data/lib/fog/azurerm/models/compute/operation_status_response.rb +18 -0
- data/lib/fog/azurerm/models/compute/server.rb +199 -0
- data/lib/fog/azurerm/models/compute/servers.rb +47 -0
- data/lib/fog/azurerm/models/compute/virtual_machine_extension.rb +76 -0
- data/lib/fog/azurerm/models/compute/virtual_machine_extensions.rb +31 -0
- data/lib/fog/azurerm/models/dns/record_set.rb +91 -0
- data/lib/fog/azurerm/models/dns/record_sets.rb +34 -0
- data/lib/fog/azurerm/models/dns/zone.rb +58 -0
- data/lib/fog/azurerm/models/dns/zones.rb +29 -0
- data/lib/fog/azurerm/models/key_vault/access_policy_entry.rb +31 -0
- data/lib/fog/azurerm/models/key_vault/vault.rb +76 -0
- data/lib/fog/azurerm/models/key_vault/vaults.rb +27 -0
- data/lib/fog/azurerm/models/network/express_route_circuit.rb +86 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_authorization.rb +50 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_authorizations.rb +28 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_peering.rb +91 -0
- data/lib/fog/azurerm/models/network/express_route_circuit_peerings.rb +27 -0
- data/lib/fog/azurerm/models/network/express_route_circuits.rb +30 -0
- data/lib/fog/azurerm/models/network/express_route_service_provider.rb +29 -0
- data/lib/fog/azurerm/models/network/express_route_service_providers.rb +18 -0
- data/lib/fog/azurerm/models/network/frontend_ip_configuration.rb +27 -0
- data/lib/fog/azurerm/models/network/inbound_nat_pool.rb +26 -0
- data/lib/fog/azurerm/models/network/inbound_nat_rule.rb +26 -0
- data/lib/fog/azurerm/models/network/ipallocation_method.rb +12 -0
- data/lib/fog/azurerm/models/network/load_balancer.rb +247 -0
- data/lib/fog/azurerm/models/network/load_balancers.rb +36 -0
- data/lib/fog/azurerm/models/network/load_balancing_rule.rb +37 -0
- data/lib/fog/azurerm/models/network/local_network_gateway.rb +60 -0
- data/lib/fog/azurerm/models/network/local_network_gateways.rb +27 -0
- data/lib/fog/azurerm/models/network/network_interface.rb +121 -0
- data/lib/fog/azurerm/models/network/network_interfaces.rb +30 -0
- data/lib/fog/azurerm/models/network/network_security_group.rb +112 -0
- data/lib/fog/azurerm/models/network/network_security_groups.rb +30 -0
- data/lib/fog/azurerm/models/network/network_security_rule.rb +66 -0
- data/lib/fog/azurerm/models/network/network_security_rules.rb +31 -0
- data/lib/fog/azurerm/models/network/path_rule.rb +30 -0
- data/lib/fog/azurerm/models/network/probe.rb +28 -0
- data/lib/fog/azurerm/models/network/public_ip.rb +68 -0
- data/lib/fog/azurerm/models/network/public_ips.rb +30 -0
- data/lib/fog/azurerm/models/network/security_rule_access.rb +12 -0
- data/lib/fog/azurerm/models/network/security_rule_direction.rb +12 -0
- data/lib/fog/azurerm/models/network/security_rule_protocol.rb +13 -0
- data/lib/fog/azurerm/models/network/subnet.rb +66 -0
- data/lib/fog/azurerm/models/network/subnets.rb +31 -0
- data/lib/fog/azurerm/models/network/virtual_network.rb +107 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateway.rb +137 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateway_connection.rb +76 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateway_connections.rb +27 -0
- data/lib/fog/azurerm/models/network/virtual_network_gateways.rb +30 -0
- data/lib/fog/azurerm/models/network/virtual_networks.rb +36 -0
- data/lib/fog/azurerm/models/network/vpn_client_configuration.rb +34 -0
- data/lib/fog/azurerm/models/network/vpn_client_revoked_certificates.rb +22 -0
- data/lib/fog/azurerm/models/network/vpn_client_root_certificates.rb +22 -0
- data/lib/fog/azurerm/models/resources/azure_resource.rb +25 -0
- data/lib/fog/azurerm/models/resources/azure_resources.rb +32 -0
- data/lib/fog/azurerm/models/resources/dependency.rb +27 -0
- data/lib/fog/azurerm/models/resources/deployment.rb +65 -0
- data/lib/fog/azurerm/models/resources/deployments.rb +30 -0
- data/lib/fog/azurerm/models/resources/provider.rb +27 -0
- data/lib/fog/azurerm/models/resources/provider_resource_type.rb +22 -0
- data/lib/fog/azurerm/models/resources/resource_group.rb +32 -0
- data/lib/fog/azurerm/models/resources/resource_groups.rb +29 -0
- data/lib/fog/azurerm/models/sql/firewall_rule.rb +48 -0
- data/lib/fog/azurerm/models/sql/firewall_rules.rb +32 -0
- data/lib/fog/azurerm/models/sql/sql_database.rb +67 -0
- data/lib/fog/azurerm/models/sql/sql_databases.rb +32 -0
- data/lib/fog/azurerm/models/sql/sql_server.rb +49 -0
- data/lib/fog/azurerm/models/sql/sql_servers.rb +31 -0
- data/lib/fog/azurerm/models/storage/data_disk.rb +27 -0
- data/lib/fog/azurerm/models/storage/directories.rb +70 -0
- data/lib/fog/azurerm/models/storage/directory.rb +151 -0
- data/lib/fog/azurerm/models/storage/file.rb +263 -0
- data/lib/fog/azurerm/models/storage/files.rb +183 -0
- data/lib/fog/azurerm/models/storage/kind.rb +12 -0
- data/lib/fog/azurerm/models/storage/recovery_vault.rb +50 -0
- data/lib/fog/azurerm/models/storage/recovery_vaults.rb +27 -0
- data/lib/fog/azurerm/models/storage/sku_name.rb +15 -0
- data/lib/fog/azurerm/models/storage/sku_tier.rb +12 -0
- data/lib/fog/azurerm/models/storage/storage_account.rb +89 -0
- data/lib/fog/azurerm/models/storage/storage_accounts.rb +40 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_point.rb +82 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_end_points.rb +30 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +88 -0
- data/lib/fog/azurerm/models/traffic_manager/traffic_manager_profiles.rb +27 -0
- data/lib/fog/azurerm/network.rb +178 -0
- data/lib/fog/azurerm/requests/application_gateway/check_ag_exists.rb +31 -0
- data/lib/fog/azurerm/requests/application_gateway/create_or_update_application_gateway.rb +301 -0
- data/lib/fog/azurerm/requests/application_gateway/delete_application_gateway.rb +26 -0
- data/lib/fog/azurerm/requests/application_gateway/get_application_gateway.rb +159 -0
- data/lib/fog/azurerm/requests/application_gateway/list_application_gateways.rb +29 -0
- data/lib/fog/azurerm/requests/application_gateway/start_application_gateway.rb +27 -0
- data/lib/fog/azurerm/requests/application_gateway/stop_application_gateway.rb +27 -0
- data/lib/fog/azurerm/requests/application_gateway/update_sku_attributes.rb +28 -0
- data/lib/fog/azurerm/requests/application_gateway/update_subnet_id_in_gateway_ip_configuration.rb +29 -0
- data/lib/fog/azurerm/requests/compute/attach_data_disk_to_vm.rb +172 -0
- data/lib/fog/azurerm/requests/compute/check_availability_set_exists.rb +31 -0
- data/lib/fog/azurerm/requests/compute/check_managed_disk_exists.rb +33 -0
- data/lib/fog/azurerm/requests/compute/check_vm_exists.rb +39 -0
- data/lib/fog/azurerm/requests/compute/check_vm_extension_exists.rb +31 -0
- data/lib/fog/azurerm/requests/compute/check_vm_status.rb +38 -0
- data/lib/fog/azurerm/requests/compute/create_availability_set.rb +48 -0
- data/lib/fog/azurerm/requests/compute/create_or_update_managed_disk.rb +121 -0
- data/lib/fog/azurerm/requests/compute/create_or_update_vm_extension.rb +63 -0
- data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +264 -0
- data/lib/fog/azurerm/requests/compute/deallocate_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/delete_availability_set.rb +27 -0
- data/lib/fog/azurerm/requests/compute/delete_managed_disk.rb +29 -0
- data/lib/fog/azurerm/requests/compute/delete_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/delete_vm_extension.rb +28 -0
- data/lib/fog/azurerm/requests/compute/detach_data_disk_from_vm.rb +103 -0
- data/lib/fog/azurerm/requests/compute/generalize_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/get_availability_set.rb +32 -0
- data/lib/fog/azurerm/requests/compute/get_managed_disk.rb +64 -0
- data/lib/fog/azurerm/requests/compute/get_virtual_machine.rb +86 -0
- data/lib/fog/azurerm/requests/compute/get_vm_extension.rb +46 -0
- data/lib/fog/azurerm/requests/compute/grant_access_to_managed_disk.rb +30 -0
- data/lib/fog/azurerm/requests/compute/list_availability_sets.rb +40 -0
- data/lib/fog/azurerm/requests/compute/list_available_sizes_for_virtual_machine.rb +64 -0
- data/lib/fog/azurerm/requests/compute/list_managed_disks_by_rg.rb +66 -0
- data/lib/fog/azurerm/requests/compute/list_managed_disks_in_subscription.rb +66 -0
- data/lib/fog/azurerm/requests/compute/list_virtual_machines.rb +69 -0
- data/lib/fog/azurerm/requests/compute/power_off_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/redeploy_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/restart_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/compute/revoke_access_to_managed_disk.rb +33 -0
- data/lib/fog/azurerm/requests/compute/start_virtual_machine.rb +35 -0
- data/lib/fog/azurerm/requests/dns/check_record_set_exists.rb +31 -0
- data/lib/fog/azurerm/requests/dns/check_zone_exists.rb +33 -0
- data/lib/fog/azurerm/requests/dns/create_or_update_record_set.rb +71 -0
- data/lib/fog/azurerm/requests/dns/create_or_update_zone.rb +57 -0
- data/lib/fog/azurerm/requests/dns/delete_record_set.rb +28 -0
- data/lib/fog/azurerm/requests/dns/delete_zone.rb +28 -0
- data/lib/fog/azurerm/requests/dns/get_record_set.rb +47 -0
- data/lib/fog/azurerm/requests/dns/get_records_from_record_set.rb +32 -0
- data/lib/fog/azurerm/requests/dns/get_zone.rb +41 -0
- data/lib/fog/azurerm/requests/dns/list_record_sets.rb +63 -0
- data/lib/fog/azurerm/requests/dns/list_zones.rb +72 -0
- data/lib/fog/azurerm/requests/key_vault/check_vault_exists.rb +31 -0
- data/lib/fog/azurerm/requests/key_vault/create_or_update_vault.rb +105 -0
- data/lib/fog/azurerm/requests/key_vault/delete_vault.rb +28 -0
- data/lib/fog/azurerm/requests/key_vault/get_vault.rb +54 -0
- data/lib/fog/azurerm/requests/key_vault/list_vaults.rb +56 -0
- data/lib/fog/azurerm/requests/network/add_address_prefixes_in_virtual_network.rb +68 -0
- data/lib/fog/azurerm/requests/network/add_dns_servers_in_virtual_network.rb +76 -0
- data/lib/fog/azurerm/requests/network/add_security_rules.rb +154 -0
- data/lib/fog/azurerm/requests/network/add_subnets_in_virtual_network.rb +71 -0
- data/lib/fog/azurerm/requests/network/attach_network_security_group_to_subnet.rb +57 -0
- data/lib/fog/azurerm/requests/network/attach_resource_to_nic.rb +89 -0
- data/lib/fog/azurerm/requests/network/attach_route_table_to_subnet.rb +57 -0
- data/lib/fog/azurerm/requests/network/check_express_route_cir_auth_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_express_route_circuit_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_load_balancer_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_local_net_gateway_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_net_sec_group_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_net_sec_rule_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_network_interface_exists.rb +31 -0
- data/lib/fog/azurerm/requests/network/check_public_ip_exists.rb +33 -0
- data/lib/fog/azurerm/requests/network/check_subnet_exists.rb +32 -0
- data/lib/fog/azurerm/requests/network/check_virtual_network_exists.rb +33 -0
- data/lib/fog/azurerm/requests/network/check_vnet_gateway_connection_exists.rb +32 -0
- data/lib/fog/azurerm/requests/network/check_vnet_gateway_exists.rb +32 -0
- data/lib/fog/azurerm/requests/network/create_load_balancer.rb +189 -0
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit.rb +111 -0
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit_authorization.rb +51 -0
- data/lib/fog/azurerm/requests/network/create_or_update_express_route_circuit_peering.rb +79 -0
- data/lib/fog/azurerm/requests/network/create_or_update_local_network_gateway.rb +80 -0
- data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +120 -0
- data/lib/fog/azurerm/requests/network/create_or_update_network_security_group.rb +177 -0
- data/lib/fog/azurerm/requests/network/create_or_update_network_security_rule.rb +59 -0
- data/lib/fog/azurerm/requests/network/create_or_update_public_ip.rb +59 -0
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network.rb +110 -0
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway.rb +159 -0
- data/lib/fog/azurerm/requests/network/create_or_update_virtual_network_gateway_connection.rb +83 -0
- data/lib/fog/azurerm/requests/network/create_subnet.rb +54 -0
- data/lib/fog/azurerm/requests/network/delete_express_route_circuit.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_express_route_circuit_authorization.rb +29 -0
- data/lib/fog/azurerm/requests/network/delete_express_route_circuit_peering.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_load_balancer.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_local_network_gateway.rb +29 -0
- data/lib/fog/azurerm/requests/network/delete_network_interface.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_network_security_group.rb +30 -0
- data/lib/fog/azurerm/requests/network/delete_network_security_rule.rb +30 -0
- data/lib/fog/azurerm/requests/network/delete_public_ip.rb +27 -0
- data/lib/fog/azurerm/requests/network/delete_subnet.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_virtual_network.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_virtual_network_gateway.rb +28 -0
- data/lib/fog/azurerm/requests/network/delete_virtual_network_gateway_connection.rb +29 -0
- data/lib/fog/azurerm/requests/network/detach_network_security_group_from_subnet.rb +51 -0
- data/lib/fog/azurerm/requests/network/detach_resource_from_nic.rb +81 -0
- data/lib/fog/azurerm/requests/network/detach_route_table_from_subnet.rb +51 -0
- data/lib/fog/azurerm/requests/network/get_available_ipaddresses_count.rb +23 -0
- data/lib/fog/azurerm/requests/network/get_connection_shared_key.rb +25 -0
- data/lib/fog/azurerm/requests/network/get_express_route_circuit.rb +51 -0
- data/lib/fog/azurerm/requests/network/get_express_route_circuit_authorization.rb +35 -0
- data/lib/fog/azurerm/requests/network/get_express_route_circuit_peering.rb +48 -0
- data/lib/fog/azurerm/requests/network/get_load_balancer.rb +170 -0
- data/lib/fog/azurerm/requests/network/get_local_network_gateway.rb +47 -0
- data/lib/fog/azurerm/requests/network/get_network_interface.rb +60 -0
- data/lib/fog/azurerm/requests/network/get_network_security_group.rb +165 -0
- data/lib/fog/azurerm/requests/network/get_network_security_rule.rb +47 -0
- data/lib/fog/azurerm/requests/network/get_public_ip.rb +41 -0
- data/lib/fog/azurerm/requests/network/get_subnet.rb +37 -0
- data/lib/fog/azurerm/requests/network/get_virtual_network.rb +62 -0
- data/lib/fog/azurerm/requests/network/get_virtual_network_gateway.rb +45 -0
- data/lib/fog/azurerm/requests/network/get_virtual_network_gateway_connection.rb +47 -0
- data/lib/fog/azurerm/requests/network/list_express_route_circuit_authorizations.rb +37 -0
- data/lib/fog/azurerm/requests/network/list_express_route_circuit_peerings.rb +44 -0
- data/lib/fog/azurerm/requests/network/list_express_route_circuits.rb +53 -0
- data/lib/fog/azurerm/requests/network/list_express_route_service_providers.rb +37 -0
- data/lib/fog/azurerm/requests/network/list_load_balancers.rb +31 -0
- data/lib/fog/azurerm/requests/network/list_load_balancers_in_subscription.rb +31 -0
- data/lib/fog/azurerm/requests/network/list_local_network_gateways.rb +50 -0
- data/lib/fog/azurerm/requests/network/list_network_interfaces.rb +67 -0
- data/lib/fog/azurerm/requests/network/list_network_security_groups.rb +169 -0
- data/lib/fog/azurerm/requests/network/list_network_security_rules.rb +51 -0
- data/lib/fog/azurerm/requests/network/list_public_ips.rb +46 -0
- data/lib/fog/azurerm/requests/network/list_subnets.rb +55 -0
- data/lib/fog/azurerm/requests/network/list_virtual_network_gateway_connections.rb +50 -0
- data/lib/fog/azurerm/requests/network/list_virtual_network_gateways.rb +43 -0
- data/lib/fog/azurerm/requests/network/list_virtual_networks.rb +74 -0
- data/lib/fog/azurerm/requests/network/list_virtual_networks_in_subscription.rb +74 -0
- data/lib/fog/azurerm/requests/network/remove_address_prefixes_from_virtual_network.rb +69 -0
- data/lib/fog/azurerm/requests/network/remove_dns_servers_from_virtual_network.rb +69 -0
- data/lib/fog/azurerm/requests/network/remove_security_rule.rb +157 -0
- data/lib/fog/azurerm/requests/network/remove_subnets_from_virtual_network.rb +59 -0
- data/lib/fog/azurerm/requests/network/reset_connection_shared_key.rb +36 -0
- data/lib/fog/azurerm/requests/network/set_connection_shared_key.rb +36 -0
- data/lib/fog/azurerm/requests/resources/check_azure_resource_exists.rb +40 -0
- data/lib/fog/azurerm/requests/resources/check_deployment_exists.rb +30 -0
- data/lib/fog/azurerm/requests/resources/check_resource_group_exists.rb +30 -0
- data/lib/fog/azurerm/requests/resources/create_deployment.rb +97 -0
- data/lib/fog/azurerm/requests/resources/create_resource_group.rb +39 -0
- data/lib/fog/azurerm/requests/resources/delete_deployment.rb +28 -0
- data/lib/fog/azurerm/requests/resources/delete_resource_group.rb +28 -0
- data/lib/fog/azurerm/requests/resources/delete_resource_tag.rb +44 -0
- data/lib/fog/azurerm/requests/resources/get_deployment.rb +81 -0
- data/lib/fog/azurerm/requests/resources/get_resource_group.rb +47 -0
- data/lib/fog/azurerm/requests/resources/list_deployments.rb +77 -0
- data/lib/fog/azurerm/requests/resources/list_resource_groups.rb +51 -0
- data/lib/fog/azurerm/requests/resources/list_tagged_resources.rb +50 -0
- data/lib/fog/azurerm/requests/resources/tag_resource.rb +43 -0
- data/lib/fog/azurerm/requests/sql/check_database_exists.rb +21 -0
- data/lib/fog/azurerm/requests/sql/check_firewall_rule_exists.rb +21 -0
- data/lib/fog/azurerm/requests/sql/check_sql_server_exists.rb +21 -0
- data/lib/fog/azurerm/requests/sql/create_or_update_database.rb +68 -0
- data/lib/fog/azurerm/requests/sql/create_or_update_firewall_rule.rb +42 -0
- data/lib/fog/azurerm/requests/sql/create_or_update_sql_server.rb +50 -0
- data/lib/fog/azurerm/requests/sql/delete_database.rb +28 -0
- data/lib/fog/azurerm/requests/sql/delete_firewall_rule.rb +29 -0
- data/lib/fog/azurerm/requests/sql/delete_sql_server.rb +29 -0
- data/lib/fog/azurerm/requests/sql/get_database.rb +42 -0
- data/lib/fog/azurerm/requests/sql/get_firewall_rule.rb +37 -0
- data/lib/fog/azurerm/requests/sql/get_sql_server.rb +34 -0
- data/lib/fog/azurerm/requests/sql/list_databases.rb +58 -0
- data/lib/fog/azurerm/requests/sql/list_firewall_rules.rb +49 -0
- data/lib/fog/azurerm/requests/sql/list_sql_servers.rb +44 -0
- data/lib/fog/azurerm/requests/storage/acquire_blob_lease.rb +32 -0
- data/lib/fog/azurerm/requests/storage/acquire_container_lease.rb +32 -0
- data/lib/fog/azurerm/requests/storage/check_container_exists.rb +30 -0
- data/lib/fog/azurerm/requests/storage/check_storage_account_exists.rb +37 -0
- data/lib/fog/azurerm/requests/storage/check_storage_account_name_availability.rb +44 -0
- data/lib/fog/azurerm/requests/storage/commit_blob_blocks.rb +30 -0
- data/lib/fog/azurerm/requests/storage/compare_container_blobs.rb +148 -0
- data/lib/fog/azurerm/requests/storage/copy_blob.rb +30 -0
- data/lib/fog/azurerm/requests/storage/copy_blob_from_uri.rb +30 -0
- data/lib/fog/azurerm/requests/storage/create_block_blob.rb +108 -0
- data/lib/fog/azurerm/requests/storage/create_container.rb +40 -0
- data/lib/fog/azurerm/requests/storage/create_disk.rb +62 -0
- data/lib/fog/azurerm/requests/storage/create_or_update_recovery_vault.rb +54 -0
- data/lib/fog/azurerm/requests/storage/create_page_blob.rb +31 -0
- data/lib/fog/azurerm/requests/storage/create_storage_account.rb +64 -0
- data/lib/fog/azurerm/requests/storage/delete_blob.rb +32 -0
- data/lib/fog/azurerm/requests/storage/delete_container.rb +31 -0
- data/lib/fog/azurerm/requests/storage/delete_disk.rb +36 -0
- data/lib/fog/azurerm/requests/storage/delete_recovery_vault.rb +35 -0
- data/lib/fog/azurerm/requests/storage/delete_storage_account.rb +27 -0
- data/lib/fog/azurerm/requests/storage/disable_backup_protection.rb +60 -0
- data/lib/fog/azurerm/requests/storage/enable_backup_protection.rb +61 -0
- data/lib/fog/azurerm/requests/storage/get_all_backup_jobs.rb +56 -0
- data/lib/fog/azurerm/requests/storage/get_backup_container.rb +53 -0
- data/lib/fog/azurerm/requests/storage/get_backup_item.rb +58 -0
- data/lib/fog/azurerm/requests/storage/get_backup_job_for_vm.rb +53 -0
- data/lib/fog/azurerm/requests/storage/get_backup_protection_policy.rb +64 -0
- data/lib/fog/azurerm/requests/storage/get_blob.rb +163 -0
- data/lib/fog/azurerm/requests/storage/get_blob_http_url.rb +39 -0
- data/lib/fog/azurerm/requests/storage/get_blob_https_url.rb +39 -0
- data/lib/fog/azurerm/requests/storage/get_blob_properties.rb +55 -0
- data/lib/fog/azurerm/requests/storage/get_blob_url.rb +28 -0
- data/lib/fog/azurerm/requests/storage/get_container_acl.rb +30 -0
- data/lib/fog/azurerm/requests/storage/get_container_properties.rb +41 -0
- data/lib/fog/azurerm/requests/storage/get_container_url.rb +34 -0
- data/lib/fog/azurerm/requests/storage/get_recovery_vault.rb +49 -0
- data/lib/fog/azurerm/requests/storage/get_storage_access_keys.rb +32 -0
- data/lib/fog/azurerm/requests/storage/get_storage_account.rb +36 -0
- data/lib/fog/azurerm/requests/storage/list_blobs.rb +168 -0
- data/lib/fog/azurerm/requests/storage/list_containers.rb +73 -0
- data/lib/fog/azurerm/requests/storage/list_recovery_vaults.rb +48 -0
- data/lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb +49 -0
- data/lib/fog/azurerm/requests/storage/list_storage_accounts.rb +49 -0
- data/lib/fog/azurerm/requests/storage/multipart_save_block_blob.rb +110 -0
- data/lib/fog/azurerm/requests/storage/put_blob_block.rb +30 -0
- data/lib/fog/azurerm/requests/storage/put_blob_metadata.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_blob_pages.rb +30 -0
- data/lib/fog/azurerm/requests/storage/put_blob_properties.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_container_acl.rb +31 -0
- data/lib/fog/azurerm/requests/storage/put_container_metadata.rb +31 -0
- data/lib/fog/azurerm/requests/storage/release_blob_lease.rb +30 -0
- data/lib/fog/azurerm/requests/storage/release_container_lease.rb +30 -0
- data/lib/fog/azurerm/requests/storage/save_page_blob.rb +111 -0
- data/lib/fog/azurerm/requests/storage/set_recovery_vault_context.rb +36 -0
- data/lib/fog/azurerm/requests/storage/start_backup.rb +54 -0
- data/lib/fog/azurerm/requests/storage/update_storage_account.rb +59 -0
- data/lib/fog/azurerm/requests/storage/wait_blob_copy_operation_to_finish.rb +56 -0
- data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_endpoint_exists.rb +31 -0
- data/lib/fog/azurerm/requests/traffic_manager/check_traffic_manager_profile_exists.rb +31 -0
- data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_endpoint.rb +54 -0
- data/lib/fog/azurerm/requests/traffic_manager/create_or_update_traffic_manager_profile.rb +120 -0
- data/lib/fog/azurerm/requests/traffic_manager/delete_traffic_manager_endpoint.rb +28 -0
- data/lib/fog/azurerm/requests/traffic_manager/delete_traffic_manager_profile.rb +26 -0
- data/lib/fog/azurerm/requests/traffic_manager/get_traffic_manager_endpoint.rb +39 -0
- data/lib/fog/azurerm/requests/traffic_manager/get_traffic_manager_profile.rb +80 -0
- data/lib/fog/azurerm/requests/traffic_manager/list_traffic_manager_profiles.rb +82 -0
- data/lib/fog/azurerm/resources.rb +71 -0
- data/lib/fog/azurerm/sql.rb +66 -0
- data/lib/fog/azurerm/storage.rb +155 -0
- data/lib/fog/azurerm/traffic_manager.rb +62 -0
- data/lib/fog/azurerm/utilities/general.rb +168 -0
- data/lib/fog/azurerm/utilities/logger_messages.yml +19 -0
- data/lib/fog/azurerm/version.rb +5 -0
- data/rake-script.sh +4 -0
- data/rakefile +29 -0
- data/test/api_stub.rb +128 -0
- data/test/api_stub/models/application_gateway/gateway.rb +165 -0
- data/test/api_stub/models/compute/availability_set.rb +50 -0
- data/test/api_stub/models/compute/managed_disk.rb +59 -0
- data/test/api_stub/models/compute/server.rb +190 -0
- data/test/api_stub/models/compute/virtual_machine_extension.rb +31 -0
- data/test/api_stub/models/dns/record_set.rb +57 -0
- data/test/api_stub/models/dns/zone.rb +29 -0
- data/test/api_stub/models/key_vault/vault.rb +39 -0
- data/test/api_stub/models/network/express_route_circuit.rb +47 -0
- data/test/api_stub/models/network/express_route_circuit_authorization.rb +22 -0
- data/test/api_stub/models/network/express_route_circuit_peering.rb +33 -0
- data/test/api_stub/models/network/express_route_service_provider.rb +29 -0
- data/test/api_stub/models/network/load_balancer.rb +154 -0
- data/test/api_stub/models/network/local_network_gateway.rb +31 -0
- data/test/api_stub/models/network/network_interface.rb +72 -0
- data/test/api_stub/models/network/network_security_group.rb +95 -0
- data/test/api_stub/models/network/network_security_rule.rb +30 -0
- data/test/api_stub/models/network/public_ip.rb +36 -0
- data/test/api_stub/models/network/subnet.rb +36 -0
- data/test/api_stub/models/network/virtual_network.rb +62 -0
- data/test/api_stub/models/network/virtual_network_gateway.rb +26 -0
- data/test/api_stub/models/network/virtual_network_gateway_connection.rb +31 -0
- data/test/api_stub/models/resources/deployment.rb +116 -0
- data/test/api_stub/models/resources/resource.rb +43 -0
- data/test/api_stub/models/resources/resource_group.rb +24 -0
- data/test/api_stub/models/sql/sql_database.rb +30 -0
- data/test/api_stub/models/sql/sql_firewall_rule.rb +24 -0
- data/test/api_stub/models/sql/sql_server.rb +24 -0
- data/test/api_stub/models/storage/directory.rb +178 -0
- data/test/api_stub/models/storage/file.rb +181 -0
- data/test/api_stub/models/storage/recovery_vault.rb +23 -0
- data/test/api_stub/models/storage/storageaccount.rb +22 -0
- data/test/api_stub/models/traffic_manager/traffic_manager_end_point.rb +27 -0
- data/test/api_stub/models/traffic_manager/traffic_manager_profile.rb +75 -0
- data/test/api_stub/requests/application_gateway/gateway.rb +461 -0
- data/test/api_stub/requests/compute/availability_set.rb +57 -0
- data/test/api_stub/requests/compute/managed_disk.rb +102 -0
- data/test/api_stub/requests/compute/virtual_machine.rb +943 -0
- data/test/api_stub/requests/compute/virtual_machine_extension.rb +46 -0
- data/test/api_stub/requests/dns/record_set.rb +75 -0
- data/test/api_stub/requests/dns/zone.rb +52 -0
- data/test/api_stub/requests/key_vault/vault.rb +95 -0
- data/test/api_stub/requests/network/express_route_circuit.rb +100 -0
- data/test/api_stub/requests/network/express_route_circuit_authorization.rb +31 -0
- data/test/api_stub/requests/network/express_route_circuit_peering.rb +62 -0
- data/test/api_stub/requests/network/express_route_service_provider.rb +30 -0
- data/test/api_stub/requests/network/load_balancer.rb +388 -0
- data/test/api_stub/requests/network/local_network_gateway.rb +62 -0
- data/test/api_stub/requests/network/network_interface.rb +264 -0
- data/test/api_stub/requests/network/network_security_group.rb +225 -0
- data/test/api_stub/requests/network/network_security_rule.rb +72 -0
- data/test/api_stub/requests/network/public_ip.rb +71 -0
- data/test/api_stub/requests/network/subnet.rb +71 -0
- data/test/api_stub/requests/network/virtual_network.rb +125 -0
- data/test/api_stub/requests/network/virtual_network_gateway.rb +49 -0
- data/test/api_stub/requests/network/virtual_network_gateway_connection.rb +68 -0
- data/test/api_stub/requests/resources/deployment.rb +68 -0
- data/test/api_stub/requests/resources/resource.rb +45 -0
- data/test/api_stub/requests/resources/resource_group.rb +51 -0
- data/test/api_stub/requests/sql/database.rb +71 -0
- data/test/api_stub/requests/sql/firewall_rule.rb +50 -0
- data/test/api_stub/requests/sql/sql_server.rb +49 -0
- data/test/api_stub/requests/storage/directory.rb +89 -0
- data/test/api_stub/requests/storage/file.rb +243 -0
- data/test/api_stub/requests/storage/recovery_vault.rb +189 -0
- data/test/api_stub/requests/storage/storageaccount.rb +126 -0
- data/test/api_stub/requests/traffic_manager/traffic_manager_endpoint.rb +41 -0
- data/test/api_stub/requests/traffic_manager/traffic_manager_profile.rb +166 -0
- data/test/integration/README.md +14 -0
- data/test/integration/Virtual_network_gateway_connection.rb +220 -0
- data/test/integration/application_gateway.rb +253 -0
- data/test/integration/availability_set.rb +90 -0
- data/test/integration/blob.rb +297 -0
- data/test/integration/container.rb +160 -0
- data/test/integration/credentials/azure.yml +5 -0
- data/test/integration/data_disk.rb +90 -0
- data/test/integration/deployment.rb +78 -0
- data/test/integration/express_route_circuit.rb +139 -0
- data/test/integration/external_load_balancer.rb +155 -0
- data/test/integration/internal_load_balancer.rb +144 -0
- data/test/integration/key_vault.rb +98 -0
- data/test/integration/local_network_gateway.rb +91 -0
- data/test/integration/managed_disk.rb +113 -0
- data/test/integration/network_interface.rb +156 -0
- data/test/integration/network_security_group.rb +133 -0
- data/test/integration/network_security_rule.rb +102 -0
- data/test/integration/public_ip.rb +83 -0
- data/test/integration/record_set.rb +126 -0
- data/test/integration/resource_group.rb +59 -0
- data/test/integration/resource_tag.rb +91 -0
- data/test/integration/server.rb +266 -0
- data/test/integration/server_custom_image.rb +127 -0
- data/test/integration/sql_server.rb +175 -0
- data/test/integration/storage_account.rb +123 -0
- data/test/integration/subnet.rb +122 -0
- data/test/integration/traffic_manager.rb +137 -0
- data/test/integration/virtual_machine_extension.rb +165 -0
- data/test/integration/virtual_network.rb +162 -0
- data/test/integration/virtual_network_gateway.rb +125 -0
- data/test/integration/virtual_network_gateway_connection_to_express_route.rb +123 -0
- data/test/integration/zone.rb +81 -0
- data/test/models/application_gateway/test_gateway.rb +135 -0
- data/test/models/application_gateway/test_gateways.rb +55 -0
- data/test/models/compute/test_availability_set.rb +54 -0
- data/test/models/compute/test_availability_sets.rb +55 -0
- data/test/models/compute/test_managed_disk.rb +61 -0
- data/test/models/compute/test_managed_disks.rb +68 -0
- data/test/models/compute/test_server.rb +201 -0
- data/test/models/compute/test_servers.rb +56 -0
- data/test/models/compute/test_virtual_machine_extension.rb +61 -0
- data/test/models/compute/test_virtual_machine_extensions.rb +49 -0
- data/test/models/dns/test_record_set.rb +86 -0
- data/test/models/dns/test_record_sets.rb +66 -0
- data/test/models/dns/test_zone.rb +50 -0
- data/test/models/dns/test_zones.rb +51 -0
- data/test/models/key_vault/test_vault.rb +39 -0
- data/test/models/key_vault/test_vaults.rb +55 -0
- data/test/models/network/test_express_route_circuit.rb +52 -0
- data/test/models/network/test_express_route_circuit_authorization.rb +50 -0
- data/test/models/network/test_express_route_circuit_authorizations.rb +56 -0
- data/test/models/network/test_express_route_circuit_peering.rb +53 -0
- data/test/models/network/test_express_route_circuit_peerings.rb +43 -0
- data/test/models/network/test_express_route_circuits.rb +55 -0
- data/test/models/network/test_express_route_service_providers.rb +30 -0
- data/test/models/network/test_load_balancer.rb +51 -0
- data/test/models/network/test_load_balancers.rb +55 -0
- data/test/models/network/test_local_network_gateway.rb +53 -0
- data/test/models/network/test_local_network_gateways.rb +55 -0
- data/test/models/network/test_network_interface.rb +96 -0
- data/test/models/network/test_network_interfaces.rb +55 -0
- data/test/models/network/test_network_security_group.rb +86 -0
- data/test/models/network/test_network_security_groups.rb +54 -0
- data/test/models/network/test_network_security_rule.rb +44 -0
- data/test/models/network/test_network_security_rules.rb +55 -0
- data/test/models/network/test_public_ip.rb +61 -0
- data/test/models/network/test_public_ips.rb +55 -0
- data/test/models/network/test_subnet.rb +83 -0
- data/test/models/network/test_subnets.rb +56 -0
- data/test/models/network/test_virtual_network.rb +106 -0
- data/test/models/network/test_virtual_network_gateway.rb +62 -0
- data/test/models/network/test_virtual_network_gateway_connection.rb +59 -0
- data/test/models/network/test_virtual_network_gateway_connections.rb +55 -0
- data/test/models/network/test_virtual_network_gateways.rb +55 -0
- data/test/models/network/test_virtual_networks.rb +67 -0
- data/test/models/resources/test_deployment.rb +55 -0
- data/test/models/resources/test_deployments.rb +51 -0
- data/test/models/resources/test_resource.rb +22 -0
- data/test/models/resources/test_resource_group.rb +44 -0
- data/test/models/resources/test_resource_groups.rb +51 -0
- data/test/models/resources/test_resources.rb +52 -0
- data/test/models/sql/test_database.rb +67 -0
- data/test/models/sql/test_databases.rb +42 -0
- data/test/models/sql/test_firewall_rule.rb +55 -0
- data/test/models/sql/test_firewall_rules.rb +42 -0
- data/test/models/sql/test_sql_server.rb +57 -0
- data/test/models/sql/test_sql_servers.rb +41 -0
- data/test/models/storage/test_data_disk.rb +23 -0
- data/test/models/storage/test_directories.rb +74 -0
- data/test/models/storage/test_directory.rb +178 -0
- data/test/models/storage/test_file.rb +294 -0
- data/test/models/storage/test_files.rb +234 -0
- data/test/models/storage/test_recovery_vault.rb +61 -0
- data/test/models/storage/test_recovery_vaults.rb +47 -0
- data/test/models/storage/test_storage_account.rb +88 -0
- data/test/models/storage/test_storage_accounts.rb +78 -0
- data/test/models/traffic_manager/test_traffic_manager_end_point.rb +54 -0
- data/test/models/traffic_manager/test_traffic_manager_end_points.rb +56 -0
- data/test/models/traffic_manager/test_traffic_manager_profile.rb +62 -0
- data/test/models/traffic_manager/test_traffic_manager_profiles.rb +55 -0
- data/test/requests/application_gateway/test_check_ag_exists.rb +31 -0
- data/test/requests/application_gateway/test_create_or_update_application_gateway.rb +35 -0
- data/test/requests/application_gateway/test_delete_application_gateway.rb +23 -0
- data/test/requests/application_gateway/test_get_application_gateway.rb +24 -0
- data/test/requests/application_gateway/test_list_application_gateways.rb +24 -0
- data/test/requests/application_gateway/test_start_application_gateway.rb +25 -0
- data/test/requests/application_gateway/test_stop_application_gateway.rb +25 -0
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +90 -0
- data/test/requests/compute/test_check_availability_set_exists.rb +31 -0
- data/test/requests/compute/test_check_managed_disk_exists.rb +31 -0
- data/test/requests/compute/test_check_vm_exists.rb +31 -0
- data/test/requests/compute/test_check_vm_extension_exists.rb +31 -0
- data/test/requests/compute/test_create_availability_set.rb +28 -0
- data/test/requests/compute/test_create_or_update_managed_disk.rb +38 -0
- data/test/requests/compute/test_create_virtual_machine.rb +90 -0
- data/test/requests/compute/test_create_vm_extension.rb +35 -0
- data/test/requests/compute/test_deallocate_virtual_machine.rb +32 -0
- data/test/requests/compute/test_delete_availability_set.rb +23 -0
- data/test/requests/compute/test_delete_managed_disk.rb +23 -0
- data/test/requests/compute/test_delete_virtual_machine.rb +32 -0
- data/test/requests/compute/test_detach_data_disk_from_vm.rb +32 -0
- data/test/requests/compute/test_generalize_virtual_machine.rb +32 -0
- data/test/requests/compute/test_get_availability_set.rb +24 -0
- data/test/requests/compute/test_get_managed_disk.rb +24 -0
- data/test/requests/compute/test_get_virtual_machine.rb +24 -0
- data/test/requests/compute/test_get_vm_extension.rb +26 -0
- data/test/requests/compute/test_get_vm_status.rb +25 -0
- data/test/requests/compute/test_grant_access_to_managed_disk.rb +26 -0
- data/test/requests/compute/test_list_availability_sets.rb +24 -0
- data/test/requests/compute/test_list_available_sizes_for_virtual_machine.rb +33 -0
- data/test/requests/compute/test_list_managed_disks_by_rg.rb +24 -0
- data/test/requests/compute/test_list_managed_disks_in_subscription.rb +24 -0
- data/test/requests/compute/test_list_virtual_machines.rb +24 -0
- data/test/requests/compute/test_power_off_virtual_machine.rb +32 -0
- data/test/requests/compute/test_redeploy_virtual_machine.rb +33 -0
- data/test/requests/compute/test_restart_virtual_machine.rb +32 -0
- data/test/requests/compute/test_revoke_access_to_managed_disk.rb +24 -0
- data/test/requests/compute/test_start_virtual_machine.rb +32 -0
- data/test/requests/compute/test_update_vm_extension.rb +35 -0
- data/test/requests/dns/test_check_record_set_exists.rb +31 -0
- data/test/requests/dns/test_check_zone_exists.rb +35 -0
- data/test/requests/dns/test_create_record_set.rb +46 -0
- data/test/requests/dns/test_create_zone.rb +37 -0
- data/test/requests/dns/test_delete_record_set.rb +24 -0
- data/test/requests/dns/test_delete_zone.rb +24 -0
- data/test/requests/dns/test_get_record_set.rb +24 -0
- data/test/requests/dns/test_get_records_from_record_set.rb +42 -0
- data/test/requests/dns/test_get_zone.rb +35 -0
- data/test/requests/dns/test_list_record_sets.rb +35 -0
- data/test/requests/dns/test_list_zones.rb +26 -0
- data/test/requests/key_vault/test_check_vault_exists.rb +31 -0
- data/test/requests/key_vault/test_create_or_update_vault.rb +25 -0
- data/test/requests/key_vault/test_delete_vault.rb +23 -0
- data/test/requests/key_vault/test_get_vault.rb +24 -0
- data/test/requests/key_vault/test_list_vaults.rb +24 -0
- data/test/requests/network/test_add_address_prefixes_in_virtual_network.rb +29 -0
- data/test/requests/network/test_add_dns_servers_in_virtual_network.rb +29 -0
- data/test/requests/network/test_add_security_rules.rb +43 -0
- data/test/requests/network/test_add_subnets_in_virtual_network.rb +29 -0
- data/test/requests/network/test_attach_network_security_group_to_subnet.rb +26 -0
- data/test/requests/network/test_attach_resource_to_nic.rb +43 -0
- data/test/requests/network/test_attach_route_table_to_subnet.rb +26 -0
- data/test/requests/network/test_check_express_route_cir_auth_exists.rb +31 -0
- data/test/requests/network/test_check_express_route_circuit_exists.rb +31 -0
- data/test/requests/network/test_check_load_balancer_exists.rb +31 -0
- data/test/requests/network/test_check_local_net_gateway_exists.rb +31 -0
- data/test/requests/network/test_check_net_sec_group_exists.rb +31 -0
- data/test/requests/network/test_check_net_sec_rule_exists.rb +31 -0
- data/test/requests/network/test_check_network_interface_exists.rb +31 -0
- data/test/requests/network/test_check_public_ip_exists.rb +30 -0
- data/test/requests/network/test_check_subnet_exists.rb +31 -0
- data/test/requests/network/test_check_virtual_network_exists.rb +34 -0
- data/test/requests/network/test_check_vnet_gateway_connection_exists.rb +31 -0
- data/test/requests/network/test_check_vnet_gateway_exists.rb +31 -0
- data/test/requests/network/test_create_express_route_circuit.rb +39 -0
- data/test/requests/network/test_create_express_route_circuit_authorization.rb +35 -0
- data/test/requests/network/test_create_express_route_circuit_peering.rb +37 -0
- data/test/requests/network/test_create_load_balancer.rb +49 -0
- data/test/requests/network/test_create_local_network_gateway.rb +36 -0
- data/test/requests/network/test_create_network_interface.rb +42 -0
- data/test/requests/network/test_create_or_update_network_security_group.rb +38 -0
- data/test/requests/network/test_create_or_update_network_security_rule.rb +28 -0
- data/test/requests/network/test_create_or_update_virtual_network.rb +55 -0
- data/test/requests/network/test_create_public_ip.rb +35 -0
- data/test/requests/network/test_create_subnet.rb +35 -0
- data/test/requests/network/test_create_virtual_network_gateway.rb +37 -0
- data/test/requests/network/test_create_virtual_network_gateway_connection.rb +36 -0
- data/test/requests/network/test_delete_express_route_circuit.rb +24 -0
- data/test/requests/network/test_delete_express_route_circuit_authorization.rb +23 -0
- data/test/requests/network/test_delete_express_route_circuit_peering.rb +24 -0
- data/test/requests/network/test_delete_load_balancer.rb +24 -0
- data/test/requests/network/test_delete_local_network_gateway.rb +23 -0
- data/test/requests/network/test_delete_network_interface.rb +24 -0
- data/test/requests/network/test_delete_network_security_group.rb +25 -0
- data/test/requests/network/test_delete_network_security_rule.rb +25 -0
- data/test/requests/network/test_delete_public_ip.rb +24 -0
- data/test/requests/network/test_delete_subnet.rb +24 -0
- data/test/requests/network/test_delete_virtual_network.rb +24 -0
- data/test/requests/network/test_delete_virtual_network_gateway.rb +24 -0
- data/test/requests/network/test_delete_virtual_network_gateway_connection.rb +23 -0
- data/test/requests/network/test_detach_network_security_group_from_subnet.rb +26 -0
- data/test/requests/network/test_detach_resource_from_nic.rb +41 -0
- data/test/requests/network/test_detach_route_table_from_subnet.rb +26 -0
- data/test/requests/network/test_get_available_ipaddresses_count.rb +18 -0
- data/test/requests/network/test_get_connection_shared_key.rb +24 -0
- data/test/requests/network/test_get_express_route_circuit.rb +24 -0
- data/test/requests/network/test_get_express_route_circuit_authorization.rb +24 -0
- data/test/requests/network/test_get_express_route_circuit_peering.rb +24 -0
- data/test/requests/network/test_get_load_balancer.rb +24 -0
- data/test/requests/network/test_get_local_network_gateway.rb +24 -0
- data/test/requests/network/test_get_network_interface.rb +24 -0
- data/test/requests/network/test_get_network_security_group.rb +26 -0
- data/test/requests/network/test_get_network_security_rule.rb +26 -0
- data/test/requests/network/test_get_public_ip.rb +26 -0
- data/test/requests/network/test_get_subnet.rb +26 -0
- data/test/requests/network/test_get_virtual_network.rb +26 -0
- data/test/requests/network/test_get_virtual_network_gateway.rb +24 -0
- data/test/requests/network/test_get_virtual_network_gateway_connection.rb +24 -0
- data/test/requests/network/test_list_express_route_circuit_authorizations.rb +24 -0
- data/test/requests/network/test_list_express_route_circuit_peerings.rb +24 -0
- data/test/requests/network/test_list_express_route_circuits.rb +26 -0
- data/test/requests/network/test_list_express_route_service_providers.rb +24 -0
- data/test/requests/network/test_list_load_balancers.rb +24 -0
- data/test/requests/network/test_list_local_network_gateways.rb +24 -0
- data/test/requests/network/test_list_network_interfaces.rb +24 -0
- data/test/requests/network/test_list_network_security_groups.rb +26 -0
- data/test/requests/network/test_list_network_security_rules.rb +26 -0
- data/test/requests/network/test_list_public_ips.rb +24 -0
- data/test/requests/network/test_list_subnets.rb +24 -0
- data/test/requests/network/test_list_virtual_network_gateway_connections.rb +24 -0
- data/test/requests/network/test_list_virtual_network_gateways.rb +24 -0
- data/test/requests/network/test_list_virtual_networks.rb +24 -0
- data/test/requests/network/test_list_virtual_networks_in_subscription.rb +24 -0
- data/test/requests/network/test_remove_address_prefixes_from_virtual_network.rb +29 -0
- data/test/requests/network/test_remove_dns_servers_from_virtual_network.rb +29 -0
- data/test/requests/network/test_remove_security_rule.rb +29 -0
- data/test/requests/network/test_remove_subnets_from_virtual_network.rb +29 -0
- data/test/requests/network/test_reset_connection_shared_key.rb +23 -0
- data/test/requests/network/test_set_connection_shared_key.rb +23 -0
- data/test/requests/network/test_update_public_ip.rb +34 -0
- data/test/requests/resources/test_check_azure_resource_exists.rb +22 -0
- data/test/requests/resources/test_check_deployment_exists.rb +29 -0
- data/test/requests/resources/test_check_resource_group_exists.rb +29 -0
- data/test/requests/resources/test_create_deployment.rb +32 -0
- data/test/requests/resources/test_create_resource_group.rb +24 -0
- data/test/requests/resources/test_delete_deployment.rb +25 -0
- data/test/requests/resources/test_delete_resource_group.rb +24 -0
- data/test/requests/resources/test_delete_resource_tag.rb +35 -0
- data/test/requests/resources/test_get_deployment.rb +24 -0
- data/test/requests/resources/test_get_resource_group.rb +24 -0
- data/test/requests/resources/test_list_deployments.rb +25 -0
- data/test/requests/resources/test_list_resource_groups.rb +24 -0
- data/test/requests/resources/test_list_tagged_resources.rb +24 -0
- data/test/requests/resources/test_tag_resource.rb +35 -0
- data/test/requests/sql/test_create_or_update_database.rb +25 -0
- data/test/requests/sql/test_create_or_update_firewall_rule.rb +25 -0
- data/test/requests/sql/test_create_or_update_sql_server.rb +25 -0
- data/test/requests/sql/test_delete_database.rb +23 -0
- data/test/requests/sql/test_delete_firewall_rule.rb +23 -0
- data/test/requests/sql/test_delete_sql_server.rb +23 -0
- data/test/requests/sql/test_get_database.rb +24 -0
- data/test/requests/sql/test_get_firewall_rule.rb +24 -0
- data/test/requests/sql/test_get_sql_server.rb +24 -0
- data/test/requests/sql/test_list_databases.rb +24 -0
- data/test/requests/sql/test_list_firewall_rules.rb +24 -0
- data/test/requests/sql/test_list_sql_servers.rb +24 -0
- data/test/requests/storage/test_acquire_blob_lease.rb +36 -0
- data/test/requests/storage/test_acquire_container_lease.rb +36 -0
- data/test/requests/storage/test_check_container_exists.rb +18 -0
- data/test/requests/storage/test_check_storage_account_exists.rb +34 -0
- data/test/requests/storage/test_check_storage_account_name_availability.rb +35 -0
- data/test/requests/storage/test_commit_blob_blocks.rb +34 -0
- data/test/requests/storage/test_compare_container_blobs.rb +36 -0
- data/test/requests/storage/test_copy_blob.rb +36 -0
- data/test/requests/storage/test_copy_blob_from_uri.rb +36 -0
- data/test/requests/storage/test_create_block_blob.rb +80 -0
- data/test/requests/storage/test_create_container.rb +36 -0
- data/test/requests/storage/test_create_disk.rb +70 -0
- data/test/requests/storage/test_create_page_blob.rb +34 -0
- data/test/requests/storage/test_create_recovery_vault.rb +35 -0
- data/test/requests/storage/test_create_storage_account.rb +34 -0
- data/test/requests/storage/test_delete_blob.rb +42 -0
- data/test/requests/storage/test_delete_container.rb +42 -0
- data/test/requests/storage/test_delete_disk.rb +30 -0
- data/test/requests/storage/test_delete_recovery_vault.rb +34 -0
- data/test/requests/storage/test_delete_storage_account.rb +28 -0
- data/test/requests/storage/test_disable_backup_protection.rb +52 -0
- data/test/requests/storage/test_enable_backup_protection.rb +66 -0
- data/test/requests/storage/test_get_all_backup_jobs.rb +35 -0
- data/test/requests/storage/test_get_backup_container.rb +35 -0
- data/test/requests/storage/test_get_backup_item.rb +35 -0
- data/test/requests/storage/test_get_backup_job_for_vm.rb +26 -0
- data/test/requests/storage/test_get_backup_protection_policy.rb +35 -0
- data/test/requests/storage/test_get_blob.rb +141 -0
- data/test/requests/storage/test_get_blob_http_url.rb +30 -0
- data/test/requests/storage/test_get_blob_https_url.rb +30 -0
- data/test/requests/storage/test_get_blob_properties.rb +45 -0
- data/test/requests/storage/test_get_blob_url.rb +75 -0
- data/test/requests/storage/test_get_container_acl.rb +37 -0
- data/test/requests/storage/test_get_container_properties.rb +45 -0
- data/test/requests/storage/test_get_container_url.rb +33 -0
- data/test/requests/storage/test_get_recovery_vault.rb +35 -0
- data/test/requests/storage/test_get_storage_access_keys.rb +24 -0
- data/test/requests/storage/test_get_storage_account.rb +25 -0
- data/test/requests/storage/test_list_blobs.rb +77 -0
- data/test/requests/storage/test_list_containers.rb +54 -0
- data/test/requests/storage/test_list_recovery_vault.rb +35 -0
- data/test/requests/storage/test_list_storage_accounts.rb +37 -0
- data/test/requests/storage/test_list_storage_accounts_for_rg.rb +37 -0
- data/test/requests/storage/test_multipart_save_block_blob.rb +105 -0
- data/test/requests/storage/test_put_blob_block.rb +34 -0
- data/test/requests/storage/test_put_blob_metadata.rb +36 -0
- data/test/requests/storage/test_put_blob_pages.rb +34 -0
- data/test/requests/storage/test_put_blob_properties.rb +39 -0
- data/test/requests/storage/test_put_container_acl.rb +34 -0
- data/test/requests/storage/test_put_container_metadata.rb +36 -0
- data/test/requests/storage/test_release_blob_lease.rb +34 -0
- data/test/requests/storage/test_release_container_lease.rb +34 -0
- data/test/requests/storage/test_save_page_blob.rb +115 -0
- data/test/requests/storage/test_set_recovery_vault_context.rb +34 -0
- data/test/requests/storage/test_start_backup.rb +55 -0
- data/test/requests/storage/test_update_storage_account.rb +34 -0
- data/test/requests/storage/test_wait_blob_copy_operation_to_finish.rb +148 -0
- data/test/requests/traffic_manager/test_check_traffic_manager_endpoint_exists.rb +31 -0
- data/test/requests/traffic_manager/test_check_traffic_manager_profile_exists.rb +31 -0
- data/test/requests/traffic_manager/test_create_traffic_manager_endpoint.rb +25 -0
- data/test/requests/traffic_manager/test_create_traffic_manager_profile.rb +25 -0
- data/test/requests/traffic_manager/test_delete_traffic_manager_endpoint.rb +23 -0
- data/test/requests/traffic_manager/test_delete_traffic_manager_profile.rb +23 -0
- data/test/requests/traffic_manager/test_get_traffic_manager_endpoint.rb +24 -0
- data/test/requests/traffic_manager/test_get_traffic_manager_profile.rb +24 -0
- data/test/requests/traffic_manager/test_list_traffic_manager_profiles.rb +24 -0
- data/test/requests/traffic_manager/test_update_traffic_manager_endpoint.rb +27 -0
- data/test/requests/traffic_manager/test_update_traffic_manager_profile.rb +27 -0
- data/test/smoke_tests/compute/test_resource_group_smoke.rb +37 -0
- data/test/test_credentials.rb +63 -0
- data/test/test_helper.rb +817 -0
- metadata +1074 -0
@@ -0,0 +1,148 @@
|
|
1
|
+
#DNS
|
2
|
+
|
3
|
+
This document explains how to get started using Azure DNS Service with Fog.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
First of all, you need to require the Fog library by executing:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
require 'fog/azurerm'
|
11
|
+
```
|
12
|
+
|
13
|
+
## Create Connection
|
14
|
+
|
15
|
+
Next, create a connection to the DNS Service:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
azure_dns_service = Fog::DNS::AzureRM.new(
|
19
|
+
tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
|
20
|
+
client_id: '<Clientid>', # Client id of Azure Active Directory Application
|
21
|
+
client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
|
22
|
+
subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
|
23
|
+
:environment => '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
27
|
+
## Check Zone Existence
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
azure_dns_service.zones.check_zone_exists(<Resource Group name>, <Zone name>)
|
31
|
+
```
|
32
|
+
|
33
|
+
## Create Zone
|
34
|
+
|
35
|
+
Create a new Zone
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
azure_dns_service.zones.create(
|
39
|
+
name: '<Zone name>',
|
40
|
+
resource_group: '<Resource Group name>'
|
41
|
+
)
|
42
|
+
```
|
43
|
+
## List Zones
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
azure_dns_service.zones.each do |zone|
|
47
|
+
puts "#{zone.name}"
|
48
|
+
puts "#{zone.resource_group}"
|
49
|
+
end
|
50
|
+
```
|
51
|
+
|
52
|
+
## Retrieve a single Zone
|
53
|
+
|
54
|
+
Get a single record of Zone
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
zone = azure_dns_service
|
58
|
+
.zones
|
59
|
+
.get('<Resource Group name>', '<Zone name>')
|
60
|
+
puts "#{zone.name}"
|
61
|
+
```
|
62
|
+
|
63
|
+
## Destroy a single Zone
|
64
|
+
|
65
|
+
Get Zone object from the get method(described above) and then destroy that Zone.
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
zone.destroy
|
69
|
+
```
|
70
|
+
|
71
|
+
## Check Record Set Existence
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
azure_dns_service.record_sets.check_record_set_exists(<Resource Group name>, <Record Set name>, <Zone name>, <Record Type(A/CNAME)>)
|
75
|
+
```
|
76
|
+
|
77
|
+
## Create Record Set
|
78
|
+
|
79
|
+
Create a new Record Set
|
80
|
+
|
81
|
+
```ruby
|
82
|
+
azure_dns_service.record_sets.create(
|
83
|
+
name: '<Record Set name>',
|
84
|
+
resource_group: '<Resource Group name>',
|
85
|
+
zone_name: '<Zone Name>',
|
86
|
+
records: <String array of Records>,
|
87
|
+
type: '<Record Type(A/CNAME)>',
|
88
|
+
ttl: <Time to live(Integer)>
|
89
|
+
)
|
90
|
+
```
|
91
|
+
|
92
|
+
## List Record Sets
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
azure_dns_service.record_sets(
|
96
|
+
resource_group: '<Resource Group Name>',
|
97
|
+
zone_name: '<Zone Name>'
|
98
|
+
).each do |record_set|
|
99
|
+
puts "#{record_set.name}"
|
100
|
+
puts "#{record_set.resource_group}"
|
101
|
+
end
|
102
|
+
```
|
103
|
+
|
104
|
+
## Retrieve a single Record Set
|
105
|
+
|
106
|
+
Get a single record of Record Set
|
107
|
+
|
108
|
+
```ruby
|
109
|
+
record_set = azure_dns_service
|
110
|
+
.record_sets
|
111
|
+
.get('<Resource Group Name>', '<Record Set name>', '<Zone Name>', '<Record Type>')
|
112
|
+
puts "#{record_set.name}"
|
113
|
+
```
|
114
|
+
|
115
|
+
## Update TTL
|
116
|
+
|
117
|
+
Get an object of record set and then update TTL
|
118
|
+
|
119
|
+
```ruby
|
120
|
+
record_set.update_ttl(
|
121
|
+
ttl: '<Time to live(Integer)>,
|
122
|
+
)
|
123
|
+
```
|
124
|
+
|
125
|
+
## Add/Remove Record set in Existing Record sets
|
126
|
+
|
127
|
+
Add a record by giving the value of record set in the form of string.
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
record_set.add_a_type_record('<Record>')
|
131
|
+
```
|
132
|
+
|
133
|
+
Remove record from existing records by giving its value in the form of string.
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
record_set.remove_a_type_record('<Record>')
|
137
|
+
```
|
138
|
+
|
139
|
+
## Destroy a single Record Set
|
140
|
+
|
141
|
+
Get Record Set object from the get method(described above) and then destroy that Record Set.
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
record_set.destroy
|
145
|
+
```
|
146
|
+
|
147
|
+
## Support and Feedback
|
148
|
+
Your feedback is appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# Key Vault
|
2
|
+
|
3
|
+
This document explains how to get started using Azure Key Vault Service with Fog to manage Vault. With this gem you can create/list/delete Vault.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
First of all, you need to require the Fog library by executing:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
require 'fog/azurerm'
|
11
|
+
```
|
12
|
+
## Create Connection
|
13
|
+
|
14
|
+
Next, create a connection to the Key Vault Service:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
azure_key_vault_service = Fog::KeyVault::AzureRM.new(
|
18
|
+
tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
|
19
|
+
client_id: '<Clientid>', # Client id of Azure Active Directory Application
|
20
|
+
client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
|
21
|
+
subscription_id: '<Subscriptionid>' # Subscription id of an Azure Account
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
25
|
+
## Check Vault Existence
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
azure_key_vault_service.vaults.check_vault_exists(<Resource Group name>, <Vault Name>)
|
29
|
+
```
|
30
|
+
|
31
|
+
## Create Vault
|
32
|
+
|
33
|
+
Create a new Vault.
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
vault = azure_key_vault_service.vaults.create(
|
37
|
+
name: '<Vault Name>',
|
38
|
+
location: 'eastus',
|
39
|
+
resource_group: '<Resource Group name>',
|
40
|
+
tenant_id: <Tenantid>,
|
41
|
+
sku_family: 'A',
|
42
|
+
sku_name: 'standard',
|
43
|
+
access_policies: [
|
44
|
+
{
|
45
|
+
tenant_id: <Tenantid>,
|
46
|
+
object_id: <Tenantid>,
|
47
|
+
permissions: {
|
48
|
+
keys: ['all'],
|
49
|
+
secrets: ['all']
|
50
|
+
}
|
51
|
+
}
|
52
|
+
]
|
53
|
+
|
54
|
+
)
|
55
|
+
```
|
56
|
+
|
57
|
+
## List Vaults
|
58
|
+
|
59
|
+
List all vaults in a resource group
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
vaults = azure_key_vault_service.vaults(resource_group: '<Resource Group Name>')
|
63
|
+
vaults.each do |vault|
|
64
|
+
puts "#{vault.name}"
|
65
|
+
end
|
66
|
+
```
|
67
|
+
|
68
|
+
## Retrieve a single Vault
|
69
|
+
|
70
|
+
Get a single record of Vault
|
71
|
+
|
72
|
+
```ruby
|
73
|
+
vault = azure_key_vault_service
|
74
|
+
.vaults
|
75
|
+
.get('<Resource Group name>', '<Vault Name>')
|
76
|
+
puts "#{vault.name}"
|
77
|
+
```
|
78
|
+
|
79
|
+
## Destroy a single Vault
|
80
|
+
|
81
|
+
Get a vault object from the get method and then destroy that vault.
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
vault.destroy
|
85
|
+
```
|
86
|
+
|
87
|
+
## Support and Feedback
|
88
|
+
Your feedback is highly appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.
|
@@ -0,0 +1,1129 @@
|
|
1
|
+
# Network
|
2
|
+
|
3
|
+
This document explains how to get started using Azure Network Service with Fog. With this gem you can create/update/list/delete virtual networks, subnets, public IPs and network interfaces.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
First of all, you need to require the Fog library by executing:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
require 'fog/azurerm'
|
11
|
+
```
|
12
|
+
## Create Connection
|
13
|
+
|
14
|
+
Next, create a connection to the Network Service:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
azure_network_service = Fog::Network::AzureRM.new(
|
18
|
+
tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
|
19
|
+
client_id: '<Clientid>', # Client id of Azure Active Directory Application
|
20
|
+
client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
|
21
|
+
subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
|
22
|
+
:environment => '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
|
23
|
+
)
|
24
|
+
```
|
25
|
+
|
26
|
+
## Check Virtual Network Existence
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
azure_network_service.virtual_networks.check_virtual_network_exists(<Resource Group name>, <Virtual Network Name>)
|
30
|
+
```
|
31
|
+
|
32
|
+
## Create Virtual Network
|
33
|
+
|
34
|
+
Create a new virtual network
|
35
|
+
|
36
|
+
Optional parameters for Virtual Network: subnets, dns_servers & address_prefixes
|
37
|
+
Optional parameters for Subnet: network_security_group_id, route_table_id & address_prefix
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
vnet = azure_network_service.virtual_networks.create(
|
41
|
+
name: '<Virtual Network Name>',
|
42
|
+
location: 'westus',
|
43
|
+
resource_group: '<Resource Group Name>',
|
44
|
+
subnets: [{
|
45
|
+
name: '<Subnet Name>',
|
46
|
+
address_prefix: '10.1.0.0/24',
|
47
|
+
network_security_group_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/networkSecurityGroups/<Network Security Group Name>',
|
48
|
+
route_table_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/routeTables/<Route Table Name>'
|
49
|
+
}],
|
50
|
+
dns_servers: ['10.1.0.0','10.2.0.0'],
|
51
|
+
address_prefixes: ['10.1.0.0/16','10.2.0.0/16']
|
52
|
+
)
|
53
|
+
```
|
54
|
+
|
55
|
+
## List Virtual Networks in Resource Group
|
56
|
+
|
57
|
+
List all virtual networks in a resource group
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
vnets = azure_network_service.virtual_networks(resource_group: '<Resource Group Name>')
|
61
|
+
vnets.each do |vnet|
|
62
|
+
puts "#{vnet.name}"
|
63
|
+
puts "#{vnet.location}"
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
## List Virtual Networks in Subscription
|
68
|
+
|
69
|
+
List all virtual networks in a subscription
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
vnets = azure_network_service.virtual_networks
|
73
|
+
vnets.each do |vnet|
|
74
|
+
puts "#{vnet.name}"
|
75
|
+
puts "#{vnet.location}"
|
76
|
+
end
|
77
|
+
```
|
78
|
+
|
79
|
+
## Retrieve a single Virtual Network
|
80
|
+
|
81
|
+
Get a single record of virtual network
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
vnet = azure_network_service.virtual_networks.get('<Resource Group Name>', '<Virtual Network name>')
|
85
|
+
puts "#{vnet.name}"
|
86
|
+
```
|
87
|
+
|
88
|
+
## Add/Remove DNS Servers to/from Virtual Network
|
89
|
+
|
90
|
+
Add/Remove DNS Servers to/from Virtual Network
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
vnet.add_dns_servers(['10.3.0.0','10.4.0.0'])
|
94
|
+
vnet.remove_dns_servers(['10.3.0.0','10.4.0.0'])
|
95
|
+
```
|
96
|
+
|
97
|
+
## Add/Remove Address Prefixes to/from Virtual Network
|
98
|
+
|
99
|
+
Add/Remove Address Prefixes to/from Virtual Network
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
vnet.add_address_prefixes(['10.2.0.0/16', '10.3.0.0/16'])
|
103
|
+
vnet.remove_address_prefixes(['10.2.0.0/16'])
|
104
|
+
```
|
105
|
+
|
106
|
+
## Add/Remove Subnets to/from Virtual Network
|
107
|
+
|
108
|
+
Add/Remove Subnets to/from Virtual Network
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
vnet.add_subnets([{
|
112
|
+
name: 'test-subnet',
|
113
|
+
address_prefix: '10.3.0.0/24'
|
114
|
+
}])
|
115
|
+
|
116
|
+
vnet.remove_subnets(['test-subnet'])
|
117
|
+
```
|
118
|
+
|
119
|
+
## Update Virtual Network
|
120
|
+
|
121
|
+
Update Virtual Network
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
vnet.update({
|
125
|
+
subnets:[{
|
126
|
+
name: 'fog-subnet',
|
127
|
+
address_prefix: '10.3.0.0/16'
|
128
|
+
}],
|
129
|
+
dns_servers: ['10.3.0.0','10.4.0.0']
|
130
|
+
})
|
131
|
+
```
|
132
|
+
|
133
|
+
## Destroy a single virtual network
|
134
|
+
|
135
|
+
Get virtual network object from the get method and then destroy that virtual network.
|
136
|
+
|
137
|
+
```ruby
|
138
|
+
vnet.destroy
|
139
|
+
```
|
140
|
+
|
141
|
+
## Check Subnet Existence
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
azure_network_service.subnets.check_subnet_exists(<Resource Group name>, <Virtual Network Name>, <Subnet Name>)
|
145
|
+
```
|
146
|
+
|
147
|
+
## Create Subnet
|
148
|
+
|
149
|
+
Create a new Subnet
|
150
|
+
|
151
|
+
Optional parameters: network_security_group_id, route_table_id & address_prefix
|
152
|
+
|
153
|
+
```ruby
|
154
|
+
subnet = azure_network_service.subnets.create(
|
155
|
+
name: '<Subnet Name>',
|
156
|
+
resource_group: '<Resource Group Name>',
|
157
|
+
virtual_network_name: '<Virtual Network Name>',
|
158
|
+
address_prefix: '10.0.0.0/24',
|
159
|
+
network_security_group_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/networkSecurityGroups/<Network Security Group Name>',
|
160
|
+
route_table_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/routeTables/<Route Table Name>'
|
161
|
+
)
|
162
|
+
```
|
163
|
+
|
164
|
+
## List Subnets
|
165
|
+
|
166
|
+
List subnets in a resource group and a virtual network
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
subnets = azure_network_service.subnets(resource_group: '<Resource Group name>', virtual_network_name: '<Virtual Network name>')
|
170
|
+
subnets.each do |subnet|
|
171
|
+
puts "#{subnet.name}"
|
172
|
+
end
|
173
|
+
```
|
174
|
+
|
175
|
+
## Retrieve a single Subnet
|
176
|
+
|
177
|
+
Get a single record of Subnet
|
178
|
+
|
179
|
+
```ruby
|
180
|
+
subnet = azure_network_service
|
181
|
+
.subnets
|
182
|
+
.get('<Resource Group name>', '<Virtual Network name>', '<Subnet name>')
|
183
|
+
puts "#{subnet.name}"
|
184
|
+
```
|
185
|
+
|
186
|
+
## Attach Network Security Group to Subnet
|
187
|
+
|
188
|
+
Attach Network Security Group to Subnet
|
189
|
+
|
190
|
+
```ruby
|
191
|
+
subnet = azure_network_service.attach_network_security_group('/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/networkSecurityGroups/<Network Security Group Name>')
|
192
|
+
puts "#{subnet.network_security_group_id}"
|
193
|
+
```
|
194
|
+
|
195
|
+
## Detach Network Security Group from Subnet
|
196
|
+
|
197
|
+
Detach Network Security Group from Subnet
|
198
|
+
|
199
|
+
```ruby
|
200
|
+
subnet = azure_network_service.detach_network_security_group
|
201
|
+
puts "#{subnet.network_security_group_id}"
|
202
|
+
```
|
203
|
+
|
204
|
+
## Attach Route Table to Subnet
|
205
|
+
|
206
|
+
Attach Route Table to Subnet
|
207
|
+
|
208
|
+
```ruby
|
209
|
+
subnet = azure_network_service.attach_route_table('/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/routeTables/<Route Table Name>')
|
210
|
+
puts "#{subnet.route_table_id}"
|
211
|
+
```
|
212
|
+
|
213
|
+
## Detach Route Table from Subnet
|
214
|
+
|
215
|
+
Detach Route Table from Subnet
|
216
|
+
|
217
|
+
```ruby
|
218
|
+
subnet = azure_network_service.detach_route_table
|
219
|
+
puts "#{subnet.route_table_id}"
|
220
|
+
```
|
221
|
+
|
222
|
+
## List Number of Available IP Addresses in Subnet
|
223
|
+
|
224
|
+
The parameter is a boolean which checks if the Virtual Network the Subnet belongs to is attached to an Express Route Circuit or not
|
225
|
+
|
226
|
+
```ruby
|
227
|
+
puts "#{subnet.get_available_ipaddresses_count(false)}"
|
228
|
+
```
|
229
|
+
|
230
|
+
## Destroy a single Subnet
|
231
|
+
|
232
|
+
Get a subnet object from the get method and then destroy that subnet.
|
233
|
+
|
234
|
+
```ruby
|
235
|
+
subnet.destroy
|
236
|
+
```
|
237
|
+
|
238
|
+
## Check Network Interface Card Existence
|
239
|
+
|
240
|
+
```ruby
|
241
|
+
azure_network_service.network_interfaces.check_network_interface_exists(<Resource Group name>, <Network Interface name>)
|
242
|
+
```
|
243
|
+
|
244
|
+
## Create Network Interface Card
|
245
|
+
|
246
|
+
Create a new network interface. Skip public_ip_address_id parameter to create network interface without PublicIP. The parameter, private_ip_allocation_method can be Dynamic or Static.
|
247
|
+
|
248
|
+
```ruby
|
249
|
+
nic = azure_network_service.network_interfaces.create(
|
250
|
+
name: '<Network Interface name>',
|
251
|
+
resource_group: '<Resource Group name>',
|
252
|
+
location: 'eastus',
|
253
|
+
subnet_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network name>/subnets/<Subnet name>',
|
254
|
+
public_ip_address_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/publicIPAddresses/<Public IP name>',
|
255
|
+
ip_configuration_name: '<Ip Configuration Name>',
|
256
|
+
private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic
|
257
|
+
)
|
258
|
+
```
|
259
|
+
|
260
|
+
## List Network Interface Cards
|
261
|
+
|
262
|
+
List network interfaces in a resource group
|
263
|
+
|
264
|
+
```ruby
|
265
|
+
nics = azure_network_service.network_interfaces(resource_group: '<Resource Group name>')
|
266
|
+
nics.each do |nic|
|
267
|
+
puts "#{nic.name}"
|
268
|
+
end
|
269
|
+
```
|
270
|
+
|
271
|
+
## Retrieve a single Network Interface Card
|
272
|
+
|
273
|
+
Get a single record of Network Interface
|
274
|
+
|
275
|
+
```ruby
|
276
|
+
nic = azure_network_service
|
277
|
+
.network_interfaces
|
278
|
+
.get('<Resource Group name>', '<Network Interface name>')
|
279
|
+
puts "#{nic.name}"
|
280
|
+
```
|
281
|
+
|
282
|
+
## Update Network Interface Card
|
283
|
+
|
284
|
+
You can update network interface by passing only updated attributes, in the form of hash.
|
285
|
+
For example,
|
286
|
+
```ruby
|
287
|
+
nic.update(private_ip_allocation_method: 'Static', private_ip_address: '10.0.0.0')
|
288
|
+
```
|
289
|
+
## Attach/Detach resources to Network Interface Card
|
290
|
+
|
291
|
+
Attach Subnet, Public-IP or Network-Security-Group as following
|
292
|
+
```ruby
|
293
|
+
subnet_id = "<NEW-SUBNET-ID>"
|
294
|
+
nic.attach_subnet(subnet_id)
|
295
|
+
|
296
|
+
public_ip_id = "<NEW-PUBLIC_IP-ID>"
|
297
|
+
nic.attach_public_ip(public_ip_id)
|
298
|
+
|
299
|
+
nsg_id = "<NEW-NSG-ID>"
|
300
|
+
nic.attach_network_security_group(nsg_id)
|
301
|
+
|
302
|
+
```
|
303
|
+
Detach Public-IP or Network-Security-Group as following
|
304
|
+
|
305
|
+
```ruby
|
306
|
+
nic.detach_public_ip
|
307
|
+
|
308
|
+
nic.detach_network_security_group
|
309
|
+
|
310
|
+
```
|
311
|
+
`Note: You can't detach subnet from Network Interface.`
|
312
|
+
|
313
|
+
## Destroy a single Network Interface Card
|
314
|
+
|
315
|
+
Get a network interface object from the get method and then destroy that network interface.
|
316
|
+
|
317
|
+
```ruby
|
318
|
+
nic.destroy
|
319
|
+
```
|
320
|
+
|
321
|
+
## Check Public IP Existence
|
322
|
+
|
323
|
+
```ruby
|
324
|
+
azure_network_service.public_ips.check_public_ip_exists(<Resource Group name>, <Public IP name>>)
|
325
|
+
```
|
326
|
+
|
327
|
+
## Create Public IP
|
328
|
+
|
329
|
+
Create a new public IP. The parameter, type can be Dynamic or Static.
|
330
|
+
|
331
|
+
```ruby
|
332
|
+
pubip = azure_network_service.public_ips.create(
|
333
|
+
name: '<Public IP name>',
|
334
|
+
resource_group: '<Resource Group name>',
|
335
|
+
location: 'westus',
|
336
|
+
public_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Static
|
337
|
+
)
|
338
|
+
```
|
339
|
+
|
340
|
+
## Check for Public IP
|
341
|
+
|
342
|
+
Checks if the Public IP already exists or not.
|
343
|
+
|
344
|
+
```ruby
|
345
|
+
azure_network_service.public_ips.check_if_exists('<Public IP name>', '<Resource Group name>')
|
346
|
+
```
|
347
|
+
|
348
|
+
## List Public IPs
|
349
|
+
|
350
|
+
List network interfaces in a resource group
|
351
|
+
|
352
|
+
```ruby
|
353
|
+
pubips = azure_network_service.public_ips(resource_group: '<Resource Group name>')
|
354
|
+
pubips.each do |pubip|
|
355
|
+
puts "#{pubip.name}"
|
356
|
+
end
|
357
|
+
```
|
358
|
+
|
359
|
+
## Retrieve a single Public Ip
|
360
|
+
|
361
|
+
Get a single record of Public Ip
|
362
|
+
|
363
|
+
```ruby
|
364
|
+
pubip = azure_network_service
|
365
|
+
.public_ips
|
366
|
+
.get('<Resource Group name>', '<Public IP name>')
|
367
|
+
puts "#{pubip.name}"
|
368
|
+
```
|
369
|
+
|
370
|
+
## Update Public Ip
|
371
|
+
|
372
|
+
Get a Public IP object from the get method and then update that public IP. You can update the Public IP by passing the modifiable attributes in the form of a hash.
|
373
|
+
|
374
|
+
```ruby
|
375
|
+
pubip.update(
|
376
|
+
public_ip_allocation_method: '<IP Allocation Method>',
|
377
|
+
idle_timeout_in_minutes: '<Idle Timeout In Minutes>',
|
378
|
+
domain_name_label: '<Domain Name Label>'
|
379
|
+
)
|
380
|
+
```
|
381
|
+
|
382
|
+
## Destroy a single Public Ip
|
383
|
+
|
384
|
+
Get a Public IP object from the get method and then destroy that public IP.
|
385
|
+
|
386
|
+
```ruby
|
387
|
+
pubip.destroy
|
388
|
+
```
|
389
|
+
|
390
|
+
## Check Network Security Group Existence
|
391
|
+
|
392
|
+
```ruby
|
393
|
+
azure_network_service.network_security_groups.check_net_sec_group_exists(<Resource Group name>, <Network Security Group name>)
|
394
|
+
```
|
395
|
+
|
396
|
+
## Create Network Security Group
|
397
|
+
|
398
|
+
Network security group requires a resource group to create.
|
399
|
+
|
400
|
+
```ruby
|
401
|
+
azure_network_service.network_security_groups.create(
|
402
|
+
name: '<Network Security Group name>',
|
403
|
+
resource_group: '<Resource Group name>',
|
404
|
+
location: 'eastus',
|
405
|
+
security_rules: [{
|
406
|
+
name: '<Security Rule name>',
|
407
|
+
protocol: Fog::ARM::Network::Models::SecurityRuleProtocol::Tcp,
|
408
|
+
source_port_range: '22',
|
409
|
+
destination_port_range: '22',
|
410
|
+
source_address_prefix: '0.0.0.0/0',
|
411
|
+
destination_address_prefix: '0.0.0.0/0',
|
412
|
+
access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
|
413
|
+
priority: '100',
|
414
|
+
direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
|
415
|
+
}]
|
416
|
+
)
|
417
|
+
```
|
418
|
+
|
419
|
+
## List Network Security Groups
|
420
|
+
|
421
|
+
List all the network security groups in a resource group
|
422
|
+
|
423
|
+
```ruby
|
424
|
+
network_security_groups = azure_network_service.network_security_groups(resource_group: '<Resource Group name>')
|
425
|
+
network_security_groups.each do |nsg|
|
426
|
+
puts "#{nsg.name}"
|
427
|
+
end
|
428
|
+
```
|
429
|
+
|
430
|
+
## Retrieve a single Network Security Group
|
431
|
+
|
432
|
+
Get a single record of Network Security Group
|
433
|
+
|
434
|
+
```ruby
|
435
|
+
nsg = azure_network_service
|
436
|
+
.network_security_groups
|
437
|
+
.get('<Resource Group Name>','<Network Security Group name>')
|
438
|
+
puts "#{nsg.name}"
|
439
|
+
```
|
440
|
+
|
441
|
+
## Update Security Rules
|
442
|
+
|
443
|
+
You can update security rules by passing the modified attributes in the form of hash.
|
444
|
+
|
445
|
+
```ruby
|
446
|
+
nsg.update_security_rules(
|
447
|
+
security_rules:
|
448
|
+
[
|
449
|
+
{
|
450
|
+
name: '<Security Rule name>',
|
451
|
+
protocol: Fog::ARM::Network::Models::SecurityRuleProtocol::Tcp,
|
452
|
+
source_port_range: '*',
|
453
|
+
destination_port_range: '*',
|
454
|
+
source_address_prefix: '0.0.0.0/0',
|
455
|
+
destination_address_prefix: '0.0.0.0/0',
|
456
|
+
access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
|
457
|
+
priority: '100',
|
458
|
+
direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
|
459
|
+
}
|
460
|
+
]
|
461
|
+
)
|
462
|
+
```
|
463
|
+
`Note: You can't modify Name of a security rule.`
|
464
|
+
|
465
|
+
## Add and Remove Security Rules in a Network Security Group
|
466
|
+
|
467
|
+
Add array of security rules in the form of hash.
|
468
|
+
|
469
|
+
```ruby
|
470
|
+
nsg.add_security_rules(
|
471
|
+
[
|
472
|
+
{
|
473
|
+
name: '<Security Rule name>',
|
474
|
+
protocol: Fog::ARM::Network::Models::SecurityRuleProtocol::Tcp,
|
475
|
+
source_port_range: '3389',
|
476
|
+
destination_port_range: '3389',
|
477
|
+
source_address_prefix: '0.0.0.0/0',
|
478
|
+
destination_address_prefix: '0.0.0.0/0',
|
479
|
+
access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
|
480
|
+
priority: '102',
|
481
|
+
direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
|
482
|
+
}
|
483
|
+
]
|
484
|
+
)
|
485
|
+
```
|
486
|
+
|
487
|
+
Delete security rule by providing its name.
|
488
|
+
|
489
|
+
```ruby
|
490
|
+
nsg.remove_security_rule('<Security Rule name>')
|
491
|
+
```
|
492
|
+
|
493
|
+
## Destroy a Network Security Group
|
494
|
+
|
495
|
+
Get a network security group object from the get method and then destroy that network security group.
|
496
|
+
|
497
|
+
```ruby
|
498
|
+
nsg.destroy
|
499
|
+
```
|
500
|
+
|
501
|
+
## Check Network Security Rule Existence
|
502
|
+
|
503
|
+
```ruby
|
504
|
+
azure_network_service.network_security_rules.check_net_sec_rule_exists(<Resource Group name>, <Network Security Group name>, <Security Rule name>)
|
505
|
+
```
|
506
|
+
|
507
|
+
## Create Network Security Rule
|
508
|
+
|
509
|
+
Network security rule requires a resource group and network security group to create.
|
510
|
+
|
511
|
+
```ruby
|
512
|
+
azure_network_service.network_security_rules.create(
|
513
|
+
name: '<Security Rule name>',
|
514
|
+
resource_group: '<Resource Group name>',
|
515
|
+
protocol: Fog::ARM::Network::Models::SecurityRuleProtocol::Tcp,
|
516
|
+
network_security_group_name: '<Network Security Group name>',
|
517
|
+
source_port_range: '22',
|
518
|
+
destination_port_range: '22',
|
519
|
+
source_address_prefix: '0.0.0.0/0',
|
520
|
+
destination_address_prefix: '0.0.0.0/0',
|
521
|
+
access: Fog::ARM::Network::Models::SecurityRuleAccess::Allow,
|
522
|
+
priority: '100',
|
523
|
+
direction: Fog::ARM::Network::Models::SecurityRuleDirection::Inbound
|
524
|
+
)
|
525
|
+
```
|
526
|
+
|
527
|
+
## List Network Security Rules
|
528
|
+
|
529
|
+
List all the network security rules in a resource group and network security group
|
530
|
+
|
531
|
+
```ruby
|
532
|
+
network_security_rules = azure_network_service.network_security_rules(resource_group: '<Resource Group name>',
|
533
|
+
network_security_group_name: '<Network Security Group name>')
|
534
|
+
network_security_rules.each do |network_security_rule|
|
535
|
+
puts network_security_rule.name
|
536
|
+
end
|
537
|
+
```
|
538
|
+
|
539
|
+
## Retrieve a single Network Security Rule
|
540
|
+
|
541
|
+
Get a single record of Network Security Rule
|
542
|
+
|
543
|
+
```ruby
|
544
|
+
network_security_rule = azure_network_service
|
545
|
+
.network_security_rules
|
546
|
+
.get(<Resource Group Name>','<Network Security Group name>', '<Security Rule name>')
|
547
|
+
puts "#{network_security_rule.name}"
|
548
|
+
```
|
549
|
+
|
550
|
+
## Destroy a Network Security Rule
|
551
|
+
|
552
|
+
Get a network security rule object from the get method and then destroy that network security rule.
|
553
|
+
|
554
|
+
```ruby
|
555
|
+
network_security_rule.destroy
|
556
|
+
```
|
557
|
+
|
558
|
+
## Check External Load Balancer Existence
|
559
|
+
|
560
|
+
```ruby
|
561
|
+
azure_network_service.load_balancers.check_load_balancer_exists(<Resource Group name>, <Load Balancer name>)
|
562
|
+
```
|
563
|
+
|
564
|
+
## Create External Load Balancer
|
565
|
+
|
566
|
+
Create a new load balancer.
|
567
|
+
|
568
|
+
```ruby
|
569
|
+
lb = azure_network_service.load_balancers.create(
|
570
|
+
name: '<Load Balancer name>',
|
571
|
+
resource_group: '<Resource Group name>',
|
572
|
+
location: 'westus',
|
573
|
+
|
574
|
+
frontend_ip_configurations:
|
575
|
+
[
|
576
|
+
{
|
577
|
+
name: 'fic',
|
578
|
+
private_ipallocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic,
|
579
|
+
public_ipaddress_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/publicIPAddresses/<Public-IP-Name>'
|
580
|
+
}
|
581
|
+
],
|
582
|
+
backend_address_pool_names:
|
583
|
+
[
|
584
|
+
'pool1'
|
585
|
+
],
|
586
|
+
load_balancing_rules:
|
587
|
+
[
|
588
|
+
{
|
589
|
+
name: 'lb_rule_1',
|
590
|
+
frontend_ip_configuration_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load Balancer name>/frontendIPConfigurations/fic',
|
591
|
+
backend_address_pool_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load Balancer name>/backendAddressPools/pool1',
|
592
|
+
protocol: 'Tcp',
|
593
|
+
frontend_port: '80',
|
594
|
+
backend_port: '8080',
|
595
|
+
enable_floating_ip: false,
|
596
|
+
idle_timeout_in_minutes: 4,
|
597
|
+
load_distribution: "Default"
|
598
|
+
}
|
599
|
+
],
|
600
|
+
inbound_nat_rules:
|
601
|
+
[
|
602
|
+
{
|
603
|
+
name: 'RDP-Traffic',
|
604
|
+
frontend_ip_configuration_id: '/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load Balancer name>/frontendIPConfigurations/fic',
|
605
|
+
protocol: 'Tcp',
|
606
|
+
frontend_port: 3389,
|
607
|
+
backend_port: 3389
|
608
|
+
}
|
609
|
+
]
|
610
|
+
)
|
611
|
+
```
|
612
|
+
|
613
|
+
## Create Internal Load Balancer
|
614
|
+
|
615
|
+
```ruby
|
616
|
+
|
617
|
+
lb = azure_network_service.load_balancers.create(
|
618
|
+
name: '<Load Balancer name>',
|
619
|
+
resource_group: '<Resource Group name>',
|
620
|
+
location: 'westus',
|
621
|
+
frontend_ip_configurations:
|
622
|
+
[
|
623
|
+
{
|
624
|
+
name: 'LB-Frontend',
|
625
|
+
private_ipallocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Static,
|
626
|
+
private_ipaddress: '10.1.2.5',
|
627
|
+
subnet_id: subnet.id
|
628
|
+
}
|
629
|
+
],
|
630
|
+
backend_address_pool_names:
|
631
|
+
[
|
632
|
+
'LB-backend'
|
633
|
+
],
|
634
|
+
load_balancing_rules:
|
635
|
+
[
|
636
|
+
{
|
637
|
+
name: 'HTTP',
|
638
|
+
frontend_ip_configuration_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load-Balancer-Name>/frontendIPConfigurations/LB-Frontend",
|
639
|
+
backend_address_pool_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load-Balancer-Name>/backendAddressPools/LB-backend",
|
640
|
+
probe_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers<Load-Balancer-Name>lb/probes/HealthProbe",
|
641
|
+
protocol: 'Tcp',
|
642
|
+
frontend_port: '80',
|
643
|
+
backend_port: '80'
|
644
|
+
}
|
645
|
+
],
|
646
|
+
inbound_nat_rules:
|
647
|
+
[
|
648
|
+
{
|
649
|
+
name: 'RDP1',
|
650
|
+
frontend_ip_configuration_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load-Balancer-Name>/frontendIPConfigurations/LB-Frontend",
|
651
|
+
protocol: 'Tcp',
|
652
|
+
frontend_port: 3441,
|
653
|
+
backend_port: 3389
|
654
|
+
},
|
655
|
+
{
|
656
|
+
name: 'RDP2',
|
657
|
+
frontend_ip_configuration_id: "/subscriptions/<Subscriptionid>/resourceGroups/<Resource Group name>/providers/Microsoft.Network/loadBalancers/<Load-Balancer-Name>/frontendIPConfigurations/LB-Frontend",
|
658
|
+
protocol: 'Tcp',
|
659
|
+
frontend_port: 3442,
|
660
|
+
backend_port: 3389
|
661
|
+
}
|
662
|
+
],
|
663
|
+
probes:
|
664
|
+
[
|
665
|
+
{
|
666
|
+
name: 'HealthProbe',
|
667
|
+
protocol: 'http',
|
668
|
+
request_path: 'HealthProbe.aspx',
|
669
|
+
port: '80',
|
670
|
+
interval_in_seconds: 15,
|
671
|
+
number_of_probes: 2
|
672
|
+
}
|
673
|
+
]
|
674
|
+
)
|
675
|
+
```
|
676
|
+
|
677
|
+
## List Load Balancers
|
678
|
+
|
679
|
+
List all load balancers in a resource group
|
680
|
+
|
681
|
+
```ruby
|
682
|
+
lbs = azure_network_service.load_balancers(resource_group: '<Resource Group name>')
|
683
|
+
lbs.each do |lb|
|
684
|
+
puts "#{lb.name}"
|
685
|
+
end
|
686
|
+
```
|
687
|
+
|
688
|
+
## List Load Balancers in subscription
|
689
|
+
|
690
|
+
List all load balancers in a subscription
|
691
|
+
|
692
|
+
```ruby
|
693
|
+
lbs = azure_network_service.load_balancers
|
694
|
+
lbs.each do |lb|
|
695
|
+
puts "#{lb.name}"
|
696
|
+
end
|
697
|
+
```
|
698
|
+
|
699
|
+
## Retrieve a single Load Balancer
|
700
|
+
|
701
|
+
Get a single record of Load Balancer
|
702
|
+
|
703
|
+
```ruby
|
704
|
+
lb = azure_network_service
|
705
|
+
.load_balancers
|
706
|
+
.get('<Resource Group name>', '<Load Balancer name>')
|
707
|
+
puts "#{lb.name}"
|
708
|
+
```
|
709
|
+
|
710
|
+
## Destroy a Load Balancer
|
711
|
+
|
712
|
+
Get a load balancer object from the get method and then destroy that load balancer.
|
713
|
+
|
714
|
+
```ruby
|
715
|
+
lb.destroy
|
716
|
+
```
|
717
|
+
|
718
|
+
## Check Virtual Network Gateway Existence
|
719
|
+
|
720
|
+
```ruby
|
721
|
+
azure_network_service.virtual_network_gateways.check_vnet_gateway_exists(<Resource Group name>, <Virtual Network Gateway Name>)
|
722
|
+
```
|
723
|
+
|
724
|
+
## Create Virtual Network Gateway
|
725
|
+
|
726
|
+
Create a new Virtual Network Gateway.
|
727
|
+
|
728
|
+
```ruby
|
729
|
+
network_gateway = network.virtual_network_gateways.create(
|
730
|
+
name: '<Virtual Network Gateway Name>',
|
731
|
+
location: 'eastus',
|
732
|
+
tags: {
|
733
|
+
key1: 'value1',
|
734
|
+
key2: 'value2'
|
735
|
+
},
|
736
|
+
ip_configurations: [
|
737
|
+
{
|
738
|
+
name: 'default',
|
739
|
+
private_ipallocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic,
|
740
|
+
public_ipaddress_id: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Network/publicIPAddresses/{public_ip_name}',
|
741
|
+
subnet_id: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Network/virtualNetworks/{virtual_network_name}/subnets/{subnet_name}',
|
742
|
+
private_ipaddress: nil
|
743
|
+
}
|
744
|
+
],
|
745
|
+
resource_group: 'learn_fog',
|
746
|
+
sku_name: 'Standard',
|
747
|
+
sku_tier: 'Standard',
|
748
|
+
sku_capacity: 2,
|
749
|
+
gateway_type: 'ExpressRoute',
|
750
|
+
enable_bgp: true,
|
751
|
+
gateway_size: nil,
|
752
|
+
asn: 100,
|
753
|
+
bgp_peering_address: nil,
|
754
|
+
peer_weight: 3,
|
755
|
+
vpn_type: 'RouteBased',
|
756
|
+
vpn_client_address_pool: [],
|
757
|
+
gateway_default_site: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Network/localNetworkGateways/{local_network_gateway_name}',
|
758
|
+
default_sites: [],
|
759
|
+
vpn_client_configuration: {
|
760
|
+
address_pool: ['192.168.0.4', '192.168.0.5'],
|
761
|
+
root_certificates: [
|
762
|
+
{
|
763
|
+
name: 'root',
|
764
|
+
public_cert_data: 'certificate data'
|
765
|
+
}
|
766
|
+
],
|
767
|
+
revoked_certificates: [
|
768
|
+
{
|
769
|
+
name: 'revoked',
|
770
|
+
thumbprint: 'thumb print detail'
|
771
|
+
}
|
772
|
+
]
|
773
|
+
}
|
774
|
+
)
|
775
|
+
```
|
776
|
+
|
777
|
+
## List Virtual Network Gateways
|
778
|
+
|
779
|
+
List all virtual network gateways in a resource group
|
780
|
+
|
781
|
+
```ruby
|
782
|
+
network_gateways = network.virtual_network_gateways(resource_group: '<Resource Group Name>')
|
783
|
+
network_gateways.each do |gateway|
|
784
|
+
puts "#{gateway.name}"
|
785
|
+
end
|
786
|
+
```
|
787
|
+
|
788
|
+
## Retrieve single Virtual Network Gateway
|
789
|
+
|
790
|
+
Get single record of Virtual Network Gateway
|
791
|
+
|
792
|
+
```ruby
|
793
|
+
network_gateway = network.virtual_network_gateways.get('<Resource Group Name>', '<Virtual Network Gateway Name>')
|
794
|
+
puts "#{network_gateway.name}"
|
795
|
+
```
|
796
|
+
|
797
|
+
## Destroy single Virtual Network Gateway
|
798
|
+
|
799
|
+
Get a virtual network gateway object from the get method and then destroy that virtual network gateway.
|
800
|
+
|
801
|
+
```ruby
|
802
|
+
network_gateway.destroy
|
803
|
+
```
|
804
|
+
|
805
|
+
## Check Local Network Gateway Existence
|
806
|
+
|
807
|
+
```ruby
|
808
|
+
azure_network_service.local_network_gateways.check_local_net_gateway_exists(<Resource Group name>, <Local Network Gateway Name>)
|
809
|
+
```
|
810
|
+
|
811
|
+
## Create Local Network Gateway
|
812
|
+
|
813
|
+
Create a new Local Network Gateway.
|
814
|
+
|
815
|
+
```ruby
|
816
|
+
local_network_gateway = network.local_network_gateways.create(
|
817
|
+
name: "<Local Network Gateway Name>",
|
818
|
+
location: "eastus",
|
819
|
+
tags: {
|
820
|
+
key1: "value1",
|
821
|
+
key2: "value2"
|
822
|
+
},
|
823
|
+
resource_group: "<Resource Group Name>",
|
824
|
+
gateway_ip_address: '192.168.1.1',
|
825
|
+
local_network_address_space_prefixes: [],
|
826
|
+
asn: 100,
|
827
|
+
bgp_peering_address: '192.168.1.2',
|
828
|
+
peer_weight: 3
|
829
|
+
)
|
830
|
+
```
|
831
|
+
|
832
|
+
## List Local Network Gateways
|
833
|
+
|
834
|
+
List all local network gateways in a resource group
|
835
|
+
|
836
|
+
```ruby
|
837
|
+
local_network_gateways = network.local_network_gateways(resource_group: '<Resource Group Name>')
|
838
|
+
local_network_gateways.each do |gateway|
|
839
|
+
puts "#{gateway.name}"
|
840
|
+
end
|
841
|
+
```
|
842
|
+
|
843
|
+
## Retrieve single Local Network Gateway
|
844
|
+
|
845
|
+
Get single record of Local Network Gateway
|
846
|
+
|
847
|
+
```ruby
|
848
|
+
local_network_gateway = network.local_network_gateways.get('<Resource Group Name>', '<Local Network Gateway Name>')
|
849
|
+
puts "#{local_network_gateway.name}"
|
850
|
+
```
|
851
|
+
|
852
|
+
## Destroy single Local Network Gateway
|
853
|
+
|
854
|
+
Get a local network gateway object from the get method and then destroy that local network gateway.
|
855
|
+
|
856
|
+
```ruby
|
857
|
+
local_network_gateway.destroy
|
858
|
+
```
|
859
|
+
|
860
|
+
## Express Route
|
861
|
+
|
862
|
+
Microsoft Azure ExpressRoute lets you extend your on-premises networks into the Microsoft cloud over a dedicated private connection facilitated by a connectivity provider.
|
863
|
+
For more details about express route [click here](https://azure.microsoft.com/en-us/documentation/articles/expressroute-introduction/).
|
864
|
+
|
865
|
+
# Express Route Circuit
|
866
|
+
|
867
|
+
The Circuit represents the entity created by customer to register with an express route service provider with intent to connect to Microsoft.
|
868
|
+
|
869
|
+
## Check Express Route Circuit Existence
|
870
|
+
|
871
|
+
```ruby
|
872
|
+
azure_network_service.express_route_circuits.check_express_route_circuit_exists(<Resource Group name>, <Circuit Name>)
|
873
|
+
```
|
874
|
+
|
875
|
+
## Create an Express Route Circuit
|
876
|
+
|
877
|
+
Create a new Express Route Circuit.
|
878
|
+
|
879
|
+
```ruby
|
880
|
+
circuit = network.express_route_circuits.create(
|
881
|
+
"name": "<Circuit Name>",
|
882
|
+
"location": "eastus",
|
883
|
+
"resource_group": "<Resource Group Name>",
|
884
|
+
"tags": {
|
885
|
+
"key1": 'value1',
|
886
|
+
"key2": 'value2'
|
887
|
+
},
|
888
|
+
"sku_name": "Standard_MeteredData",
|
889
|
+
"sku_tier": "Standard",
|
890
|
+
"sku_family": "MeteredData",
|
891
|
+
"service_provider_name": "Telenor",
|
892
|
+
"peering_location": "London",
|
893
|
+
"bandwidth_in_mbps": 100,
|
894
|
+
"peerings": [
|
895
|
+
{
|
896
|
+
"name": "AzurePublicPeering",
|
897
|
+
"peering_type": "AzurePublicPeering",
|
898
|
+
"peer_asn": 100,
|
899
|
+
"primary_peer_address_prefix": "192.168.1.0/30",
|
900
|
+
"secondary_peer_address_prefix": "192.168.2.0/30",
|
901
|
+
"vlan_id": 200
|
902
|
+
}
|
903
|
+
]
|
904
|
+
)
|
905
|
+
```
|
906
|
+
|
907
|
+
## List Express Route Circuits
|
908
|
+
|
909
|
+
List all express route circuits in a resource group
|
910
|
+
|
911
|
+
```ruby
|
912
|
+
circuits = network.express_route_circuits(resource_group: '<Resource Group Name>')
|
913
|
+
circuits.each do |circuit|
|
914
|
+
puts "#{circuit.name}"
|
915
|
+
end
|
916
|
+
```
|
917
|
+
|
918
|
+
## Retrieve a single Express Route Circuit
|
919
|
+
|
920
|
+
Get a single record of Express Route Circuit
|
921
|
+
|
922
|
+
```ruby
|
923
|
+
circuit = network.express_route_circuits.get("<Resource Group Name>", "<Circuit Name>")
|
924
|
+
puts "#{circuit.name}"
|
925
|
+
```
|
926
|
+
|
927
|
+
## Destroy a single Express Route Circuit
|
928
|
+
|
929
|
+
Get an express route circuit object from the get method and then destroy that express route circuit.
|
930
|
+
|
931
|
+
```ruby
|
932
|
+
circuit.destroy
|
933
|
+
```
|
934
|
+
# Express Route Authorization
|
935
|
+
|
936
|
+
Authorization is part of Express Route circuit.
|
937
|
+
|
938
|
+
## Check Express Route Circuit Authorization Existence
|
939
|
+
|
940
|
+
```ruby
|
941
|
+
azure_network_service.express_route_circuit_authorizations.check_express_route_cir_auth_exists(<Resource Group name>, <Circuit Name>, <Authorization-Name>)
|
942
|
+
```
|
943
|
+
|
944
|
+
## Create an Express Route Circuit Authorization
|
945
|
+
|
946
|
+
Create a new Express Route Circuit Authorization. Parameter 'authorization_status' can be 'Available' or 'InUse'.
|
947
|
+
|
948
|
+
```ruby
|
949
|
+
authorization = network.express_route_circuit_authorizations.create(
|
950
|
+
"resource_group": "<Resourse Group Name>",
|
951
|
+
"name": "<Resource-Unique-Name>",
|
952
|
+
"circuit_name": "<Circuit Name>",
|
953
|
+
"authorization_status": "Available",
|
954
|
+
"authorization_name": "<Authorization-Name>",
|
955
|
+
)
|
956
|
+
```
|
957
|
+
|
958
|
+
## List Express Route Circuit Authorizations
|
959
|
+
|
960
|
+
List all express route circuit authorizations in a resource group.
|
961
|
+
|
962
|
+
```ruby
|
963
|
+
authorizations = network.express_route_circuit_authorizations(resource_group: '<Resource Group Name>', circuit_name: '<Circuit Name>')
|
964
|
+
authorizations.each do |authorization|
|
965
|
+
puts "#{authorization.name}"
|
966
|
+
end
|
967
|
+
```
|
968
|
+
|
969
|
+
## Retrieve single Express Route Circuit Authorization
|
970
|
+
|
971
|
+
Get a single record of Express Route Circuit Authorization.
|
972
|
+
|
973
|
+
```ruby
|
974
|
+
authorization = network.express_route_circuit_authorizations.get("<Resource Group Name>", "Circuit Name", "Authorization Name")
|
975
|
+
puts "#{authorization.name}"
|
976
|
+
```
|
977
|
+
|
978
|
+
## Destroy single Express Route Circuit Authorization
|
979
|
+
|
980
|
+
Get an express route circuit authorization object from the get method and then destroy that express route circuit authorization.
|
981
|
+
|
982
|
+
```ruby
|
983
|
+
authorization.destroy
|
984
|
+
```
|
985
|
+
|
986
|
+
|
987
|
+
# Express Route Peering
|
988
|
+
|
989
|
+
BGP Peering is part of Express Route circuit and defines the type of connectivity needed with Microsoft.
|
990
|
+
|
991
|
+
## Create an Express Route Circuit Peering
|
992
|
+
|
993
|
+
Create a new Express Route Circuit Peering.
|
994
|
+
|
995
|
+
```ruby
|
996
|
+
peering = network.express_route_circuit_peerings.create(
|
997
|
+
"name": "AzurePrivatePeering",
|
998
|
+
"circuit_name": "<Circuit Name>",
|
999
|
+
"resource_group": "<Resourse Group Name>",
|
1000
|
+
"peering_type": "AzurePrivatePeering",
|
1001
|
+
"peer_asn": 100,
|
1002
|
+
"primary_peer_address_prefix": "192.168.3.0/30",
|
1003
|
+
"secondary_peer_address_prefix": "192.168.4.0/30",
|
1004
|
+
"vlan_id": 200
|
1005
|
+
)
|
1006
|
+
```
|
1007
|
+
|
1008
|
+
## List Express Route Circuit Peerings
|
1009
|
+
|
1010
|
+
List all express route circuit peerings in a resource group
|
1011
|
+
|
1012
|
+
```ruby
|
1013
|
+
peerings = network.express_route_circuit_peerings(resource_group: '<Resource Group Name>', circuit_name: '<Circuit Name>')
|
1014
|
+
peerings.each do |peering|
|
1015
|
+
puts "#{peering.name}"
|
1016
|
+
end
|
1017
|
+
```
|
1018
|
+
|
1019
|
+
## Retrieve single Express Route Circuit Peering
|
1020
|
+
|
1021
|
+
Get a single record of Express Route Circuit Peering
|
1022
|
+
|
1023
|
+
```ruby
|
1024
|
+
peering = network.express_route_circuit_peerings.get("<Resource Group Name>", "<Peering Name>", "Circuit Name")
|
1025
|
+
puts "#{peering.peering_type}"
|
1026
|
+
```
|
1027
|
+
|
1028
|
+
## Destroy single Express Route Circuit Peering
|
1029
|
+
|
1030
|
+
Get an express route circuit peering object from the get method and then destroy that express route circuit peering.
|
1031
|
+
|
1032
|
+
```ruby
|
1033
|
+
peering.destroy
|
1034
|
+
```
|
1035
|
+
|
1036
|
+
# Express Route Service Provider
|
1037
|
+
|
1038
|
+
Express Route Service Providers are telcos and exchange providers who are approved in the system to provide Express Route connectivity.
|
1039
|
+
|
1040
|
+
## List Express Route Service Providers
|
1041
|
+
|
1042
|
+
List all express route service providers
|
1043
|
+
|
1044
|
+
```ruby
|
1045
|
+
service_providers = network.express_route_service_providers
|
1046
|
+
puts service_providers
|
1047
|
+
```
|
1048
|
+
|
1049
|
+
## Check Virtual Network Gateway Connection Existence
|
1050
|
+
|
1051
|
+
```ruby
|
1052
|
+
azure_network_service.virtual_network_gateway_connections.check_vnet_gateway_connection_exists(<Resource Group name>, <Virtual Network Gateway Connection Name>)
|
1053
|
+
```
|
1054
|
+
|
1055
|
+
## Create Virtual Network Gateway Connection
|
1056
|
+
|
1057
|
+
Create a new Virtual Network Gateway Connection.
|
1058
|
+
|
1059
|
+
```ruby
|
1060
|
+
gateway_connection = network.virtual_network_gateway_connections.create(
|
1061
|
+
name: '<Virtual Network Gateway Connection Name>',
|
1062
|
+
location: 'eastus',
|
1063
|
+
tags: {
|
1064
|
+
key1: 'value1',
|
1065
|
+
key2: 'value2'
|
1066
|
+
},
|
1067
|
+
resource_group: '<Resource Group Name>',
|
1068
|
+
virtual_network_gateway1: {
|
1069
|
+
name: 'firstgateway',
|
1070
|
+
resource_group: '<Resource Group Name>'
|
1071
|
+
},
|
1072
|
+
virtual_network_gateway2: {
|
1073
|
+
name: 'secondgateway',
|
1074
|
+
resource_group: '<Resource Group Name>'
|
1075
|
+
}
|
1076
|
+
connection_type: 'VNet-to-VNet'
|
1077
|
+
)
|
1078
|
+
```
|
1079
|
+
|
1080
|
+
## List Virtual Network Gateway Connections
|
1081
|
+
|
1082
|
+
List all virtual network gateway connections in a resource group
|
1083
|
+
|
1084
|
+
```ruby
|
1085
|
+
gateway_connections = network.virtual_network_gateway_connections(resource_group: '<Resource Group Name>')
|
1086
|
+
gateway_connections.each do |connection|
|
1087
|
+
puts "#{connection.name}"
|
1088
|
+
end
|
1089
|
+
```
|
1090
|
+
|
1091
|
+
## Retrieve single Virtual Network Gateway Connection
|
1092
|
+
|
1093
|
+
Get single record of Virtual Network Gateway Connection
|
1094
|
+
|
1095
|
+
```ruby
|
1096
|
+
gateway_connection = network.virtual_network_gateway_connections.get('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
|
1097
|
+
puts "#{gateway_connection.name}"
|
1098
|
+
```
|
1099
|
+
|
1100
|
+
## Destroy single Virtual Network Gateway Connection
|
1101
|
+
|
1102
|
+
Get a virtual network gateway connection object from the get method and then destroy that virtual network gateway connection.
|
1103
|
+
|
1104
|
+
```ruby
|
1105
|
+
gateway_connection.destroy
|
1106
|
+
```
|
1107
|
+
|
1108
|
+
## Get the shared key for a connection
|
1109
|
+
|
1110
|
+
```ruby
|
1111
|
+
shared_key = network.get_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>')
|
1112
|
+
puts gateway_connection
|
1113
|
+
```
|
1114
|
+
|
1115
|
+
## Set the shared key for a connection
|
1116
|
+
|
1117
|
+
```ruby
|
1118
|
+
network.set_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>', 'Value')
|
1119
|
+
```
|
1120
|
+
|
1121
|
+
## Reset the shared key for a connection
|
1122
|
+
|
1123
|
+
```ruby
|
1124
|
+
network.reset_connection_shared_key('<Resource Group Name>', '<Virtual Network Gateway Connection Name>', <Key Length in Integer>)
|
1125
|
+
```
|
1126
|
+
|
1127
|
+
|
1128
|
+
## Support and Feedback
|
1129
|
+
Your feedback is highly appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.
|