disableControl method

Future<DisableControlOutput> disableControl({
  1. String? controlIdentifier,
  2. String? enabledControlIdentifier,
  3. String? targetIdentifier,
})

This API call turns off a control. It starts an asynchronous operation that deletes Amazon Web Services resources on the specified organizational unit and the accounts it contains. The resources will vary according to the control that you specify. For usage examples, see the Controls Reference Guide .

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter controlIdentifier : The ARN of the control. Only Strongly recommended and Elective controls are permitted, with the exception of the Region deny control. For information on how to find the controlIdentifier, see the overview page.

Parameter enabledControlIdentifier : The ARN of the enabled control to be disabled, which uniquely identifies the control instance on the target organizational unit.

Parameter targetIdentifier : The ARN of the organizational unit. For information on how to find the targetIdentifier, see the overview page.

Implementation

Future<DisableControlOutput> disableControl({
  String? controlIdentifier,
  String? enabledControlIdentifier,
  String? targetIdentifier,
}) async {
  final $payload = <String, dynamic>{
    if (controlIdentifier != null) 'controlIdentifier': controlIdentifier,
    if (enabledControlIdentifier != null)
      'enabledControlIdentifier': enabledControlIdentifier,
    if (targetIdentifier != null) 'targetIdentifier': targetIdentifier,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/disable-control',
    exceptionFnMap: _exceptionFns,
  );
  return DisableControlOutput.fromJson(response);
}