public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonFISConfig config = new AmazonFISConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonFISClient client = new AmazonFISClient(creds, config); ListExperimentTemplatesResponse resp = new ListExperimentTemplatesResponse(); do { ListExperimentTemplatesRequest req = new ListExperimentTemplatesRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListExperimentTemplates(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.ExperimentTemplates) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
internal virtual ListExperimentTemplatesResponse ListExperimentTemplates(ListExperimentTemplatesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListExperimentTemplatesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListExperimentTemplatesResponseUnmarshaller.Instance; return(Invoke <ListExperimentTemplatesResponse>(request, options)); }
/// <summary> /// Lists your experiment templates. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListExperimentTemplates 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 ListExperimentTemplates service method, as returned by FIS.</returns> /// <exception cref="Amazon.FIS.Model.ValidationException"> /// The specified input is not valid, or fails to satisfy the constraints for the request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fis-2020-12-01/ListExperimentTemplates">REST API Reference for ListExperimentTemplates Operation</seealso> public virtual Task <ListExperimentTemplatesResponse> ListExperimentTemplatesAsync(ListExperimentTemplatesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListExperimentTemplatesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListExperimentTemplatesResponseUnmarshaller.Instance; return(InvokeAsync <ListExperimentTemplatesResponse>(request, options, cancellationToken)); }