updateStandardsControl method
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.
May throw AccessDeniedException.
May throw InternalException.
May throw InvalidAccessException.
May throw InvalidInputException.
May throw ResourceNotFoundException.
Parameter standardsControlArn :
The ARN of the security standard control to enable or disable.
Parameter controlStatus :
The updated status of the security standard control.
Parameter disabledReason :
A description of the reason why you are disabling a security standard
control. If you are disabling a control, then this is required.
Implementation
Future<void> updateStandardsControl({
required String standardsControlArn,
ControlStatus? controlStatus,
String? disabledReason,
}) async {
final $payload = <String, dynamic>{
if (controlStatus != null) 'ControlStatus': controlStatus.value,
if (disabledReason != null) 'DisabledReason': disabledReason,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/standards/control/${standardsControlArn.split('/').map(Uri.encodeComponent).join('/')}',
exceptionFnMap: _exceptionFns,
);
}