list_clusters
¶
list_clusters(
*,
config_overrides: Optional[EKSClientConfig] = None,
max_results: Optional[ListClustersRequestMaxResults] = None,
next_token: Optional[String] = None,
include: Optional[IncludeClustersList] = None,
) -> ListClustersResponse
Lists the Amazon EKS clusters in your Amazon Web Services account in the specified Amazon Web Services Region.
Parameters:
-
max_results(Optional[ListClustersRequestMaxResults], default:None) –The maximum number of results, returned in paginated output. You receive
maxResultsin a single page, along with anextTokenresponse element. You can see the remaining results of the initial request by sending another request with the returnednextTokenvalue. This value can be between 1 and 100. If you don't use this parameter, 100 results and anextTokenvalue, if applicable, are returned. -
next_token(Optional[String], default:None) –The
nextTokenvalue returned from a previous paginated request, wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. This value is null when there are no more results to return.This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.
-
include(Optional[IncludeClustersList], default:None) –Indicates whether external clusters are included in the returned list. Use '
all' to return https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.htmlconnected clusters, or blank to return only Amazon EKS clusters. 'all' must be in lowercase otherwise an error occurs.
Raises:
-
ClientException–These errors are usually caused by a client action. Actions can include using an action or resource on behalf of an IAM principal that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.
-
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
ServerException–These errors are usually caused by a server-side issue.
-
ServiceUnavailableException–The service is unavailable. Back off and retry the operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To list your available clusters This example command lists all of your available clusters in your default region.
Source code in docs_src/capo_eks/_services/eks.py
3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 | |