azure_mgmt_sql 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a28f3a2d59c806ea7d68715bf22ce49beac07af3
4
- data.tar.gz: 3445edf1d91ac78afbea5f2cc74461a152b9edc6
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTQxZjg1MTQxN2FhYzNiYmRlMjhkMzM1NWNhY2Q2MTllYjY1OWMyZg==
5
+ data.tar.gz: !binary |-
6
+ MTU0NzI5YWM0MTk3NTg2ZWE0ZjllNTQ3YWVkNTQzOGIyZTI4YTNjMw==
5
7
  SHA512:
6
- metadata.gz: c796665a19d1ed6e6a6a42c1f948f15ae468c8ce731438ff901f2179fe956c7837a10c7d6bc87d3dfb083229990520655797421cfda63edc4d7f37fd45bcd2ab
7
- data.tar.gz: 00f42260df2e1861542192bf32c8f6b3951074872a92a03ae40c7ed8fec477478f31dd485a09e6945710a2cb492a4251796bc8d1971a29d29a617f728acc82e5
8
+ metadata.gz: !binary |-
9
+ MTQ1YTY1MGI4MzhmNTAzMDZhNDBkMGFkODVhNmU5ZWZmOWExODE1Yzc4MmI3
10
+ Y2RjNTJiZWZkZmUxZGJkZTI4OTk4NGFkZmQ2ZWE2NmVhYzNiMjc5YzJiN2Y3
11
+ MmFmMjY0YTZkMDk4ZWQ2ZmRjNjM4YzFjYzI3NmE4MmZhNzA2OTg=
12
+ data.tar.gz: !binary |-
13
+ YWUxZDZiZjk4ZWE0YzVkZTUwYjdjYmQ0NGE5Mjc3ZmZiMjY1YmUxYjBmMThk
14
+ YmE4OTVkYzM4YTM0MTNmZmZiOGZlODhiNzc1NzFiMTFlNmZmZDUyNzE2YmUx
15
+ NTg3NmRlNTQxYWJhZjVjMGQwZjA1ZDYzNzc3YmRlNDA0YWMxN2Y=
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'rake', '~> 10'
30
30
  spec.add_development_dependency 'rspec', '~> 3'
31
31
  spec.add_development_dependency 'dotenv', '~> 2'
32
- spec.add_development_dependency 'azure_mgmt_resources', '~> 0.2'
32
+ spec.add_development_dependency 'azure_mgmt_resources', '~> 0.3'
33
33
 
34
- spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.0'
34
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.3'
35
35
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -45,7 +45,7 @@ module Azure::ARM::SQL
45
45
  #
46
46
  def create_or_update(parameters, resource_group_name, server_name, custom_headers = nil)
47
47
  # Send request
48
- promise = begin_create_or_update(parameters, resource_group_name, server_name, custom_headers)
48
+ promise = begin_create_or_update_async(parameters, resource_group_name, server_name, custom_headers)
49
49
 
50
50
  promise = promise.then do |response|
51
51
  # Defining deserialization method.
@@ -56,7 +56,7 @@ module Azure::ARM::SQL
56
56
  end
57
57
 
58
58
  # Waiting for response.
59
- @client.get_put_operation_result(response, deserialize_method)
59
+ @client.get_long_running_operation_result(response, deserialize_method)
60
60
  end
61
61
 
62
62
  promise
@@ -71,13 +71,49 @@ module Azure::ARM::SQL
71
71
  # @param resource_group_name [String] The name of the Resource Group to which
72
72
  # the server belongs.
73
73
  # @param server_name [String] The name of the Azure SQL Server.
74
- # @param [Hash{String => String}] The hash of custom headers need to be
75
- # applied to HTTP request.
74
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
75
+ # will be added to the HTTP request.
76
76
  #
77
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
78
- # response.
77
+ # @return [ServerSecurityAlertPolicy] operation results.
79
78
  #
80
79
  def begin_create_or_update(parameters, resource_group_name, server_name, custom_headers = nil)
80
+ response = begin_create_or_update_async(parameters, resource_group_name, server_name, custom_headers).value!
81
+ response.body unless response.nil?
82
+ end
83
+
84
+ #
85
+ # Creates or updates an Azure SQL Server security alert policy.
86
+ #
87
+ # @param parameters [ServerSecurityAlertPolicyCreateOrUpdateParameters] The
88
+ # required parameters for creating or updating a Azure SQL Server security
89
+ # alert policy.
90
+ # @param resource_group_name [String] The name of the Resource Group to which
91
+ # the server belongs.
92
+ # @param server_name [String] The name of the Azure SQL Server.
93
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
94
+ # will be added to the HTTP request.
95
+ #
96
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
97
+ #
98
+ def begin_create_or_update_with_http_info(parameters, resource_group_name, server_name, custom_headers = nil)
99
+ begin_create_or_update_async(parameters, resource_group_name, server_name, custom_headers).value!
100
+ end
101
+
102
+ #
103
+ # Creates or updates an Azure SQL Server security alert policy.
104
+ #
105
+ # @param parameters [ServerSecurityAlertPolicyCreateOrUpdateParameters] The
106
+ # required parameters for creating or updating a Azure SQL Server security
107
+ # alert policy.
108
+ # @param resource_group_name [String] The name of the Resource Group to which
109
+ # the server belongs.
110
+ # @param server_name [String] The name of the Azure SQL Server.
111
+ # @param [Hash{String => String}] A hash of custom headers that will be added
112
+ # to the HTTP request.
113
+ #
114
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
115
+ #
116
+ def begin_create_or_update_async(parameters, resource_group_name, server_name, custom_headers = nil)
81
117
  fail ArgumentError, 'parameters is nil' if parameters.nil?
82
118
  parameters.validate unless parameters.nil?
83
119
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -95,7 +131,7 @@ module Azure::ARM::SQL
95
131
  unless parameters.nil?
96
132
  parameters = ServerSecurityAlertPolicyCreateOrUpdateParameters.serialize_object(parameters)
97
133
  end
98
- request_content = JSON.generate(parameters, quirks_mode: true)
134
+ request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
99
135
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/Default'
100
136
  options = {
101
137
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -104,7 +140,10 @@ module Azure::ARM::SQL
104
140
  body: request_content,
105
141
  headers: request_headers.merge(custom_headers || {})
106
142
  }
107
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
143
+
144
+ request_url = @base_url || @client.base_url
145
+
146
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
108
147
  promise = request.run_promise do |req|
109
148
  @client.credentials.sign_request(req) unless @client.credentials.nil?
110
149
  end
@@ -157,13 +196,43 @@ module Azure::ARM::SQL
157
196
  # @param resource_group_name [String] The name of the Resource Group to which
158
197
  # the server belongs.
159
198
  # @param server_name [String] The name of the Azure SQL Server.
160
- # @param [Hash{String => String}] The hash of custom headers need to be
161
- # applied to HTTP request.
199
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
200
+ # will be added to the HTTP request.
162
201
  #
163
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
164
- # response.
202
+ # @return [ServerSecurityAlertPolicy] operation results.
165
203
  #
166
204
  def get(resource_group_name, server_name, custom_headers = nil)
205
+ response = get_async(resource_group_name, server_name, custom_headers).value!
206
+ response.body unless response.nil?
207
+ end
208
+
209
+ #
210
+ # Returns an Azure SQL Server security alert policy.
211
+ #
212
+ # @param resource_group_name [String] The name of the Resource Group to which
213
+ # the server belongs.
214
+ # @param server_name [String] The name of the Azure SQL Server.
215
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
216
+ # will be added to the HTTP request.
217
+ #
218
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
219
+ #
220
+ def get_with_http_info(resource_group_name, server_name, custom_headers = nil)
221
+ get_async(resource_group_name, server_name, custom_headers).value!
222
+ end
223
+
224
+ #
225
+ # Returns an Azure SQL Server security alert policy.
226
+ #
227
+ # @param resource_group_name [String] The name of the Resource Group to which
228
+ # the server belongs.
229
+ # @param server_name [String] The name of the Azure SQL Server.
230
+ # @param [Hash{String => String}] A hash of custom headers that will be added
231
+ # to the HTTP request.
232
+ #
233
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
234
+ #
235
+ def get_async(resource_group_name, server_name, custom_headers = nil)
167
236
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
168
237
  fail ArgumentError, 'server_name is nil' if server_name.nil?
169
238
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -180,7 +249,10 @@ module Azure::ARM::SQL
180
249
  query_params: {'api-version' => @client.api_version},
181
250
  headers: request_headers.merge(custom_headers || {})
182
251
  }
183
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
252
+
253
+ request_url = @base_url || @client.base_url
254
+
255
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
184
256
  promise = request.run_promise do |req|
185
257
  @client.credentials.sign_request(req) unless @client.credentials.nil?
186
258
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,8 +1,8 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::SQL
7
- VERSION = '0.2.1'
7
+ VERSION = '0.3.0'
8
8
  end
metadata CHANGED
@@ -1,106 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: !binary |-
5
+ MC4zLjA=
5
6
  platform: ruby
6
7
  authors:
7
8
  - Microsoft Corporation
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-03-11 00:00:00.000000000 Z
12
+ date: 2016-05-23 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - "~>"
18
+ - - ~>
18
19
  - !ruby/object:Gem::Version
19
20
  version: '1.9'
20
21
  type: :development
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - "~>"
25
+ - - ~>
25
26
  - !ruby/object:Gem::Version
26
27
  version: '1.9'
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: rake
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - "~>"
32
+ - - ~>
32
33
  - !ruby/object:Gem::Version
33
34
  version: '10'
34
35
  type: :development
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - "~>"
39
+ - - ~>
39
40
  - !ruby/object:Gem::Version
40
41
  version: '10'
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: rspec
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - "~>"
46
+ - - ~>
46
47
  - !ruby/object:Gem::Version
47
- version: '3'
48
+ version: !binary |-
49
+ Mw==
48
50
  type: :development
49
51
  prerelease: false
50
52
  version_requirements: !ruby/object:Gem::Requirement
51
53
  requirements:
52
- - - "~>"
54
+ - - ~>
53
55
  - !ruby/object:Gem::Version
54
- version: '3'
56
+ version: !binary |-
57
+ Mw==
55
58
  - !ruby/object:Gem::Dependency
56
59
  name: dotenv
57
60
  requirement: !ruby/object:Gem::Requirement
58
61
  requirements:
59
- - - "~>"
62
+ - - ~>
60
63
  - !ruby/object:Gem::Version
61
64
  version: '2'
62
65
  type: :development
63
66
  prerelease: false
64
67
  version_requirements: !ruby/object:Gem::Requirement
65
68
  requirements:
66
- - - "~>"
69
+ - - ~>
67
70
  - !ruby/object:Gem::Version
68
71
  version: '2'
69
72
  - !ruby/object:Gem::Dependency
70
73
  name: azure_mgmt_resources
71
74
  requirement: !ruby/object:Gem::Requirement
72
75
  requirements:
73
- - - "~>"
76
+ - - ~>
74
77
  - !ruby/object:Gem::Version
75
- version: '0.2'
78
+ version: !binary |-
79
+ MC4z
76
80
  type: :development
77
81
  prerelease: false
78
82
  version_requirements: !ruby/object:Gem::Requirement
79
83
  requirements:
80
- - - "~>"
84
+ - - ~>
81
85
  - !ruby/object:Gem::Version
82
- version: '0.2'
86
+ version: !binary |-
87
+ MC4z
83
88
  - !ruby/object:Gem::Dependency
84
89
  name: ms_rest_azure
85
90
  requirement: !ruby/object:Gem::Requirement
86
91
  requirements:
87
- - - "~>"
92
+ - - ~>
88
93
  - !ruby/object:Gem::Version
89
- version: 0.2.0
94
+ version: !binary |-
95
+ MC4yLjM=
90
96
  type: :runtime
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - "~>"
100
+ - - ~>
95
101
  - !ruby/object:Gem::Version
96
- version: 0.2.0
102
+ version: !binary |-
103
+ MC4yLjM=
97
104
  description: Microsoft Azure SQL Management Client Library for Ruby
98
105
  email: azrubyteam@microsoft.com
99
106
  executables: []
100
107
  extensions: []
101
108
  extra_rdoc_files: []
102
109
  files:
103
- - ".rspec"
110
+ - .rspec
104
111
  - LICENSE.txt
105
112
  - Rakefile
106
113
  - azure_mgmt_sql.gemspec
@@ -124,17 +131,17 @@ require_paths:
124
131
  - lib
125
132
  required_ruby_version: !ruby/object:Gem::Requirement
126
133
  requirements:
127
- - - ">="
134
+ - - ! '>='
128
135
  - !ruby/object:Gem::Version
129
136
  version: 1.9.3
130
137
  required_rubygems_version: !ruby/object:Gem::Requirement
131
138
  requirements:
132
- - - ">="
139
+ - - ! '>='
133
140
  - !ruby/object:Gem::Version
134
141
  version: '0'
135
142
  requirements: []
136
143
  rubyforge_project:
137
- rubygems_version: 2.4.6
144
+ rubygems_version: 2.4.5
138
145
  signing_key:
139
146
  specification_version: 4
140
147
  summary: Official Ruby client library to consume Microsoft Azure SQL Management services.