createIntegration method
Creates a Zero-ETL integration in the caller's account between two
resources with Amazon Resource Names (ARNs): the SourceArn
and TargetArn.
May throw AccessDeniedException.
May throw ConflictException.
May throw EntityNotFoundException.
May throw IntegrationConflictOperationFault.
May throw IntegrationQuotaExceededFault.
May throw InternalServerException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw KMSKeyNotAccessibleFault.
May throw ResourceNotFoundException.
May throw ResourceNumberLimitExceededException.
May throw ValidationException.
Parameter integrationName :
A unique name for an integration in Glue.
Parameter sourceArn :
The ARN of the source resource for the integration.
Parameter targetArn :
The ARN of the target resource for the integration.
Parameter additionalEncryptionContext :
An optional set of non-secret key–value pairs that contains additional
contextual information for encryption. This can only be provided if
KMSKeyId is provided.
Parameter dataFilter :
Selects source tables for the integration using Maxwell filter syntax.
Parameter description :
A description of the integration.
Parameter integrationConfig :
The configuration settings.
Parameter kmsKeyId :
The ARN of a KMS key used for encrypting the channel.
Parameter tags :
Metadata assigned to the resource consisting of a list of key-value pairs.
Implementation
Future<CreateIntegrationResponse> createIntegration({
required String integrationName,
required String sourceArn,
required String targetArn,
Map<String, String>? additionalEncryptionContext,
String? dataFilter,
String? description,
IntegrationConfig? integrationConfig,
String? kmsKeyId,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.CreateIntegration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'IntegrationName': integrationName,
'SourceArn': sourceArn,
'TargetArn': targetArn,
if (additionalEncryptionContext != null)
'AdditionalEncryptionContext': additionalEncryptionContext,
if (dataFilter != null) 'DataFilter': dataFilter,
if (description != null) 'Description': description,
if (integrationConfig != null) 'IntegrationConfig': integrationConfig,
if (kmsKeyId != null) 'KmsKeyId': kmsKeyId,
if (tags != null) 'Tags': tags,
},
);
return CreateIntegrationResponse.fromJson(jsonResponse.body);
}