Class: Azure::AnalysisServices::Mgmt::V2016_05_16::Servers

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb

Overview

The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Analysis Services servers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Servers

Creates and initializes a new instance of the Servers class.

Parameters:

  • client

    service class for accessing basic functionality.



19
20
21
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 19

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientAnalysisServicesManagementClient (readonly)

Returns reference to the AnalysisServicesManagementClient.

Returns:



24
25
26
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 24

def client
  @client
end

Instance Method Details

#begin_create(resource_group_name, server_name, server_parameters, custom_headers: nil) ⇒ AnalysisServicesServer

Provisions the specified Analysis Services server based on the configuration specified in the request.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be a minimum of 3 characters, and a maximum of 63. used to provision the Analysis Services server. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • server_parameters (AnalysisServicesServer)

    Contains the information

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

    A hash of custom headers that

Returns:

  • (AnalysisServicesServer)

    operation results.



1052
1053
1054
1055
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1052

def begin_create(resource_group_name, server_name, server_parameters, custom_headers:nil)
  response = begin_create_async(resource_group_name, server_name, server_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_create_async(resource_group_name, server_name, server_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Provisions the specified Analysis Services server based on the configuration specified in the request.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be a minimum of 3 characters, and a maximum of 63. used to provision the Analysis Services server. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • server_parameters (AnalysisServicesServer)

    Contains the information

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1093

def begin_create_async(resource_group_name, server_name, server_parameters, custom_headers: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, 'server_name is nil' if server_name.nil?
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MaxLength': '63'" if !server_name.nil? && server_name.length > 63
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MinLength': '3'" if !server_name.nil? && server_name.length < 3
  fail ArgumentError, "'server_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !server_name.nil? && server_name.match(Regexp.new('^^[a-z][a-z0-9]*$$')).nil?
  fail ArgumentError, 'server_parameters is nil' if server_parameters.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServer.mapper()
  request_content = @client.serialize(request_mapper,  server_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}'

  request_url = @base_url || @client.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServer.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::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServer.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

#begin_create_with_http_info(resource_group_name, server_name, server_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Provisions the specified Analysis Services server based on the configuration specified in the request.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be a minimum of 3 characters, and a maximum of 63. used to provision the Analysis Services server. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • server_parameters (AnalysisServicesServer)

    Contains the information

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1073
1074
1075
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1073

def begin_create_with_http_info(resource_group_name, server_name, server_parameters, custom_headers:nil)
  begin_create_async(resource_group_name, server_name, server_parameters, custom_headers:custom_headers).value!
end

#begin_delete(resource_group_name, server_name, custom_headers: nil) ⇒ Object

Deletes the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that



1182
1183
1184
1185
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1182

def begin_delete(resource_group_name, server_name, custom_headers:nil)
  response = begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers).value!
  nil
end

#begin_delete_async(resource_group_name, server_name, custom_headers: nil) ⇒ Concurrent::Promise

Deletes the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1217

def begin_delete_async(resource_group_name, server_name, custom_headers: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, 'server_name is nil' if server_name.nil?
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MaxLength': '63'" if !server_name.nil? && server_name.length > 63
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MinLength': '3'" if !server_name.nil? && server_name.length < 3
  fail ArgumentError, "'server_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !server_name.nil? && server_name.match(Regexp.new('^^[a-z][a-z0-9]*$$')).nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/servers/{serverName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'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(: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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end

#begin_delete_with_http_info(resource_group_name, server_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1200
1201
1202
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1200

def begin_delete_with_http_info(resource_group_name, server_name, custom_headers:nil)
  begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers).value!
end

#begin_resume(resource_group_name, server_name, custom_headers: nil) ⇒ Object

Resumes operation of the specified Analysis Services server instance.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that



1505
1506
1507
1508
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1505

def begin_resume(resource_group_name, server_name, custom_headers:nil)
  response = begin_resume_async(resource_group_name, server_name, custom_headers:custom_headers).value!
  nil
end

#begin_resume_async(resource_group_name, server_name, custom_headers: nil) ⇒ Concurrent::Promise

Resumes operation of the specified Analysis Services server instance.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1540

def begin_resume_async(resource_group_name, server_name, custom_headers: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, 'server_name is nil' if server_name.nil?
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MaxLength': '63'" if !server_name.nil? && server_name.length > 63
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MinLength': '3'" if !server_name.nil? && server_name.length < 3
  fail ArgumentError, "'server_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !server_name.nil? && server_name.match(Regexp.new('^^[a-z][a-z0-9]*$$')).nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/servers/{serverName}/resume'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'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(: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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end

#begin_resume_with_http_info(resource_group_name, server_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Resumes operation of the specified Analysis Services server instance.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1523
1524
1525
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1523

def begin_resume_with_http_info(resource_group_name, server_name, custom_headers:nil)
  begin_resume_async(resource_group_name, server_name, custom_headers:custom_headers).value!
end

#begin_suspend(resource_group_name, server_name, custom_headers: nil) ⇒ Object

Supends operation of the specified Analysis Services server instance.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that



1409
1410
1411
1412
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1409

def begin_suspend(resource_group_name, server_name, custom_headers:nil)
  response = begin_suspend_async(resource_group_name, server_name, custom_headers:custom_headers).value!
  nil
end

#begin_suspend_async(resource_group_name, server_name, custom_headers: nil) ⇒ Concurrent::Promise

Supends operation of the specified Analysis Services server instance.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1444

def begin_suspend_async(resource_group_name, server_name, custom_headers: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, 'server_name is nil' if server_name.nil?
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MaxLength': '63'" if !server_name.nil? && server_name.length > 63
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MinLength': '3'" if !server_name.nil? && server_name.length < 3
  fail ArgumentError, "'server_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !server_name.nil? && server_name.match(Regexp.new('^^[a-z][a-z0-9]*$$')).nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/servers/{serverName}/suspend'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'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(: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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end

#begin_suspend_with_http_info(resource_group_name, server_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Supends operation of the specified Analysis Services server instance.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1427
1428
1429
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1427

def begin_suspend_with_http_info(resource_group_name, server_name, custom_headers:nil)
  begin_suspend_async(resource_group_name, server_name, custom_headers:custom_headers).value!
end

#begin_update(resource_group_name, server_name, server_update_parameters, custom_headers: nil) ⇒ AnalysisServicesServer

Updates the current state of the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. Request object that contains the updated information for the server. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (AnalysisServicesServer)

    operation results.



1281
1282
1283
1284
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1281

def begin_update(resource_group_name, server_name, server_update_parameters, custom_headers:nil)
  response = begin_update_async(resource_group_name, server_name, server_update_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_update_async(resource_group_name, server_name, server_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Updates the current state of the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. Request object that contains the updated information for the server. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • server_update_parameters (AnalysisServicesServerUpdateParameters)
  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1320

def begin_update_async(resource_group_name, server_name, server_update_parameters, custom_headers: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, 'server_name is nil' if server_name.nil?
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MaxLength': '63'" if !server_name.nil? && server_name.length > 63
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MinLength': '3'" if !server_name.nil? && server_name.length < 3
  fail ArgumentError, "'server_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !server_name.nil? && server_name.match(Regexp.new('^^[a-z][a-z0-9]*$$')).nil?
  fail ArgumentError, 'server_update_parameters is nil' if server_update_parameters.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServerUpdateParameters.mapper()
  request_content = @client.serialize(request_mapper,  server_update_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'subscriptionId' => @client.subscription_id},
      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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServer.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 == 202
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServer.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

#begin_update_with_http_info(resource_group_name, server_name, server_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates the current state of the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. Request object that contains the updated information for the server. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1301
1302
1303
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 1301

def begin_update_with_http_info(resource_group_name, server_name, server_update_parameters, custom_headers:nil)
  begin_update_async(resource_group_name, server_name, server_update_parameters, custom_headers:custom_headers).value!
end

#check_name_availability(location, server_parameters, custom_headers: nil) ⇒ CheckServerNameAvailabilityResult

Check the name availability in the target location.

into. information used to provision the Analysis Services server. will be added to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • server_parameters (CheckServerNameAvailabilityParameters)

    Contains the

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

    A hash of custom headers that

Returns:

  • (CheckServerNameAvailabilityResult)

    operation results.



754
755
756
757
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 754

def check_name_availability(location, server_parameters, custom_headers:nil)
  response = check_name_availability_async(location, server_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#check_name_availability_async(location, server_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Check the name availability in the target location.

into. information used to provision the Analysis Services server. to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • server_parameters (CheckServerNameAvailabilityParameters)

    Contains the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
843
844
845
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 787

def check_name_availability_async(location, server_parameters, custom_headers:nil)
  fail ArgumentError, 'location is nil' if location.nil?
  fail ArgumentError, 'server_parameters is nil' if server_parameters.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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::AnalysisServices::Mgmt::V2016_05_16::Models::CheckServerNameAvailabilityParameters.mapper()
  request_content = @client.serialize(request_mapper,  server_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/checkNameAvailability'

  request_url = @base_url || @client.base_url

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

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::CheckServerNameAvailabilityResult.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

#check_name_availability_with_http_info(location, server_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Check the name availability in the target location.

into. information used to provision the Analysis Services server. will be added to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • server_parameters (CheckServerNameAvailabilityParameters)

    Contains the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



771
772
773
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 771

def check_name_availability_with_http_info(location, server_parameters, custom_headers:nil)
  check_name_availability_async(location, server_parameters, custom_headers:custom_headers).value!
end

#create(resource_group_name, server_name, server_parameters, custom_headers: nil) ⇒ AnalysisServicesServer

Provisions the specified Analysis Services server based on the configuration specified in the request.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be a minimum of 3 characters, and a maximum of 63. used to provision the Analysis Services server. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • server_parameters (AnalysisServicesServer)

    Contains the information

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

    A hash of custom headers that

Returns:

  • (AnalysisServicesServer)

    operation results.



149
150
151
152
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 149

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

#create_async(resource_group_name, server_name, server_parameters, custom_headers: nil) ⇒ Concurrent::Promise

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be a minimum of 3 characters, and a maximum of 63. used to provision the Analysis Services server. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • server_parameters (AnalysisServicesServer)

    Contains the information

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 168

def create_async(resource_group_name, server_name, server_parameters, custom_headers:nil)
  # Send request
  promise = begin_create_async(resource_group_name, server_name, server_parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServer.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

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

Deletes the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that



197
198
199
200
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 197

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

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

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 214

def delete_async(resource_group_name, server_name, custom_headers:nil)
  # Send request
  promise = begin_delete_async(resource_group_name, server_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#get_details(resource_group_name, server_name, custom_headers: nil) ⇒ AnalysisServicesServer

Gets details about the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be a minimum of 3 characters, and a maximum of 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (AnalysisServicesServer)

    operation results.



39
40
41
42
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 39

def get_details(resource_group_name, server_name, custom_headers:nil)
  response = get_details_async(resource_group_name, server_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_details_async(resource_group_name, server_name, custom_headers: nil) ⇒ Concurrent::Promise

Gets details about the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be a minimum of 3 characters, and a maximum of 63. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 74

def get_details_async(resource_group_name, server_name, custom_headers: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, 'server_name is nil' if server_name.nil?
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MaxLength': '63'" if !server_name.nil? && server_name.length > 63
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MinLength': '3'" if !server_name.nil? && server_name.length < 3
  fail ArgumentError, "'server_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !server_name.nil? && server_name.match(Regexp.new('^^[a-z][a-z0-9]*$$')).nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/servers/{serverName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServer.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_details_with_http_info(resource_group_name, server_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets details about the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be a minimum of 3 characters, and a maximum of 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



57
58
59
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 57

def get_details_with_http_info(resource_group_name, server_name, custom_headers:nil)
  get_details_async(resource_group_name, server_name, custom_headers:custom_headers).value!
end

#list(custom_headers: nil) ⇒ AnalysisServicesServers

Lists all the Analysis Services servers for the given subscription.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (AnalysisServicesServers)

    operation results.



475
476
477
478
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 475

def list(custom_headers:nil)
  response = list_async(custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_async(custom_headers: nil) ⇒ Concurrent::Promise

Lists all the Analysis Services servers for the given subscription.

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 500

def list_async(custom_headers:nil)
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/servers'

  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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end

#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ AnalysisServicesServers

Gets all the Analysis Services servers for the given resource group.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

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

    A hash of custom headers that

Returns:

  • (AnalysisServicesServers)

    operation results.



381
382
383
384
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 381

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

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

Gets all the Analysis Services servers for the given resource group.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
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
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 412

def list_by_resource_group_async(resource_group_name, custom_headers: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?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/servers'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end

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

Gets all the Analysis Services servers for the given resource group.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



397
398
399
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 397

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_operation_results(location, operation_id, custom_headers: nil) ⇒ Object

List the result of the specified operation.

into. will be added to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • operation_id (String)

    The target operation Id.

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

    A hash of custom headers that



857
858
859
860
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 857

def list_operation_results(location, operation_id, custom_headers:nil)
  response = list_operation_results_async(location, operation_id, custom_headers:custom_headers).value!
  nil
end

#list_operation_results_async(location, operation_id, custom_headers: nil) ⇒ Concurrent::Promise

List the result of the specified operation.

into. to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • operation_id (String)

    The target operation Id.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 888

def list_operation_results_async(location, operation_id, custom_headers:nil)
  fail ArgumentError, 'location is nil' if location.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/locations/{location}/operationresults/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'location' => location,'operationId' => operation_id,'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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

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

    result
  end

  promise.execute
end

#list_operation_results_with_http_info(location, operation_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List the result of the specified operation.

into. will be added to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • operation_id (String)

    The target operation Id.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



873
874
875
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 873

def list_operation_results_with_http_info(location, operation_id, custom_headers:nil)
  list_operation_results_async(location, operation_id, custom_headers:custom_headers).value!
end

#list_operation_statuses(location, operation_id, custom_headers: nil) ⇒ OperationStatus

List the status of operation.

into. will be added to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • operation_id (String)

    The target operation Id.

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

    A hash of custom headers that

Returns:

  • (OperationStatus)

    operation results.



942
943
944
945
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 942

def list_operation_statuses(location, operation_id, custom_headers:nil)
  response = list_operation_statuses_async(location, operation_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_operation_statuses_async(location, operation_id, custom_headers: nil) ⇒ Concurrent::Promise

List the status of operation.

into. to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • operation_id (String)

    The target operation Id.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 973

def list_operation_statuses_async(location, operation_id, custom_headers:nil)
  fail ArgumentError, 'location is nil' if location.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/locations/{location}/operationstatuses/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'location' => location,'operationId' => operation_id,'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 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::OperationStatus.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 == 202
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::OperationStatus.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_operation_statuses_with_http_info(location, operation_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List the status of operation.

into. will be added to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • operation_id (String)

    The target operation Id.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



958
959
960
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 958

def list_operation_statuses_with_http_info(location, operation_id, custom_headers:nil)
  list_operation_statuses_async(location, operation_id, custom_headers:custom_headers).value!
end

#list_skus_for_existing(resource_group_name, server_name, custom_headers: nil) ⇒ SkuEnumerationForExistingResourceResult

Lists eligible SKUs for an Analysis Services resource.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (SkuEnumerationForExistingResourceResult)

    operation results.



648
649
650
651
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 648

def list_skus_for_existing(resource_group_name, server_name, custom_headers:nil)
  response = list_skus_for_existing_async(resource_group_name, server_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_skus_for_existing_async(resource_group_name, server_name, custom_headers: nil) ⇒ Concurrent::Promise

Lists eligible SKUs for an Analysis Services resource.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
729
730
731
732
733
734
735
736
737
738
739
740
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 683

def list_skus_for_existing_async(resource_group_name, server_name, custom_headers: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, 'server_name is nil' if server_name.nil?
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MaxLength': '63'" if !server_name.nil? && server_name.length > 63
  fail ArgumentError, "'server_name' should satisfy the constraint - 'MinLength': '3'" if !server_name.nil? && server_name.length < 3
  fail ArgumentError, "'server_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !server_name.nil? && server_name.match(Regexp.new('^^[a-z][a-z0-9]*$$')).nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/servers/{serverName}/skus'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::SkuEnumerationForExistingResourceResult.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_skus_for_existing_with_http_info(resource_group_name, server_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists eligible SKUs for an Analysis Services resource.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



666
667
668
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 666

def list_skus_for_existing_with_http_info(resource_group_name, server_name, custom_headers:nil)
  list_skus_for_existing_async(resource_group_name, server_name, custom_headers:custom_headers).value!
end

#list_skus_for_new(custom_headers: nil) ⇒ SkuEnumerationForNewResourceResult

Lists eligible SKUs for Analysis Services resource provider.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (SkuEnumerationForNewResourceResult)

    operation results.



559
560
561
562
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 559

def list_skus_for_new(custom_headers:nil)
  response = list_skus_for_new_async(custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_skus_for_new_async(custom_headers: nil) ⇒ Concurrent::Promise

Lists eligible SKUs for Analysis Services resource provider.

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
629
630
631
632
633
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 584

def list_skus_for_new_async(custom_headers:nil)
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.AnalysisServices/skus'

  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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::SkuEnumerationForNewResourceResult.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_skus_for_new_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists eligible SKUs for Analysis Services resource provider.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



572
573
574
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 572

def list_skus_for_new_with_http_info(custom_headers:nil)
  list_skus_for_new_async(custom_headers:custom_headers).value!
end

#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists all the Analysis Services servers for the given subscription.

will be added to the HTTP request.

Parameters:

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



488
489
490
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 488

def list_with_http_info(custom_headers:nil)
  list_async(custom_headers:custom_headers).value!
end

#resume(resource_group_name, server_name, custom_headers: nil) ⇒ Object

Resumes operation of the specified Analysis Services server instance.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that



337
338
339
340
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 337

def resume(resource_group_name, server_name, custom_headers:nil)
  response = resume_async(resource_group_name, server_name, custom_headers:custom_headers).value!
  nil
end

#resume_async(resource_group_name, server_name, custom_headers: nil) ⇒ Concurrent::Promise

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 354

def resume_async(resource_group_name, server_name, custom_headers:nil)
  # Send request
  promise = begin_resume_async(resource_group_name, server_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#suspend(resource_group_name, server_name, custom_headers: nil) ⇒ Object

Supends operation of the specified Analysis Services server instance.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that



293
294
295
296
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 293

def suspend(resource_group_name, server_name, custom_headers:nil)
  response = suspend_async(resource_group_name, server_name, custom_headers:custom_headers).value!
  nil
end

#suspend_async(resource_group_name, server_name, custom_headers: nil) ⇒ Concurrent::Promise

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 310

def suspend_async(resource_group_name, server_name, custom_headers:nil)
  # Send request
  promise = begin_suspend_async(resource_group_name, server_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#update(resource_group_name, server_name, server_update_parameters, custom_headers: nil) ⇒ AnalysisServicesServer

Updates the current state of the specified Analysis Services server.

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. Request object that contains the updated information for the server. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (AnalysisServicesServer)

    operation results.



245
246
247
248
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 245

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

#update_async(resource_group_name, server_name, server_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise

which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. be at least 3 characters in length, and no more than 63. Request object that contains the updated information for the server. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • server_name (String)

    The name of the Analysis Services server. It must

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/2016-05-16/generated/azure_mgmt_analysis_services/servers.rb', line 264

def update_async(resource_group_name, server_name, server_update_parameters, custom_headers:nil)
  # Send request
  promise = begin_update_async(resource_group_name, server_name, server_update_parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::AnalysisServices::Mgmt::V2016_05_16::Models::AnalysisServicesServer.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end