createIntegrationAssociation method

Future<CreateIntegrationAssociationResponse> createIntegrationAssociation({
  1. required String instanceId,
  2. required String integrationArn,
  3. required IntegrationType integrationType,
  4. String? sourceApplicationName,
  5. String? sourceApplicationUrl,
  6. SourceType? sourceType,
  7. Map<String, String>? tags,
})

Creates an Amazon Web Services resource association with an Connect Customer instance.

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

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 integrationArn : The Amazon Resource Name (ARN) of the integration.

Parameter integrationType : The type of information to be ingested.

Parameter sourceApplicationName : The name of the external application. This field is only required for the EVENT integration type.

Parameter sourceApplicationUrl : The URL for the external application. This field is only required for the EVENT integration type.

Parameter sourceType : The type of the data source. This field is only required for the EVENT integration type.

Parameter tags : The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

Implementation

Future<CreateIntegrationAssociationResponse> createIntegrationAssociation({
  required String instanceId,
  required String integrationArn,
  required IntegrationType integrationType,
  String? sourceApplicationName,
  String? sourceApplicationUrl,
  SourceType? sourceType,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'IntegrationArn': integrationArn,
    'IntegrationType': integrationType.value,
    if (sourceApplicationName != null)
      'SourceApplicationName': sourceApplicationName,
    if (sourceApplicationUrl != null)
      'SourceApplicationUrl': sourceApplicationUrl,
    if (sourceType != null) 'SourceType': sourceType.value,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/instance/${Uri.encodeComponent(instanceId)}/integration-associations',
    exceptionFnMap: _exceptionFns,
  );
  return CreateIntegrationAssociationResponse.fromJson(response);
}