/// <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='managedInstanceName'> /// The name of the managed instance. /// </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 <DatabaseVulnerabilityAssessment> GetAsync(this IManagedDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, 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='managedInstanceName'> /// The name of the managed instance. /// </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 IManagedDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, DatabaseVulnerabilityAssessment parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, managedInstanceName, 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='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='databaseName'> /// The name of the database for which the vulnerability assessment is defined. /// </param> public static DatabaseVulnerabilityAssessment Get(this IManagedDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName) { return(operations.GetAsync(resourceGroupName, managedInstanceName, databaseName).GetAwaiter().GetResult()); }
/// <summary> /// Lists the vulnerability assessments of a managed 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 <DatabaseVulnerabilityAssessment> > ListByDatabaseNextAsync(this IManagedDatabaseVulnerabilityAssessmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the vulnerability assessments of a managed 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 IManagedDatabaseVulnerabilityAssessmentsOperations 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='managedInstanceName'> /// The name of the managed instance. /// </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 IManagedDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <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='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='databaseName'> /// The name of the database for which the vulnerability assessment is defined. /// </param> public static void Delete(this IManagedDatabaseVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName, string databaseName) { operations.DeleteAsync(resourceGroupName, managedInstanceName, databaseName).GetAwaiter().GetResult(); }