public virtual ArmOperation <DatabaseAccountTableThroughputSettingResource> MigrateTableToManualThroughput(WaitUntil waitUntil, CancellationToken cancellationToken = default)
 {
     using var scope = _databaseAccountTableThroughputSettingTableResourcesClientDiagnostics.CreateScope("DatabaseAccountTableThroughputSettingResource.MigrateTableToManualThroughput");
     scope.Start();
     try
     {
         var response  = _databaseAccountTableThroughputSettingTableResourcesRestClient.MigrateTableToManualThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken);
         var operation = new CosmosDBArmOperation <DatabaseAccountTableThroughputSettingResource>(new DatabaseAccountTableThroughputSettingOperationSource(Client), _databaseAccountTableThroughputSettingTableResourcesClientDiagnostics, Pipeline, _databaseAccountTableThroughputSettingTableResourcesRestClient.CreateMigrateTableToManualThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name).Request, response, OperationFinalStateVia.Location);
         if (waitUntil == WaitUntil.Completed)
         {
             operation.WaitForCompletion(cancellationToken);
         }
         return(operation);
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
Esempio n. 2
0
 public virtual TableResourceMigrateTableToManualThroughputOperation MigrateTableToManualThroughput(bool waitForCompletion = true, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("DatabaseAccountTableThroughputSetting.MigrateTableToManualThroughput");
     scope.Start();
     try
     {
         var response  = _tableResourcesRestClient.MigrateTableToManualThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken);
         var operation = new TableResourceMigrateTableToManualThroughputOperation(_clientDiagnostics, Pipeline, _tableResourcesRestClient.CreateMigrateTableToManualThroughputRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name).Request, response);
         if (waitForCompletion)
         {
             operation.WaitForCompletion(cancellationToken);
         }
         return(operation);
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }