/// <summary>
 /// Initializes a new instance of the SqlManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public SqlManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._auditingPolicy                       = new AuditingPolicyOperations(this);
     this._capabilities                         = new CapabilitiesOperations(this);
     this._databaseActivation                   = new DatabaseActivationOperations(this);
     this._databaseBackup                       = new DatabaseBackupOperations(this);
     this._databases                            = new DatabaseOperations(this);
     this._dataMasking                          = new DataMaskingOperations(this);
     this._elasticPools                         = new ElasticPoolOperations(this);
     this._firewallRules                        = new FirewallRuleOperations(this);
     this._recommendedElasticPools              = new RecommendedElasticPoolOperations(this);
     this._recommendedIndexes                   = new RecommendedIndexOperations(this);
     this._databaseReplicationLinks             = new ReplicationLinkOperations(this);
     this._secureConnection                     = new SecureConnectionPolicyOperations(this);
     this._securityAlertPolicy                  = new SecurityAlertPolicyOperations(this);
     this._serverAdministrators                 = new ServerAdministratorOperations(this);
     this._communicationLinks                   = new ServerCommunicationLinkOperations(this);
     this._serverDisasterRecoveryConfigurations = new ServerDisasterRecoveryConfigurationOperations(this);
     this._servers                            = new ServerOperations(this);
     this._serverUpgrades                     = new ServerUpgradeOperations(this);
     this._serviceObjectives                  = new ServiceObjectiveOperations(this);
     this._serviceTierAdvisors                = new ServiceTierAdvisorOperations(this);
     this._transparentDataEncryption          = new TransparentDataEncryptionOperations(this);
     this._apiVersion                         = "2014-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Returns details on recommended index.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IRecommendedIndexOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL server.
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the Azure SQL database.
 /// </param>
 /// <param name='schemaName'>
 /// Required. The name of the Azure SQL database schema.
 /// </param>
 /// <param name='tableName'>
 /// Required. The name of the Azure SQL database table.
 /// </param>
 /// <param name='indexName'>
 /// Required. The name of the Azure SQL database recommended index.
 /// </param>
 /// <returns>
 /// Represents the response to a get recommended index request.
 /// </returns>
 public static RecommendedIndexGetResponse Get(this IRecommendedIndexOperations operations, string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string indexName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRecommendedIndexOperations)s).GetAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, indexName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the SqlManagementClient class.
 /// </summary>
 public SqlManagementClient()
     : base()
 {
     this._auditingPolicy          = new AuditingPolicyOperations(this);
     this._databaseActivation      = new DatabaseActivationOperations(this);
     this._databaseBackup          = new DatabaseBackupOperations(this);
     this._databases               = new DatabaseOperations(this);
     this._dataMasking             = new DataMaskingOperations(this);
     this._elasticPools            = new ElasticPoolOperations(this);
     this._firewallRules           = new FirewallRuleOperations(this);
     this._recommendedElasticPools = new RecommendedElasticPoolOperations(this);
     this._recommendedIndexes      = new RecommendedIndexOperations(this);
     this._secureConnection        = new SecureConnectionPolicyOperations(this);
     this._servers                            = new ServerOperations(this);
     this._serverUpgrades                     = new ServerUpgradeOperations(this);
     this._serviceObjectives                  = new ServiceObjectiveOperations(this);
     this._serviceTierAdvisors                = new ServiceTierAdvisorOperations(this);
     this._transparentDataEncryption          = new TransparentDataEncryptionOperations(this);
     this._apiVersion                         = "2014-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// We execute or cancel index operations by updating index state.
 /// Allowed state transitions are :Active          -> Pending
 /// - Start index creation processPending         -> Active
 /// - Cancel index creationActive/Pending  -> Ignored
 /// - Ignore index recommendation so it will no longer show
 /// in active recommendationsIgnored         -> Active           -
 /// Restore index recommendationSuccess         -> Pending Revert   -
 /// Revert index that has been createdPending Revert  -> Revert
 /// Canceled  - Cancel index revert operation
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IRecommendedIndexOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Database Server belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server on which the
 /// database is hosted.
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the Azure SQL Database.
 /// </param>
 /// <param name='schemaName'>
 /// Required. The name of the Azure SQL Database schema.
 /// </param>
 /// <param name='tableName'>
 /// Required. The name of the Azure SQL Database table.
 /// </param>
 /// <param name='indexName'>
 /// Required. The name of the Azure SQL Database recommended index.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for updating index state.
 /// </param>
 /// <returns>
 /// Represents the response to a get recommended index request.
 /// </returns>
 public static Task <RecommendedIndexUpdateResponse> UpdateAsync(this IRecommendedIndexOperations operations, string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string indexName, RecommendedIndexUpdateParameters parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, indexName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Returns details on recommended index.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IRecommendedIndexOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL server.
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the Azure SQL database.
 /// </param>
 /// <param name='schemaName'>
 /// Required. The name of the Azure SQL database schema.
 /// </param>
 /// <param name='tableName'>
 /// Required. The name of the Azure SQL database table.
 /// </param>
 /// <param name='indexName'>
 /// Required. The name of the Azure SQL database recommended index.
 /// </param>
 /// <returns>
 /// Represents the response to a get recommended index request.
 /// </returns>
 public static Task <RecommendedIndexGetResponse> GetAsync(this IRecommendedIndexOperations operations, string resourceGroupName, string serverName, string databaseName, string schemaName, string tableName, string indexName)
 {
     return(operations.GetAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, indexName, CancellationToken.None));
 }