updateEnabledControl method

Future<UpdateEnabledControlOutput> updateEnabledControl({
  1. required String enabledControlIdentifier,
  2. required List<EnabledControlParameter> parameters,
})

Updates the configuration of an already enabled control.

If the enabled control shows an EnablementStatus of SUCCEEDED, supply parameters that are different from the currently configured parameters. Otherwise, Amazon Web Services Control Tower will not accept the request.

If the enabled control shows an EnablementStatus of FAILED, Amazon Web Services Control Tower updates the control to match any valid parameters that you supply.

If the DriftSummary status for the control shows as DRIFTED, you cannot call this API. Instead, you can update the control by calling the ResetEnabledControl API. Alternatively, you can call DisableControl and then call EnableControl again. Also, you can run an extending governance operation to repair drift. 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 enabledControlIdentifier : The ARN of the enabled control that will be updated.

Parameter parameters : A key/value pair, where Key is of type String and Value is of type Document.

Implementation

Future<UpdateEnabledControlOutput> updateEnabledControl({
  required String enabledControlIdentifier,
  required List<EnabledControlParameter> parameters,
}) async {
  final $payload = <String, dynamic>{
    'enabledControlIdentifier': enabledControlIdentifier,
    'parameters': parameters,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/update-enabled-control',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateEnabledControlOutput.fromJson(response);
}