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
9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 | |