tagContact method

Future<void> tagContact({
  1. required String contactId,
  2. required String instanceId,
  3. required Map<String, String> tags,
})

Adds the specified tags to the contact resource. For more information about this API is used, see Set up granular billing for a detailed view of your Connect Customer usage.

May throw InternalServiceException. May throw InvalidActiveRegionException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter contactId : The identifier of the contact in this instance of Connect Customer.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter tags : The tags to be assigned to the contact resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

Implementation

Future<void> tagContact({
  required String contactId,
  required String instanceId,
  required Map<String, String> tags,
}) async {
  final $payload = <String, dynamic>{
    'ContactId': contactId,
    'InstanceId': instanceId,
    'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/contact/tags',
    exceptionFnMap: _exceptionFns,
  );
}