Пример #1
0
 /// <summary>
 /// Gets the managed instance'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 for which the vulnerability assessment is
 /// defined.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ManagedInstanceVulnerabilityAssessment> GetAsync(this IManagedInstanceVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, managedInstanceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// Creates or updates the managed instance's vulnerability assessment. Learn
 /// more about setting SQL vulnerability assessment with managed identity -
 /// https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage
 /// </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 for which the vulnerability assessment is
 /// defined.
 /// </param>
 /// <param name='parameters'>
 /// The requested resource.
 /// </param>
 public static ManagedInstanceVulnerabilityAssessment CreateOrUpdate(this IManagedInstanceVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName, ManagedInstanceVulnerabilityAssessment parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).GetAwaiter().GetResult());
 }
Пример #3
0
 /// <summary>
 /// Gets the managed instance'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 for which the vulnerability assessment is
 /// defined.
 /// </param>
 public static ManagedInstanceVulnerabilityAssessment Get(this IManagedInstanceVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName)
 {
     return(operations.GetAsync(resourceGroupName, managedInstanceName).GetAwaiter().GetResult());
 }
Пример #4
0
 /// <summary>
 /// Gets the managed instance's vulnerability assessment policies.
 /// </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 <ManagedInstanceVulnerabilityAssessment> > ListByInstanceNextAsync(this IManagedInstanceVulnerabilityAssessmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByInstanceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #5
0
 /// <summary>
 /// Gets the managed instance's vulnerability assessment policies.
 /// </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 <ManagedInstanceVulnerabilityAssessment> ListByInstanceNext(this IManagedInstanceVulnerabilityAssessmentsOperations operations, string nextPageLink)
 {
     return(operations.ListByInstanceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Пример #6
0
 /// <summary>
 /// Removes the managed instance'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 for which the vulnerability assessment is
 /// defined.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IManagedInstanceVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, managedInstanceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #7
0
 /// <summary>
 /// Removes the managed instance'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 for which the vulnerability assessment is
 /// defined.
 /// </param>
 public static void Delete(this IManagedInstanceVulnerabilityAssessmentsOperations operations, string resourceGroupName, string managedInstanceName)
 {
     operations.DeleteAsync(resourceGroupName, managedInstanceName).GetAwaiter().GetResult();
 }