updateContactFlowModuleContent method

Future<void> updateContactFlowModuleContent({
  1. required String contactFlowModuleId,
  2. required String instanceId,
  3. String? content,
  4. String? settings,
})

Updates specified flow module for the specified Connect Customer instance.

Use the $SAVED alias in the request to describe the SAVED content of a Flow. For example, arn:aws:.../contact-flow/{id}:$SAVED. After a flow is published, $SAVED needs to be supplied to view saved content that has not been published.

May throw AccessDeniedException. May throw InternalServiceException. May throw InvalidContactFlowModuleException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter contactFlowModuleId : The identifier of the flow module.

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 content : The JSON string that represents the content of the flow. For an example, see Example flow in Connect Customer Flow language.

Parameter settings : Serialized JSON string of the flow module Settings schema.

Implementation

Future<void> updateContactFlowModuleContent({
  required String contactFlowModuleId,
  required String instanceId,
  String? content,
  String? settings,
}) async {
  final $payload = <String, dynamic>{
    if (content != null) 'Content': content,
    if (settings != null) 'Settings': settings,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/contact-flow-modules/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(contactFlowModuleId)}/content',
    exceptionFnMap: _exceptionFns,
  );
}