/// <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); } }
/// <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(); }
/// <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); } }
/// <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()); }
/// <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()); }
/// <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()); }
/// <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(); }