Inspector2 / Client / create_code_security_integration
create_code_security_integration¶
- Inspector2.Client.create_code_security_integration(**kwargs)¶
Creates a code security integration with a source code repository provider.
After calling the
CreateCodeSecurityIntegrationoperation, you complete authentication and authorization with your provider. Next you call theUpdateCodeSecurityIntegrationoperation to provide thedetailsto complete the integration setupSee also: AWS API Documentation
Request Syntax
response = client.create_code_security_integration( name='string', type='GITLAB_SELF_MANAGED'|'GITHUB', details={ 'gitlabSelfManaged': { 'instanceUrl': 'string', 'accessToken': 'string' } }, tags={ 'string': 'string' } )
- Parameters:
name (string) –
[REQUIRED]
The name of the code security integration.
type (string) –
[REQUIRED]
The type of repository provider for the integration.
details (dict) –
The integration details specific to the repository provider type.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
gitlabSelfManaged.gitlabSelfManaged (dict) –
Details specific to creating an integration with a self-managed GitLab instance.
instanceUrl (string) – [REQUIRED]
The URL of the self-managed GitLab instance.
accessToken (string) – [REQUIRED]
The personal access token used to authenticate with the self-managed GitLab instance.
tags (dict) –
The tags to apply to the code security integration.
(string) –
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'integrationArn': 'string', 'status': 'PENDING'|'IN_PROGRESS'|'ACTIVE'|'INACTIVE'|'DISABLING', 'authorizationUrl': 'string' }
Response Structure
(dict) –
integrationArn (string) –
The Amazon Resource Name (ARN) of the created code security integration.
status (string) –
The current status of the code security integration.
authorizationUrl (string) –
The URL used to authorize the integration with the repository provider.
Exceptions
Inspector2.Client.exceptions.ServiceQuotaExceededExceptionInspector2.Client.exceptions.ConflictExceptionInspector2.Client.exceptions.AccessDeniedExceptionInspector2.Client.exceptions.ValidationExceptionInspector2.Client.exceptions.ThrottlingExceptionInspector2.Client.exceptions.InternalServerException