Deletes a certificate authority (CA) from your cluster.
Deleting a certificate authority removes its public certificate from the cluster's trust bundle. You can't delete the certificate authority that's currently signing certificates for the cluster (its signingStatus is IN_USE) — to remove the outgoing CA, first activate the successor CA with ActivateCertificateAuthority . Amazon EKS also protects a successor CA from deletion in certain cases to keep a valid rotation path — for example, a successor that Amazon EKS appended can't be deleted while it's the only successor on the cluster. This is an asynchronous operation that returns an update object.
Parameters:
-
cluster_name
(String)
–
The name of your cluster.
-
certificate_authority_id
(String)
–
The ID of the certificate authority to delete. You can't delete the certificate authority that's currently signing certificates for the cluster.
-
client_request_token
(Optional[String], default:
None
)
–
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Raises:
-
InvalidParameterException
–
The specified parameter is invalid. Review the available parameters for the API request.
-
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 delete_certificate_authority(
self,
cluster_name: "capo_eks.types.string.String",
certificate_authority_id: "capo_eks.types.string.String",
*,
config_overrides: Optional[AsyncEKSClientConfig] = None,
client_request_token: Optional["capo_eks.types.string.String"] = None,
) -> "capo_eks.types.delete_certificate_authority_response.DeleteCertificateAuthorityResponse":
"""<p>Deletes a certificate authority (CA) from your cluster.</p> <p>Deleting a certificate authority removes its public certificate from the cluster's trust bundle. You can't delete the certificate authority that's currently signing certificates for the cluster (its <code>signingStatus</code> is <code>IN_USE</code>) — to remove the outgoing CA, first activate the successor CA with <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ActivateCertificateAuthority.html"> <code>ActivateCertificateAuthority</code> </a>. Amazon EKS also protects a successor CA from deletion in certain cases to keep a valid rotation path — for example, a successor that Amazon EKS appended can't be deleted while it's the only successor on the cluster. This is an asynchronous operation that returns an <code>update</code> object.</p>
Args:
cluster_name: <p>The name of your cluster.</p>
certificate_authority_id: <p>The ID of the certificate authority to delete. You can't delete the certificate authority that's currently signing certificates for the cluster.</p>
client_request_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
Raises:
capo_eks.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</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.delete_certificate_authority_request.DeleteCertificateAuthorityRequest]",
) -> AsyncOperationResponse[
"capo_eks.types.delete_certificate_authority_response.DeleteCertificateAuthorityResponse"
]:
import capo_eks._operations.aws_wesley_frontend.delete_certificate_authority
(
output,
http_response,
) = await capo_eks._operations.aws_wesley_frontend.delete_certificate_authority.async_delete_certificate_authority(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteCertificateAuthority")
)
input_: capo_eks.types.delete_certificate_authority_request.DeleteCertificateAuthorityRequest = {
"cluster_name": cluster_name,
"certificate_authority_id": certificate_authority_id,
}
if client_request_token is None:
client_request_token = str(uuid.uuid4())
input_["client_request_token"] = client_request_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|