/// <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 a list of Azure SQL Database restore points.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the 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 from which to retrieve
 /// available restore points.
 /// </param>
 /// <returns>
 /// Represents the response to a List Azure Sql Database restore points
 /// request.
 /// </returns>
 public static RestorePointListResponse ListRestorePoints(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDatabaseBackupOperations)s).ListRestorePointsAsync(resourceGroupName, serverName, databaseName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#3
0
 /// <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._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._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>
 /// Returns a list of Azure SQL Database restore points.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the 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 from which to retrieve
 /// available restore points.
 /// </param>
 /// <returns>
 /// Represents the response to a List Azure Sql Database restore points
 /// request.
 /// </returns>
 public static Task <RestorePointListResponse> ListRestorePointsAsync(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     return(operations.ListRestorePointsAsync(resourceGroupName, serverName, databaseName, CancellationToken.None));
 }
示例#5
0
 /// <summary>
 /// Returns a list of Azure SQL deleted database backups (a resource
 /// representing a deleted database that can be restored).
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the server
 /// belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server to retrieve
 /// deleted databases for.
 /// </param>
 /// <returns>
 /// Represents the response to a List Azure Sql Database deleted
 /// database backups request.
 /// </returns>
 public static Task <DeletedDatabaseBackupListResponse> ListDeletedDatabaseBackupsAsync(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName)
 {
     return(operations.ListDeletedDatabaseBackupsAsync(resourceGroupName, serverName, CancellationToken.None));
 }
示例#6
0
 /// <summary>
 /// Begins creating or updating an Azure SQL Server backup
 /// LongTermRetention vault. To determine the status of the operation
 /// call GetBackupLongTermRetentionVaultOperationStatus.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Server belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Server on which the database is
 /// hosted.
 /// </param>
 /// <param name='backupLongTermRetentionVaultName'>
 /// Required. The name of the Azure SQL Server backup LongTermRetention
 /// vault.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a backup
 /// LongTermRetention vault.
 /// </param>
 /// <returns>
 /// Response for long running Azure operations.
 /// </returns>
 public static BackupLongTermRetentionVaultCreateOrUpdateResponse BeginCreateOrUpdateBackupLongTermRetentionVault(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string backupLongTermRetentionVaultName, BackupLongTermRetentionVaultCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDatabaseBackupOperations)s).BeginCreateOrUpdateBackupLongTermRetentionVaultAsync(resourceGroupName, serverName, backupLongTermRetentionVaultName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#7
0
 /// <summary>
 /// Returns a list of Azure SQL Database backup LongTermRetention
 /// policies
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the resource
 /// belongs.
 /// </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>
 /// <returns>
 /// Represents the response to a List Azure Sql Database backup
 /// LongTermRetention policy request.
 /// </returns>
 public static Task <DatabaseBackupLongTermRetentionPolicyListResponse> ListDatabaseBackupLongTermRetentionPoliciesAsync(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     return(operations.ListDatabaseBackupLongTermRetentionPoliciesAsync(resourceGroupName, serverName, databaseName, CancellationToken.None));
 }
示例#8
0
 /// <summary>
 /// Gets the status of an Azure Sql Database backup LongTermRetention
 /// policy create or update operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation
 /// </param>
 /// <returns>
 /// Response for long running Azure operations.
 /// </returns>
 public static Task <DatabaseBackupLongTermRetentionPolicyCreateOrUpdateResponse> GetDatabaseBackupLongTermRetentionPolicyOperationStatusAsync(this IDatabaseBackupOperations operations, string operationStatusLink)
 {
     return(operations.GetDatabaseBackupLongTermRetentionPolicyOperationStatusAsync(operationStatusLink, CancellationToken.None));
 }
示例#9
0
 /// <summary>
 /// Returns an Azure SQL Database geo backup.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the server
 /// belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server to retrieve geo
 /// backups for.
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the Azure SQL Database to retrieve geo
 /// backups for.
 /// </param>
 /// <returns>
 /// Represents the response to a Get Azure Sql Database geo backup
 /// request.
 /// </returns>
 public static Task <GeoBackupGetResponse> GetGeoBackupAsync(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     return(operations.GetGeoBackupAsync(resourceGroupName, serverName, databaseName, CancellationToken.None));
 }
示例#10
0
 /// <summary>
 /// Gets the status of an Azure Sql Database backup LongTermRetention
 /// policy create or update operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation
 /// </param>
 /// <returns>
 /// Response for long running Azure operations.
 /// </returns>
 public static DatabaseBackupLongTermRetentionPolicyCreateOrUpdateResponse GetDatabaseBackupLongTermRetentionPolicyOperationStatus(this IDatabaseBackupOperations operations, string operationStatusLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDatabaseBackupOperations)s).GetDatabaseBackupLongTermRetentionPolicyOperationStatusAsync(operationStatusLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#11
0
 /// <summary>
 /// Returns an Azure SQL Database backup LongTermRetention policy
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the resource
 /// belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server.
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the Azure SQL Database.
 /// </param>
 /// <param name='backupLongTermRetentionPolicyName'>
 /// Required. The name of the Azure SQL Database backup
 /// LongTermRetention policy.
 /// </param>
 /// <returns>
 /// Represents the response to a Get Azure Sql Database backup
 /// LongTermRetention policy request.
 /// </returns>
 public static DatabaseBackupLongTermRetentionPolicyGetResponse GetDatabaseBackupLongTermRetentionPolicy(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string databaseName, string backupLongTermRetentionPolicyName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDatabaseBackupOperations)s).GetDatabaseBackupLongTermRetentionPolicyAsync(resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#12
0
 /// <summary>
 /// Returns an Azure SQL Server backup LongTermRetention vault
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the resource
 /// belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server.
 /// </param>
 /// <param name='backupLongTermRetentionVaultName'>
 /// Required. The name of the Azure SQL Database backup
 /// LongTermRetention vault.
 /// </param>
 /// <returns>
 /// Represents the response to a Get Azure Sql Server backup
 /// LongTermRetention vault request.
 /// </returns>
 public static Task <BackupLongTermRetentionVaultGetResponse> GetBackupLongTermRetentionVaultAsync(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string backupLongTermRetentionVaultName)
 {
     return(operations.GetBackupLongTermRetentionVaultAsync(resourceGroupName, serverName, backupLongTermRetentionVaultName, CancellationToken.None));
 }
示例#13
0
 /// <summary>
 /// Creates or updates an Azure SQL Database backup LongTermRetention
 /// policy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the server
 /// belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Server on which the database is
 /// hosted.
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the Azure SQL Database to be operated on
 /// (Updated or created).
 /// </param>
 /// <param name='backupLongTermRetentionPolicyName'>
 /// Required. The name of the Azure SQL Database backup
 /// LongTermRetention policy.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a
 /// database backup LongTermRetention policy.
 /// </param>
 /// <returns>
 /// Response for long running Azure operations.
 /// </returns>
 public static Task <DatabaseBackupLongTermRetentionPolicyCreateOrUpdateResponse> CreateOrUpdateDatabaseBackupLongTermRetentionPolicyAsync(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string databaseName, string backupLongTermRetentionPolicyName, DatabaseBackupLongTermRetentionPolicyCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateDatabaseBackupLongTermRetentionPolicyAsync(resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName, parameters, CancellationToken.None));
 }
示例#14
0
 /// <summary>
 /// Begins creating or updating an Azure SQL Server backup
 /// LongTermRetention vault. To determine the status of the operation
 /// call GetBackupLongTermRetentionVaultOperationStatus.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IDatabaseBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Server belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Server on which the database is
 /// hosted.
 /// </param>
 /// <param name='backupLongTermRetentionVaultName'>
 /// Required. The name of the Azure SQL Server backup LongTermRetention
 /// vault.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a backup
 /// LongTermRetention vault.
 /// </param>
 /// <returns>
 /// Response for long running Azure operations.
 /// </returns>
 public static Task <BackupLongTermRetentionVaultCreateOrUpdateResponse> BeginCreateOrUpdateBackupLongTermRetentionVaultAsync(this IDatabaseBackupOperations operations, string resourceGroupName, string serverName, string backupLongTermRetentionVaultName, BackupLongTermRetentionVaultCreateOrUpdateParameters parameters)
 {
     return(operations.BeginCreateOrUpdateBackupLongTermRetentionVaultAsync(resourceGroupName, serverName, backupLongTermRetentionVaultName, parameters, CancellationToken.None));
 }