public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonSyntheticsConfig config = new AmazonSyntheticsConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonSyntheticsClient client = new AmazonSyntheticsClient(creds, config); DescribeRuntimeVersionsResponse resp = new DescribeRuntimeVersionsResponse(); do { DescribeRuntimeVersionsRequest req = new DescribeRuntimeVersionsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.DescribeRuntimeVersions(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.RuntimeVersions) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
internal virtual DescribeRuntimeVersionsResponse DescribeRuntimeVersions(DescribeRuntimeVersionsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeRuntimeVersionsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeRuntimeVersionsResponseUnmarshaller.Instance; return(Invoke <DescribeRuntimeVersionsResponse>(request, options)); }
/// <summary> /// Returns a list of Synthetics canary runtime versions. For more information, see <a /// href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html"> /// Canary Runtime Versions</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeRuntimeVersions 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 DescribeRuntimeVersions service method, as returned by Synthetics.</returns> /// <exception cref="Amazon.Synthetics.Model.InternalServerException"> /// An unknown internal error occurred. /// </exception> /// <exception cref="Amazon.Synthetics.Model.ValidationException"> /// A parameter could not be validated. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeRuntimeVersions">REST API Reference for DescribeRuntimeVersions Operation</seealso> public virtual Task <DescribeRuntimeVersionsResponse> DescribeRuntimeVersionsAsync(DescribeRuntimeVersionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeRuntimeVersionsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeRuntimeVersionsResponseUnmarshaller.Instance; return(InvokeAsync <DescribeRuntimeVersionsResponse>(request, options, cancellationToken)); }