Skip to content

delete_authentication_profile async

delete_authentication_profile(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    authentication_profile_name: Optional[AuthenticationProfileNameString] = None,
) -> DeleteAuthenticationProfileResult

Deletes an authentication profile.

Parameters:

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def delete_authentication_profile(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    authentication_profile_name: Optional[
        "capo_redshift.types.authentication_profile_name_string.AuthenticationProfileNameString"
    ] = None,
) -> "capo_redshift.types.delete_authentication_profile_result.DeleteAuthenticationProfileResult":
    """<p>Deletes an authentication profile.</p>

    Args:
        authentication_profile_name: <p>The name of the authentication profile to delete.</p>

    Raises:
        capo_redshift.errors.authentication_profile_not_found_fault.AuthenticationProfileNotFoundFault: <p>The authentication profile can't be found.</p>
        capo_redshift.errors.invalid_authentication_profile_request_fault.InvalidAuthenticationProfileRequestFault: <p>The authentication profile request is not valid. The profile name can't be null or empty. The authentication profile API operation must be available in the Amazon Web Services Region.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.delete_authentication_profile_message.DeleteAuthenticationProfileMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.delete_authentication_profile_result.DeleteAuthenticationProfileResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.delete_authentication_profile

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.delete_authentication_profile.async_delete_authentication_profile(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAuthenticationProfile")
    )
    input_: capo_redshift.types.delete_authentication_profile_message.DeleteAuthenticationProfileMessage = {}
    if authentication_profile_name is not None:
        input_["authentication_profile_name"] = authentication_profile_name

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