public void AutoScalingAttachLoadBalancerTargetGroups() { #region autoscaling-attach-load-balancer-target-groups-1 var response = client.AttachLoadBalancerTargetGroups(new AttachLoadBalancerTargetGroupsRequest { AutoScalingGroupName = "my-auto-scaling-group", TargetGroupARNs = new List <string> { "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067" } }); #endregion }
private Amazon.AutoScaling.Model.AttachLoadBalancerTargetGroupsResponse CallAWSServiceOperation(IAmazonAutoScaling client, Amazon.AutoScaling.Model.AttachLoadBalancerTargetGroupsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Auto Scaling", "AttachLoadBalancerTargetGroups"); try { #if DESKTOP return(client.AttachLoadBalancerTargetGroups(request)); #elif CORECLR return(client.AttachLoadBalancerTargetGroupsAsync(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; } }