Class: Azure::MixedReality::Mgmt::V2019_12_02_preview::RemoteRenderingAccounts

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb

Overview

Mixed Reality Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ RemoteRenderingAccounts

Creates and initializes a new instance of the RemoteRenderingAccounts class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientMixedRealityClient (readonly)

Returns reference to the MixedRealityClient.

Returns:



22
23
24
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 22

def client
  @client
end

Instance Method Details

#create(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ RemoteRenderingAccount

Creating or Updating a Remote Rendering Account.

Account parameter. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • remote_rendering_account (RemoteRenderingAccount)

    Remote Rendering

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

    A hash of custom headers that

Returns:

  • (RemoteRenderingAccount)

    operation results.



518
519
520
521
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 518

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

#create_async(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ Concurrent::Promise

Creating or Updating a Remote Rendering Account.

Account parameter. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • remote_rendering_account (RemoteRenderingAccount)

    Remote Rendering

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 551

def create_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, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !.nil? && .length > 90
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1
  fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !.nil? && .match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'remote_rendering_account 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?

  # Serialize Request
  request_mapper = Azure::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccount.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.MixedReality/remoteRenderingAccounts/{accountName}'

  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,'accountName' => },
      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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccount.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::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccount.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_with_http_info(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Creating or Updating a Remote Rendering Account.

Account parameter. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • remote_rendering_account (RemoteRenderingAccount)

    Remote Rendering

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



535
536
537
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 535

def create_with_http_info(resource_group_name, , , custom_headers:nil)
  create_async(resource_group_name, , , custom_headers:custom_headers).value!
end

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

Delete a Remote Rendering Account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

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

    A hash of custom headers that



212
213
214
215
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 212

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, account_name, custom_headers: nil) ⇒ Concurrent::Promise

Delete a Remote Rendering Account.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • 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
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 241

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, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !.nil? && .length > 90
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1
  fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !.nil? && .match(Regexp.new('^^[-\w\._\(\)]+$$')).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.MixedReality/remoteRenderingAccounts/{accountName}'

  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,'accountName' => },
      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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end

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

Delete a Remote Rendering Account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • 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/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 227

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, account_name, custom_headers: nil) ⇒ RemoteRenderingAccount

Retrieve a Remote Rendering Account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

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

    A hash of custom headers that

Returns:

  • (RemoteRenderingAccount)

    operation results.



302
303
304
305
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 302

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, account_name, custom_headers: nil) ⇒ Concurrent::Promise

Retrieve a Remote Rendering Account.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



331
332
333
334
335
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
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 331

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, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !.nil? && .length > 90
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1
  fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !.nil? && .match(Regexp.new('^^[-\w\._\(\)]+$$')).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.MixedReality/remoteRenderingAccounts/{accountName}'

  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,'accountName' => },
      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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccount.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_keys(resource_group_name, account_name, custom_headers: nil) ⇒ AccountKeys

Get Both of the 2 Keys of a Remote Rendering Account

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

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

    A hash of custom headers that

Returns:

  • (AccountKeys)

    operation results.



640
641
642
643
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 640

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

#get_keys_async(resource_group_name, account_name, custom_headers: nil) ⇒ Concurrent::Promise

Get Both of the 2 Keys of a Remote Rendering Account

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 669

def get_keys_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, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !.nil? && .length > 90
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1
  fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !.nil? && .match(Regexp.new('^^[-\w\._\(\)]+$$')).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.MixedReality/remoteRenderingAccounts/{accountName}/keys'

  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,'accountName' => },
      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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::AccountKeys.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_keys_with_http_info(resource_group_name, account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Get Both of the 2 Keys of a Remote Rendering Account

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



655
656
657
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 655

def get_keys_with_http_info(resource_group_name, , custom_headers:nil)
  get_keys_async(resource_group_name, , custom_headers:custom_headers).value!
end

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

Retrieve a Remote Rendering Account.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



317
318
319
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 317

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, custom_headers: nil) ⇒ Array<RemoteRenderingAccount>

List Resources by Resource Group

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

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

    A hash of custom headers that

Returns:

  • (Array<RemoteRenderingAccount>)

    operation results.



119
120
121
122
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 119

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

#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ RemoteRenderingAccountPage

List Resources by Resource Group

will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

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

    A hash of custom headers that

Returns:

  • (RemoteRenderingAccountPage)

    which provide lazy access to pages of



1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 1054

def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
  response = list_by_resource_group_async(resource_group_name, 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, custom_headers: nil) ⇒ Concurrent::Promise

List Resources by Resource Group

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



146
147
148
149
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
201
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 146

def list_by_resource_group_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, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).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.MixedReality/remoteRenderingAccounts'

  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},
      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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccountPage.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) ⇒ RemoteRenderingAccountPage

List Resources 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:

  • (RemoteRenderingAccountPage)

    operation results.



944
945
946
947
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 944

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

List Resources 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.



973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 973

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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccountPage.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

List Resources 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.



959
960
961
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 959

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, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List Resources by Resource Group

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



133
134
135
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 133

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

#list_by_subscription(custom_headers: nil) ⇒ Array<RemoteRenderingAccount>

List Remote Rendering Accounts by Subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (Array<RemoteRenderingAccount>)

    operation results.



32
33
34
35
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 32

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

#list_by_subscription_as_lazy(custom_headers: nil) ⇒ RemoteRenderingAccountPage

List Remote Rendering Accounts by Subscription

will be added to the HTTP request.

the response.

Parameters:

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

    A hash of custom headers that

Returns:

  • (RemoteRenderingAccountPage)

    which provide lazy access to pages of



1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 1033

def list_by_subscription_as_lazy(custom_headers:nil)
  response = list_by_subscription_async(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(custom_headers: nil) ⇒ Concurrent::Promise

List Remote Rendering Accounts by Subscription

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



57
58
59
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
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 57

def list_by_subscription_async(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.MixedReality/remoteRenderingAccounts'

  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},
      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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccountPage.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) ⇒ RemoteRenderingAccountPage

List Remote Rendering 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:

  • (RemoteRenderingAccountPage)

    operation results.



854
855
856
857
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 854

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

List Remote Rendering 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.



883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 883

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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccountPage.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

List Remote Rendering 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.



869
870
871
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 869

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(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List Remote Rendering Accounts by Subscription

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



45
46
47
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 45

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

#regenerate_keys(resource_group_name, account_name, regenerate, custom_headers: nil) ⇒ AccountKeys

Regenerate specified Key of a Remote Rendering Account

regeneration. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • regenerate (AccountKeyRegenerateRequest)

    Required information for key

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

    A hash of custom headers that

Returns:

  • (AccountKeys)

    operation results.



742
743
744
745
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 742

def regenerate_keys(resource_group_name, , regenerate, custom_headers:nil)
  response = regenerate_keys_async(resource_group_name, , regenerate, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#regenerate_keys_async(resource_group_name, account_name, regenerate, custom_headers: nil) ⇒ Concurrent::Promise

Regenerate specified Key of a Remote Rendering Account

regeneration. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • regenerate (AccountKeyRegenerateRequest)

    Required information for key

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 775

def regenerate_keys_async(resource_group_name, , regenerate, 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, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !.nil? && .length > 90
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1
  fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !.nil? && .match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'regenerate is nil' if regenerate.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?

  # Serialize Request
  request_mapper = Azure::MixedReality::Mgmt::V2019_12_02_preview::Models::AccountKeyRegenerateRequest.mapper()
  request_content = @client.serialize(request_mapper,  regenerate)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/keys'

  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,'accountName' => },
      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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::AccountKeys.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_keys_with_http_info(resource_group_name, account_name, regenerate, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Regenerate specified Key of a Remote Rendering Account

regeneration. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • regenerate (AccountKeyRegenerateRequest)

    Required information for key

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



759
760
761
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 759

def regenerate_keys_with_http_info(resource_group_name, , regenerate, custom_headers:nil)
  regenerate_keys_async(resource_group_name, , regenerate, custom_headers:custom_headers).value!
end

#update(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ RemoteRenderingAccount

Updating a Remote Rendering Account

Account parameter. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • remote_rendering_account (RemoteRenderingAccount)

    Remote Rendering

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

    A hash of custom headers that

Returns:

  • (RemoteRenderingAccount)

    operation results.



404
405
406
407
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 404

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, account_name, remote_rendering_account, custom_headers: nil) ⇒ Concurrent::Promise

Updating a Remote Rendering Account

Account parameter. to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • remote_rendering_account (RemoteRenderingAccount)

    Remote Rendering

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



437
438
439
440
441
442
443
444
445
446
447
448
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
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 437

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, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'account_name is nil' if .nil?
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !.nil? && .length > 90
  fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !.nil? && .length < 1
  fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !.nil? && .match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
  fail ArgumentError, 'remote_rendering_account 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?

  # Serialize Request
  request_mapper = Azure::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccount.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.MixedReality/remoteRenderingAccounts/{accountName}'

  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,'accountName' => },
      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 MsRest::HttpOperationError.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.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-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::MixedReality::Mgmt::V2019_12_02_preview::Models::RemoteRenderingAccount.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, account_name, remote_rendering_account, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updating a Remote Rendering Account

Account parameter. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Name of an Azure resource group.

  • account_name (String)

    Name of an Mixed Reality Account.

  • remote_rendering_account (RemoteRenderingAccount)

    Remote Rendering

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



421
422
423
# File 'lib/2019-12-02-preview/generated/azure_mgmt_mixedreality/remote_rendering_accounts.rb', line 421

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