Class: Azure::PowerBiDedicated::Mgmt::V2017_10_01::Capacities

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb

Overview

PowerBI Dedicated Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Power BI dedicated capacities

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Capacities

Creates and initializes a new instance of the Capacities class.

Parameters:

  • client

    service class for accessing basic functionality.



19
20
21
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 19

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientPowerBIDedicatedManagementClient (readonly)

Returns reference to the PowerBIDedicatedManagementClient.

Returns:



24
25
26
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 24

def client
  @client
end

Instance Method Details

#begin_create(resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers: nil) ⇒ DedicatedCapacity

Provisions the specified Dedicated capacity based on the configuration specified in the request.

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

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_parameters (DedicatedCapacity)

    Contains the information used

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

    A hash of custom headers that

Returns:

  • (DedicatedCapacity)

    operation results.



875
876
877
878
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 875

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

#begin_create_async(resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Provisions the specified Dedicated capacity based on the configuration specified in the request.

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

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_parameters (DedicatedCapacity)

    Contains the information used

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 916

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

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'dedicatedCapacityName' => dedicated_capacity_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?
    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::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacity.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::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacity.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, dedicated_capacity_name, capacity_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Provisions the specified Dedicated capacity based on the configuration specified in the request.

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

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_parameters (DedicatedCapacity)

    Contains the information used

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



896
897
898
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 896

def begin_create_with_http_info(resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers:nil)
  begin_create_async(resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers:custom_headers).value!
end

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

Deletes the specified Dedicated capacity.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that



1007
1008
1009
1010
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1007

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

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

Deletes the specified Dedicated capacity.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1042

def begin_delete_async(resource_group_name, dedicated_capacity_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, 'dedicated_capacity_name is nil' if dedicated_capacity_name.nil?
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MaxLength': '63'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length > 63
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MinLength': '3'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length < 3
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !dedicated_capacity_name.nil? && dedicated_capacity_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.PowerBIDedicated/capacities/{dedicatedCapacityName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'dedicatedCapacityName' => dedicated_capacity_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.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

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

Deletes the specified Dedicated capacity.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1025
1026
1027
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1025

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

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

Resumes operation of the specified Dedicated capacity instance.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that



1336
1337
1338
1339
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1336

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

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

Resumes operation of the specified Dedicated capacity instance.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1371

def begin_resume_async(resource_group_name, dedicated_capacity_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, 'dedicated_capacity_name is nil' if dedicated_capacity_name.nil?
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MaxLength': '63'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length > 63
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MinLength': '3'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length < 3
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !dedicated_capacity_name.nil? && dedicated_capacity_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.PowerBIDedicated/capacities/{dedicatedCapacityName}/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,'dedicatedCapacityName' => dedicated_capacity_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.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

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

Resumes operation of the specified Dedicated capacity instance.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1354
1355
1356
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1354

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

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

Suspends operation of the specified dedicated capacity instance.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that



1238
1239
1240
1241
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1238

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

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

Suspends operation of the specified dedicated capacity instance.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1273

def begin_suspend_async(resource_group_name, dedicated_capacity_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, 'dedicated_capacity_name is nil' if dedicated_capacity_name.nil?
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MaxLength': '63'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length > 63
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MinLength': '3'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length < 3
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !dedicated_capacity_name.nil? && dedicated_capacity_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.PowerBIDedicated/capacities/{dedicatedCapacityName}/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,'dedicatedCapacityName' => dedicated_capacity_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.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

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

Suspends operation of the specified dedicated capacity instance.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1256
1257
1258
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1256

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

#begin_update(resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers: nil) ⇒ DedicatedCapacity

Updates the current state of the specified Dedicated capacity.

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

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_update_parameters (DedicatedCapacityUpdateParameters)

    Request

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

    A hash of custom headers that

Returns:

  • (DedicatedCapacity)

    operation results.



1108
1109
1110
1111
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1108

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

#begin_update_async(resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Updates the current state of the specified Dedicated capacity.

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

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_update_parameters (DedicatedCapacityUpdateParameters)

    Request

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1147

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

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'dedicatedCapacityName' => dedicated_capacity_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?
    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::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacity.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::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacity.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, dedicated_capacity_name, capacity_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates the current state of the specified Dedicated capacity.

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

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_update_parameters (DedicatedCapacityUpdateParameters)

    Request

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1128
1129
1130
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 1128

def begin_update_with_http_info(resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers:nil)
  begin_update_async(resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers:custom_headers).value!
end

#check_name_availability(location, capacity_parameters, custom_headers: nil) ⇒ CheckCapacityNameAvailabilityResult

Check the name availability in the target location.

into. of the capacity. will be added to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • capacity_parameters (CheckCapacityNameAvailabilityParameters)

    The name

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

    A hash of custom headers that

Returns:

  • (CheckCapacityNameAvailabilityResult)

    operation results.



764
765
766
767
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 764

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

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

Check the name availability in the target location.

into. of the capacity. to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • capacity_parameters (CheckCapacityNameAvailabilityParameters)

    The name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
846
847
848
849
850
851
852
853
854
855
856
857
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 797

def check_name_availability_async(location, capacity_parameters, custom_headers:nil)
  fail ArgumentError, 'location is nil' if location.nil?
  fail ArgumentError, 'capacity_parameters is nil' if capacity_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::PowerBiDedicated::Mgmt::V2017_10_01::Models::CheckCapacityNameAvailabilityParameters.mapper()
  request_content = @client.serialize(request_mapper,  capacity_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/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?
    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::PowerBiDedicated::Mgmt::V2017_10_01::Models::CheckCapacityNameAvailabilityResult.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, capacity_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Check the name availability in the target location.

into. of the capacity. will be added to the HTTP request.

Parameters:

  • location (String)

    The region name which the operation will lookup

  • capacity_parameters (CheckCapacityNameAvailabilityParameters)

    The name

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



781
782
783
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 781

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

#create(resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers: nil) ⇒ DedicatedCapacity

Provisions the specified Dedicated capacity based on the configuration specified in the request.

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

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_parameters (DedicatedCapacity)

    Contains the information used

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

    A hash of custom headers that

Returns:

  • (DedicatedCapacity)

    operation results.



151
152
153
154
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 151

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

#create_async(resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers: nil) ⇒ Concurrent::Promise

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

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_parameters (DedicatedCapacity)

    Contains the information used

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 170

def create_async(resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers:nil)
  # Send request
  promise = begin_create_async(resource_group_name, dedicated_capacity_name, capacity_parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacity.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, dedicated_capacity_name, custom_headers: nil) ⇒ Object

Deletes the specified Dedicated capacity.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that



199
200
201
202
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 199

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

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

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 216

def delete_async(resource_group_name, dedicated_capacity_name, custom_headers:nil)
  # Send request
  promise = begin_delete_async(resource_group_name, dedicated_capacity_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, dedicated_capacity_name, custom_headers: nil) ⇒ DedicatedCapacity

Gets details about the specified dedicated capacity.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (DedicatedCapacity)

    operation results.



39
40
41
42
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 39

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

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

Gets details about the specified dedicated capacity.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the dedicated capacity.

  • 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
132
133
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 74

def get_details_async(resource_group_name, dedicated_capacity_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, 'dedicated_capacity_name is nil' if dedicated_capacity_name.nil?
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MaxLength': '63'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length > 63
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MinLength': '3'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length < 3
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !dedicated_capacity_name.nil? && dedicated_capacity_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.PowerBIDedicated/capacities/{dedicatedCapacityName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'dedicatedCapacityName' => dedicated_capacity_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?
    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::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacity.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, dedicated_capacity_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets details about the specified dedicated capacity.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the dedicated capacity.

  • 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/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 57

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

#list(custom_headers: nil) ⇒ DedicatedCapacities

Lists all the Dedicated capacities 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:

  • (DedicatedCapacities)

    operation results.



479
480
481
482
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 479

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 Dedicated capacities 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.



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
550
551
552
553
554
555
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 504

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.PowerBIDedicated/capacities'

  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?
    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::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacities.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) ⇒ DedicatedCapacities

Gets all the Dedicated capacities for the given resource group.

which a given PowerBIDedicated capacity 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:

  • (DedicatedCapacities)

    operation results.



383
384
385
386
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 383

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 Dedicated capacities for the given resource group.

which a given PowerBIDedicated capacity 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.



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
466
467
468
469
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 414

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.PowerBIDedicated/capacities'

  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?
    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::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacities.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 Dedicated capacities for the given resource group.

which a given PowerBIDedicated capacity 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.



399
400
401
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 399

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_skus(custom_headers: nil) ⇒ SkuEnumerationForNewResourceResult

Lists eligible SKUs for PowerBI Dedicated 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.



565
566
567
568
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 565

def list_skus(custom_headers:nil)
  response = list_skus_async(custom_headers:custom_headers).value!
  response.body unless response.nil?
end

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

Lists eligible SKUs for PowerBI Dedicated 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.



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
634
635
636
637
638
639
640
641
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 590

def list_skus_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.PowerBIDedicated/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?
    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::PowerBiDedicated::Mgmt::V2017_10_01::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_capacity(resource_group_name, dedicated_capacity_name, custom_headers: nil) ⇒ SkuEnumerationForExistingResourceResult

Lists eligible SKUs for a PowerBI Dedicated resource.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (SkuEnumerationForExistingResourceResult)

    operation results.



656
657
658
659
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 656

def list_skus_for_capacity(resource_group_name, dedicated_capacity_name, custom_headers:nil)
  response = list_skus_for_capacity_async(resource_group_name, dedicated_capacity_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_skus_for_capacity_async(resource_group_name, dedicated_capacity_name, custom_headers: nil) ⇒ Concurrent::Promise

Lists eligible SKUs for a PowerBI Dedicated resource.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
741
742
743
744
745
746
747
748
749
750
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 691

def list_skus_for_capacity_async(resource_group_name, dedicated_capacity_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, 'dedicated_capacity_name is nil' if dedicated_capacity_name.nil?
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MaxLength': '63'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length > 63
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'MinLength': '3'" if !dedicated_capacity_name.nil? && dedicated_capacity_name.length < 3
  fail ArgumentError, "'dedicated_capacity_name' should satisfy the constraint - 'Pattern': '^[a-z][a-z0-9]*$'" if !dedicated_capacity_name.nil? && dedicated_capacity_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.PowerBIDedicated/capacities/{dedicatedCapacityName}/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,'dedicatedCapacityName' => dedicated_capacity_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?
    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::PowerBiDedicated::Mgmt::V2017_10_01::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_capacity_with_http_info(resource_group_name, dedicated_capacity_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists eligible SKUs for a PowerBI Dedicated resource.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



674
675
676
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 674

def list_skus_for_capacity_with_http_info(resource_group_name, dedicated_capacity_name, custom_headers:nil)
  list_skus_for_capacity_async(resource_group_name, dedicated_capacity_name, custom_headers:custom_headers).value!
end

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

Lists eligible SKUs for PowerBI Dedicated 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.



578
579
580
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 578

def list_skus_with_http_info(custom_headers:nil)
  list_skus_async(custom_headers:custom_headers).value!
end

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

Lists all the Dedicated capacities 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.



492
493
494
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 492

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

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

Resumes operation of the specified Dedicated capacity instance.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that



339
340
341
342
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 339

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

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

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 356

def resume_async(resource_group_name, dedicated_capacity_name, custom_headers:nil)
  # Send request
  promise = begin_resume_async(resource_group_name, dedicated_capacity_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, dedicated_capacity_name, custom_headers: nil) ⇒ Object

Suspends operation of the specified dedicated capacity instance.

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that



295
296
297
298
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 295

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

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

which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90. It must 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

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 312

def suspend_async(resource_group_name, dedicated_capacity_name, custom_headers:nil)
  # Send request
  promise = begin_suspend_async(resource_group_name, dedicated_capacity_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, dedicated_capacity_name, capacity_update_parameters, custom_headers: nil) ⇒ DedicatedCapacity

Updates the current state of the specified Dedicated capacity.

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

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_update_parameters (DedicatedCapacityUpdateParameters)

    Request

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

    A hash of custom headers that

Returns:

  • (DedicatedCapacity)

    operation results.



247
248
249
250
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 247

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

#update_async(resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise

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

response.

Parameters:

  • resource_group_name (String)

    The name of the Azure Resource group of

  • dedicated_capacity_name (String)

    The name of the Dedicated capacity.

  • capacity_update_parameters (DedicatedCapacityUpdateParameters)

    Request

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# File 'lib/2017-10-01/generated/azure_mgmt_powerbi_dedicated/capacities.rb', line 266

def update_async(resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers:nil)
  # Send request
  promise = begin_update_async(resource_group_name, dedicated_capacity_name, capacity_update_parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::PowerBiDedicated::Mgmt::V2017_10_01::Models::DedicatedCapacity.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