Skip to content

delete_access_entry async

delete_access_entry(
    cluster_name: String,
    principal_arn: String,
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
) -> DeleteAccessEntryResponse

Deletes an access entry.

Deleting an access entry of a type other than Standard can cause your cluster to function improperly. If you delete an access entry in error, you can recreate it.

Parameters:

  • cluster_name (String) –

    The name of your cluster.

  • principal_arn (String) –

    The ARN of the IAM principal for the AccessEntry.

Raises:

  • InvalidRequestException –

    The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.

  • 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.

  • 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_access_entry(
    self,
    cluster_name: "capo_eks.types.string.String",
    principal_arn: "capo_eks.types.string.String",
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
) -> "capo_eks.types.delete_access_entry_response.DeleteAccessEntryResponse":
    """<p>Deletes an access entry.</p> <p>Deleting an access entry of a type other than <code>Standard</code> can cause your cluster to function improperly. If you delete an access entry in error, you can recreate it.</p>

    Args:
        cluster_name: <p>The name of your cluster.</p>
        principal_arn: <p>The ARN of the IAM principal for the <code>AccessEntry</code>.</p>

    Raises:
        capo_eks.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations.</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_eks.types.delete_access_entry_request.DeleteAccessEntryRequest]",
    ) -> AsyncOperationResponse[
        "capo_eks.types.delete_access_entry_response.DeleteAccessEntryResponse"
    ]:
        import capo_eks._operations.aws_wesley_frontend.delete_access_entry

        (
            output,
            http_response,
        ) = await capo_eks._operations.aws_wesley_frontend.delete_access_entry.async_delete_access_entry(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAccessEntry")
    )
    input_: capo_eks.types.delete_access_entry_request.DeleteAccessEntryRequest = {
        "cluster_name": cluster_name,
        "principal_arn": principal_arn,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output