updateContactFlowContent method

Future<void> updateContactFlowContent({
  1. required String contactFlowId,
  2. required String content,
  3. required String instanceId,
})

Updates the specified contact flow.

You can also create and update contact flows using the Amazon Connect Flow language.

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

Parameter contactFlowId : The identifier of the contact flow.

Parameter content : The JSON string that represents contact flow’s content. For an example, see Example contact flow in Amazon Connect Flow language in the Amazon Connect Administrator Guide.

Parameter instanceId : The identifier of the Amazon Connect instance.

Implementation

Future<void> updateContactFlowContent({
  required String contactFlowId,
  required String content,
  required String instanceId,
}) async {
  ArgumentError.checkNotNull(contactFlowId, 'contactFlowId');
  _s.validateStringLength(
    'contactFlowId',
    contactFlowId,
    0,
    500,
    isRequired: true,
  );
  ArgumentError.checkNotNull(content, 'content');
  ArgumentError.checkNotNull(instanceId, 'instanceId');
  _s.validateStringLength(
    'instanceId',
    instanceId,
    1,
    100,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'Content': content,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/contact-flows/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(contactFlowId)}/content',
    exceptionFnMap: _exceptionFns,
  );
}