updateContactFlowMetadata method

Future<void> updateContactFlowMetadata({
  1. required String contactFlowId,
  2. required String instanceId,
  3. ContactFlowState? contactFlowState,
  4. String? description,
  5. String? name,
})

Updates metadata about specified flow.

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

Parameter contactFlowId : The identifier of the flow.

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 contactFlowState : The state of flow.

Parameter description : The description of the flow.

Parameter name : The name of the flow.

Implementation

Future<void> updateContactFlowMetadata({
  required String contactFlowId,
  required String instanceId,
  ContactFlowState? contactFlowState,
  String? description,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    if (contactFlowState != null) 'ContactFlowState': contactFlowState.value,
    if (description != null) 'Description': description,
    if (name != null) 'Name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/contact-flows/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(contactFlowId)}/metadata',
    exceptionFnMap: _exceptionFns,
  );
}