Deletes the specified Amazon Redshift HSM configuration.
Parameters:
-
hsm_configuration_identifier
(Optional[String], default:
None
)
–
The identifier of the Amazon Redshift HSM configuration to be deleted.
Raises:
Source code in docs_src/capo_redshift/_services/async_redshift.py
| async def delete_hsm_configuration(
self,
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
hsm_configuration_identifier: Optional[
"capo_redshift.types.string.String"
] = None,
) -> None:
"""<p>Deletes the specified Amazon Redshift HSM configuration.</p>
Args:
hsm_configuration_identifier: <p>The identifier of the Amazon Redshift HSM configuration to be deleted.</p>
Raises:
capo_redshift.errors.hsm_configuration_not_found_fault.HsmConfigurationNotFoundFault: <p>There is no Amazon Redshift HSM configuration with the specified identifier.</p>
capo_redshift.errors.invalid_hsm_configuration_state_fault.InvalidHsmConfigurationStateFault: <p>The specified HSM configuration is not in the <code>available</code> state, or it is still in use by one or more Amazon Redshift clusters.</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_hsm_configuration_message.DeleteHsmConfigurationMessage]",
) -> AsyncOperationResponse[None]:
import capo_redshift._operations.redshift_service_version20121201.delete_hsm_configuration
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.delete_hsm_configuration.async_delete_hsm_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteHsmConfiguration")
)
input_: capo_redshift.types.delete_hsm_configuration_message.DeleteHsmConfigurationMessage = {}
if hsm_configuration_identifier is not None:
input_["hsm_configuration_identifier"] = hsm_configuration_identifier
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|