associateFlow method

Future<void> associateFlow({
  1. required String flowId,
  2. required String instanceId,
  3. required String resourceId,
  4. required FlowAssociationResourceType resourceType,
})

Associates a connect resource to a flow.

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

Parameter flowId : 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 resourceId : The identifier of the resource.

  • Amazon Web Services End User Messaging SMS phone number ARN when using SMS_PHONE_NUMBER
  • Amazon Web Services End User Messaging Social phone number ARN when using WHATSAPP_MESSAGING_PHONE_NUMBER

Parameter resourceType : A valid resource type.

Implementation

Future<void> associateFlow({
  required String flowId,
  required String instanceId,
  required String resourceId,
  required FlowAssociationResourceType resourceType,
}) async {
  final $payload = <String, dynamic>{
    'FlowId': flowId,
    'ResourceId': resourceId,
    'ResourceType': resourceType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/flow-associations/${Uri.encodeComponent(instanceId)}',
    exceptionFnMap: _exceptionFns,
  );
}