Deletes a custom control in Audit Manager.
When you invoke this operation, the custom control is deleted from any frameworks or assessments that it’s currently part of. As a result, Audit Manager will stop collecting evidence for that custom control in all of your assessments. This includes assessments that you previously created before you deleted the custom control.
Parameters:
-
control_id
(UUID)
–
The unique identifier for the control.
Raises:
Source code in docs_src/capo_auditmanager/_services/async_audit_manager.py
| async def delete_control(
self,
control_id: "capo_auditmanager.types.uuid.UUID",
*,
config_overrides: Optional[AsyncAuditManagerClientConfig] = None,
) -> "capo_auditmanager.types.delete_control_response.DeleteControlResponse":
"""<p> Deletes a custom control in Audit Manager. </p> <important> <p>When you invoke this operation, the custom control is deleted from any frameworks or assessments that it’s currently part of. As a result, Audit Manager will stop collecting evidence for that custom control in all of your assessments. This includes assessments that you previously created before you deleted the custom control.</p> </important>
Args:
control_id: <p> The unique identifier for the control. </p>
Raises:
capo_auditmanager.errors.access_denied_exception.AccessDeniedException: <p> Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again. </p>
capo_auditmanager.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
capo_auditmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource that's specified in the request can't be found. </p>
capo_auditmanager.errors.validation_exception.ValidationException: <p> The request has invalid or missing parameters. </p>
capo_auditmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_auditmanager.types.delete_control_request.DeleteControlRequest]",
) -> AsyncOperationResponse[
"capo_auditmanager.types.delete_control_response.DeleteControlResponse"
]:
import capo_auditmanager._operations.bedrock_assessment_manager_lambda.delete_control
(
output,
http_response,
) = await capo_auditmanager._operations.bedrock_assessment_manager_lambda.delete_control.async_delete_control(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteControl")
)
input_: capo_auditmanager.types.delete_control_request.DeleteControlRequest = {
"control_id": control_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|