class Azure::MixedReality::Mgmt::V2019_02_28_preview::SpatialAnchorsAccounts
Mixed Reality Client
Attributes
@return [MixedRealityClient] reference to the MixedRealityClient
Public Class Methods
Creates and initializes a new instance of the SpatialAnchorsAccounts
class. @param client service class for accessing basic functionality.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 17 def initialize(client) @client = client end
Public Instance Methods
Creating or Updating a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account [SpatialAnchorsAccount] Spatial Anchors Account parameter. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccount] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 528 def create(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:nil) response = create_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:custom_headers).value! response.body unless response.nil? end
Creating or Updating a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account [SpatialAnchorsAccount] Spatial Anchors Account parameter. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 563 def create_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_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, 'spatial_anchors_account_name is nil' if spatial_anchors_account_name.nil? fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MaxLength': '90'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length > 90 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MinLength': '1'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length < 1 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'spatial_anchors_account is nil' if spatial_anchors_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_02_28_preview::Models::SpatialAnchorsAccount.mapper() request_content = @client.serialize(request_mapper, spatial_anchors_account) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}' 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,'spatialAnchorsAccountName' => spatial_anchors_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, 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_02_28_preview::Models::SpatialAnchorsAccount.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_02_28_preview::Models::SpatialAnchorsAccount.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
Creating or Updating a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account [SpatialAnchorsAccount] Spatial Anchors Account parameter. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 546 def create_with_http_info(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:nil) create_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:custom_headers).value! end
Delete a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 213 def delete(resource_group_name, spatial_anchors_account_name, custom_headers:nil) response = delete_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value! nil end
Delete a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 244 def delete_async(resource_group_name, spatial_anchors_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, 'spatial_anchors_account_name is nil' if spatial_anchors_account_name.nil? fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MaxLength': '90'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length > 90 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MinLength': '1'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length < 1 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !spatial_anchors_account_name.nil? && spatial_anchors_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/spatialAnchorsAccounts/{spatialAnchorsAccountName}' 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,'spatialAnchorsAccountName' => spatial_anchors_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, 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 a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 229 def delete_with_http_info(resource_group_name, spatial_anchors_account_name, custom_headers:nil) delete_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value! end
Retrieve a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccount] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 306 def get(resource_group_name, spatial_anchors_account_name, custom_headers:nil) response = get_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Retrieve a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 337 def get_async(resource_group_name, spatial_anchors_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, 'spatial_anchors_account_name is nil' if spatial_anchors_account_name.nil? fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MaxLength': '90'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length > 90 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MinLength': '1'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length < 1 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !spatial_anchors_account_name.nil? && spatial_anchors_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/spatialAnchorsAccounts/{spatialAnchorsAccountName}' 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,'spatialAnchorsAccountName' => spatial_anchors_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, 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_02_28_preview::Models::SpatialAnchorsAccount.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 Both of the 2 Keys of a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccountKeys] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 653 def get_keys(resource_group_name, spatial_anchors_account_name, custom_headers:nil) response = get_keys_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get Both of the 2 Keys of a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 684 def get_keys_async(resource_group_name, spatial_anchors_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, 'spatial_anchors_account_name is nil' if spatial_anchors_account_name.nil? fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MaxLength': '90'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length > 90 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MinLength': '1'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length < 1 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !spatial_anchors_account_name.nil? && spatial_anchors_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/spatialAnchorsAccounts/{spatialAnchorsAccountName}/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,'spatialAnchorsAccountName' => spatial_anchors_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, 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_02_28_preview::Models::SpatialAnchorsAccountKeys.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 Both of the 2 Keys of a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 669 def get_keys_with_http_info(resource_group_name, spatial_anchors_account_name, custom_headers:nil) get_keys_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value! end
Retrieve a Spatial Anchors Account.
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 322 def get_with_http_info(resource_group_name, spatial_anchors_account_name, custom_headers:nil) get_async(resource_group_name, spatial_anchors_account_name, custom_headers:custom_headers).value! end
List Resources by Resource Group
@param resource_group_name [String] Name of an Azure
resource group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SpatialAnchorsAccount>] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_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 Resources by Resource Group
@param resource_group_name [String] Name of an Azure
resource group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccountList] which provide lazy access to pages of the response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 1075 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 Resources by Resource Group
@param resource_group_name [String] Name of an Azure
resource group. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_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/spatialAnchorsAccounts' 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_02_28_preview::Models::SpatialAnchorsAccountList.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 Resources by Resource Group
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccountList] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 965 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 Resources by Resource Group
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 994 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_02_28_preview::Models::SpatialAnchorsAccountList.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 Resources by Resource Group
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 980 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 Resources by Resource Group
@param resource_group_name [String] Name of an Azure
resource group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_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 Spatial Anchors Accounts by Subscription
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<SpatialAnchorsAccount>] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_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 Spatial Anchors Accounts by Subscription
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccountList] which provide lazy access to pages of the response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 1054 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 Spatial Anchors Accounts by Subscription
@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_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/spatialAnchorsAccounts' 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_02_28_preview::Models::SpatialAnchorsAccountList.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 Spatial Anchors Accounts by Subscription
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccountList] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 875 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 Spatial Anchors Accounts by Subscription
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 904 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_02_28_preview::Models::SpatialAnchorsAccountList.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 Spatial Anchors Accounts by Subscription
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 890 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 Spatial Anchors Accounts by Subscription
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_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 1 Key of a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account_key_regenerate
- SpatialAnchorsAccountKeyRegenerateRequest
-
Specifying which key to be
regenerated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccountKeys] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 759 def regenerate_keys(resource_group_name, spatial_anchors_account_name, spatial_anchors_account_key_regenerate, custom_headers:nil) response = regenerate_keys_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account_key_regenerate, custom_headers:custom_headers).value! response.body unless response.nil? end
Regenerate 1 Key of a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account_key_regenerate
- SpatialAnchorsAccountKeyRegenerateRequest
-
Specifying which key to be
regenerated. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 796 def regenerate_keys_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account_key_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, 'spatial_anchors_account_name is nil' if spatial_anchors_account_name.nil? fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MaxLength': '90'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length > 90 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MinLength': '1'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length < 1 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'spatial_anchors_account_key_regenerate is nil' if spatial_anchors_account_key_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_02_28_preview::Models::SpatialAnchorsAccountKeyRegenerateRequest.mapper() request_content = @client.serialize(request_mapper, spatial_anchors_account_key_regenerate) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}/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,'spatialAnchorsAccountName' => spatial_anchors_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, 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_02_28_preview::Models::SpatialAnchorsAccountKeys.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 1 Key of a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account_key_regenerate
- SpatialAnchorsAccountKeyRegenerateRequest
-
Specifying which key to be
regenerated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 778 def regenerate_keys_with_http_info(resource_group_name, spatial_anchors_account_name, spatial_anchors_account_key_regenerate, custom_headers:nil) regenerate_keys_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account_key_regenerate, custom_headers:custom_headers).value! end
Updating a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account [SpatialAnchorsAccount] Spatial Anchors Account parameter. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [SpatialAnchorsAccount] operation results.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 411 def update(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:nil) response = update_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:custom_headers).value! response.body unless response.nil? end
Updating a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account [SpatialAnchorsAccount] Spatial Anchors Account parameter. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 446 def update_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_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, 'spatial_anchors_account_name is nil' if spatial_anchors_account_name.nil? fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MaxLength': '90'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length > 90 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'MinLength': '1'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.length < 1 fail ArgumentError, "'spatial_anchors_account_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !spatial_anchors_account_name.nil? && spatial_anchors_account_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'spatial_anchors_account is nil' if spatial_anchors_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_02_28_preview::Models::SpatialAnchorsAccount.mapper() request_content = @client.serialize(request_mapper, spatial_anchors_account) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}' 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,'spatialAnchorsAccountName' => spatial_anchors_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, 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_02_28_preview::Models::SpatialAnchorsAccount.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
Updating a Spatial Anchors Account
@param resource_group_name [String] Name of an Azure
resource group. @param spatial_anchors_account_name [String] Name of an Mixed Reality Spatial Anchors Account. @param spatial_anchors_account [SpatialAnchorsAccount] Spatial Anchors Account parameter. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2019-02-28-preview/generated/azure_mgmt_mixedreality/spatial_anchors_accounts.rb, line 429 def update_with_http_info(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:nil) update_async(resource_group_name, spatial_anchors_account_name, spatial_anchors_account, custom_headers:custom_headers).value! end