azure_mgmt_sql 0.15.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2014-04-01/generated/azure_mgmt_sql.rb +77 -63
  3. data/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb +118 -16
  4. data/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb +114 -16
  5. data/lib/2014-04-01/generated/azure_mgmt_sql/capabilities.rb +6 -5
  6. data/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_policies.rb +12 -12
  7. data/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_rules.rb +12 -12
  8. data/lib/2014-04-01/generated/azure_mgmt_sql/database_advisors.rb +18 -17
  9. data/lib/2014-04-01/generated/azure_mgmt_sql/database_connection_policies.rb +12 -12
  10. data/lib/2014-04-01/generated/azure_mgmt_sql/database_table_auditing_policies.rb +18 -17
  11. data/lib/2014-04-01/generated/azure_mgmt_sql/database_threat_detection_policies.rb +12 -12
  12. data/lib/2014-04-01/generated/azure_mgmt_sql/database_usages.rb +6 -5
  13. data/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb +649 -643
  14. data/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb +830 -0
  15. data/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_activities.rb +6 -5
  16. data/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_database_activities.rb +6 -5
  17. data/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pools.rb +216 -213
  18. data/lib/2014-04-01/generated/azure_mgmt_sql/extensions.rb +130 -0
  19. data/lib/2014-04-01/generated/azure_mgmt_sql/firewall_rules.rb +24 -22
  20. data/lib/2014-04-01/generated/azure_mgmt_sql/geo_backup_policies.rb +18 -17
  21. data/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_policy_list_result.rb +56 -0
  22. data/lib/2014-04-01/generated/azure_mgmt_sql/models/backup_long_term_retention_vault_list_result.rb +56 -0
  23. data/lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb +43 -10
  24. data/lib/2014-04-01/generated/azure_mgmt_sql/models/database_edition.rb +1 -0
  25. data/lib/2014-04-01/generated/azure_mgmt_sql/models/database_update.rb +43 -10
  26. data/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration.rb +164 -0
  27. data/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_auto_failover.rb +16 -0
  28. data/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_failover_policy.rb +16 -0
  29. data/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_list_result.rb +57 -0
  30. data/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_role.rb +17 -0
  31. data/lib/2014-04-01/generated/azure_mgmt_sql/models/disaster_recovery_configuration_status.rb +18 -0
  32. data/lib/2014-04-01/generated/azure_mgmt_sql/models/edition_capability.rb +13 -0
  33. data/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool.rb +13 -0
  34. data/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb +13 -0
  35. data/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool_update.rb +13 -0
  36. data/lib/2014-04-01/generated/azure_mgmt_sql/models/extension_list_result.rb +54 -0
  37. data/lib/2014-04-01/generated/azure_mgmt_sql/models/import_request.rb +12 -4
  38. data/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text.rb +72 -0
  39. data/lib/2014-04-01/generated/azure_mgmt_sql/models/query_text_list_result.rb +55 -0
  40. data/lib/2014-04-01/generated/azure_mgmt_sql/models/service_objective_name.rb +52 -2
  41. data/lib/2014-04-01/generated/azure_mgmt_sql/models/slo_usage_metric.rb +10 -3
  42. data/lib/2014-04-01/generated/azure_mgmt_sql/operations.rb +6 -5
  43. data/lib/2014-04-01/generated/azure_mgmt_sql/queries.rb +6 -5
  44. data/lib/2014-04-01/generated/azure_mgmt_sql/query_statistics.rb +6 -5
  45. data/lib/2014-04-01/generated/azure_mgmt_sql/query_texts.rb +134 -0
  46. data/lib/2014-04-01/generated/azure_mgmt_sql/recommended_elastic_pools.rb +18 -15
  47. data/lib/2014-04-01/generated/azure_mgmt_sql/recoverable_databases.rb +12 -10
  48. data/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb +38 -33
  49. data/lib/2014-04-01/generated/azure_mgmt_sql/restorable_dropped_databases.rb +12 -10
  50. data/lib/2014-04-01/generated/azure_mgmt_sql/restore_points.rb +6 -5
  51. data/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb +32 -30
  52. data/lib/2014-04-01/generated/azure_mgmt_sql/server_communication_links.rb +28 -26
  53. data/lib/2014-04-01/generated/azure_mgmt_sql/server_connection_policies.rb +12 -12
  54. data/lib/2014-04-01/generated/azure_mgmt_sql/server_table_auditing_policies.rb +18 -17
  55. data/lib/2014-04-01/generated/azure_mgmt_sql/server_usages.rb +6 -5
  56. data/lib/2014-04-01/generated/azure_mgmt_sql/servers.rb +134 -133
  57. data/lib/2014-04-01/generated/azure_mgmt_sql/service_objectives.rb +12 -10
  58. data/lib/2014-04-01/generated/azure_mgmt_sql/service_tier_advisors.rb +12 -10
  59. data/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb +32 -17
  60. data/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb +6 -5
  61. data/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_configurations.rb +6 -5
  62. data/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryptions.rb +12 -12
  63. data/lib/2015-05-01-preview/generated/azure_mgmt_sql.rb +22 -19
  64. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_advisors.rb +18 -17
  65. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +12 -12
  66. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb +18 -17
  67. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/encryption_protectors.rb +31 -29
  68. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb +71 -67
  69. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage.rb +110 -0
  70. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/subscription_usage_list_result.rb +100 -0
  71. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/operations.rb +15 -13
  72. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_advisors.rb +18 -17
  73. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_keys.rb +41 -38
  74. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/servers.rb +66 -62
  75. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +8 -1
  76. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/subscription_usages.rb +324 -0
  77. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb +62 -56
  78. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb +118 -107
  79. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_members.rb +76 -71
  80. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/virtual_network_rules.rb +41 -38
  81. data/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb +30 -1
  82. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb +21 -18
  83. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_restore_points.rb +527 -0
  84. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb +1599 -0
  85. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/arm_sku.rb +92 -0
  86. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb +16 -0
  87. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb +17 -0
  88. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_mode.rb +17 -0
  89. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb +90 -0
  90. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_reason.rb +17 -0
  91. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/catalog_collation_type.rb +16 -0
  92. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb +47 -0
  93. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb +23 -0
  94. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb +393 -0
  95. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb +100 -0
  96. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_restore_point.rb +124 -0
  97. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_restore_point_list_result.rb +100 -0
  98. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb +348 -0
  99. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb +145 -0
  100. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_operation_result.rb +170 -0
  101. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb +46 -0
  102. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_type.rb +16 -0
  103. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sample_name.rb +17 -0
  104. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_automatic_tuning.rb +110 -0
  105. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias.rb +74 -0
  106. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb +47 -0
  107. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb +100 -0
  108. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/status.rb +32 -0
  109. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb +92 -0
  110. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb +238 -0
  111. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb +805 -0
  112. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +21 -1
  113. data/lib/profiles/latest/modules/sql_profile_module.rb +912 -749
  114. data/lib/profiles/latest/sql_latest_profile_client.rb +28 -9
  115. data/lib/profiles/latest/sql_module_definition.rb +0 -1
  116. data/lib/version.rb +1 -1
  117. metadata +49 -3
@@ -38,8 +38,8 @@ module Azure::SQL::Mgmt::V2014_04_01
38
38
  #
39
39
  # @return [ServerConnectionPolicy] operation results.
40
40
  #
41
- def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil)
42
- response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
41
+ def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil)
42
+ response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
43
43
  response.body unless response.nil?
44
44
  end
45
45
 
@@ -57,8 +57,8 @@ module Azure::SQL::Mgmt::V2014_04_01
57
57
  #
58
58
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
59
59
  #
60
- def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil)
61
- create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
60
+ def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil)
61
+ create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
62
62
  end
63
63
 
64
64
  #
@@ -75,7 +75,7 @@ module Azure::SQL::Mgmt::V2014_04_01
75
75
  #
76
76
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
77
77
  #
78
- def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil)
78
+ def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil)
79
79
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
80
80
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
81
81
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -85,13 +85,12 @@ module Azure::SQL::Mgmt::V2014_04_01
85
85
 
86
86
 
87
87
  request_headers = {}
88
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
88
89
 
89
90
  # Set Headers
90
91
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
92
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
93
 
93
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
94
-
95
94
  # Serialize Request
96
95
  request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::ServerConnectionPolicy.mapper()
97
96
  request_content = @client.serialize(request_mapper, parameters)
@@ -160,8 +159,8 @@ module Azure::SQL::Mgmt::V2014_04_01
160
159
  #
161
160
  # @return [ServerConnectionPolicy] operation results.
162
161
  #
163
- def get(resource_group_name, server_name, custom_headers = nil)
164
- response = get_async(resource_group_name, server_name, custom_headers).value!
162
+ def get(resource_group_name, server_name, custom_headers:nil)
163
+ response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value!
165
164
  response.body unless response.nil?
166
165
  end
167
166
 
@@ -177,8 +176,8 @@ module Azure::SQL::Mgmt::V2014_04_01
177
176
  #
178
177
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
179
178
  #
180
- def get_with_http_info(resource_group_name, server_name, custom_headers = nil)
181
- get_async(resource_group_name, server_name, custom_headers).value!
179
+ def get_with_http_info(resource_group_name, server_name, custom_headers:nil)
180
+ get_async(resource_group_name, server_name, custom_headers:custom_headers).value!
182
181
  end
183
182
 
184
183
  #
@@ -193,7 +192,7 @@ module Azure::SQL::Mgmt::V2014_04_01
193
192
  #
194
193
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
195
194
  #
196
- def get_async(resource_group_name, server_name, custom_headers = nil)
195
+ def get_async(resource_group_name, server_name, custom_headers:nil)
197
196
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
198
197
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
199
198
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -202,6 +201,7 @@ module Azure::SQL::Mgmt::V2014_04_01
202
201
 
203
202
 
204
203
  request_headers = {}
204
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
205
205
 
206
206
  # Set Headers
207
207
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -37,8 +37,8 @@ module Azure::SQL::Mgmt::V2014_04_01
37
37
  #
38
38
  # @return [ServerTableAuditingPolicy] operation results.
39
39
  #
40
- def get(resource_group_name, server_name, custom_headers = nil)
41
- response = get_async(resource_group_name, server_name, custom_headers).value!
40
+ def get(resource_group_name, server_name, custom_headers:nil)
41
+ response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value!
42
42
  response.body unless response.nil?
43
43
  end
44
44
 
@@ -55,8 +55,8 @@ module Azure::SQL::Mgmt::V2014_04_01
55
55
  #
56
56
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
57
57
  #
58
- def get_with_http_info(resource_group_name, server_name, custom_headers = nil)
59
- get_async(resource_group_name, server_name, custom_headers).value!
58
+ def get_with_http_info(resource_group_name, server_name, custom_headers:nil)
59
+ get_async(resource_group_name, server_name, custom_headers:custom_headers).value!
60
60
  end
61
61
 
62
62
  #
@@ -72,7 +72,7 @@ module Azure::SQL::Mgmt::V2014_04_01
72
72
  #
73
73
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
74
  #
75
- def get_async(resource_group_name, server_name, custom_headers = nil)
75
+ def get_async(resource_group_name, server_name, custom_headers:nil)
76
76
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
77
  fail ArgumentError, 'server_name is nil' if server_name.nil?
78
78
  table_auditing_policy_name = 'default'
@@ -81,6 +81,7 @@ module Azure::SQL::Mgmt::V2014_04_01
81
81
 
82
82
 
83
83
  request_headers = {}
84
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
84
85
 
85
86
  # Set Headers
86
87
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -140,8 +141,8 @@ module Azure::SQL::Mgmt::V2014_04_01
140
141
  #
141
142
  # @return [ServerTableAuditingPolicy] operation results.
142
143
  #
143
- def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil)
144
- response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
144
+ def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil)
145
+ response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
145
146
  response.body unless response.nil?
146
147
  end
147
148
 
@@ -160,8 +161,8 @@ module Azure::SQL::Mgmt::V2014_04_01
160
161
  #
161
162
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
162
163
  #
163
- def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil)
164
- create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
164
+ def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil)
165
+ create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
165
166
  end
166
167
 
167
168
  #
@@ -179,7 +180,7 @@ module Azure::SQL::Mgmt::V2014_04_01
179
180
  #
180
181
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
181
182
  #
182
- def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil)
183
+ def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil)
183
184
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
184
185
  fail ArgumentError, 'server_name is nil' if server_name.nil?
185
186
  table_auditing_policy_name = 'default'
@@ -189,13 +190,12 @@ module Azure::SQL::Mgmt::V2014_04_01
189
190
 
190
191
 
191
192
  request_headers = {}
193
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
192
194
 
193
195
  # Set Headers
194
196
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
195
197
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
196
198
 
197
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
198
-
199
199
  # Serialize Request
200
200
  request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::ServerTableAuditingPolicy.mapper()
201
201
  request_content = @client.serialize(request_mapper, parameters)
@@ -265,8 +265,8 @@ module Azure::SQL::Mgmt::V2014_04_01
265
265
  #
266
266
  # @return [ServerTableAuditingPolicyListResult] operation results.
267
267
  #
268
- def list_by_server(resource_group_name, server_name, custom_headers = nil)
269
- response = list_by_server_async(resource_group_name, server_name, custom_headers).value!
268
+ def list_by_server(resource_group_name, server_name, custom_headers:nil)
269
+ response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
270
270
  response.body unless response.nil?
271
271
  end
272
272
 
@@ -283,8 +283,8 @@ module Azure::SQL::Mgmt::V2014_04_01
283
283
  #
284
284
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
285
285
  #
286
- def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil)
287
- list_by_server_async(resource_group_name, server_name, custom_headers).value!
286
+ def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil)
287
+ list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
288
288
  end
289
289
 
290
290
  #
@@ -300,7 +300,7 @@ module Azure::SQL::Mgmt::V2014_04_01
300
300
  #
301
301
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
302
302
  #
303
- def list_by_server_async(resource_group_name, server_name, custom_headers = nil)
303
+ def list_by_server_async(resource_group_name, server_name, custom_headers:nil)
304
304
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
305
305
  fail ArgumentError, 'server_name is nil' if server_name.nil?
306
306
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -308,6 +308,7 @@ module Azure::SQL::Mgmt::V2014_04_01
308
308
 
309
309
 
310
310
  request_headers = {}
311
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
311
312
 
312
313
  # Set Headers
313
314
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -36,8 +36,8 @@ module Azure::SQL::Mgmt::V2014_04_01
36
36
  #
37
37
  # @return [ServerUsageListResult] operation results.
38
38
  #
39
- def list_by_server(resource_group_name, server_name, custom_headers = nil)
40
- response = list_by_server_async(resource_group_name, server_name, custom_headers).value!
39
+ def list_by_server(resource_group_name, server_name, custom_headers:nil)
40
+ response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
41
41
  response.body unless response.nil?
42
42
  end
43
43
 
@@ -53,8 +53,8 @@ module Azure::SQL::Mgmt::V2014_04_01
53
53
  #
54
54
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
55
  #
56
- def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil)
57
- list_by_server_async(resource_group_name, server_name, custom_headers).value!
56
+ def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil)
57
+ list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
58
58
  end
59
59
 
60
60
  #
@@ -69,7 +69,7 @@ module Azure::SQL::Mgmt::V2014_04_01
69
69
  #
70
70
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
71
  #
72
- def list_by_server_async(resource_group_name, server_name, custom_headers = nil)
72
+ def list_by_server_async(resource_group_name, server_name, custom_headers:nil)
73
73
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
74
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
75
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -77,6 +77,7 @@ module Azure::SQL::Mgmt::V2014_04_01
77
77
 
78
78
 
79
79
  request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
80
81
 
81
82
  # Set Headers
82
83
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -24,6 +24,104 @@ module Azure::SQL::Mgmt::V2014_04_01
24
24
  # @return [SqlManagementClient] reference to the SqlManagementClient
25
25
  attr_reader :client
26
26
 
27
+ #
28
+ # Determines whether a resource can be created with the specified name.
29
+ #
30
+ # @param parameters [CheckNameAvailabilityRequest] The parameters to request
31
+ # for name availability.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [CheckNameAvailabilityResponse] operation results.
36
+ #
37
+ def check_name_availability(parameters, custom_headers:nil)
38
+ response = check_name_availability_async(parameters, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Determines whether a resource can be created with the specified name.
44
+ #
45
+ # @param parameters [CheckNameAvailabilityRequest] The parameters to request
46
+ # for name availability.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
+ #
52
+ def check_name_availability_with_http_info(parameters, custom_headers:nil)
53
+ check_name_availability_async(parameters, custom_headers:custom_headers).value!
54
+ end
55
+
56
+ #
57
+ # Determines whether a resource can be created with the specified name.
58
+ #
59
+ # @param parameters [CheckNameAvailabilityRequest] The parameters to request
60
+ # for name availability.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def check_name_availability_async(parameters, custom_headers:nil)
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
70
+
71
+
72
+ request_headers = {}
73
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
+
75
+ # Set Headers
76
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
77
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
78
+
79
+ # Serialize Request
80
+ request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest.mapper()
81
+ request_content = @client.serialize(request_mapper, parameters)
82
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
83
+
84
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability'
85
+
86
+ request_url = @base_url || @client.base_url
87
+
88
+ options = {
89
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
90
+ path_params: {'subscriptionId' => @client.subscription_id},
91
+ query_params: {'api-version' => @client.api_version},
92
+ body: request_content,
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:post, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
27
125
  #
28
126
  # Returns a list of servers.
29
127
  #
@@ -32,8 +130,8 @@ module Azure::SQL::Mgmt::V2014_04_01
32
130
  #
33
131
  # @return [ServerListResult] operation results.
34
132
  #
35
- def list(custom_headers = nil)
36
- response = list_async(custom_headers).value!
133
+ def list(custom_headers:nil)
134
+ response = list_async(custom_headers:custom_headers).value!
37
135
  response.body unless response.nil?
38
136
  end
39
137
 
@@ -45,8 +143,8 @@ module Azure::SQL::Mgmt::V2014_04_01
45
143
  #
46
144
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
47
145
  #
48
- def list_with_http_info(custom_headers = nil)
49
- list_async(custom_headers).value!
146
+ def list_with_http_info(custom_headers:nil)
147
+ list_async(custom_headers:custom_headers).value!
50
148
  end
51
149
 
52
150
  #
@@ -57,12 +155,13 @@ module Azure::SQL::Mgmt::V2014_04_01
57
155
  #
58
156
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
157
  #
60
- def list_async(custom_headers = nil)
158
+ def list_async(custom_headers:nil)
61
159
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
160
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
63
161
 
64
162
 
65
163
  request_headers = {}
164
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
165
 
67
166
  # Set Headers
68
167
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -121,8 +220,8 @@ module Azure::SQL::Mgmt::V2014_04_01
121
220
  #
122
221
  # @return [Server] operation results.
123
222
  #
124
- def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil)
125
- response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
223
+ def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil)
224
+ response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
126
225
  response.body unless response.nil?
127
226
  end
128
227
 
@@ -140,8 +239,8 @@ module Azure::SQL::Mgmt::V2014_04_01
140
239
  #
141
240
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
142
241
  #
143
- def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil)
144
- create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
242
+ def create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil)
243
+ create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
145
244
  end
146
245
 
147
246
  #
@@ -158,7 +257,7 @@ module Azure::SQL::Mgmt::V2014_04_01
158
257
  #
159
258
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
160
259
  #
161
- def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil)
260
+ def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil)
162
261
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
163
262
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
164
263
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -167,13 +266,12 @@ module Azure::SQL::Mgmt::V2014_04_01
167
266
 
168
267
 
169
268
  request_headers = {}
269
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
170
270
 
171
271
  # Set Headers
172
272
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
173
273
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
174
274
 
175
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
176
-
177
275
  # Serialize Request
178
276
  request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::Server.mapper()
179
277
  request_content = @client.serialize(request_mapper, parameters)
@@ -244,8 +342,8 @@ module Azure::SQL::Mgmt::V2014_04_01
244
342
  #
245
343
  # @return [Server] operation results.
246
344
  #
247
- def update(resource_group_name, server_name, parameters, custom_headers = nil)
248
- response = update_async(resource_group_name, server_name, parameters, custom_headers).value!
345
+ def update(resource_group_name, server_name, parameters, custom_headers:nil)
346
+ response = update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
249
347
  response.body unless response.nil?
250
348
  end
251
349
 
@@ -263,8 +361,8 @@ module Azure::SQL::Mgmt::V2014_04_01
263
361
  #
264
362
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
265
363
  #
266
- def update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil)
267
- update_async(resource_group_name, server_name, parameters, custom_headers).value!
364
+ def update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil)
365
+ update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
268
366
  end
269
367
 
270
368
  #
@@ -281,7 +379,7 @@ module Azure::SQL::Mgmt::V2014_04_01
281
379
  #
282
380
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
283
381
  #
284
- def update_async(resource_group_name, server_name, parameters, custom_headers = nil)
382
+ def update_async(resource_group_name, server_name, parameters, custom_headers:nil)
285
383
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
286
384
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
287
385
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -290,13 +388,12 @@ module Azure::SQL::Mgmt::V2014_04_01
290
388
 
291
389
 
292
390
  request_headers = {}
391
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
293
392
 
294
393
  # Set Headers
295
394
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
296
395
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
297
396
 
298
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
299
-
300
397
  # Serialize Request
301
398
  request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::ServerUpdate.mapper()
302
399
  request_content = @client.serialize(request_mapper, parameters)
@@ -354,8 +451,8 @@ module Azure::SQL::Mgmt::V2014_04_01
354
451
  # will be added to the HTTP request.
355
452
  #
356
453
  #
357
- def delete(resource_group_name, server_name, custom_headers = nil)
358
- response = delete_async(resource_group_name, server_name, custom_headers).value!
454
+ def delete(resource_group_name, server_name, custom_headers:nil)
455
+ response = delete_async(resource_group_name, server_name, custom_headers:custom_headers).value!
359
456
  nil
360
457
  end
361
458
 
@@ -371,8 +468,8 @@ module Azure::SQL::Mgmt::V2014_04_01
371
468
  #
372
469
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
373
470
  #
374
- def delete_with_http_info(resource_group_name, server_name, custom_headers = nil)
375
- delete_async(resource_group_name, server_name, custom_headers).value!
471
+ def delete_with_http_info(resource_group_name, server_name, custom_headers:nil)
472
+ delete_async(resource_group_name, server_name, custom_headers:custom_headers).value!
376
473
  end
377
474
 
378
475
  #
@@ -387,7 +484,7 @@ module Azure::SQL::Mgmt::V2014_04_01
387
484
  #
388
485
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
389
486
  #
390
- def delete_async(resource_group_name, server_name, custom_headers = nil)
487
+ def delete_async(resource_group_name, server_name, custom_headers:nil)
391
488
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
392
489
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
393
490
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -395,6 +492,7 @@ module Azure::SQL::Mgmt::V2014_04_01
395
492
 
396
493
 
397
494
  request_headers = {}
495
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
398
496
 
399
497
  # Set Headers
400
498
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -441,8 +539,8 @@ module Azure::SQL::Mgmt::V2014_04_01
441
539
  #
442
540
  # @return [Server] operation results.
443
541
  #
444
- def get(resource_group_name, server_name, custom_headers = nil)
445
- response = get_async(resource_group_name, server_name, custom_headers).value!
542
+ def get(resource_group_name, server_name, custom_headers:nil)
543
+ response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value!
446
544
  response.body unless response.nil?
447
545
  end
448
546
 
@@ -458,8 +556,8 @@ module Azure::SQL::Mgmt::V2014_04_01
458
556
  #
459
557
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
460
558
  #
461
- def get_with_http_info(resource_group_name, server_name, custom_headers = nil)
462
- get_async(resource_group_name, server_name, custom_headers).value!
559
+ def get_with_http_info(resource_group_name, server_name, custom_headers:nil)
560
+ get_async(resource_group_name, server_name, custom_headers:custom_headers).value!
463
561
  end
464
562
 
465
563
  #
@@ -474,7 +572,7 @@ module Azure::SQL::Mgmt::V2014_04_01
474
572
  #
475
573
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
476
574
  #
477
- def get_async(resource_group_name, server_name, custom_headers = nil)
575
+ def get_async(resource_group_name, server_name, custom_headers:nil)
478
576
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
479
577
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
480
578
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -482,6 +580,7 @@ module Azure::SQL::Mgmt::V2014_04_01
482
580
 
483
581
 
484
582
  request_headers = {}
583
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
485
584
 
486
585
  # Set Headers
487
586
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -537,8 +636,8 @@ module Azure::SQL::Mgmt::V2014_04_01
537
636
  #
538
637
  # @return [ServerListResult] operation results.
539
638
  #
540
- def list_by_resource_group(resource_group_name, custom_headers = nil)
541
- response = list_by_resource_group_async(resource_group_name, custom_headers).value!
639
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
640
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
542
641
  response.body unless response.nil?
543
642
  end
544
643
 
@@ -553,8 +652,8 @@ module Azure::SQL::Mgmt::V2014_04_01
553
652
  #
554
653
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
555
654
  #
556
- def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
557
- list_by_resource_group_async(resource_group_name, custom_headers).value!
655
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
656
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
558
657
  end
559
658
 
560
659
  #
@@ -568,13 +667,14 @@ module Azure::SQL::Mgmt::V2014_04_01
568
667
  #
569
668
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
570
669
  #
571
- def list_by_resource_group_async(resource_group_name, custom_headers = nil)
670
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
572
671
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
573
672
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
574
673
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
575
674
 
576
675
 
577
676
  request_headers = {}
677
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
578
678
 
579
679
  # Set Headers
580
680
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -619,104 +719,5 @@ module Azure::SQL::Mgmt::V2014_04_01
619
719
  promise.execute
620
720
  end
621
721
 
622
- #
623
- # Determines whether a resource can be created with the specified name.
624
- #
625
- # @param parameters [CheckNameAvailabilityRequest] The parameters to request
626
- # for name availability.
627
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
628
- # will be added to the HTTP request.
629
- #
630
- # @return [CheckNameAvailabilityResponse] operation results.
631
- #
632
- def check_name_availability(parameters, custom_headers = nil)
633
- response = check_name_availability_async(parameters, custom_headers).value!
634
- response.body unless response.nil?
635
- end
636
-
637
- #
638
- # Determines whether a resource can be created with the specified name.
639
- #
640
- # @param parameters [CheckNameAvailabilityRequest] The parameters to request
641
- # for name availability.
642
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
643
- # will be added to the HTTP request.
644
- #
645
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
646
- #
647
- def check_name_availability_with_http_info(parameters, custom_headers = nil)
648
- check_name_availability_async(parameters, custom_headers).value!
649
- end
650
-
651
- #
652
- # Determines whether a resource can be created with the specified name.
653
- #
654
- # @param parameters [CheckNameAvailabilityRequest] The parameters to request
655
- # for name availability.
656
- # @param [Hash{String => String}] A hash of custom headers that will be added
657
- # to the HTTP request.
658
- #
659
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
660
- #
661
- def check_name_availability_async(parameters, custom_headers = nil)
662
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
663
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
664
- fail ArgumentError, 'parameters is nil' if parameters.nil?
665
-
666
-
667
- request_headers = {}
668
-
669
- # Set Headers
670
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
671
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
672
-
673
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
674
-
675
- # Serialize Request
676
- request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityRequest.mapper()
677
- request_content = @client.serialize(request_mapper, parameters)
678
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
679
-
680
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability'
681
-
682
- request_url = @base_url || @client.base_url
683
-
684
- options = {
685
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
686
- path_params: {'subscriptionId' => @client.subscription_id},
687
- query_params: {'api-version' => @client.api_version},
688
- body: request_content,
689
- headers: request_headers.merge(custom_headers || {}),
690
- base_url: request_url
691
- }
692
- promise = @client.make_request_async(:post, path_template, options)
693
-
694
- promise = promise.then do |result|
695
- http_response = result.response
696
- status_code = http_response.status
697
- response_content = http_response.body
698
- unless status_code == 200
699
- error_model = JSON.load(response_content)
700
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
701
- end
702
-
703
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
704
- # Deserialize Response
705
- if status_code == 200
706
- begin
707
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
708
- result_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::CheckNameAvailabilityResponse.mapper()
709
- result.body = @client.deserialize(result_mapper, parsed_response)
710
- rescue Exception => e
711
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
712
- end
713
- end
714
-
715
- result
716
- end
717
-
718
- promise.execute
719
- end
720
-
721
722
  end
722
723
  end