update_standards_control
¶
update_standards_control(
standards_control_arn: NonEmptyString,
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
control_status: Optional[ControlStatus] = None,
disabled_reason: Optional[NonEmptyString] = None,
) -> UpdateStandardsControlResponse
Used to control whether an individual security standard control is enabled or disabled.
Calls to this operation return a RESOURCE_NOT_FOUND_EXCEPTION error when the standard subscription for the control has StandardsControlsUpdatable value NOT_READY_FOR_UPDATES.
Parameters:
-
standards_control_arn(NonEmptyString) –The ARN of the security standard control to enable or disable.
-
control_status(Optional[ControlStatus], default:None) –The updated status of the security standard control.
-
disabled_reason(Optional[NonEmptyString], default:None) –A description of the reason why you are disabling a security standard control. If you are disabling a control, then this is required.
Raises:
-
AccessDeniedException–You don't have permission to perform the action specified in the request.
-
InternalException–Internal server error.
-
InvalidAccessException–The account doesn't have permission to perform this action.
-
InvalidInputException–The request was rejected because you supplied an invalid or out-of-range value for an input parameter.
-
ResourceNotFoundException–The request was rejected because we can't find the specified resource.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update the enablement status of a standard control The following example disables the specified control in the specified security standard.
>>> client.update_standards_control(standards_control_arn='arn:aws:securityhub:us-west-1:123456789012:control/pci-dss/v/3.2.1/PCI.AutoScaling.1', control_status='DISABLED', disabled_reason='Not applicable to my service')
Source code in docs_src/capo_securityhub/_services/security_hub.py
8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 | |