createIntegrationAssociation method
Future<CreateIntegrationAssociationResponse>
createIntegrationAssociation({
- required String instanceId,
- required String integrationArn,
- required IntegrationType integrationType,
- required String sourceApplicationName,
- required String sourceApplicationUrl,
- required SourceType sourceType,
This API is in preview release for Amazon Connect and is subject to change.
Create an AppIntegration association with an Amazon Connect instance.
May throw DuplicateResourceException. May throw ResourceNotFoundException. May throw InternalServiceException. May throw InvalidRequestException. May throw ThrottlingException.
Parameter instanceId
:
The identifier of the Amazon Connect 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.
Parameter sourceApplicationUrl
:
The URL for the external application.
Parameter sourceType
:
The type of the data source.
Implementation
Future<CreateIntegrationAssociationResponse> createIntegrationAssociation({
required String instanceId,
required String integrationArn,
required IntegrationType integrationType,
required String sourceApplicationName,
required String sourceApplicationUrl,
required SourceType sourceType,
}) async {
ArgumentError.checkNotNull(instanceId, 'instanceId');
_s.validateStringLength(
'instanceId',
instanceId,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(integrationArn, 'integrationArn');
ArgumentError.checkNotNull(integrationType, 'integrationType');
ArgumentError.checkNotNull(sourceApplicationName, 'sourceApplicationName');
_s.validateStringLength(
'sourceApplicationName',
sourceApplicationName,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(sourceApplicationUrl, 'sourceApplicationUrl');
_s.validateStringLength(
'sourceApplicationUrl',
sourceApplicationUrl,
1,
2000,
isRequired: true,
);
ArgumentError.checkNotNull(sourceType, 'sourceType');
final $payload = <String, dynamic>{
'IntegrationArn': integrationArn,
'IntegrationType': integrationType.toValue(),
'SourceApplicationName': sourceApplicationName,
'SourceApplicationUrl': sourceApplicationUrl,
'SourceType': sourceType.toValue(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/instance/${Uri.encodeComponent(instanceId)}/integration-associations',
exceptionFnMap: _exceptionFns,
);
return CreateIntegrationAssociationResponse.fromJson(response);
}