getUICustomization method

Future<GetUICustomizationResponse> getUICustomization({
  1. required String userPoolId,
  2. String? clientId,
})

Gets the UI Customization information for a particular app client's app UI, if there is something set. If nothing is set for the particular client, but there is an existing pool level customization (app clientId will be ALL), then that is returned. If nothing is present, then an empty shape is returned.

May throw InvalidParameterException. May throw ResourceNotFoundException. May throw NotAuthorizedException. May throw TooManyRequestsException. May throw InternalErrorException.

Parameter userPoolId : The user pool ID for the user pool.

Parameter clientId : The client ID for the client app.

Implementation

Future<GetUICustomizationResponse> getUICustomization({
  required String userPoolId,
  String? clientId,
}) async {
  ArgumentError.checkNotNull(userPoolId, 'userPoolId');
  _s.validateStringLength(
    'userPoolId',
    userPoolId,
    1,
    55,
    isRequired: true,
  );
  _s.validateStringLength(
    'clientId',
    clientId,
    1,
    128,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSCognitoIdentityProviderService.GetUICustomization'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'UserPoolId': userPoolId,
      if (clientId != null) 'ClientId': clientId,
    },
  );

  return GetUICustomizationResponse.fromJson(jsonResponse.body);
}