removeAttributes method
Removes one or more custom attributes, of the same attribute type, from the application. Existing endpoints still have the attributes but Amazon Pinpoint will stop capturing new or changed values for these attributes.
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 attributeType :
The type of attribute or attributes to remove. Valid values are:
- endpoint-custom-attributes - Custom attributes that describe endpoints, such as the date when an associated user opted in or out of receiving communications from you through a specific type of channel.
- endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints, such as the number of app sessions or the number of items left in a cart.
- endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.
Implementation
Future<RemoveAttributesResponse> removeAttributes({
required String applicationId,
required String attributeType,
required UpdateAttributesRequest updateAttributesRequest,
}) async {
final response = await _protocol.sendRaw(
payload: updateAttributesRequest,
method: 'PUT',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/attributes/${Uri.encodeComponent(attributeType)}',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return RemoveAttributesResponse(
attributesResource: AttributesResource.fromJson($json),
);
}