Ejemplo n.º 1
0
 public virtual Response <DatabaseAccountMongodbDatabaseCollectionThroughputSetting> Get(CancellationToken cancellationToken = default)
 {
     using var scope = _databaseAccountMongodbDatabaseCollectionThroughputSettingMongoDBResourcesClientDiagnostics.CreateScope("DatabaseAccountMongodbDatabaseCollectionThroughputSetting.Get");
     scope.Start();
     try
     {
         var response = _databaseAccountMongodbDatabaseCollectionThroughputSettingMongoDBResourcesRestClient.GetMongoDBCollectionThroughput(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken);
         if (response.Value == null)
         {
             throw new RequestFailedException(response.GetRawResponse());
         }
         return(Response.FromValue(new DatabaseAccountMongodbDatabaseCollectionThroughputSetting(Client, response.Value), response.GetRawResponse()));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }