public void ElasticLoadBalancingV2ModifyRule()
        {
            #region elbv2-modify-rule-1

            var response = client.ModifyRule(new ModifyRuleRequest
            {
                Conditions = new List <RuleCondition> {
                    new RuleCondition {
                        Field  = "path-pattern",
                        Values = new List <string> {
                            "/images/*"
                        }
                    }
                },
                RuleArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee"
            });

            List <Rule> rules = response.Rules;

            #endregion
        }
コード例 #2
0
 private Amazon.ElasticLoadBalancingV2.Model.ModifyRuleResponse CallAWSServiceOperation(IAmazonElasticLoadBalancingV2 client, Amazon.ElasticLoadBalancingV2.Model.ModifyRuleRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing V2", "ModifyRule");
     try
     {
         #if DESKTOP
         return(client.ModifyRule(request));
         #elif CORECLR
         return(client.ModifyRuleAsync(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;
     }
 }