Class: Azure::Logic::Mgmt::V2016_06_01::IntegrationAccounts

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb

Overview

REST API for Azure Logic Apps.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ IntegrationAccounts

Creates and initializes a new instance of the IntegrationAccounts class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientLogicManagementClient (readonly)

Returns reference to the LogicManagementClient.

Returns:



22
23
24
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 22

def client
  @client
end

Instance Method Details

#create_or_update(resource_group_name, integration_account_name, integration_account, custom_headers: nil) ⇒ IntegrationAccount

Creates or updates an integration account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • integration_account (IntegrationAccount)

    The integration account.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IntegrationAccount)

    operation results.



305
306
307
308
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 305

def create_or_update(resource_group_name, , , custom_headers:nil)
  response = create_or_update_async(resource_group_name, , , custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#create_or_update_async(resource_group_name, integration_account_name, integration_account, custom_headers: nil) ⇒ Concurrent::Promise

Creates or updates an integration account.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • integration_account (IntegrationAccount)

    The integration account.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 336

def create_or_update_async(resource_group_name, , , custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'integration_account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'integration_account is nil' if .nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccount.mapper()
  request_content = @client.serialize(request_mapper,  )
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => },
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 201
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#create_or_update_with_http_info(resource_group_name, integration_account_name, integration_account, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Creates or updates an integration account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • integration_account (IntegrationAccount)

    The integration account.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



321
322
323
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 321

def create_or_update_with_http_info(resource_group_name, , , custom_headers:nil)
  create_or_update_async(resource_group_name, , , custom_headers:custom_headers).value!
end

#delete(resource_group_name, integration_account_name, custom_headers: nil) ⇒ Object

Deletes an integration account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



519
520
521
522
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 519

def delete(resource_group_name, , custom_headers:nil)
  response = delete_async(resource_group_name, , custom_headers:custom_headers).value!
  nil
end

#delete_async(resource_group_name, integration_account_name, custom_headers: nil) ⇒ Concurrent::Promise

Deletes an integration account.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 548

def delete_async(resource_group_name, , custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'integration_account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => },
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#delete_with_http_info(resource_group_name, integration_account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes an integration account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



534
535
536
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 534

def delete_with_http_info(resource_group_name, , custom_headers:nil)
  delete_async(resource_group_name, , custom_headers:custom_headers).value!
end

#get(resource_group_name, integration_account_name, custom_headers: nil) ⇒ IntegrationAccount

Gets an integration account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IntegrationAccount)

    operation results.



212
213
214
215
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 212

def get(resource_group_name, , custom_headers:nil)
  response = get_async(resource_group_name, , custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_async(resource_group_name, integration_account_name, custom_headers: nil) ⇒ Concurrent::Promise

Gets an integration account.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 241

def get_async(resource_group_name, , custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'integration_account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => },
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_callback_url(resource_group_name, integration_account_name, parameters, custom_headers: nil) ⇒ CallbackUrl

Gets the integration account callback URL.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • parameters (GetCallbackUrlParameters)

    The callback URL parameters.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (CallbackUrl)

    operation results.



602
603
604
605
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 602

def get_callback_url(resource_group_name, , parameters, custom_headers:nil)
  response = get_callback_url_async(resource_group_name, , parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_callback_url_async(resource_group_name, integration_account_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise

Gets the integration account callback URL.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • parameters (GetCallbackUrlParameters)

    The callback URL parameters.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 633

def get_callback_url_async(resource_group_name, , parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'integration_account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::GetCallbackUrlParameters.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => },
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::CallbackUrl.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_callback_url_with_http_info(resource_group_name, integration_account_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the integration account callback URL.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • parameters (GetCallbackUrlParameters)

    The callback URL parameters.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



618
619
620
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 618

def get_callback_url_with_http_info(resource_group_name, , parameters, custom_headers:nil)
  get_callback_url_async(resource_group_name, , parameters, custom_headers:custom_headers).value!
end

#get_with_http_info(resource_group_name, integration_account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets an integration account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



227
228
229
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 227

def get_with_http_info(resource_group_name, , custom_headers:nil)
  get_async(resource_group_name, , custom_headers:custom_headers).value!
end

#list_by_resource_group(resource_group_name, top: nil, custom_headers: nil) ⇒ Array<IntegrationAccount>

Gets a list of integration accounts by resource group.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<IntegrationAccount>)

    operation results.



121
122
123
124
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 121

def list_by_resource_group(resource_group_name, top:nil, custom_headers:nil)
  first_page = list_by_resource_group_as_lazy(resource_group_name, top:top, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_by_resource_group_as_lazy(resource_group_name, top: nil, custom_headers: nil) ⇒ IntegrationAccountListResult

Gets a list of integration accounts by resource group.

will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IntegrationAccountListResult)

    which provide lazy access to pages of



1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 1206

def list_by_resource_group_as_lazy(resource_group_name, top:nil, custom_headers:nil)
  response = list_by_resource_group_async(resource_group_name, top:top, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_by_resource_group_async(resource_group_name, top: nil, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of integration accounts by resource group.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 150

def list_by_resource_group_async(resource_group_name, top:nil, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
      query_params: {'api-version' => @client.api_version,'$top' => top},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ IntegrationAccountListResult

Gets a list of integration accounts by resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IntegrationAccountListResult)

    operation results.



1096
1097
1098
1099
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 1096

def list_by_resource_group_next(next_page_link, custom_headers:nil)
  response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of integration accounts by resource group.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 1125

def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets a list of integration accounts by resource group.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1111
1112
1113
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 1111

def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
  list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_by_resource_group_with_http_info(resource_group_name, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets a list of integration accounts by resource group.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



136
137
138
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 136

def list_by_resource_group_with_http_info(resource_group_name, top:nil, custom_headers:nil)
  list_by_resource_group_async(resource_group_name, top:top, custom_headers:custom_headers).value!
end

#list_by_subscription(top: nil, custom_headers: nil) ⇒ Array<IntegrationAccount>

Gets a list of integration accounts by subscription.

will be added to the HTTP request.

Parameters:

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array<IntegrationAccount>)

    operation results.



33
34
35
36
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 33

def list_by_subscription(top:nil, custom_headers:nil)
  first_page = list_by_subscription_as_lazy(top:top, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_by_subscription_as_lazy(top: nil, custom_headers: nil) ⇒ IntegrationAccountListResult

Gets a list of integration accounts by subscription.

will be added to the HTTP request.

the response.

Parameters:

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IntegrationAccountListResult)

    which provide lazy access to pages of



1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 1184

def list_by_subscription_as_lazy(top:nil, custom_headers:nil)
  response = list_by_subscription_async(top:top, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_by_subscription_async(top: nil, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of integration accounts by subscription.

to the HTTP request.

Parameters:

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 60

def list_by_subscription_async(top:nil, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version,'$top' => top},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_by_subscription_next(next_page_link, custom_headers: nil) ⇒ IntegrationAccountListResult

Gets a list of integration accounts by subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IntegrationAccountListResult)

    operation results.



1008
1009
1010
1011
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 1008

def list_by_subscription_next(next_page_link, custom_headers:nil)
  response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Gets a list of integration accounts by subscription.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 1037

def list_by_subscription_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccountListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets a list of integration accounts by subscription.

to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1023
1024
1025
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 1023

def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
  list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_by_subscription_with_http_info(top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets a list of integration accounts by subscription.

will be added to the HTTP request.

Parameters:

  • top (Integer) (defaults to: nil)

    The number of items to be included in the result.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



47
48
49
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 47

def list_by_subscription_with_http_info(top:nil, custom_headers:nil)
  list_by_subscription_async(top:top, custom_headers:custom_headers).value!
end

#list_key_vault_keys(resource_group_name, integration_account_name, list_key_vault_keys, custom_headers: nil) ⇒ KeyVaultKeyCollection

Gets the integration account’s Key Vault keys.

parameters. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • list_key_vault_keys (ListKeyVaultKeysDefinition)

    The key vault

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (KeyVaultKeyCollection)

    operation results.



706
707
708
709
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 706

def list_key_vault_keys(resource_group_name, , list_key_vault_keys, custom_headers:nil)
  response = list_key_vault_keys_async(resource_group_name, , list_key_vault_keys, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_key_vault_keys_async(resource_group_name, integration_account_name, list_key_vault_keys, custom_headers: nil) ⇒ Concurrent::Promise

Gets the integration account’s Key Vault keys.

parameters. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • list_key_vault_keys (ListKeyVaultKeysDefinition)

    The key vault

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 739

def list_key_vault_keys_async(resource_group_name, , list_key_vault_keys, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'integration_account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'list_key_vault_keys is nil' if list_key_vault_keys.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::ListKeyVaultKeysDefinition.mapper()
  request_content = @client.serialize(request_mapper,  list_key_vault_keys)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => },
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::KeyVaultKeyCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_key_vault_keys_with_http_info(resource_group_name, integration_account_name, list_key_vault_keys, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the integration account’s Key Vault keys.

parameters. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • list_key_vault_keys (ListKeyVaultKeysDefinition)

    The key vault

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



723
724
725
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 723

def list_key_vault_keys_with_http_info(resource_group_name, , list_key_vault_keys, custom_headers:nil)
  list_key_vault_keys_async(resource_group_name, , list_key_vault_keys, custom_headers:custom_headers).value!
end

#log_tracking_events(resource_group_name, integration_account_name, log_tracking_events, custom_headers: nil) ⇒ Object

Logs the integration account’s tracking events.

parameters. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • log_tracking_events (TrackingEventsDefinition)

    The callback URL

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



811
812
813
814
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 811

def log_tracking_events(resource_group_name, , log_tracking_events, custom_headers:nil)
  response = log_tracking_events_async(resource_group_name, , log_tracking_events, custom_headers:custom_headers).value!
  nil
end

#log_tracking_events_async(resource_group_name, integration_account_name, log_tracking_events, custom_headers: nil) ⇒ Concurrent::Promise

Logs the integration account’s tracking events.

parameters. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • log_tracking_events (TrackingEventsDefinition)

    The callback URL

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 844

def log_tracking_events_async(resource_group_name, , log_tracking_events, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'integration_account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'log_tracking_events is nil' if log_tracking_events.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::TrackingEventsDefinition.mapper()
  request_content = @client.serialize(request_mapper,  log_tracking_events)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => },
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#log_tracking_events_with_http_info(resource_group_name, integration_account_name, log_tracking_events, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Logs the integration account’s tracking events.

parameters. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • log_tracking_events (TrackingEventsDefinition)

    The callback URL

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



828
829
830
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 828

def log_tracking_events_with_http_info(resource_group_name, , log_tracking_events, custom_headers:nil)
  log_tracking_events_async(resource_group_name, , log_tracking_events, custom_headers:custom_headers).value!
end

#regenerate_access_key(resource_group_name, integration_account_name, regenerate_access_key, custom_headers: nil) ⇒ IntegrationAccount

Regenerates the integration account access key.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • regenerate_access_key (RegenerateActionParameter)

    The access key type.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IntegrationAccount)

    operation results.



906
907
908
909
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 906

def regenerate_access_key(resource_group_name, , regenerate_access_key, custom_headers:nil)
  response = regenerate_access_key_async(resource_group_name, , regenerate_access_key, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#regenerate_access_key_async(resource_group_name, integration_account_name, regenerate_access_key, custom_headers: nil) ⇒ Concurrent::Promise

Regenerates the integration account access key.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • regenerate_access_key (RegenerateActionParameter)

    The access key type.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 937

def regenerate_access_key_async(resource_group_name, , regenerate_access_key, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'integration_account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'regenerate_access_key is nil' if regenerate_access_key.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::RegenerateActionParameter.mapper()
  request_content = @client.serialize(request_mapper,  regenerate_access_key)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => },
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#regenerate_access_key_with_http_info(resource_group_name, integration_account_name, regenerate_access_key, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Regenerates the integration account access key.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • regenerate_access_key (RegenerateActionParameter)

    The access key type.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



922
923
924
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 922

def regenerate_access_key_with_http_info(resource_group_name, , regenerate_access_key, custom_headers:nil)
  regenerate_access_key_async(resource_group_name, , regenerate_access_key, custom_headers:custom_headers).value!
end

#update(resource_group_name, integration_account_name, integration_account, custom_headers: nil) ⇒ IntegrationAccount

Updates an integration account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • integration_account (IntegrationAccount)

    The integration account.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (IntegrationAccount)

    operation results.



418
419
420
421
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 418

def update(resource_group_name, , , custom_headers:nil)
  response = update_async(resource_group_name, , , custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_async(resource_group_name, integration_account_name, integration_account, custom_headers: nil) ⇒ Concurrent::Promise

Updates an integration account.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • integration_account (IntegrationAccount)

    The integration account.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 449

def update_async(resource_group_name, , , custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'integration_account_name is nil' if .nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'integration_account is nil' if .nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccount.mapper()
  request_content = @client.serialize(request_mapper,  )
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => },
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:patch, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Logic::Mgmt::V2016_06_01::Models::IntegrationAccount.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#update_with_http_info(resource_group_name, integration_account_name, integration_account, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates an integration account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The resource group name.

  • integration_account_name (String)

    The integration account name.

  • integration_account (IntegrationAccount)

    The integration account.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



434
435
436
# File 'lib/2016-06-01/generated/azure_mgmt_logic/integration_accounts.rb', line 434

def update_with_http_info(resource_group_name, , , custom_headers:nil)
  update_async(resource_group_name, , , custom_headers:custom_headers).value!
end