public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonCodeGuruProfilerConfig config = new AmazonCodeGuruProfilerConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonCodeGuruProfilerClient client = new AmazonCodeGuruProfilerClient(creds, config); ListProfilingGroupsResponse resp = new ListProfilingGroupsResponse(); do { ListProfilingGroupsRequest req = new ListProfilingGroupsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListProfilingGroups(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.ProfilingGroupNames) { AddObject(obj); } foreach (var obj in resp.ProfilingGroups) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Lists profiling groups. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListProfilingGroups service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the ListProfilingGroups service method, as returned by CodeGuruProfiler.</returns> /// <exception cref="Amazon.CodeGuruProfiler.Model.InternalServerException"> /// The server encountered an internal error and is unable to complete the request. /// </exception> /// <exception cref="Amazon.CodeGuruProfiler.Model.ThrottlingException"> /// The request was denied due to request throttling. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ListProfilingGroups">REST API Reference for ListProfilingGroups Operation</seealso> public virtual Task <ListProfilingGroupsResponse> ListProfilingGroupsAsync(ListProfilingGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListProfilingGroupsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListProfilingGroupsResponseUnmarshaller.Instance; return(InvokeAsync <ListProfilingGroupsResponse>(request, options, cancellationToken)); }
/// <summary> /// Lists profiling groups. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListProfilingGroups service method.</param> /// /// <returns>The response from the ListProfilingGroups service method, as returned by CodeGuruProfiler.</returns> /// <exception cref="Amazon.CodeGuruProfiler.Model.InternalServerException"> /// The server encountered an internal error and is unable to complete the request. /// </exception> /// <exception cref="Amazon.CodeGuruProfiler.Model.ThrottlingException"> /// The request was denied due to request throttling. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ListProfilingGroups">REST API Reference for ListProfilingGroups Operation</seealso> public virtual ListProfilingGroupsResponse ListProfilingGroups(ListProfilingGroupsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListProfilingGroupsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListProfilingGroupsResponseUnmarshaller.Instance; return(Invoke <ListProfilingGroupsResponse>(request, options)); }
/// <summary> /// Initiates the asynchronous execution of the ListProfilingGroups operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListProfilingGroups operation on AmazonCodeGuruProfilerClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListProfilingGroups /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ListProfilingGroups">REST API Reference for ListProfilingGroups Operation</seealso> public virtual IAsyncResult BeginListProfilingGroups(ListProfilingGroupsRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = ListProfilingGroupsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListProfilingGroupsResponseUnmarshaller.Instance; return(BeginInvoke(request, options, callback, state)); }