public async Task UpdateDomainWAFRuleSetAsync_ExpectedResult() { var req = new UpdateWAFRuleSetRequest() { Active = false }; var ops = new DomainWAFRuleSetOperations <WAFRuleSet>(_client); await ops.UpdateDomainWAFRuleSetAsync("test-domain.co.uk", "00000000-0000-0000-0000-000000000000", req); await _client.Received() .PatchAsync($"/ddosx/v1/domains/test-domain.co.uk/waf/rulesets/00000000-0000-0000-0000-000000000000", req); }
public async Task UpdateDomainWAFRuleSetAsync(string domainName, string ruleSetID, UpdateWAFRuleSetRequest req) { if (string.IsNullOrWhiteSpace(domainName)) { throw new UKFastClientValidationException("Invalid domain name"); } if (string.IsNullOrWhiteSpace(ruleSetID)) { throw new UKFastClientValidationException("Invalid rule set id"); } await Client.PatchAsync($"/ddosx/v1/domains/{domainName}/waf/rulesets/{ruleSetID}", req); }