updateSmsChannel method

Future<UpdateSmsChannelResponse> updateSmsChannel({
  1. required String applicationId,
  2. required SMSChannelRequest sMSChannelRequest,
})

Enables the SMS channel for an application or updates the status and settings of the SMS channel for an application.

May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.

Parameter applicationId : The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Implementation

Future<UpdateSmsChannelResponse> updateSmsChannel({
  required String applicationId,
  required SMSChannelRequest sMSChannelRequest,
}) async {
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  ArgumentError.checkNotNull(sMSChannelRequest, 'sMSChannelRequest');
  final response = await _protocol.sendRaw(
    payload: sMSChannelRequest,
    method: 'PUT',
    requestUri: '/v1/apps/${Uri.encodeComponent(applicationId)}/channels/sms',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return UpdateSmsChannelResponse(
    sMSChannelResponse: SMSChannelResponse.fromJson($json),
  );
}