Ejemplo n.º 1
0
 public static async Task <Listener> CreateHttpListenerAsync(
     this ELBHelper elbh,
     string loadBalancerArn,
     string targetGroupArn,
     int port,
     CancellationToken cancellationToken = default(CancellationToken))
 => (await elbh.CreateListenerAsync(
         port,
         ProtocolEnum.HTTP,
         loadBalancerArn,
         targetGroupArn,
         ActionTypeEnum.Forward,
         null,
         null,
         cancellationToken).EnsureSuccessAsync()).Listeners.Single();
Ejemplo n.º 2
0
 public static async Task <Listener> CreateHttpsListenerAsync(
     this ELBHelper elbh,
     string loadBalancerArn,
     string targetGroupArn,
     string certificateArn,
     CancellationToken cancellationToken = default(CancellationToken))
 => (await elbh.CreateListenerAsync(
         443,
         ProtocolEnum.HTTPS,
         loadBalancerArn,
         targetGroupArn,
         ActionTypeEnum.Forward,
         new Certificate[] { new Certificate()
                             {
                                 CertificateArn = certificateArn
                             } },
         "ELBSecurityPolicy-2016-08",
         cancellationToken).EnsureSuccessAsync()).Listeners.Single();