Class: Azure::MixedReality::Mgmt::V2019_12_02_preview::RemoteRenderingAccounts
- Inherits:
-
Object
- Object
- Azure::MixedReality::Mgmt::V2019_12_02_preview::RemoteRenderingAccounts
- 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
-
#client ⇒ MixedRealityClient
readonly
Reference to the MixedRealityClient.
Instance Method Summary collapse
-
#create(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ RemoteRenderingAccount
Creating or Updating a Remote Rendering Account.
-
#create_async(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ Concurrent::Promise
Creating or Updating a Remote Rendering Account.
-
#create_with_http_info(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creating or Updating a Remote Rendering Account.
-
#delete(resource_group_name, account_name, custom_headers: nil) ⇒ Object
Delete a Remote Rendering Account.
-
#delete_async(resource_group_name, account_name, custom_headers: nil) ⇒ Concurrent::Promise
Delete a Remote Rendering Account.
-
#delete_with_http_info(resource_group_name, account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Delete a Remote Rendering Account.
-
#get(resource_group_name, account_name, custom_headers: nil) ⇒ RemoteRenderingAccount
Retrieve a Remote Rendering Account.
-
#get_async(resource_group_name, account_name, custom_headers: nil) ⇒ Concurrent::Promise
Retrieve a Remote Rendering Account.
-
#get_keys(resource_group_name, account_name, custom_headers: nil) ⇒ AccountKeys
Get Both of the 2 Keys of a Remote Rendering Account.
-
#get_keys_async(resource_group_name, account_name, custom_headers: nil) ⇒ Concurrent::Promise
Get Both of the 2 Keys of a Remote Rendering Account.
-
#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.
-
#get_with_http_info(resource_group_name, account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Retrieve a Remote Rendering Account.
-
#initialize(client) ⇒ RemoteRenderingAccounts
constructor
Creates and initializes a new instance of the RemoteRenderingAccounts class.
-
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<RemoteRenderingAccount>
List Resources by Resource Group.
-
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ RemoteRenderingAccountPage
List Resources by Resource Group.
-
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
List Resources by Resource Group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ RemoteRenderingAccountPage
List Resources by Resource Group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List Resources by Resource Group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List Resources by Resource Group.
-
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List Resources by Resource Group.
-
#list_by_subscription(custom_headers: nil) ⇒ Array<RemoteRenderingAccount>
List Remote Rendering Accounts by Subscription.
-
#list_by_subscription_as_lazy(custom_headers: nil) ⇒ RemoteRenderingAccountPage
List Remote Rendering Accounts by Subscription.
-
#list_by_subscription_async(custom_headers: nil) ⇒ Concurrent::Promise
List Remote Rendering Accounts by Subscription.
-
#list_by_subscription_next(next_page_link, custom_headers: nil) ⇒ RemoteRenderingAccountPage
List Remote Rendering Accounts by Subscription.
-
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List Remote Rendering Accounts by Subscription.
-
#list_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List Remote Rendering Accounts by Subscription.
-
#list_by_subscription_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List Remote Rendering Accounts by Subscription.
-
#regenerate_keys(resource_group_name, account_name, regenerate, custom_headers: nil) ⇒ AccountKeys
Regenerate specified Key of a Remote Rendering Account.
-
#regenerate_keys_async(resource_group_name, account_name, regenerate, custom_headers: nil) ⇒ Concurrent::Promise
Regenerate specified Key of a Remote Rendering Account.
-
#regenerate_keys_with_http_info(resource_group_name, account_name, regenerate, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerate specified Key of a Remote Rendering Account.
-
#update(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ RemoteRenderingAccount
Updating a Remote Rendering Account.
-
#update_async(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ Concurrent::Promise
Updating a Remote Rendering Account.
-
#update_with_http_info(resource_group_name, account_name, remote_rendering_account, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updating a Remote Rendering Account.
Constructor Details
#initialize(client) ⇒ RemoteRenderingAccounts
Creates and initializes a new instance of the RemoteRenderingAccounts class.
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
#client ⇒ MixedRealityClient (readonly)
Returns reference to the MixedRealityClient.
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.
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, account_name, remote_rendering_account, custom_headers:nil) response = create_async(resource_group_name, account_name, remote_rendering_account, 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.
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, account_name, remote_rendering_account, 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 account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1 fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'remote_rendering_account is nil' if remote_rendering_account.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, remote_rendering_account) 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 = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name}, 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, ) 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., 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., 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.
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, account_name, remote_rendering_account, custom_headers:nil) create_async(resource_group_name, account_name, remote_rendering_account, 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.
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, account_name, custom_headers:nil) response = delete_async(resource_group_name, account_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.
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, account_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 account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1 fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_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/{accountName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name}, 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, ) 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.
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, account_name, custom_headers:nil) delete_async(resource_group_name, account_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.
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, account_name, custom_headers:nil) response = get_async(resource_group_name, account_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.
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, account_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 account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1 fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_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/{accountName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_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, ) 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., 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.
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, account_name, custom_headers:nil) response = get_keys_async(resource_group_name, account_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.
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, account_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 account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1 fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_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/{accountName}/keys' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_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, ) 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., 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.
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, account_name, custom_headers:nil) get_keys_async(resource_group_name, account_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.
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, account_name, custom_headers:nil) get_async(resource_group_name, account_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.
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.
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.
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 = { 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, ) 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., 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.
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.
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 = { 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, ) 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., 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.
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.
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.
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.
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.
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 = { 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, ) 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., 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.
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.
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 = { 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, ) 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., 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.
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.
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.
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, account_name, regenerate, custom_headers:nil) response = regenerate_keys_async(resource_group_name, account_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.
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, account_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 account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1 fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.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 = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name}, 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, ) 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., 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.
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, account_name, regenerate, custom_headers:nil) regenerate_keys_async(resource_group_name, account_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.
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, account_name, remote_rendering_account, custom_headers:nil) response = update_async(resource_group_name, account_name, remote_rendering_account, 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.
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, account_name, remote_rendering_account, 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 account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '90'" if !account_name.nil? && account_name.length > 90 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '1'" if !account_name.nil? && account_name.length < 1 fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !account_name.nil? && account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'remote_rendering_account is nil' if remote_rendering_account.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, remote_rendering_account) 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 = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name}, 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, ) 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., 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.
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, account_name, remote_rendering_account, custom_headers:nil) update_async(resource_group_name, account_name, remote_rendering_account, custom_headers:custom_headers).value! end |