azure_mgmt_search 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_search.rb +10 -9
  3. data/lib/generated/azure_mgmt_search/admin_keys.rb +162 -24
  4. data/lib/generated/azure_mgmt_search/models/admin_key_kind.rb +16 -0
  5. data/lib/generated/azure_mgmt_search/models/admin_key_result.rb +5 -5
  6. data/lib/generated/azure_mgmt_search/models/check_name_availability_input.rb +61 -0
  7. data/lib/generated/azure_mgmt_search/models/check_name_availability_output.rb +74 -0
  8. data/lib/generated/azure_mgmt_search/models/hosting_mode.rb +16 -0
  9. data/lib/generated/azure_mgmt_search/models/provisioning_state.rb +1 -1
  10. data/lib/generated/azure_mgmt_search/models/query_key.rb +1 -1
  11. data/lib/generated/azure_mgmt_search/models/search_management_request_options.rb +44 -0
  12. data/lib/generated/azure_mgmt_search/models/search_service.rb +205 -0
  13. data/lib/generated/azure_mgmt_search/models/search_service_status.rb +1 -1
  14. data/lib/generated/azure_mgmt_search/models/sku.rb +11 -4
  15. data/lib/generated/azure_mgmt_search/models/{sku_type.rb → sku_name.rb} +5 -3
  16. data/lib/generated/azure_mgmt_search/models/unavailable_name_reason.rb +16 -0
  17. data/lib/generated/azure_mgmt_search/module_definition.rb +1 -1
  18. data/lib/generated/azure_mgmt_search/query_keys.rb +266 -21
  19. data/lib/generated/azure_mgmt_search/search_management_client.rb +20 -6
  20. data/lib/generated/azure_mgmt_search/services.rb +371 -74
  21. data/lib/generated/azure_mgmt_search/version.rb +2 -2
  22. metadata +12 -11
  23. data/lib/generated/azure_mgmt_search/models/list_query_keys_result.rb +0 -53
  24. data/lib/generated/azure_mgmt_search/models/search_service_create_or_update_parameters.rb +0 -73
  25. data/lib/generated/azure_mgmt_search/models/search_service_list_result.rb +0 -55
  26. data/lib/generated/azure_mgmt_search/models/search_service_properties.rb +0 -68
  27. data/lib/generated/azure_mgmt_search/models/search_service_readable_properties.rb +0 -107
  28. data/lib/generated/azure_mgmt_search/models/search_service_resource.rb +0 -96
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Search
7
+ module Models
8
+ #
9
+ # Defines values for HostingMode
10
+ #
11
+ module HostingMode
12
+ Default = "default"
13
+ HighDensity = "highDensity"
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -0,0 +1,44 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Search
7
+ module Models
8
+ #
9
+ # Additional parameters for a set of operations.
10
+ #
11
+ class SearchManagementRequestOptions
12
+
13
+ include MsRestAzure
14
+
15
+ # @return A client-generated GUID value that identifies this request. If
16
+ # specified, this will be included in response information as a way to
17
+ # track the request.
18
+ attr_accessor :client_request_id
19
+
20
+
21
+ #
22
+ # Mapper for SearchManagementRequestOptions class as Ruby Hash.
23
+ # This will be used for serialization/deserialization.
24
+ #
25
+ def self.mapper()
26
+ {
27
+ required: false,
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'SearchManagementRequestOptions',
31
+ model_properties: {
32
+ client_request_id: {
33
+ required: false,
34
+ type: {
35
+ name: 'String'
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,205 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Search
7
+ module Models
8
+ #
9
+ # Describes an Azure Search service and its current state.
10
+ #
11
+ class SearchService < MsRestAzure::Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Integer] The number of replicas in the Search service. If
16
+ # specified, it must be a value between 1 and 12 inclusive for standard
17
+ # SKUs or between 1 and 3 inclusive for basic SKU. Default value: 1 .
18
+ attr_accessor :replica_count
19
+
20
+ # @return [Integer] The number of partitions in the Search service; if
21
+ # specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are
22
+ # only valid for standard SKUs. For 'standard3' services with hostingMode
23
+ # set to 'highDensity', the allowed values are between 1 and 3. Default
24
+ # value: 1 .
25
+ attr_accessor :partition_count
26
+
27
+ # @return [HostingMode] Applicable only for the standard3 SKU. You can
28
+ # set this property to enable up to 3 high density partitions that allow
29
+ # up to 1000 indexes, which is much higher than the maximum indexes
30
+ # allowed for any other SKU. For the standard3 SKU, the value is either
31
+ # 'default' or 'highDensity'. For all other SKUs, this value must be
32
+ # 'default'. Possible values include: 'default', 'highDensity'. Default
33
+ # value: 'default' .
34
+ attr_accessor :hosting_mode
35
+
36
+ # @return [SearchServiceStatus] The status of the Search service.
37
+ # Possible values include: 'running': The Search service is running and
38
+ # no provisioning operations are underway. 'provisioning': The Search
39
+ # service is being provisioned or scaled up or down. 'deleting': The
40
+ # Search service is being deleted. 'degraded': The Search service is
41
+ # degraded. This can occur when the underlying search units are not
42
+ # healthy. The Search service is most likely operational, but performance
43
+ # might be slow and some requests might be dropped. 'disabled': The
44
+ # Search service is disabled. In this state, the service will reject all
45
+ # API requests. 'error': The Search service is in an error state. If your
46
+ # service is in the degraded, disabled, or error states, it means the
47
+ # Azure Search team is actively investigating the underlying issue.
48
+ # Dedicated services in these states are still chargeable based on the
49
+ # number of search units provisioned. Possible values include: 'running',
50
+ # 'provisioning', 'deleting', 'degraded', 'disabled', 'error'
51
+ attr_accessor :status
52
+
53
+ # @return [String] The details of the Search service status.
54
+ attr_accessor :status_details
55
+
56
+ # @return [ProvisioningState] The state of the last provisioning
57
+ # operation performed on the Search service. Provisioning is an
58
+ # intermediate state that occurs while service capacity is being
59
+ # established. After capacity is set up, provisioningState changes to
60
+ # either 'succeeded' or 'failed'. Client applications can poll
61
+ # provisioning status (the recommended polling interval is from 30
62
+ # seconds to one minute) by using the Get Search Service operation to see
63
+ # when an operation is completed. If you are using the free service, this
64
+ # value tends to come back as 'succeeded' directly in the call to Create
65
+ # Search service. This is because the free service uses capacity that is
66
+ # already set up. Possible values include: 'succeeded', 'provisioning',
67
+ # 'failed'
68
+ attr_accessor :provisioning_state
69
+
70
+ # @return [Sku] The SKU of the Search Service, which determines price
71
+ # tier and capacity limits.
72
+ attr_accessor :sku
73
+
74
+
75
+ #
76
+ # Mapper for SearchService class as Ruby Hash.
77
+ # This will be used for serialization/deserialization.
78
+ #
79
+ def self.mapper()
80
+ {
81
+ required: false,
82
+ serialized_name: 'SearchService',
83
+ type: {
84
+ name: 'Composite',
85
+ class_name: 'SearchService',
86
+ model_properties: {
87
+ id: {
88
+ required: false,
89
+ read_only: true,
90
+ serialized_name: 'id',
91
+ type: {
92
+ name: 'String'
93
+ }
94
+ },
95
+ name: {
96
+ required: false,
97
+ read_only: true,
98
+ serialized_name: 'name',
99
+ type: {
100
+ name: 'String'
101
+ }
102
+ },
103
+ type: {
104
+ required: false,
105
+ read_only: true,
106
+ serialized_name: 'type',
107
+ type: {
108
+ name: 'String'
109
+ }
110
+ },
111
+ location: {
112
+ required: true,
113
+ serialized_name: 'location',
114
+ type: {
115
+ name: 'String'
116
+ }
117
+ },
118
+ tags: {
119
+ required: false,
120
+ serialized_name: 'tags',
121
+ type: {
122
+ name: 'Dictionary',
123
+ value: {
124
+ required: false,
125
+ serialized_name: 'StringElementType',
126
+ type: {
127
+ name: 'String'
128
+ }
129
+ }
130
+ }
131
+ },
132
+ replica_count: {
133
+ required: false,
134
+ serialized_name: 'properties.replicaCount',
135
+ default_value: 1,
136
+ constraints: {
137
+ InclusiveMaximum: 12,
138
+ InclusiveMinimum: 1
139
+ },
140
+ type: {
141
+ name: 'Number'
142
+ }
143
+ },
144
+ partition_count: {
145
+ required: false,
146
+ serialized_name: 'properties.partitionCount',
147
+ default_value: 1,
148
+ constraints: {
149
+ InclusiveMaximum: 12,
150
+ InclusiveMinimum: 1
151
+ },
152
+ type: {
153
+ name: 'Number'
154
+ }
155
+ },
156
+ hosting_mode: {
157
+ required: false,
158
+ serialized_name: 'properties.hostingMode',
159
+ default_value: 'default',
160
+ type: {
161
+ name: 'Enum',
162
+ module: 'HostingMode'
163
+ }
164
+ },
165
+ status: {
166
+ required: false,
167
+ read_only: true,
168
+ serialized_name: 'properties.status',
169
+ type: {
170
+ name: 'Enum',
171
+ module: 'SearchServiceStatus'
172
+ }
173
+ },
174
+ status_details: {
175
+ required: false,
176
+ read_only: true,
177
+ serialized_name: 'properties.statusDetails',
178
+ type: {
179
+ name: 'String'
180
+ }
181
+ },
182
+ provisioning_state: {
183
+ required: false,
184
+ read_only: true,
185
+ serialized_name: 'properties.provisioningState',
186
+ type: {
187
+ name: 'Enum',
188
+ module: 'ProvisioningState'
189
+ }
190
+ },
191
+ sku: {
192
+ required: true,
193
+ serialized_name: 'sku',
194
+ type: {
195
+ name: 'Composite',
196
+ class_name: 'Sku'
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ end
203
+ end
204
+ end
205
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -13,8 +13,15 @@ module Azure::ARM::Search
13
13
 
14
14
  include MsRestAzure
15
15
 
16
- # @return [SkuType] The SKU of the Search service. Possible values
17
- # include: 'free', 'standard', 'standard2'
16
+ # @return [SkuName] The SKU of the Search service. Valid values include:
17
+ # 'free': Shared service. 'basic': Dedicated service with up to 3
18
+ # replicas. 'standard': Dedicated service with up to 12 partitions and 12
19
+ # replicas. 'standard2': Similar to standard, but with more capacity per
20
+ # search unit. 'standard3': Offers maximum capacity per search unit with
21
+ # up to 12 partitions and 12 replicas (or up to 3 partitions with more
22
+ # indexes if you also set the hostingMode property to 'highDensity').
23
+ # Possible values include: 'free', 'basic', 'standard', 'standard2',
24
+ # 'standard3'
18
25
  attr_accessor :name
19
26
 
20
27
 
@@ -35,7 +42,7 @@ module Azure::ARM::Search
35
42
  serialized_name: 'name',
36
43
  type: {
37
44
  name: 'Enum',
38
- module: 'SkuType'
45
+ module: 'SkuName'
39
46
  }
40
47
  }
41
48
  }
@@ -1,17 +1,19 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.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::Search
7
7
  module Models
8
8
  #
9
- # Defines values for SkuType
9
+ # Defines values for SkuName
10
10
  #
11
- module SkuType
11
+ module SkuName
12
12
  Free = "free"
13
+ Basic = "basic"
13
14
  Standard = "standard"
14
15
  Standard2 = "standard2"
16
+ Standard3 = "standard3"
15
17
  end
16
18
  end
17
19
  end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Search
7
+ module Models
8
+ #
9
+ # Defines values for UnavailableNameReason
10
+ #
11
+ module UnavailableNameReason
12
+ Invalid = "Invalid"
13
+ AlreadyExists = "AlreadyExists"
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -22,70 +22,202 @@ module Azure::ARM::Search
22
22
  # @return [SearchManagementClient] reference to the SearchManagementClient
23
23
  attr_reader :client
24
24
 
25
+ #
26
+ # Generates a new query key for the specified Search service. You can create up
27
+ # to 50 query keys per service.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # current subscription. You can obtain this value from the Azure Resource
31
+ # Manager API or the portal.
32
+ # @param search_service_name [String] The name of the Azure Search service
33
+ # associated with the specified resource group.
34
+ # @param name [String] The name of the new query API key.
35
+ # @param search_management_request_options [SearchManagementRequestOptions]
36
+ # Additional parameters for the operation
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [QueryKey] operation results.
41
+ #
42
+ def create(resource_group_name, search_service_name, name, search_management_request_options = nil, custom_headers = nil)
43
+ response = create_async(resource_group_name, search_service_name, name, search_management_request_options, custom_headers).value!
44
+ response.body unless response.nil?
45
+ end
46
+
47
+ #
48
+ # Generates a new query key for the specified Search service. You can create up
49
+ # to 50 query keys per service.
50
+ #
51
+ # @param resource_group_name [String] The name of the resource group within the
52
+ # current subscription. You can obtain this value from the Azure Resource
53
+ # Manager API or the portal.
54
+ # @param search_service_name [String] The name of the Azure Search service
55
+ # associated with the specified resource group.
56
+ # @param name [String] The name of the new query API key.
57
+ # @param search_management_request_options [SearchManagementRequestOptions]
58
+ # Additional parameters for the operation
59
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
60
+ # will be added to the HTTP request.
61
+ #
62
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
63
+ #
64
+ def create_with_http_info(resource_group_name, search_service_name, name, search_management_request_options = nil, custom_headers = nil)
65
+ create_async(resource_group_name, search_service_name, name, search_management_request_options, custom_headers).value!
66
+ end
67
+
68
+ #
69
+ # Generates a new query key for the specified Search service. You can create up
70
+ # to 50 query keys per service.
71
+ #
72
+ # @param resource_group_name [String] The name of the resource group within the
73
+ # current subscription. You can obtain this value from the Azure Resource
74
+ # Manager API or the portal.
75
+ # @param search_service_name [String] The name of the Azure Search service
76
+ # associated with the specified resource group.
77
+ # @param name [String] The name of the new query API key.
78
+ # @param search_management_request_options [SearchManagementRequestOptions]
79
+ # Additional parameters for the operation
80
+ # @param [Hash{String => String}] A hash of custom headers that will be added
81
+ # to the HTTP request.
82
+ #
83
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
84
+ #
85
+ def create_async(resource_group_name, search_service_name, name, search_management_request_options = nil, custom_headers = nil)
86
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
87
+ fail ArgumentError, 'search_service_name is nil' if search_service_name.nil?
88
+ fail ArgumentError, 'name is nil' if name.nil?
89
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
90
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
91
+
92
+ client_request_id = nil
93
+ unless search_management_request_options.nil?
94
+ client_request_id = search_management_request_options.clientRequestId
95
+ end
96
+
97
+ request_headers = {}
98
+
99
+ # Set Headers
100
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
101
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
102
+ request_headers['x-ms-client-request-id'] = client_request_id.to_s unless client_request_id.to_s.nil?
103
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}'
104
+
105
+ request_url = @base_url || @client.base_url
106
+
107
+ options = {
108
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
109
+ path_params: {'resourceGroupName' => resource_group_name,'searchServiceName' => search_service_name,'name' => name,'subscriptionId' => @client.subscription_id},
110
+ query_params: {'api-version' => @client.api_version},
111
+ headers: request_headers.merge(custom_headers || {}),
112
+ base_url: request_url
113
+ }
114
+ promise = @client.make_request_async(:post, path_template, options)
115
+
116
+ promise = promise.then do |result|
117
+ http_response = result.response
118
+ status_code = http_response.status
119
+ response_content = http_response.body
120
+ unless status_code == 200
121
+ error_model = JSON.load(response_content)
122
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
123
+ end
124
+
125
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
126
+ # Deserialize Response
127
+ if status_code == 200
128
+ begin
129
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
130
+ result_mapper = QueryKey.mapper()
131
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
132
+ rescue Exception => e
133
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
134
+ end
135
+ end
136
+
137
+ result
138
+ end
139
+
140
+ promise.execute
141
+ end
142
+
25
143
  #
26
144
  # Returns the list of query API keys for the given Azure Search service.
27
145
  #
28
- # @param resource_group_name [String] The name of the resource group within
29
- # the current subscription.
30
- # @param service_name [String] The name of the Search service for which to
31
- # list query keys.
146
+ # @param resource_group_name [String] The name of the resource group within the
147
+ # current subscription. You can obtain this value from the Azure Resource
148
+ # Manager API or the portal.
149
+ # @param search_service_name [String] The name of the Azure Search service
150
+ # associated with the specified resource group.
151
+ # @param search_management_request_options [SearchManagementRequestOptions]
152
+ # Additional parameters for the operation
32
153
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
154
  # will be added to the HTTP request.
34
155
  #
35
156
  # @return [ListQueryKeysResult] operation results.
36
157
  #
37
- def list(resource_group_name, service_name, custom_headers = nil)
38
- response = list_async(resource_group_name, service_name, custom_headers).value!
158
+ def list_by_search_service(resource_group_name, search_service_name, search_management_request_options = nil, custom_headers = nil)
159
+ response = list_by_search_service_async(resource_group_name, search_service_name, search_management_request_options, custom_headers).value!
39
160
  response.body unless response.nil?
40
161
  end
41
162
 
42
163
  #
43
164
  # Returns the list of query API keys for the given Azure Search service.
44
165
  #
45
- # @param resource_group_name [String] The name of the resource group within
46
- # the current subscription.
47
- # @param service_name [String] The name of the Search service for which to
48
- # list query keys.
166
+ # @param resource_group_name [String] The name of the resource group within the
167
+ # current subscription. You can obtain this value from the Azure Resource
168
+ # Manager API or the portal.
169
+ # @param search_service_name [String] The name of the Azure Search service
170
+ # associated with the specified resource group.
171
+ # @param search_management_request_options [SearchManagementRequestOptions]
172
+ # Additional parameters for the operation
49
173
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
50
174
  # will be added to the HTTP request.
51
175
  #
52
176
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
53
177
  #
54
- def list_with_http_info(resource_group_name, service_name, custom_headers = nil)
55
- list_async(resource_group_name, service_name, custom_headers).value!
178
+ def list_by_search_service_with_http_info(resource_group_name, search_service_name, search_management_request_options = nil, custom_headers = nil)
179
+ list_by_search_service_async(resource_group_name, search_service_name, search_management_request_options, custom_headers).value!
56
180
  end
57
181
 
58
182
  #
59
183
  # Returns the list of query API keys for the given Azure Search service.
60
184
  #
61
- # @param resource_group_name [String] The name of the resource group within
62
- # the current subscription.
63
- # @param service_name [String] The name of the Search service for which to
64
- # list query keys.
185
+ # @param resource_group_name [String] The name of the resource group within the
186
+ # current subscription. You can obtain this value from the Azure Resource
187
+ # Manager API or the portal.
188
+ # @param search_service_name [String] The name of the Azure Search service
189
+ # associated with the specified resource group.
190
+ # @param search_management_request_options [SearchManagementRequestOptions]
191
+ # Additional parameters for the operation
65
192
  # @param [Hash{String => String}] A hash of custom headers that will be added
66
193
  # to the HTTP request.
67
194
  #
68
195
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
69
196
  #
70
- def list_async(resource_group_name, service_name, custom_headers = nil)
197
+ def list_by_search_service_async(resource_group_name, search_service_name, search_management_request_options = nil, custom_headers = nil)
71
198
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
72
- fail ArgumentError, 'service_name is nil' if service_name.nil?
199
+ fail ArgumentError, 'search_service_name is nil' if search_service_name.nil?
73
200
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
201
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
202
 
203
+ client_request_id = nil
204
+ unless search_management_request_options.nil?
205
+ client_request_id = search_management_request_options.clientRequestId
206
+ end
76
207
 
77
208
  request_headers = {}
78
209
 
79
210
  # Set Headers
80
211
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
81
212
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
82
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}/listQueryKeys'
213
+ request_headers['x-ms-client-request-id'] = client_request_id.to_s unless client_request_id.to_s.nil?
214
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys'
83
215
 
84
216
  request_url = @base_url || @client.base_url
85
217
 
86
218
  options = {
87
219
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
88
- path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
220
+ path_params: {'resourceGroupName' => resource_group_name,'searchServiceName' => search_service_name,'subscriptionId' => @client.subscription_id},
89
221
  query_params: {'api-version' => @client.api_version},
90
222
  headers: request_headers.merge(custom_headers || {}),
91
223
  base_url: request_url
@@ -119,5 +251,118 @@ module Azure::ARM::Search
119
251
  promise.execute
120
252
  end
121
253
 
254
+ #
255
+ # Deletes the specified query key. Unlike admin keys, query keys are not
256
+ # regenerated. The process for regenerating a query key is to delete and then
257
+ # recreate it.
258
+ #
259
+ # @param resource_group_name [String] The name of the resource group within the
260
+ # current subscription. You can obtain this value from the Azure Resource
261
+ # Manager API or the portal.
262
+ # @param search_service_name [String] The name of the Azure Search service
263
+ # associated with the specified resource group.
264
+ # @param key [String] The query key to be deleted. Query keys are identified by
265
+ # value, not by name.
266
+ # @param search_management_request_options [SearchManagementRequestOptions]
267
+ # Additional parameters for the operation
268
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
269
+ # will be added to the HTTP request.
270
+ #
271
+ #
272
+ def delete(resource_group_name, search_service_name, key, search_management_request_options = nil, custom_headers = nil)
273
+ response = delete_async(resource_group_name, search_service_name, key, search_management_request_options, custom_headers).value!
274
+ nil
275
+ end
276
+
277
+ #
278
+ # Deletes the specified query key. Unlike admin keys, query keys are not
279
+ # regenerated. The process for regenerating a query key is to delete and then
280
+ # recreate it.
281
+ #
282
+ # @param resource_group_name [String] The name of the resource group within the
283
+ # current subscription. You can obtain this value from the Azure Resource
284
+ # Manager API or the portal.
285
+ # @param search_service_name [String] The name of the Azure Search service
286
+ # associated with the specified resource group.
287
+ # @param key [String] The query key to be deleted. Query keys are identified by
288
+ # value, not by name.
289
+ # @param search_management_request_options [SearchManagementRequestOptions]
290
+ # Additional parameters for the operation
291
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
292
+ # will be added to the HTTP request.
293
+ #
294
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
295
+ #
296
+ def delete_with_http_info(resource_group_name, search_service_name, key, search_management_request_options = nil, custom_headers = nil)
297
+ delete_async(resource_group_name, search_service_name, key, search_management_request_options, custom_headers).value!
298
+ end
299
+
300
+ #
301
+ # Deletes the specified query key. Unlike admin keys, query keys are not
302
+ # regenerated. The process for regenerating a query key is to delete and then
303
+ # recreate it.
304
+ #
305
+ # @param resource_group_name [String] The name of the resource group within the
306
+ # current subscription. You can obtain this value from the Azure Resource
307
+ # Manager API or the portal.
308
+ # @param search_service_name [String] The name of the Azure Search service
309
+ # associated with the specified resource group.
310
+ # @param key [String] The query key to be deleted. Query keys are identified by
311
+ # value, not by name.
312
+ # @param search_management_request_options [SearchManagementRequestOptions]
313
+ # Additional parameters for the operation
314
+ # @param [Hash{String => String}] A hash of custom headers that will be added
315
+ # to the HTTP request.
316
+ #
317
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
318
+ #
319
+ def delete_async(resource_group_name, search_service_name, key, search_management_request_options = nil, custom_headers = nil)
320
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
321
+ fail ArgumentError, 'search_service_name is nil' if search_service_name.nil?
322
+ fail ArgumentError, 'key is nil' if key.nil?
323
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
324
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
325
+
326
+ client_request_id = nil
327
+ unless search_management_request_options.nil?
328
+ client_request_id = search_management_request_options.clientRequestId
329
+ end
330
+
331
+ request_headers = {}
332
+
333
+ # Set Headers
334
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
335
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
336
+ request_headers['x-ms-client-request-id'] = client_request_id.to_s unless client_request_id.to_s.nil?
337
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}'
338
+
339
+ request_url = @base_url || @client.base_url
340
+
341
+ options = {
342
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
343
+ path_params: {'resourceGroupName' => resource_group_name,'searchServiceName' => search_service_name,'key' => key,'subscriptionId' => @client.subscription_id},
344
+ query_params: {'api-version' => @client.api_version},
345
+ headers: request_headers.merge(custom_headers || {}),
346
+ base_url: request_url
347
+ }
348
+ promise = @client.make_request_async(:delete, path_template, options)
349
+
350
+ promise = promise.then do |result|
351
+ http_response = result.response
352
+ status_code = http_response.status
353
+ response_content = http_response.body
354
+ unless status_code == 200 || status_code == 204 || status_code == 404
355
+ error_model = JSON.load(response_content)
356
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
357
+ end
358
+
359
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
360
+
361
+ result
362
+ end
363
+
364
+ promise.execute
365
+ end
366
+
122
367
  end
123
368
  end