public void WAFRegionalCreateRule() { #region createrule-1474072675555 var response = client.CreateRule(new CreateRuleRequest { ChangeToken = "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", MetricName = "WAFByteHeaderRule", Name = "WAFByteHeaderRule" }); string changeToken = response.ChangeToken; Rule rule = response.Rule; #endregion }
private Amazon.WAFRegional.Model.CreateRuleResponse CallAWSServiceOperation(IAmazonWAFRegional client, Amazon.WAFRegional.Model.CreateRuleRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS WAF Regional", "CreateRule"); try { #if DESKTOP return(client.CreateRule(request)); #elif CORECLR return(client.CreateRuleAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }