internal GetTimeSeriesServiceStatisticsPaginator(IAmazonXRay client, GetTimeSeriesServiceStatisticsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Exemplo n.º 2
0
 private Amazon.XRay.Model.GetTimeSeriesServiceStatisticsResponse CallAWSServiceOperation(IAmazonXRay client, Amazon.XRay.Model.GetTimeSeriesServiceStatisticsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS X-Ray", "GetTimeSeriesServiceStatistics");
     try
     {
         #if DESKTOP
         return(client.GetTimeSeriesServiceStatistics(request));
         #elif CORECLR
         return(client.GetTimeSeriesServiceStatisticsAsync(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;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Paginator for GetTimeSeriesServiceStatistics operation
 ///</summary>
 public IGetTimeSeriesServiceStatisticsPaginator GetTimeSeriesServiceStatistics(GetTimeSeriesServiceStatisticsRequest request)
 {
     return(new GetTimeSeriesServiceStatisticsPaginator(this.client, request));
 }
Exemplo n.º 4
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext      = context as CmdletContext;
            var useParameterSelect = this.Select.StartsWith("^");

            // create request and set iteration invariants
            var request = new Amazon.XRay.Model.GetTimeSeriesServiceStatisticsRequest();

            if (cmdletContext.EndTime != null)
            {
                request.EndTime = cmdletContext.EndTime.Value;
            }
            if (cmdletContext.EntitySelectorExpression != null)
            {
                request.EntitySelectorExpression = cmdletContext.EntitySelectorExpression;
            }
            if (cmdletContext.GroupARN != null)
            {
                request.GroupARN = cmdletContext.GroupARN;
            }
            if (cmdletContext.GroupName != null)
            {
                request.GroupName = cmdletContext.GroupName;
            }
            if (cmdletContext.Period != null)
            {
                request.Period = cmdletContext.Period.Value;
            }
            if (cmdletContext.StartTime != null)
            {
                request.StartTime = cmdletContext.StartTime.Value;
            }

            // Initialize loop variant and commence piping
            var _nextToken             = cmdletContext.NextToken;
            var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken));

            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            do
            {
                request.NextToken = _nextToken;

                CmdletOutput output;

                try
                {
                    var response = CallAWSServiceOperation(client, request);

                    object pipelineOutput = null;
                    if (!useParameterSelect)
                    {
                        pipelineOutput = cmdletContext.Select(response, this);
                    }
                    output = new CmdletOutput
                    {
                        PipelineOutput  = pipelineOutput,
                        ServiceResponse = response
                    };

                    _nextToken = response.NextToken;
                }
                catch (Exception e)
                {
                    output = new CmdletOutput {
                        ErrorResponse = e
                    };
                }

                ProcessOutput(output);
            } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken));

            if (useParameterSelect)
            {
                WriteObject(cmdletContext.Select(null, this));
            }


            return(null);
        }