azure_mgmt_search 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_search/services.rb +171 -103
- data/lib/generated/azure_mgmt_search/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdbfd8d04874d727e109dbb893b84292016cb405
|
4
|
+
data.tar.gz: 8f78b99213ab0092379978b61c62be2decd6be4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7ceafd816b99e397d2008ea048773d5b6bc8af9dc1573fd9f089de3e8c72705ac0df0453b8373cd067f2759dbc9a5760a815249d209e1e30ce340ad9d6f5973
|
7
|
+
data.tar.gz: 907e976f592e9cc3e40840836f955c9922979ec2f95495d8e4e4ff8ccdc11747f99434a9ae5d4a79f820f34cd0955bb0530c346c99e5a7ad6ab3f162c4500f7f
|
@@ -50,10 +50,6 @@ module Azure::ARM::Search
|
|
50
50
|
response.body unless response.nil?
|
51
51
|
end
|
52
52
|
|
53
|
-
#
|
54
|
-
# Creates or updates a Search service in the given resource group. If the
|
55
|
-
# Search service already exists, all properties will be updated with the given
|
56
|
-
# values.
|
57
53
|
#
|
58
54
|
# @param resource_group_name [String] The name of the resource group within the
|
59
55
|
# current subscription. You can obtain this value from the Azure Resource
|
@@ -72,111 +68,25 @@ module Azure::ARM::Search
|
|
72
68
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
73
69
|
# will be added to the HTTP request.
|
74
70
|
#
|
75
|
-
# @return [
|
76
|
-
#
|
77
|
-
def create_or_update_with_http_info(resource_group_name, search_service_name, service, search_management_request_options = nil, custom_headers = nil)
|
78
|
-
create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options, custom_headers).value!
|
79
|
-
end
|
80
|
-
|
81
|
-
#
|
82
|
-
# Creates or updates a Search service in the given resource group. If the
|
83
|
-
# Search service already exists, all properties will be updated with the given
|
84
|
-
# values.
|
85
|
-
#
|
86
|
-
# @param resource_group_name [String] The name of the resource group within the
|
87
|
-
# current subscription. You can obtain this value from the Azure Resource
|
88
|
-
# Manager API or the portal.
|
89
|
-
# @param search_service_name [String] The name of the Azure Search service to
|
90
|
-
# create or update. Search service names must only contain lowercase letters,
|
91
|
-
# digits or dashes, cannot use dash as the first two or last one characters,
|
92
|
-
# cannot contain consecutive dashes, and must be between 2 and 60 characters in
|
93
|
-
# length. Search service names must be globally unique since they are part of
|
94
|
-
# the service URI (https://<name>.search.windows.net). You cannot change the
|
95
|
-
# service name after the service is created.
|
96
|
-
# @param service [SearchService] The definition of the Search service to create
|
97
|
-
# or update.
|
98
|
-
# @param search_management_request_options [SearchManagementRequestOptions]
|
99
|
-
# Additional parameters for the operation
|
100
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
101
|
-
# to the HTTP request.
|
102
|
-
#
|
103
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
72
|
+
# response.
|
104
73
|
#
|
105
74
|
def create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options = nil, custom_headers = nil)
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
client_request_id = search_management_request_options.clientRequestId
|
115
|
-
end
|
116
|
-
|
117
|
-
request_headers = {}
|
118
|
-
|
119
|
-
# Set Headers
|
120
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
121
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
122
|
-
request_headers['x-ms-client-request-id'] = client_request_id.to_s unless client_request_id.to_s.nil?
|
123
|
-
|
124
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
125
|
-
|
126
|
-
# Serialize Request
|
127
|
-
request_mapper = Azure::ARM::Search::Models::SearchService.mapper()
|
128
|
-
request_content = @client.serialize(request_mapper, service)
|
129
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
130
|
-
|
131
|
-
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'
|
132
|
-
|
133
|
-
request_url = @base_url || @client.base_url
|
134
|
-
|
135
|
-
options = {
|
136
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
137
|
-
path_params: {'resourceGroupName' => resource_group_name,'searchServiceName' => search_service_name,'subscriptionId' => @client.subscription_id},
|
138
|
-
query_params: {'api-version' => @client.api_version},
|
139
|
-
body: request_content,
|
140
|
-
headers: request_headers.merge(custom_headers || {}),
|
141
|
-
base_url: request_url
|
142
|
-
}
|
143
|
-
promise = @client.make_request_async(:put, path_template, options)
|
144
|
-
|
145
|
-
promise = promise.then do |result|
|
146
|
-
http_response = result.response
|
147
|
-
status_code = http_response.status
|
148
|
-
response_content = http_response.body
|
149
|
-
unless status_code == 200 || status_code == 201
|
150
|
-
error_model = JSON.load(response_content)
|
151
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
75
|
+
# Send request
|
76
|
+
promise = begin_create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options, custom_headers)
|
77
|
+
|
78
|
+
promise = promise.then do |response|
|
79
|
+
# Defining deserialization method.
|
80
|
+
deserialize_method = lambda do |parsed_response|
|
81
|
+
result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
|
82
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
152
83
|
end
|
153
84
|
|
154
|
-
|
155
|
-
|
156
|
-
if status_code == 200
|
157
|
-
begin
|
158
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
159
|
-
result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
|
160
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
161
|
-
rescue Exception => e
|
162
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
163
|
-
end
|
164
|
-
end
|
165
|
-
# Deserialize Response
|
166
|
-
if status_code == 201
|
167
|
-
begin
|
168
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
169
|
-
result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
|
170
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
171
|
-
rescue Exception => e
|
172
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
173
|
-
end
|
174
|
-
end
|
175
|
-
|
176
|
-
result
|
85
|
+
# Waiting for response.
|
86
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
177
87
|
end
|
178
88
|
|
179
|
-
promise
|
89
|
+
promise
|
180
90
|
end
|
181
91
|
|
182
92
|
#
|
@@ -623,5 +533,163 @@ module Azure::ARM::Search
|
|
623
533
|
promise.execute
|
624
534
|
end
|
625
535
|
|
536
|
+
#
|
537
|
+
# Creates or updates a Search service in the given resource group. If the
|
538
|
+
# Search service already exists, all properties will be updated with the given
|
539
|
+
# values.
|
540
|
+
#
|
541
|
+
# @param resource_group_name [String] The name of the resource group within the
|
542
|
+
# current subscription. You can obtain this value from the Azure Resource
|
543
|
+
# Manager API or the portal.
|
544
|
+
# @param search_service_name [String] The name of the Azure Search service to
|
545
|
+
# create or update. Search service names must only contain lowercase letters,
|
546
|
+
# digits or dashes, cannot use dash as the first two or last one characters,
|
547
|
+
# cannot contain consecutive dashes, and must be between 2 and 60 characters in
|
548
|
+
# length. Search service names must be globally unique since they are part of
|
549
|
+
# the service URI (https://<name>.search.windows.net). You cannot change the
|
550
|
+
# service name after the service is created.
|
551
|
+
# @param service [SearchService] The definition of the Search service to create
|
552
|
+
# or update.
|
553
|
+
# @param search_management_request_options [SearchManagementRequestOptions]
|
554
|
+
# Additional parameters for the operation
|
555
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
556
|
+
# will be added to the HTTP request.
|
557
|
+
#
|
558
|
+
# @return [SearchService] operation results.
|
559
|
+
#
|
560
|
+
def begin_create_or_update(resource_group_name, search_service_name, service, search_management_request_options = nil, custom_headers = nil)
|
561
|
+
response = begin_create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options, custom_headers).value!
|
562
|
+
response.body unless response.nil?
|
563
|
+
end
|
564
|
+
|
565
|
+
#
|
566
|
+
# Creates or updates a Search service in the given resource group. If the
|
567
|
+
# Search service already exists, all properties will be updated with the given
|
568
|
+
# values.
|
569
|
+
#
|
570
|
+
# @param resource_group_name [String] The name of the resource group within the
|
571
|
+
# current subscription. You can obtain this value from the Azure Resource
|
572
|
+
# Manager API or the portal.
|
573
|
+
# @param search_service_name [String] The name of the Azure Search service to
|
574
|
+
# create or update. Search service names must only contain lowercase letters,
|
575
|
+
# digits or dashes, cannot use dash as the first two or last one characters,
|
576
|
+
# cannot contain consecutive dashes, and must be between 2 and 60 characters in
|
577
|
+
# length. Search service names must be globally unique since they are part of
|
578
|
+
# the service URI (https://<name>.search.windows.net). You cannot change the
|
579
|
+
# service name after the service is created.
|
580
|
+
# @param service [SearchService] The definition of the Search service to create
|
581
|
+
# or update.
|
582
|
+
# @param search_management_request_options [SearchManagementRequestOptions]
|
583
|
+
# Additional parameters for the operation
|
584
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
585
|
+
# will be added to the HTTP request.
|
586
|
+
#
|
587
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
588
|
+
#
|
589
|
+
def begin_create_or_update_with_http_info(resource_group_name, search_service_name, service, search_management_request_options = nil, custom_headers = nil)
|
590
|
+
begin_create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options, custom_headers).value!
|
591
|
+
end
|
592
|
+
|
593
|
+
#
|
594
|
+
# Creates or updates a Search service in the given resource group. If the
|
595
|
+
# Search service already exists, all properties will be updated with the given
|
596
|
+
# values.
|
597
|
+
#
|
598
|
+
# @param resource_group_name [String] The name of the resource group within the
|
599
|
+
# current subscription. You can obtain this value from the Azure Resource
|
600
|
+
# Manager API or the portal.
|
601
|
+
# @param search_service_name [String] The name of the Azure Search service to
|
602
|
+
# create or update. Search service names must only contain lowercase letters,
|
603
|
+
# digits or dashes, cannot use dash as the first two or last one characters,
|
604
|
+
# cannot contain consecutive dashes, and must be between 2 and 60 characters in
|
605
|
+
# length. Search service names must be globally unique since they are part of
|
606
|
+
# the service URI (https://<name>.search.windows.net). You cannot change the
|
607
|
+
# service name after the service is created.
|
608
|
+
# @param service [SearchService] The definition of the Search service to create
|
609
|
+
# or update.
|
610
|
+
# @param search_management_request_options [SearchManagementRequestOptions]
|
611
|
+
# Additional parameters for the operation
|
612
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
613
|
+
# to the HTTP request.
|
614
|
+
#
|
615
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
616
|
+
#
|
617
|
+
def begin_create_or_update_async(resource_group_name, search_service_name, service, search_management_request_options = nil, custom_headers = nil)
|
618
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
619
|
+
fail ArgumentError, 'search_service_name is nil' if search_service_name.nil?
|
620
|
+
fail ArgumentError, 'service is nil' if service.nil?
|
621
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
622
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
623
|
+
|
624
|
+
client_request_id = nil
|
625
|
+
unless search_management_request_options.nil?
|
626
|
+
client_request_id = search_management_request_options.clientRequestId
|
627
|
+
end
|
628
|
+
|
629
|
+
request_headers = {}
|
630
|
+
|
631
|
+
# Set Headers
|
632
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
633
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
634
|
+
request_headers['x-ms-client-request-id'] = client_request_id.to_s unless client_request_id.to_s.nil?
|
635
|
+
|
636
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
637
|
+
|
638
|
+
# Serialize Request
|
639
|
+
request_mapper = Azure::ARM::Search::Models::SearchService.mapper()
|
640
|
+
request_content = @client.serialize(request_mapper, service)
|
641
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
642
|
+
|
643
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'
|
644
|
+
|
645
|
+
request_url = @base_url || @client.base_url
|
646
|
+
|
647
|
+
options = {
|
648
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
649
|
+
path_params: {'resourceGroupName' => resource_group_name,'searchServiceName' => search_service_name,'subscriptionId' => @client.subscription_id},
|
650
|
+
query_params: {'api-version' => @client.api_version},
|
651
|
+
body: request_content,
|
652
|
+
headers: request_headers.merge(custom_headers || {}),
|
653
|
+
base_url: request_url
|
654
|
+
}
|
655
|
+
promise = @client.make_request_async(:put, path_template, options)
|
656
|
+
|
657
|
+
promise = promise.then do |result|
|
658
|
+
http_response = result.response
|
659
|
+
status_code = http_response.status
|
660
|
+
response_content = http_response.body
|
661
|
+
unless status_code == 200 || status_code == 201
|
662
|
+
error_model = JSON.load(response_content)
|
663
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
664
|
+
end
|
665
|
+
|
666
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
667
|
+
# Deserialize Response
|
668
|
+
if status_code == 200
|
669
|
+
begin
|
670
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
671
|
+
result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
|
672
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
673
|
+
rescue Exception => e
|
674
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
675
|
+
end
|
676
|
+
end
|
677
|
+
# Deserialize Response
|
678
|
+
if status_code == 201
|
679
|
+
begin
|
680
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
681
|
+
result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
|
682
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
683
|
+
rescue Exception => e
|
684
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
685
|
+
end
|
686
|
+
end
|
687
|
+
|
688
|
+
result
|
689
|
+
end
|
690
|
+
|
691
|
+
promise.execute
|
692
|
+
end
|
693
|
+
|
626
694
|
end
|
627
695
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_mgmt_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.9.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.9.0
|
83
83
|
description: Microsoft Azure Search Management Client Library for Ruby
|
84
84
|
email: azrubyteam@microsoft.com
|
85
85
|
executables: []
|