putAppValidationConfiguration method

Future<void> putAppValidationConfiguration({
  1. required String appId,
  2. List<AppValidationConfiguration>? appValidationConfigurations,
  3. List<ServerGroupValidationConfiguration>? serverGroupValidationConfigurations,
})

Creates or updates a validation configuration for the specified application.

May throw UnauthorizedOperationException. May throw InvalidParameterException. May throw MissingRequiredParameterException. May throw InternalError. May throw OperationNotPermittedException.

Parameter appId : The ID of the application.

Parameter appValidationConfigurations : The configuration for application validation.

Parameter serverGroupValidationConfigurations : The configuration for instance validation.

Implementation

Future<void> putAppValidationConfiguration({
  required String appId,
  List<AppValidationConfiguration>? appValidationConfigurations,
  List<ServerGroupValidationConfiguration>?
      serverGroupValidationConfigurations,
}) async {
  ArgumentError.checkNotNull(appId, 'appId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AWSServerMigrationService_V2016_10_24.PutAppValidationConfiguration'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'appId': appId,
      if (appValidationConfigurations != null)
        'appValidationConfigurations': appValidationConfigurations,
      if (serverGroupValidationConfigurations != null)
        'serverGroupValidationConfigurations':
            serverGroupValidationConfigurations,
    },
  );
}