update_standards_control
async
¶
update_standards_control(
standards_control_arn: NonEmptyString,
*,
config_overrides: Optional[AsyncSecurityHubClientConfig] = 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.
>>> await 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/async_security_hub.py
8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 | |