enableControl method
This API call activates a control. It starts an asynchronous operation that creates Amazon Web Services resources on the specified organizational unit and the accounts it contains. The resources created 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 targetIdentifier :
The ARN of the organizational unit. For information on how to find the
targetIdentifier, see the
overview page.
Parameter parameters :
A list of input parameter values, which are specified to configure the
control when you enable it.
Parameter tags :
Tags to be applied to the EnabledControl resource.
Implementation
Future<EnableControlOutput> enableControl({
required String controlIdentifier,
required String targetIdentifier,
List<EnabledControlParameter>? parameters,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'controlIdentifier': controlIdentifier,
'targetIdentifier': targetIdentifier,
if (parameters != null) 'parameters': parameters,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/enable-control',
exceptionFnMap: _exceptionFns,
);
return EnableControlOutput.fromJson(response);
}