/// <summary> /// Get a scan ruleset /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scanRulesetName'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ScanRuleset> GetAsync(this IScanRulesets operations, string scanRulesetName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(scanRulesetName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or Updates a scan ruleset /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scanRulesetName'> /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ScanRuleset> CreateOrUpdateAsync(this IScanRulesets operations, string scanRulesetName, ScanRuleset body = default(ScanRuleset), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scanRulesetName, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List scan rulesets in Data catalog /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='skipToken'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ScanRulesetList> ListAllAsync(this IScanRulesets operations, string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListAllWithHttpMessagesAsync(skipToken, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes a scan ruleset /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scanRulesetName'> /// </param> public static void Delete(this IScanRulesets operations, string scanRulesetName) { operations.DeleteAsync(scanRulesetName).GetAwaiter().GetResult(); }
/// <summary> /// Creates or Updates a scan ruleset /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scanRulesetName'> /// </param> /// <param name='body'> /// </param> public static ScanRuleset CreateOrUpdate(this IScanRulesets operations, string scanRulesetName, ScanRuleset body = default(ScanRuleset)) { return(operations.CreateOrUpdateAsync(scanRulesetName, body).GetAwaiter().GetResult()); }
/// <summary> /// Get a scan ruleset /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scanRulesetName'> /// </param> public static ScanRuleset Get(this IScanRulesets operations, string scanRulesetName) { return(operations.GetAsync(scanRulesetName).GetAwaiter().GetResult()); }
/// <summary> /// List scan rulesets in Data catalog /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='skipToken'> /// </param> public static ScanRulesetList ListAll(this IScanRulesets operations, string skipToken = default(string)) { return(operations.ListAllAsync(skipToken).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a scan ruleset /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scanRulesetName'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IScanRulesets operations, string scanRulesetName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(scanRulesetName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }