public void ElasticLoadBalancingV2ModifyListener()
        {
            #region elbv2-modify-listener-1

            var response = client.ModifyListener(new ModifyListenerRequest
            {
                DefaultActions = new List <Action> {
                    new Action {
                        TargetGroupArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-new-targets/2453ed029918f21f",
                        Type           = "forward"
                    }
                },
                ListenerArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2"
            });

            List <Listener> listeners = response.Listeners;

            #endregion
        }
Пример #2
0
 private Amazon.ElasticLoadBalancingV2.Model.ModifyListenerResponse CallAWSServiceOperation(IAmazonElasticLoadBalancingV2 client, Amazon.ElasticLoadBalancingV2.Model.ModifyListenerRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing V2", "ModifyListener");
     try
     {
         #if DESKTOP
         return(client.ModifyListener(request));
         #elif CORECLR
         return(client.ModifyListenerAsync(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;
     }
 }