azure_sdk 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/azure_sdk.rb +2 -27
  3. data/lib/azure_sdk/version.rb +1 -1
  4. data/lib/{azure_sdk → common}/configurable.rb +0 -0
  5. data/lib/{azure_sdk → common}/default.rb +0 -0
  6. data/lib/latest/latest_profile_client.rb +154 -0
  7. data/lib/latest/module_definition.rb +122 -0
  8. data/lib/latest/modules/analysisservices_profile_module.rb +104 -0
  9. data/lib/latest/modules/authorization_profile_module.rb +120 -0
  10. data/lib/latest/modules/automation_profile_module.rb +600 -0
  11. data/lib/latest/modules/batch_profile_module.rb +152 -0
  12. data/lib/latest/modules/billing_profile_module.rb +84 -0
  13. data/lib/latest/modules/cdn_profile_module.rb +236 -0
  14. data/lib/latest/modules/cognitiveservices_profile_module.rb +128 -0
  15. data/lib/latest/modules/commerce_profile_module.rb +86 -0
  16. data/lib/latest/modules/compute_profile_module.rb +734 -0
  17. data/lib/latest/modules/consumption_profile_module.rb +74 -0
  18. data/lib/latest/modules/containerinstance_profile_module.rb +126 -0
  19. data/lib/latest/modules/containerregistry_profile_module.rb +210 -0
  20. data/lib/latest/modules/containerservice_profile_module.rb +100 -0
  21. data/lib/latest/modules/customerinsights_profile_module.rb +484 -0
  22. data/lib/latest/modules/datalakeanalytics_profile_module.rb +172 -0
  23. data/lib/latest/modules/datalakestore_profile_module.rb +148 -0
  24. data/lib/latest/modules/devtestlabs_profile_module.rb +676 -0
  25. data/lib/latest/modules/dns_profile_module.rb +114 -0
  26. data/lib/latest/modules/eventgrid_profile_module.rb +146 -0
  27. data/lib/latest/modules/eventhub_profile_module.rb +172 -0
  28. data/lib/latest/modules/features_profile_module.rb +48 -0
  29. data/lib/latest/modules/graph_profile_module.rb +202 -0
  30. data/lib/latest/modules/iothub_profile_module.rb +272 -0
  31. data/lib/latest/modules/keyvault_profile_module.rb +108 -0
  32. data/lib/latest/modules/links_profile_module.rb +56 -0
  33. data/lib/latest/modules/locks_profile_module.rb +52 -0
  34. data/lib/latest/modules/logic_profile_module.rb +600 -0
  35. data/lib/latest/modules/machinelearning_profile_module.rb +184 -0
  36. data/lib/latest/modules/managedapplications_profile_module.rb +110 -0
  37. data/lib/latest/modules/marketplaceordering_profile_module.rb +66 -0
  38. data/lib/latest/modules/mediaservices_profile_module.rb +110 -0
  39. data/lib/latest/modules/mobileengagement_profile_module.rb +404 -0
  40. data/lib/latest/modules/monitor_profile_module.rb +347 -0
  41. data/lib/latest/modules/network_profile_module.rb +1168 -0
  42. data/lib/latest/modules/notificationhubs_profile_module.rb +162 -0
  43. data/lib/latest/modules/operationalinsights_profile_module.rb +209 -0
  44. data/lib/latest/modules/policy_profile_module.rb +89 -0
  45. data/lib/latest/modules/powerbiembedded_profile_module.rb +114 -0
  46. data/lib/latest/modules/recoveryservices_profile_module.rb +209 -0
  47. data/lib/latest/modules/recoveryservicesbackup_profile_module.rb +750 -0
  48. data/lib/latest/modules/recoveryservicessiterecovery_profile_module.rb +1374 -0
  49. data/lib/latest/modules/redis_profile_module.rb +172 -0
  50. data/lib/latest/modules/relay_profile_module.rb +150 -0
  51. data/lib/latest/modules/resources_profile_module.rb +234 -0
  52. data/lib/latest/modules/resourcesmanagement_profile_module.rb +94 -0
  53. data/lib/latest/modules/scheduler_profile_module.rb +218 -0
  54. data/lib/latest/modules/search_profile_module.rb +96 -0
  55. data/lib/latest/modules/servermanagement_profile_module.rb +162 -0
  56. data/lib/latest/modules/servicebus_profile_module.rb +254 -0
  57. data/lib/latest/modules/servicefabric_profile_module.rb +140 -0
  58. data/lib/latest/modules/sql_profile_module.rb +940 -0
  59. data/lib/latest/modules/storage_profile_module.rb +270 -0
  60. data/lib/latest/modules/storsimple8000series_profile_module.rb +702 -0
  61. data/lib/latest/modules/streamanalytics_profile_module.rb +336 -0
  62. data/lib/latest/modules/subscriptions_profile_module.rb +74 -0
  63. data/lib/latest/modules/trafficmanager_profile_module.rb +145 -0
  64. data/lib/latest/modules/web_profile_module.rb +1162 -0
  65. data/lib/v2017_03_09/module_definition.rb +26 -0
  66. data/lib/v2017_03_09/modules/compute_profile_module.rb +444 -0
  67. data/lib/v2017_03_09/modules/features_profile_module.rb +48 -0
  68. data/lib/v2017_03_09/modules/links_profile_module.rb +56 -0
  69. data/lib/v2017_03_09/modules/locks_profile_module.rb +48 -0
  70. data/lib/v2017_03_09/modules/network_profile_module.rb +542 -0
  71. data/lib/v2017_03_09/modules/policy_profile_module.rb +58 -0
  72. data/lib/v2017_03_09/modules/resources_profile_module.rb +230 -0
  73. data/lib/v2017_03_09/modules/storage_profile_module.rb +114 -0
  74. data/lib/v2017_03_09/modules/subscriptions_profile_module.rb +74 -0
  75. data/lib/v2017_03_09/v2017_03_09_profile_client.rb +58 -0
  76. metadata +210 -127
  77. data/lib/azure_sdk/client.rb +0 -207
@@ -1,207 +0,0 @@
1
- # encoding: utf-8
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for license information.
4
-
5
- require 'azure_mgmt_analysis_services'
6
- require 'azure_mgmt_authorization'
7
- require 'azure_mgmt_automation'
8
- require 'azure_mgmt_batch'
9
- require 'azure_mgmt_billing'
10
- require 'azure_mgmt_cdn'
11
- require 'azure_mgmt_cognitive_services'
12
- require 'azure_mgmt_commerce'
13
- require 'azure_mgmt_compute'
14
- require 'azure_mgmt_consumption'
15
- require 'azure_mgmt_container_instance'
16
- require 'azure_mgmt_container_registry'
17
- require 'azure_mgmt_customer_insights'
18
- require 'azure_mgmt_datalake_analytics'
19
- require 'azure_mgmt_datalake_store'
20
- require 'azure_mgmt_devtestlabs'
21
- require 'azure_mgmt_dns'
22
- require 'azure_mgmt_event_grid'
23
- require 'azure_mgmt_event_hub'
24
- require 'azure_mgmt_features'
25
- require 'azure_mgmt_graph'
26
- require 'azure_mgmt_iot_hub'
27
- require 'azure_mgmt_key_vault'
28
- require 'azure_mgmt_links'
29
- require 'azure_mgmt_locks'
30
- require 'azure_mgmt_logic'
31
- require 'azure_mgmt_machine_learning'
32
- require 'azure_mgmt_managed_applications'
33
- require 'azure_mgmt_marketplace_ordering'
34
- require 'azure_mgmt_media_services'
35
- require 'azure_mgmt_mobile_engagement'
36
- require 'azure_mgmt_monitor'
37
- require 'azure_mgmt_network'
38
- require 'azure_mgmt_notification_hubs'
39
- require 'azure_mgmt_operational_insights'
40
- require 'azure_mgmt_policy'
41
- require 'azure_mgmt_powerbi_embedded'
42
- require 'azure_mgmt_recovery_services'
43
- require 'azure_mgmt_recovery_services_backup'
44
- require 'azure_mgmt_recovery_services_site_recovery'
45
- require 'azure_mgmt_redis'
46
- require 'azure_mgmt_relay'
47
- require 'azure_mgmt_resources'
48
- require 'azure_mgmt_resources_management'
49
- require 'azure_mgmt_scheduler'
50
- require 'azure_mgmt_search'
51
- require 'azure_mgmt_server_management'
52
- require 'azure_mgmt_service_bus'
53
- require 'azure_mgmt_service_fabric'
54
- require 'azure_mgmt_sql'
55
- require 'azure_mgmt_stor_simple8000_series'
56
- require 'azure_mgmt_storage'
57
- require 'azure_mgmt_stream_analytics'
58
- require 'azure_mgmt_subscriptions'
59
- require 'azure_mgmt_traffic_manager'
60
- require 'azure_mgmt_web'
61
-
62
- module Azure::ARM
63
- class Client
64
- include Azure::ARM::Configurable
65
-
66
- #
67
- # Supported Azure::ARM clients.
68
- # @return [Hash] Supported Azure::ARM clients.
69
- #
70
- @@supported_clients = {
71
- :analysis_services => 'Azure::ARM::AnalysisServices::AnalysisServicesManagementClient',
72
- :authorization => 'Azure::ARM::Authorization::AuthorizationManagementClient',
73
- :automation => 'Azure::ARM::Automation::AutomationClient',
74
- :batch => 'Azure::ARM::Batch::BatchManagementClient',
75
- :billing => 'Azure::ARM::Batch::BillingManagementClient',
76
- :cdn => 'Azure::ARM::CDN::CdnManagementClient',
77
- :cognitive_services => 'Azure::ARM::CognitiveServices::CognitiveServicesManagementClient',
78
- :commerce => 'Azure::ARM::Commerce::UsageManagementClient',
79
- :compute => 'Azure::ARM::Compute::ComputeManagementClient',
80
- :consumption => 'Azure::ARM::Compute::ConsumptionManagementClient',
81
- :container_instance => 'Azure::ARM::ContainerInstance::ContainerInstanceManagementClient',
82
- :container_registry => 'Azure::ARM::ContainerRegistry::ContainerRegistry::ContainerRegistryManagementClient',
83
- :customer_insights => 'Azure::ARM::CustomerInsights::CustomerInsightsManagementClient',
84
- :datalake_analytics => 'Azure::ARM::DataLakeAnalytics::DataLakeAnalyticsAccountManagementClient',
85
- :datalake_store => 'Azure::ARM::DataLakeStore::DataLakeStoreAccountManagementClient',
86
- :devtestlabs => 'Azure::ARM::DevTestLabs::DevTestLabsClient',
87
- :dns => 'Azure::ARM::Dns::DnsManagementClient',
88
- :event_grid => 'Azure::ARM::EventGrid::EventGridManagementClient',
89
- :event_hub => 'Azure::ARM::EventHub::EventHubManagementClient',
90
- :features => 'Azure::ARM::Features::FeatureClient',
91
- :graph_rbac => 'Azure::ARM::Graph::GraphRbacManagementClient',
92
- :iot_hub => 'Azure::ARM::IotHub::IotHubClient',
93
- :key_vault => 'Azure::ARM::KeyVault::KeyVaultManagementClient',
94
- :links => 'Azure::ARM::Locks::ManagementLinkClient',
95
- :locks => 'Azure::ARM::Locks::ManagementLockClient',
96
- :logic => 'Azure::ARM::Logic::LogicManagementClient',
97
- :machine_learning => 'Azure::ARM::MachineLearning::AzureMLWebServicesManagementClient',
98
- :managed_applications => 'Azure::ARM::ManagedApplications::ManagedApplicationClient',
99
- :marketplace_ordering => 'Azure::ARM::Marketplace_Ordering::MarketplaceOrderingAgreements',
100
- :media_services => 'Azure::ARM::MediaServices::MediaServicesManagementClient',
101
- :mobile_engagement => 'Azure::ARM::MobileEngagement::EngagementManagementClient',
102
- :monitor => 'Azure::ARM::Monitor::MonitorManagementClient',
103
- :network => 'Azure::ARM::Network::NetworkManagementClient',
104
- :notification_hubs => 'Azure::ARM::NotificationHubs::NotificationHubsManagementClient',
105
- :operational_insights => 'Azure::ARM::OperationalInsights::OperationalInsightsManagementClient',
106
- :policy => 'Azure::ARM::Policy::PolicyClient',
107
- :powerbi_embedded => 'Azure::ARM::PowerBiEmbedded::PowerBIEmbeddedManagementClient',
108
- :redis => 'Azure::ARM::Redis::RedisManagementClient',
109
- :relay => 'Azure::ARM::Relay::RelayManagementClient',
110
- :resources => 'Azure::ARM::Resources::ResourceManagementClient',
111
- :resources_management => 'Azure::ARM::ResourcesManagement::ManagementGroupsAPI',
112
- :scheduler => 'Azure::ARM::Scheduler::SchedulerManagementClient',
113
- :search => 'Azure::ARM::Search::SearchManagementClient',
114
- :server_management => 'Azure::ARM::ServerManagement::ServerManagement',
115
- :service_bus => 'Azure::ARM::ServiceBus::ServiceBusManagementClient',
116
- :service_fabric => 'Azure::ARM::ServiceFabric::ServiceFabricManagementClient ',
117
- :sql => 'Azure::ARM::SQL::SqlManagementClient',
118
- :stor_simple8000_series => 'Azure::ARM::StorSimple8000Series::StorSimple8000SeriesManagementClient',
119
- :storage => 'Azure::ARM::Storage::StorageManagementClient',
120
- :stream_analytics => 'Azure::ARM::StreamAnalytics::StreamAnalyticsManagementClient',
121
- :subscription => 'Azure::ARM::Subscriptions::SubscriptionClient',
122
- :traffic_manager => 'Azure::ARM::TrafficManager::TrafficManagerManagementClient',
123
- :web => 'Azure::ARM::Web::WebSiteManagementClient'
124
- }
125
-
126
- #
127
- # Initializes a new instance of the Client class.
128
- # @param options [Hash] hash of client options.
129
- #
130
- def initialize(options = {})
131
- if options.is_a?(Hash) && options.length == 0
132
- @options = setup_options
133
- else
134
- @options = options
135
- end
136
-
137
- reset!(options)
138
-
139
- #
140
- # Dynamically create arm client methods
141
- #
142
- @@supported_clients.each do |key, value|
143
- create_arm_client_methods(key, value)
144
- end
145
- end
146
-
147
- #
148
- # Check if this client is configured with the same options.
149
- # @param opts [Hash] hash of client options.
150
- # @return [Boolean] True if client is configured with same set of options, False otherwise.
151
- #
152
- def same_options?(opts)
153
- opts.hash == @options.hash
154
- end
155
-
156
- #
157
- # Hash of client configured options.
158
- # @return [Hash] Hash of client configured options if any or empty Hash.
159
- #
160
- def options
161
- @options ||= {}
162
- end
163
-
164
- #
165
- # Creates a new instance of the MsRest::ServiceClientCredentials class if does not exists.
166
- # @return [MsRest::ServiceClientCredentials] Azure ARM credentials to authorize HTTP requests made by the service client.
167
- #
168
- def credentials
169
- if @credentials.nil?
170
- self.active_directory_settings ||= Azure::ARM::Default.active_directory_settings
171
-
172
- @credentials = MsRest::TokenCredentials.new(
173
- MsRestAzure::ApplicationTokenProvider.new(
174
- self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
175
- end
176
- @credentials
177
- end
178
-
179
- #
180
- # lists the supported Azure::ARM clients.
181
- # @return [Array] list of the supported Azure::ARM clients.
182
- #
183
- def list_supported_clients
184
- @@supported_clients.keys
185
- end
186
-
187
- private
188
-
189
- #
190
- # Creates a new instance method for Azure::ARM.client class for supported Azure ARM clients.
191
- # @param name [Symbol] name of the method as Symbol.
192
- # @param name [String] name of the Azure::ARM client to be instantiated.
193
- #
194
- def create_arm_client_methods(name, client)
195
- self.class.class_eval do
196
- public
197
- define_method name do |base_url = nil, options = nil|
198
- return instance_variable_get("@#{name}") if instance_variable_defined?("@#{name}") && !instance_variable_get("@#{name}").nil?
199
- arm_client = instance_variable_set("@#{name}", Object.const_get("#{client}").new(credentials, base_url, options))
200
- arm_client.subscription_id = self.subscription_id if arm_client.respond_to?(:subscription_id)
201
- arm_client.tenant_id = self.tenant_id if arm_client.respond_to?(:tenant_id)
202
- arm_client
203
- end
204
- end
205
- end
206
- end
207
- end