public void ElasticLoadBalancingV2DescribeTargetGroups()
        {
            #region elbv2-describe-target-groups-1

            var response = client.DescribeTargetGroups(new DescribeTargetGroupsRequest
            {
                TargetGroupArns = new List <string> {
                    "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067"
                }
            });

            List <TargetGroup> targetGroups = response.TargetGroups;

            #endregion
        }
        IEnumerable <DescribeTargetGroupsResponse> IPaginator <DescribeTargetGroupsResponse> .Paginate()
        {
            if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
            {
                throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
            }
            var marker = _request.Marker;
            DescribeTargetGroupsResponse response;

            do
            {
                _request.Marker = marker;
                response        = _client.DescribeTargetGroups(_request);
                marker          = response.NextMarker;
                yield return(response);
            }while (marker != null);
        }
 private Amazon.ElasticLoadBalancingV2.Model.DescribeTargetGroupsResponse CallAWSServiceOperation(IAmazonElasticLoadBalancingV2 client, Amazon.ElasticLoadBalancingV2.Model.DescribeTargetGroupsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing V2", "DescribeTargetGroups");
     try
     {
         #if DESKTOP
         return(client.DescribeTargetGroups(request));
         #elif CORECLR
         return(client.DescribeTargetGroupsAsync(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;
     }
 }