/// <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 Server Administrators. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServerAdministratorOperations. /// </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 to which the Azure SQL /// Server Active Directory administrators belongs. /// </param> /// <returns> /// Represents the response to a List Azure SQL Active Directory /// Administrators request. /// </returns> public static ServerAdministratorListResponse List(this IServerAdministratorOperations operations, string resourceGroupName, string serverName) { return(Task.Factory.StartNew((object s) => { return ((IServerAdministratorOperations)s).ListAsync(resourceGroupName, serverName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Begins creating a new Azure SQL Server Active Directory /// Administrator or updating an existing Azure SQL Server Active /// Directory Administrator. To determine the status of the operation /// call GetServerAdministratorOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServerAdministratorOperations. /// </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 to which the Azure SQL /// Server Active Directory administrator belongs /// </param> /// <param name='administratorName'> /// Required. The name of the Azure SQL Server Active Directory /// Administrator. /// </param> /// <param name='parameters'> /// Required. The required parameters for createing or updating an /// Active Directory Administrator. /// </param> /// <returns> /// Response for long running Azure SQL Server Active Directory /// Administrator operations. /// </returns> public static ServerAdministratorCreateOrUpdateResponse BeginCreateOrUpdate(this IServerAdministratorOperations operations, string resourceGroupName, string serverName, string administratorName, ServerAdministratorCreateOrUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IServerAdministratorOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of Azure SQL Server Administrators. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServerAdministratorOperations. /// </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 to which the Azure SQL /// Server Active Directory administrators belongs. /// </param> /// <returns> /// Represents the response to a List Azure SQL Active Directory /// Administrators request. /// </returns> public static Task <ServerAdministratorListResponse> ListAsync(this IServerAdministratorOperations operations, string resourceGroupName, string serverName) { return(operations.ListAsync(resourceGroupName, serverName, CancellationToken.None)); }
/// <summary> /// Gets the status of an Azure SQL Server Active Directory /// Administrator create or update operation. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServerAdministratorOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation /// </param> /// <returns> /// Response for long running Azure SQL Server Active Directory /// Administrator operations. /// </returns> public static Task <ServerAdministratorCreateOrUpdateResponse> GetServerAdministratorOperationStatusAsync(this IServerAdministratorOperations operations, string operationStatusLink) { return(operations.GetServerAdministratorOperationStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// Gets the status of an Azure SQL Server Active Directory /// Administrator create or update operation. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServerAdministratorOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation /// </param> /// <returns> /// Response for long running Azure SQL Server Active Directory /// Administrator operations. /// </returns> public static ServerAdministratorCreateOrUpdateResponse GetServerAdministratorOperationStatus(this IServerAdministratorOperations operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((IServerAdministratorOperations)s).GetServerAdministratorOperationStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Creates a new Azure SQL Server Active Directory Administrator or /// updates an existing Azure SQL Server Active Directory /// Administrator. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServerAdministratorOperations. /// </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 Azure SQL /// Server Active Directory Administrator is hosted. /// </param> /// <param name='administratorName'> /// Required. The name of the Azure SQL Server Active Directory /// Administrator to be operated on (Updated or created). /// </param> /// <param name='parameters'> /// Required. The required parameters for creating or updating a Server /// Administrator. /// </param> /// <returns> /// Response for long running Azure SQL Server Active Directory /// Administrator operations. /// </returns> public static Task <ServerAdministratorCreateOrUpdateResponse> CreateOrUpdateAsync(this IServerAdministratorOperations operations, string resourceGroupName, string serverName, string administratorName, ServerAdministratorCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters, CancellationToken.None)); }
/// <summary> /// Begins deleting an existing Azure SQL Server Active Directory /// Administrator.To determine the status of the operation call /// GetServerAdministratorDeleteOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServerAdministratorOperations. /// </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 to which the Azure SQL /// Server Active Directory administrator belongs /// </param> /// <param name='administratorName'> /// Required. The name of the Azure SQL Server Active Directory /// Administrator. /// </param> /// <returns> /// Response for long running Azure SQL Server Active Directory /// administrator delete operations. /// </returns> public static Task <ServerAdministratorDeleteResponse> BeginDeleteAsync(this IServerAdministratorOperations operations, string resourceGroupName, string serverName, string administratorName) { return(operations.BeginDeleteAsync(resourceGroupName, serverName, administratorName, CancellationToken.None)); }