title: What method(s) do I use to configure/update an Elastic Load Balancer via Java?
body: <p>I'm having some trouble configuring parts of my Elastic Load Balancer in AWS.  I don't have problems creating one but I'm having trouble figuring out how to configure the HealthCheck and what instances are connected behind the ELB.</p>
  
  <p>Here's my code to create the ELB.  This is all per the AWS API:</p>
  
  <pre><code>Listener Test_AS_Listener = new Listener()
      .withInstancePort(443)
      .withInstanceProtocol("HTTPS")
      .withLoadBalancerPort(443)
      .withProtocol("HTTPS")
      .withSSLCertificateId("arn:aws:iam::1111111111:server-certificate/test-certificate");
  
  CreateLoadBalancerRequest lbReq = new CreateLoadBalancerRequest()
      .withListeners(Test_AS_Listener)
      .withLoadBalancerName("TestLB")
      .withSecurityGroups("sg-11111111")
      .withSubnets("subnet-11111111");
  
  HealthCheck healthCK = new HealthCheck()
      .withHealthyThreshold(2)
      .withInterval(30)
      .withTarget("TCP:443")
      .withTimeout(5)
      .withUnhealthyThreshold(2);
  
  ConfigureHealthCheckRequest healthCheckReq = new ConfigureHealthCheckRequest()
      .withHealthCheck(healthCK)
      .withLoadBalancerName("TestLB");
  ConfigureHealthCheckResult confChkResult = new ConfigureHealthCheckResult()
      .withHealthCheck(healthCK);
  
  Instance inst = new Instance("i-11111111")
      .withInstanceId("TestLB");
  
  CreateLoadBalancerResult result = myELB.createLoadBalancer(lbReq);
  </code></pre>
  
  <p>Looking in the Javadocs for the CreateLoadBalancer method, I don't see where I can plug in the information about the health check and connecting my instance behind the ELB.  Can someone point me to the correct class/method to do this please?</p>
  
  <p>When I run my code, I can create an ELB that listens on the correct port/protocols as well as use the correct security groups, vpc, etc.  I just can't figure out how to make it route traffic to the correct instances or have the correct health check.</p>
  
  <p>Thanks in advance for your help.</p>