createCodeSecurityIntegration method

Future<CreateCodeSecurityIntegrationResponse> createCodeSecurityIntegration({
  1. required String name,
  2. required IntegrationType type,
  3. CreateIntegrationDetail? details,
  4. Map<String, String>? tags,
})

Creates a code security integration with a source code repository provider.

After calling the CreateCodeSecurityIntegration operation, you complete authentication and authorization with your provider. Next you call the UpdateCodeSecurityIntegration operation to provide the details to complete the integration setup

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter name : The name of the code security integration.

Parameter type : The type of repository provider for the integration.

Parameter details : The integration details specific to the repository provider type.

Parameter tags : The tags to apply to the code security integration.

Implementation

Future<CreateCodeSecurityIntegrationResponse> createCodeSecurityIntegration({
  required String name,
  required IntegrationType type,
  CreateIntegrationDetail? details,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'type': type.value,
    if (details != null) 'details': details,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/codesecurity/integration/create',
    exceptionFnMap: _exceptionFns,
  );
  return CreateCodeSecurityIntegrationResponse.fromJson(response);
}