enableBaseline method

Future<EnableBaselineOutput> enableBaseline({
  1. required String baselineIdentifier,
  2. required String baselineVersion,
  3. required String targetIdentifier,
  4. List<EnabledBaselineParameter>? parameters,
  5. Map<String, String>? tags,
})

Enable (apply) a Baseline to a Target. This API starts an asynchronous operation to deploy resources specified by the Baseline to the specified Target. For usage examples, see the Amazon Web Services Control Tower User Guide .

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

Parameter baselineIdentifier : The ARN of the baseline to be enabled.

Parameter baselineVersion : The specific version to be enabled of the specified baseline.

Parameter targetIdentifier : The ARN of the target on which the baseline will be enabled. Only OUs are supported as targets.

Parameter parameters : A list of key-value objects that specify enablement parameters, where key is a string and value is a document of any type.

Parameter tags : Tags associated with input to EnableBaseline.

Implementation

Future<EnableBaselineOutput> enableBaseline({
  required String baselineIdentifier,
  required String baselineVersion,
  required String targetIdentifier,
  List<EnabledBaselineParameter>? parameters,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'baselineIdentifier': baselineIdentifier,
    'baselineVersion': baselineVersion,
    'targetIdentifier': targetIdentifier,
    if (parameters != null) 'parameters': parameters,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/enable-baseline',
    exceptionFnMap: _exceptionFns,
  );
  return EnableBaselineOutput.fromJson(response);
}