updateRoutingProfileName method

Future<void> updateRoutingProfileName({
  1. required String instanceId,
  2. required String routingProfileId,
  3. String? description,
  4. String? name,
})

Updates the name and description of a routing profile. The request accepts the following data in JSON format. At least Name or Description must be provided.

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

Parameter instanceId : The identifier of the Amazon Connect instance.

Parameter routingProfileId : The identifier of the routing profile.

Parameter description : The description of the routing profile. Must not be more than 250 characters.

Parameter name : The name of the routing profile. Must not be more than 127 characters.

Implementation

Future<void> updateRoutingProfileName({
  required String instanceId,
  required String routingProfileId,
  String? description,
  String? name,
}) async {
  ArgumentError.checkNotNull(instanceId, 'instanceId');
  _s.validateStringLength(
    'instanceId',
    instanceId,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(routingProfileId, 'routingProfileId');
  _s.validateStringLength(
    'description',
    description,
    1,
    250,
  );
  _s.validateStringLength(
    'name',
    name,
    1,
    127,
  );
  final $payload = <String, dynamic>{
    if (description != null) 'Description': description,
    if (name != null) 'Name': name,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/routing-profiles/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(routingProfileId)}/name',
    exceptionFnMap: _exceptionFns,
  );
}