public void ElasticLoadBalancingV2RegisterTargets() { #region elbv2-register-targets-1 var response = client.RegisterTargets(new RegisterTargetsRequest { TargetGroupArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067", Targets = new List <TargetDescription> { new TargetDescription { Id = "i-80c8dd94" }, new TargetDescription { Id = "i-ceddcd4d" } } }); #endregion }
private Amazon.ElasticLoadBalancingV2.Model.RegisterTargetsResponse CallAWSServiceOperation(IAmazonElasticLoadBalancingV2 client, Amazon.ElasticLoadBalancingV2.Model.RegisterTargetsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing V2", "RegisterTargets"); try { #if DESKTOP return(client.RegisterTargets(request)); #elif CORECLR return(client.RegisterTargetsAsync(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; } }