createIntegration method
Creates a new integration with a third-party provider, such as GitHub, for code review and remediation.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter input :
The provider-specific input required to create the integration.
Parameter integrationDisplayName :
The display name for the integration.
Parameter provider :
The integration provider. Currently, only GITHUB is supported.
Parameter kmsKeyId :
The identifier of the AWS KMS key to use for encrypting data associated
with the integration.
Parameter tags :
The tags to associate with the integration.
Implementation
Future<CreateIntegrationOutput> createIntegration({
required ProviderInput input,
required String integrationDisplayName,
required Provider provider,
String? kmsKeyId,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'input': input,
'integrationDisplayName': integrationDisplayName,
'provider': provider.value,
if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/CreateIntegration',
exceptionFnMap: _exceptionFns,
);
return CreateIntegrationOutput.fromJson(response);
}