updateEndpoint method

Future<UpdateEndpointResponse> updateEndpoint({
  1. required String applicationId,
  2. required String endpointId,
  3. required EndpointRequest endpointRequest,
})

Creates a new endpoint for an application or updates the settings and attributes of an existing endpoint for an application. You can also use this operation to define custom attributes for an endpoint. If an update includes one or more values for a custom attribute, Amazon Pinpoint replaces (overwrites) any existing values with the new values.

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

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

Parameter endpointId : The case insensitive unique identifier for the endpoint. The identifier can't contain $, { or }.

Implementation

Future<UpdateEndpointResponse> updateEndpoint({
  required String applicationId,
  required String endpointId,
  required EndpointRequest endpointRequest,
}) async {
  final response = await _protocol.sendRaw(
    payload: endpointRequest,
    method: 'PUT',
    requestUri:
        '/v1/apps/${Uri.encodeComponent(applicationId)}/endpoints/${Uri.encodeComponent(endpointId)}',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return UpdateEndpointResponse(
    messageBody: MessageBody.fromJson($json),
  );
}