Exemple #1
0
 /// <summary>
 /// Gets the database's vulnerability assessment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database for which the vulnerability assessment is defined.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DatabaseVulnerabilityAssessmentInner> GetAsync(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Removes the database's vulnerability assessment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database for which the vulnerability assessment is defined.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #3
0
 /// <summary>
 /// Lists the vulnerability assessment policies associated with a database.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <DatabaseVulnerabilityAssessmentInner> > ListByDatabaseNextAsync(this IDatabaseVulnerabilityAssessmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #4
0
 /// <summary>
 /// Creates or updates the database's vulnerability assessment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database for which the vulnerability assessment is defined.
 /// </param>
 /// <param name='parameters'>
 /// The requested resource.
 /// </param>
 public static DatabaseVulnerabilityAssessment CreateOrUpdate(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseVulnerabilityAssessment parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult());
 }
Exemple #5
0
 /// <summary>
 /// Gets the database's vulnerability assessment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database for which the vulnerability assessment is defined.
 /// </param>
 public static DatabaseVulnerabilityAssessment Get(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     return(operations.GetAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult());
 }
Exemple #6
0
 /// <summary>
 /// Lists the vulnerability assessment policies associated with a database.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <DatabaseVulnerabilityAssessment> ListByDatabaseNext(this IDatabaseVulnerabilityAssessmentsOperations operations, string nextPageLink)
 {
     return(operations.ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemple #7
0
 /// <summary>
 /// Removes the database's vulnerability assessment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database for which the vulnerability assessment is defined.
 /// </param>
 public static void Delete(this IDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     operations.DeleteAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
 }