public void ElasticLoadBalancingModifyLoadBalancerAttributes()
        {
            #region elb-modify-load-balancer-attributes-1

            var response = client.ModifyLoadBalancerAttributes(new ModifyLoadBalancerAttributesRequest
            {
                LoadBalancerAttributes = new LoadBalancerAttributes {
                    CrossZoneLoadBalancing = new CrossZoneLoadBalancing {
                        Enabled = true
                    }
                },
                LoadBalancerName = "my-load-balancer"
            });

            LoadBalancerAttributes loadBalancerAttributes = response.LoadBalancerAttributes;
            string loadBalancerName = response.LoadBalancerName;

            #endregion
        }
示例#2
0
 private Amazon.ElasticLoadBalancing.Model.ModifyLoadBalancerAttributesResponse CallAWSServiceOperation(IAmazonElasticLoadBalancing client, Amazon.ElasticLoadBalancing.Model.ModifyLoadBalancerAttributesRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing", "ModifyLoadBalancerAttributes");
     try
     {
         #if DESKTOP
         return(client.ModifyLoadBalancerAttributes(request));
         #elif CORECLR
         return(client.ModifyLoadBalancerAttributesAsync(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;
     }
 }