/// <summary>
 /// Gets the status of an Azure SQL Database Failover Group delete
 /// operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation
 /// </param>
 /// <returns>
 /// Response for long running Azure SQL Database Failover Group delete
 /// operations.
 /// </returns>
 public static FailoverGroupDeleteResponse GetDeleteOperationStatus(this IFailoverGroupOperations operations, string operationStatusLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IFailoverGroupOperations)s).GetDeleteOperationStatusAsync(operationStatusLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates an existing Azure SQL Database Failover Group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </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
 /// Azure SQL Database Failover Group is hosted.
 /// </param>
 /// <param name='failoverGroupName'>
 /// Required. The name of the Azure SQL Database Failover Group to be
 /// updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for patch updating an Azure Sql
 /// Databaser Failover Group.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Database Failover Group
 /// operation.
 /// </returns>
 public static FailoverGroupPatchUpdateResponse PatchUpdate(this IFailoverGroupOperations operations, string resourceGroupName, string serverName, string failoverGroupName, FailoverGroupPatchUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IFailoverGroupOperations)s).PatchUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns information about Azure SQL Database Failover Groups.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Database Serve belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server in which Azure
 /// SQL Database Failover Groups belong.
 /// </param>
 /// <returns>
 /// Represents the response to a List Azure Sql Failover Group request.
 /// </returns>
 public static FailoverGroupListResponse List(this IFailoverGroupOperations operations, string resourceGroupName, string serverName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IFailoverGroupOperations)s).ListAsync(resourceGroupName, serverName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #4
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._blobAuditing               = new BlobAuditingOperations(this);
     this._capabilities               = new CapabilitiesOperations(this);
     this._databaseActivation         = new DatabaseActivationOperations(this);
     this._databaseAdvisors           = new DatabaseAdvisorOperations(this);
     this._databaseBackup             = new DatabaseBackupOperations(this);
     this._databases                  = new DatabaseOperations(this);
     this._databaseRecommendedActions = new DatabaseRecommendedActionOperations(this);
     this._dataMasking                = new DataMaskingOperations(this);
     this._dataSync                             = new DataSyncOperations(this);
     this._elasticPoolAdvisors                  = new ElasticPoolAdvisorOperations(this);
     this._elasticPools                         = new ElasticPoolOperations(this);
     this._elasticPoolRecommendedActions        = new ElasticPoolRecommendedActionOperations(this);
     this._failoverGroups                       = new FailoverGroupOperations(this);
     this._firewallRules                        = new FirewallRuleOperations(this);
     this._importExport                         = new ImportExportOperations(this);
     this._jobAccounts                          = new JobAccountOperations(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._serverAdvisors                       = new ServerAdvisorOperations(this);
     this._communicationLinks                   = new ServerCommunicationLinkOperations(this);
     this._serverDisasterRecoveryConfigurations = new ServerDisasterRecoveryConfigurationOperations(this);
     this._serverKey                            = new ServerKeyOperations(this);
     this._servers = new ServerOperations(this);
     this._serverRecommendedActions  = new ServerRecommendedActionOperations(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>
 /// Updates an existing Azure SQL Database Failover Group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </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
 /// Azure SQL Database Failover Group is hosted.
 /// </param>
 /// <param name='failoverGroupName'>
 /// Required. The name of the Azure SQL Database Failover Group to be
 /// updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for patch updating an Azure Sql
 /// Databaser Failover Group.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Database Failover Group
 /// operation.
 /// </returns>
 public static Task <FailoverGroupPatchUpdateResponse> PatchUpdateAsync(this IFailoverGroupOperations operations, string resourceGroupName, string serverName, string failoverGroupName, FailoverGroupPatchUpdateParameters parameters)
 {
     return(operations.PatchUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Returns information about Azure SQL Database Failover Groups.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Database Serve belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server in which Azure
 /// SQL Database Failover Groups belong.
 /// </param>
 /// <returns>
 /// Represents the response to a List Azure Sql Failover Group request.
 /// </returns>
 public static Task <FailoverGroupListResponse> ListAsync(this IFailoverGroupOperations operations, string resourceGroupName, string serverName)
 {
     return(operations.ListAsync(resourceGroupName, serverName, CancellationToken.None));
 }
 /// <summary>
 /// Gets the status of an Azure Sql Database Failover Group Patch
 /// update operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Database Failover Group
 /// operation.
 /// </returns>
 public static Task <FailoverGroupPatchUpdateResponse> GetFailoverGroupPatchUpdateOperationStatusAsync(this IFailoverGroupOperations operations, string operationStatusLink)
 {
     return(operations.GetFailoverGroupPatchUpdateOperationStatusAsync(operationStatusLink, CancellationToken.None));
 }
 /// <summary>
 /// Issue the forced failover operation with data loss for the Azure
 /// SQL Database Failover Group with the given name.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </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
 /// Azure SQL Database Failover Group is hosted.
 /// </param>
 /// <param name='failoverGroupName'>
 /// Required. The name of the Azure SQL Database Failover Group to be
 /// force failovered.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Database Failover Group
 /// operation.
 /// </returns>
 public static Task <FailoverGroupForceFailoverResponse> ForceFailoverAllowDataLossAsync(this IFailoverGroupOperations operations, string resourceGroupName, string serverName, string failoverGroupName)
 {
     return(operations.ForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, CancellationToken.None));
 }
 /// <summary>
 /// Begins the failover operation without data loss for the Azure SQL
 /// Database Failover Group with the given name.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </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
 /// Azure SQL Database Failover Group is hosted.
 /// </param>
 /// <param name='failoverGroupName'>
 /// Required. The name of the Azure SQL Database Failover Group to be
 /// failovered.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Database Failover Group
 /// operation.
 /// </returns>
 public static Task <FailoverGroupFailoverResponse> BeginFailoverAsync(this IFailoverGroupOperations operations, string resourceGroupName, string serverName, string failoverGroupName)
 {
     return(operations.BeginFailoverAsync(resourceGroupName, serverName, failoverGroupName, CancellationToken.None));
 }
コード例 #10
0
 /// <summary>
 /// Deletes the Azure SQL Database Failover Group with the given name.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IFailoverGroupOperations.
 /// </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
 /// Azure SQL Database Failover Group is hosted.
 /// </param>
 /// <param name='failoverGroupName'>
 /// Required. The name of the Azure SQL Database Failover Group to be
 /// deleted.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IFailoverGroupOperations operations, string resourceGroupName, string serverName, string failoverGroupName)
 {
     return(operations.DeleteAsync(resourceGroupName, serverName, failoverGroupName, CancellationToken.None));
 }