importBackendAuth method

Future<ImportBackendAuthResponse> importBackendAuth({
  1. required String appId,
  2. required String backendEnvironmentName,
  3. required String nativeClientId,
  4. required String userPoolId,
  5. required String webClientId,
  6. String? identityPoolId,
})

Imports an existing backend authentication resource.

May throw BadRequestException. May throw GatewayTimeoutException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter appId : The app ID.

Parameter backendEnvironmentName : The name of the backend environment.

Parameter nativeClientId : The ID of the Amazon Cognito native client.

Parameter userPoolId : The ID of the Amazon Cognito user pool.

Parameter webClientId : The ID of the Amazon Cognito web client.

Parameter identityPoolId : The ID of the Amazon Cognito identity pool.

Implementation

Future<ImportBackendAuthResponse> importBackendAuth({
  required String appId,
  required String backendEnvironmentName,
  required String nativeClientId,
  required String userPoolId,
  required String webClientId,
  String? identityPoolId,
}) async {
  final $payload = <String, dynamic>{
    'nativeClientId': nativeClientId,
    'userPoolId': userPoolId,
    'webClientId': webClientId,
    if (identityPoolId != null) 'identityPoolId': identityPoolId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/backend/${Uri.encodeComponent(appId)}/auth/${Uri.encodeComponent(backendEnvironmentName)}/import',
    exceptionFnMap: _exceptionFns,
  );
  return ImportBackendAuthResponse.fromJson(response);
}