Skip to content

list_virtual_clusters

list_virtual_clusters(
    *,
    config_overrides: Optional[EMRcontainersClientConfig] = None,
    container_provider_id: Optional[String1024] = None,
    container_provider_type: Optional[ContainerProviderType] = None,
    created_after: Optional[Date] = None,
    created_before: Optional[Date] = None,
    states: Optional[VirtualClusterStates] = None,
    max_results: Optional[JavaInteger] = None,
    next_token: Optional[NextToken] = None,
    eks_access_entry_integrated: Optional[Boolean] = None,
) -> ListVirtualClustersResponse

Lists information about the specified virtual cluster. Virtual cluster is a managed entity on Amazon EMR on EKS. You can create, update, 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.

Parameters:

  • container_provider_id (Optional[String1024], default: None ) –

    The container provider ID of the virtual cluster.

  • container_provider_type (Optional[ContainerProviderType], default: None ) –

    The container provider type of the virtual cluster. Amazon EKS is the only supported type as of now.

  • created_after (Optional[Date], default: None ) –

    The date and time after which the virtual clusters are created.

  • created_before (Optional[Date], default: None ) –

    The date and time before which the virtual clusters are created.

  • states (Optional[VirtualClusterStates], default: None ) –

    The states of the requested virtual clusters.

  • max_results (Optional[JavaInteger], default: None ) –

    The maximum number of virtual clusters that can be listed.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of virtual clusters to return.

  • eks_access_entry_integrated (Optional[Boolean], default: None ) –

    Optional Boolean that specifies whether the operation should return the virtual clusters that have the access entry integration enabled or disabled. If not specified, the operation returns all applicable virtual clusters.

Raises:

Source code in docs_src/capo_emr_containers/_services/em_rcontainers.py
def list_virtual_clusters(
    self,
    *,
    config_overrides: Optional[EMRcontainersClientConfig] = None,
    container_provider_id: Optional[
        "capo_emr_containers.types.string1024.String1024"
    ] = None,
    container_provider_type: Optional[
        "capo_emr_containers.types.container_provider_type.ContainerProviderType"
    ] = None,
    created_after: Optional["capo_emr_containers.types.date.Date"] = None,
    created_before: Optional["capo_emr_containers.types.date.Date"] = None,
    states: Optional[
        "capo_emr_containers.types.virtual_cluster_states.VirtualClusterStates"
    ] = None,
    max_results: Optional[
        "capo_emr_containers.types.java_integer.JavaInteger"
    ] = None,
    next_token: Optional["capo_emr_containers.types.next_token.NextToken"] = None,
    eks_access_entry_integrated: Optional[
        "capo_emr_containers.types.boolean.Boolean"
    ] = None,
) -> "capo_emr_containers.types.list_virtual_clusters_response.ListVirtualClustersResponse":
    """<p>Lists information about the specified virtual cluster. Virtual cluster is a managed entity on Amazon EMR on EKS. You can create, update, 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.</p>

    Args:
        container_provider_id: <p>The container provider ID of the virtual cluster.</p>
        container_provider_type: <p>The container provider type of the virtual cluster. Amazon EKS is the only supported type as of now.</p>
        created_after: <p>The date and time after which the virtual clusters are created.</p>
        created_before: <p>The date and time before which the virtual clusters are created.</p>
        states: <p>The states of the requested virtual clusters.</p>
        max_results: <p>The maximum number of virtual clusters that can be listed.</p>
        next_token: <p>The token for the next set of virtual clusters to return. </p>
        eks_access_entry_integrated: <p>Optional Boolean that specifies whether the operation should return the virtual clusters that have the access entry integration enabled or disabled. If not specified, the operation returns all applicable virtual clusters.</p>

    Raises:
        capo_emr_containers.errors.internal_server_exception.InternalServerException: <p>This is an internal server exception.</p>
        capo_emr_containers.errors.validation_exception.ValidationException: <p>There are invalid parameters in the client request.</p>
        capo_emr_containers.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_emr_containers.types.list_virtual_clusters_request.ListVirtualClustersRequest]",
    ) -> OperationResponse[
        "capo_emr_containers.types.list_virtual_clusters_response.ListVirtualClustersResponse"
    ]:
        import capo_emr_containers._operations.aws_chicago_web_service.list_virtual_clusters

        output, http_response = (
            capo_emr_containers._operations.aws_chicago_web_service.list_virtual_clusters.list_virtual_clusters(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListVirtualClusters")
    )
    input_: capo_emr_containers.types.list_virtual_clusters_request.ListVirtualClustersRequest = {}
    if container_provider_id is not None:
        input_["container_provider_id"] = container_provider_id
    if container_provider_type is not None:
        input_["container_provider_type"] = container_provider_type
    if created_after is not None:
        input_["created_after"] = created_after
    if created_before is not None:
        input_["created_before"] = created_before
    if states is not None:
        input_["states"] = states
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if eks_access_entry_integrated is not None:
        input_["eks_access_entry_integrated"] = eks_access_entry_integrated

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output