/// <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 information about an Azure SQL Database Server Service /// Objectives. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServiceObjectiveOperations. /// </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 Server. /// </param> /// <param name='serviceObjectiveName'> /// Required. The name of the service objective to retrieve. /// </param> /// <returns> /// Represents the response to a Get Azure Sql Database Service /// Objective request. /// </returns> public static ServiceObjectiveGetResponse Get(this IServiceObjectiveOperations operations, string resourceGroupName, string serverName, string serviceObjectiveName) { return(Task.Factory.StartNew((object s) => { return ((IServiceObjectiveOperations)s).GetAsync(resourceGroupName, serverName, serviceObjectiveName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the SqlManagementClient class. /// </summary> private SqlManagementClient() : base() { this._dac = new DacOperations(this); this._databaseOperations = new DatabaseOperationOperations(this); this._databases = new DatabaseOperations(this); this._firewallRules = new FirewallRuleOperations(this); this._servers = new ServerOperations(this); this._serviceObjectives = new ServiceObjectiveOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <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._databases = new DatabaseOperations(this); this._dataMasking = new DataMaskingOperations(this); this._firewallRules = new FirewallRuleOperations(this); this._secureConnection = new SecureConnectionPolicyOperations(this); this._servers = new ServerOperations(this); this._serviceObjectives = new ServiceObjectiveOperations(this); this._apiVersion = "2014-04-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the SqlManagementClient class. /// </summary> private SqlManagementClient() : base() { this._dac = new DacOperations(this); this._databaseCopies = new DatabaseCopyOperations(this); this._databaseOperations = new DatabaseOperationOperations(this); this._databases = new DatabaseOperations(this); this._firewallRules = new FirewallRuleOperations(this); this._quotas = new QuotaOperations(this); this._recoverableDatabases = new RecoverableDatabaseOperations(this); this._recoverDatabaseOperations = new RecoverDatabaseOperations(this); this._restorableDroppedDatabases = new RestorableDroppedDatabaseOperations(this); this._restoreDatabaseOperations = new RestoreDatabaseOperations(this); this._servers = new ServerOperations(this); this._serviceObjectives = new ServiceObjectiveOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Returns information about a certain Service Objective on a given Id. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IServiceObjectiveOperations. /// </param> /// <param name='serverName'> /// The name of the SQL Server to be queried. /// </param> /// <param name='serviceObjectiveId'> /// The Id of the Service Objective to be obtained. /// </param> /// <returns> /// Response containing the service objective for a given server and /// service objective Id. /// </returns> public static ServiceObjectiveGetResponse Get(this IServiceObjectiveOperations operations, string serverName, string serviceObjectiveId) { try { return(operations.GetAsync(serverName, serviceObjectiveId).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Returns information about all Service Objectives on a database /// server. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IServiceObjectiveOperations. /// </param> /// <param name='serverName'> /// The name of the database server to be queried. /// </param> /// <returns> /// Response containing the list of service objective for a given /// server. /// </returns> public static ServiceObjectiveListResponse List(this IServiceObjectiveOperations operations, string serverName) { try { return operations.ListAsync(serverName).Result; } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Initializes a new instance of the SqlManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> private SqlManagementClient(HttpClient httpClient) : base(httpClient) { this._dac = new DacOperations(this); this._databaseCopies = new DatabaseCopyOperations(this); this._databaseOperations = new DatabaseOperationOperations(this); this._databases = new DatabaseOperations(this); this._firewallRules = new FirewallRuleOperations(this); this._quotas = new QuotaOperations(this); this._recoverableDatabases = new RecoverableDatabaseOperations(this); this._recoverDatabaseOperations = new RecoverDatabaseOperations(this); this._restorableDroppedDatabases = new RestorableDroppedDatabaseOperations(this); this._restoreDatabaseOperations = new RestoreDatabaseOperations(this); this._servers = new ServerOperations(this); this._serviceObjectives = new ServiceObjectiveOperations(this); this._apiVersion = "2012-03-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <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._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 information about an Azure SQL Database Server Service /// Objectives. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Sql.LegacySdk.IServiceObjectiveOperations. /// </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 Server. /// </param> /// <param name='serviceObjectiveName'> /// Required. The name of the service objective to retrieve. /// </param> /// <returns> /// Represents the response to a Get Azure Sql Database Service /// Objective request. /// </returns> public static Task <ServiceObjectiveGetResponse> GetAsync(this IServiceObjectiveOperations operations, string resourceGroupName, string serverName, string serviceObjectiveName) { return(operations.GetAsync(resourceGroupName, serverName, serviceObjectiveName, CancellationToken.None)); }
/// <summary> /// Returns information about all Service Objectives on an Azure SQL /// Database Server. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IServiceObjectiveOperations. /// </param> /// <param name='serverName'> /// Required. The name of the Azure SQL Database Server to be queried. /// </param> /// <returns> /// Response containing the list of service objective for a given /// server. This is returnedfrom a call to List Service Objectives. /// </returns> public static Task <ServiceObjectiveListResponse> ListAsync(this IServiceObjectiveOperations operations, string serverName) { return(operations.ListAsync(serverName, CancellationToken.None)); }
/// <summary> /// Returns information about a certain Service Objective on a given Id. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IServiceObjectiveOperations. /// </param> /// <param name='serverName'> /// The name of the SQL Server to be queried. /// </param> /// <param name='serviceObjectiveId'> /// The Id of the Service Objective to be obtained. /// </param> /// <returns> /// Response containing the service objective for a given server and /// service objective Id. /// </returns> public static Task<ServiceObjectiveGetResponse> GetAsync(this IServiceObjectiveOperations operations, string serverName, string serviceObjectiveId) { return operations.GetAsync(serverName, serviceObjectiveId, CancellationToken.None); }