Example #1
0
 /// <summary>
 /// Gets all Azure SQL Database Server Keys for a server.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IServerKeyOperations.
 /// </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.
 /// </param>
 /// <returns>
 /// Represents the response to a List Azure Sql Server Key request.
 /// </returns>
 public static ServerKeyListResponse List(this IServerKeyOperations operations, string resourceGroupName, string serverName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerKeyOperations)s).ListAsync(resourceGroupName, serverName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #2
0
 /// <summary>
 /// Begins creating a new Azure SQL Server Key or updating an existing
 /// Azure SQL Server Key. To determine the status of the operation
 /// call GetCreateOrUpdateOperationStatus.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IServerKeyOperations.
 /// </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 to add the
 /// Server Key.
 /// </param>
 /// <param name='keyName'>
 /// Required. The name of the Azure SQL Server Key.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for createing or updating a
 /// Server Key.
 /// </param>
 /// <returns>
 /// Represents the response to a Azure Sql Server Key operation request.
 /// </returns>
 public static ServerKeyCreateOrUpdateResponse BeginCreateOrUpdate(this IServerKeyOperations operations, string resourceGroupName, string serverName, string keyName, ServerKeyCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerKeyOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #3
0
 /// <summary>
 /// Gets the status of an Azure SQL Server Key delete operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IServerKeyOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation
 /// </param>
 /// <returns>
 /// Represents the response to an Azure Sql Server Key Delete request.
 /// </returns>
 public static ServerKeyDeleteResponse GetDeleteOperationStatus(this IServerKeyOperations operations, string operationStatusLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerKeyOperations)s).GetDeleteOperationStatusAsync(operationStatusLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #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);
 }
Example #5
0
 /// <summary>
 /// Gets all Azure SQL Database Server Keys for a server.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IServerKeyOperations.
 /// </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.
 /// </param>
 /// <returns>
 /// Represents the response to a List Azure Sql Server Key request.
 /// </returns>
 public static Task <ServerKeyListResponse> ListAsync(this IServerKeyOperations operations, string resourceGroupName, string serverName)
 {
     return(operations.ListAsync(resourceGroupName, serverName, CancellationToken.None));
 }
Example #6
0
 /// <summary>
 /// Gets the status of an Azure SQL Server Key delete operation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IServerKeyOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation
 /// </param>
 /// <returns>
 /// Represents the response to an Azure Sql Server Key Delete request.
 /// </returns>
 public static Task <ServerKeyDeleteResponse> GetDeleteOperationStatusAsync(this IServerKeyOperations operations, string operationStatusLink)
 {
     return(operations.GetDeleteOperationStatusAsync(operationStatusLink, CancellationToken.None));
 }
Example #7
0
 /// <summary>
 /// Deletes an existing Azure SQL Server Key.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IServerKeyOperations.
 /// </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 Key belongs
 /// </param>
 /// <param name='keyName'>
 /// Required. The name of the Azure SQL Server Key to be deleted.
 /// </param>
 /// <returns>
 /// Represents the response to an Azure Sql Server Key Delete request.
 /// </returns>
 public static Task <ServerKeyDeleteResponse> DeleteAsync(this IServerKeyOperations operations, string resourceGroupName, string serverName, string keyName)
 {
     return(operations.DeleteAsync(resourceGroupName, serverName, keyName, CancellationToken.None));
 }
Example #8
0
 /// <summary>
 /// Creates a new Azure SQL Server Key or updates an existing Azure SQL
 /// Server Key.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.IServerKeyOperations.
 /// </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 to add the
 /// Server Key.
 /// </param>
 /// <param name='keyName'>
 /// Required. The name of the Azure SQL Server Key.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for createing or updating a
 /// Server Key.
 /// </param>
 /// <returns>
 /// Represents the response to a Azure Sql Server Key operation request.
 /// </returns>
 public static Task <ServerKeyCreateOrUpdateResponse> CreateOrUpdateAsync(this IServerKeyOperations operations, string resourceGroupName, string serverName, string keyName, ServerKeyCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters, CancellationToken.None));
 }