Deletes an authentication profile.
Parameters:
Raises:
Source code in docs_src/capo_redshift/_services/redshift.py
| def delete_authentication_profile(
self,
*,
config_overrides: Optional[RedshiftClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_redshift.types.delete_authentication_profile_message.DeleteAuthenticationProfileMessage]",
) -> OperationResponse[
"capo_redshift.types.delete_authentication_profile_result.DeleteAuthenticationProfileResult"
]:
import capo_redshift._operations.redshift_service_version20121201.delete_authentication_profile
output, http_response = (
capo_redshift._operations.redshift_service_version20121201.delete_authentication_profile.delete_authentication_profile(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|