Deregisters a connected cluster to remove it from the Amazon EKS control plane.
A connected cluster is a Kubernetes cluster that you've connected to your control plane using the Amazon EKS Connector.
Parameters:
-
name
(String)
–
The name of the connected cluster to deregister.
Raises:
-
AccessDeniedException
–
You don't have permissions to perform the requested operation. The IAM principal making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access management in the IAM User Guide.
-
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.
-
ResourceInUseException
–
The specified resource is in use.
-
ResourceNotFoundException
–
The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific.
-
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.
Source code in docs_src/capo_eks/_services/async_eks.py
| async def deregister_cluster(
self,
name: "capo_eks.types.string.String",
*,
config_overrides: Optional[AsyncEKSClientConfig] = None,
) -> "capo_eks.types.deregister_cluster_response.DeregisterClusterResponse":
"""<p>Deregisters a connected cluster to remove it from the Amazon EKS control plane.</p> <p>A connected cluster is a Kubernetes cluster that you've connected to your control plane using the <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.html">Amazon EKS Connector</a>.</p>
Args:
name: <p>The name of the connected cluster to deregister.</p>
Raises:
capo_eks.errors.access_denied_exception.AccessDeniedException: <p>You don't have permissions to perform the requested operation. The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html">IAM principal</a> making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access management</a> in the <i>IAM User Guide</i>. </p>
capo_eks.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. Actions can include using an action or resource on behalf of an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html">IAM principal</a> that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.</p>
capo_eks.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is in use.</p>
capo_eks.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found. You can view your available clusters with <code>ListClusters</code>. You can view your available managed node groups with <code>ListNodegroups</code>. Amazon EKS clusters and node groups are Amazon Web Services Region specific.</p>
capo_eks.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
capo_eks.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is unavailable. Back off and retry the operation.</p>
capo_eks.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_eks.types.deregister_cluster_request.DeregisterClusterRequest]",
) -> AsyncOperationResponse[
"capo_eks.types.deregister_cluster_response.DeregisterClusterResponse"
]:
import capo_eks._operations.aws_wesley_frontend.deregister_cluster
(
output,
http_response,
) = await capo_eks._operations.aws_wesley_frontend.deregister_cluster.async_deregister_cluster(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeregisterCluster")
)
input_: capo_eks.types.deregister_cluster_request.DeregisterClusterRequest = {
"name": name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|