public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonEMRContainersConfig config = new AmazonEMRContainersConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonEMRContainersClient client = new AmazonEMRContainersClient(creds, config); ListVirtualClustersResponse resp = new ListVirtualClustersResponse(); do { ListVirtualClustersRequest req = new ListVirtualClustersRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListVirtualClusters(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.VirtualClusters) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Lists information about the specified virtual cluster. Virtual cluster is a managed /// entity on Amazon EMR on EKS. You can create, describe, list and delete virtual clusters. /// They do not consume any additional resource in your system. A single virtual cluster /// maps to a single Kubernetes namespace. Given this relationship, you can model virtual /// clusters the same way you model Kubernetes namespaces to meet your requirements. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListVirtualClusters 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 ListVirtualClusters service method, as returned by EMRContainers.</returns> /// <exception cref="Amazon.EMRContainers.Model.InternalServerException"> /// This is an internal server exception. /// </exception> /// <exception cref="Amazon.EMRContainers.Model.ValidationException"> /// There are invalid parameters in the client request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/emr-containers-2020-10-01/ListVirtualClusters">REST API Reference for ListVirtualClusters Operation</seealso> public virtual Task <ListVirtualClustersResponse> ListVirtualClustersAsync(ListVirtualClustersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListVirtualClustersRequestMarshaller.Instance; options.ResponseUnmarshaller = ListVirtualClustersResponseUnmarshaller.Instance; return(InvokeAsync <ListVirtualClustersResponse>(request, options, cancellationToken)); }
internal virtual ListVirtualClustersResponse ListVirtualClusters(ListVirtualClustersRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListVirtualClustersRequestMarshaller.Instance; options.ResponseUnmarshaller = ListVirtualClustersResponseUnmarshaller.Instance; return(Invoke <ListVirtualClustersResponse>(request, options)); }