/// <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._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._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 information about Azure SQL Job Accounts. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations. /// </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 that the Job /// Accounts are hosted in. /// </param> /// <returns> /// Represents the response to a List Azure Sql Job Accounts request. /// </returns> public static JobAccountListResponse List(this IJobAccountOperations operations, string resourceGroupName, string serverName) { return(Task.Factory.StartNew((object s) => { return ((IJobAccountOperations)s).ListAsync(resourceGroupName, serverName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Begins creating a new Azure SQL Job Account or updating an existing /// Azure SQL Job Account. To determine the status of the operation /// call GetJobAccountOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations. /// </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 that the Job /// Account is hosted in. /// </param> /// <param name='jobAccountName'> /// Required. The name of the Azure SQL Job Account to be created or /// updated. /// </param> /// <param name='parameters'> /// Required. The required parameters for creating or updating a Job /// Account. /// </param> /// <returns> /// Response for long running Azure Sql Job Account operations. /// </returns> public static JobAccountOperationResponse BeginCreateOrUpdate(this IJobAccountOperations operations, string resourceGroupName, string serverName, string jobAccountName, JobAccountCreateOrUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IJobAccountOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, serverName, jobAccountName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets the status of an Azure Sql Job Account create or update /// operation. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation /// </param> /// <returns> /// Response for long running Azure Sql Job Account operations. /// </returns> public static JobAccountOperationResponse GetJobAccountOperationStatus(this IJobAccountOperations operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((IJobAccountOperations)s).GetJobAccountOperationStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Returns information about Azure SQL Job Accounts. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations. /// </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 that the Job /// Accounts are hosted in. /// </param> /// <returns> /// Represents the response to a List Azure Sql Job Accounts request. /// </returns> public static Task <JobAccountListResponse> ListAsync(this IJobAccountOperations operations, string resourceGroupName, string serverName) { return(operations.ListAsync(resourceGroupName, serverName, CancellationToken.None)); }
/// <summary> /// Gets the status of an Azure Sql Job Account create or update /// operation. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation /// </param> /// <returns> /// Response for long running Azure Sql Job Account operations. /// </returns> public static Task <JobAccountOperationResponse> GetJobAccountOperationStatusAsync(this IJobAccountOperations operations, string operationStatusLink) { return(operations.GetJobAccountOperationStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// Creates a new Azure SQL Job Account or updates an existing Azure /// SQL Job Account. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations. /// </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 Job Database Server that the /// Job Account is hosted in. /// </param> /// <param name='jobAccountName'> /// Required. The name of the Azure SQL Job Account to be created or /// updated. /// </param> /// <param name='parameters'> /// Required. The required parameters for creating or updating a Job /// Account. /// </param> /// <returns> /// Response for long running Azure Sql Job Account operations. /// </returns> public static Task <JobAccountOperationResponse> CreateOrUpdateAsync(this IJobAccountOperations operations, string resourceGroupName, string serverName, string jobAccountName, JobAccountCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, jobAccountName, parameters, CancellationToken.None)); }
/// <summary> /// Begins deleting the Azure SQL Job Account with the given name. To /// determine the status of the operation call /// GetJobAccountOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations. /// </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 that the Job /// Account is hosted in. /// </param> /// <param name='jobAccountName'> /// Required. The name of the Azure SQL Job Account to be deleted. /// </param> /// <returns> /// Response for long running Azure Sql Job Account operations. /// </returns> public static Task <JobAccountOperationResponse> BeginDeleteAsync(this IJobAccountOperations operations, string resourceGroupName, string serverName, string jobAccountName) { return(operations.BeginDeleteAsync(resourceGroupName, serverName, jobAccountName, CancellationToken.None)); }