list_clusters
async
¶
list_clusters(
*,
config_overrides: Optional[AsyncEKSClientConfig] = 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/async_eks.py
3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 | |