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'|'GITHUB_ENTERPRISE_SERVER', details={ 'gitlabSelfManaged': { 'instanceUrl': 'string', 'accessToken': 'string', 'vpcConfiguration': { 'vpcId': 'string', 'vpcEndpointId': 'string', 'codeConnectionsHostArn': 'string', 'subnetIds': [ 'string', ], 'securityGroups': [ 'string', ], 'tlsCertificate': 'string' } }, 'githubEnterprise': { 'instanceUrl': 'string', 'vpcConfiguration': { 'vpcId': 'string', 'vpcEndpointId': 'string', 'codeConnectionsHostArn': 'string', 'subnetIds': [ 'string', ], 'securityGroups': [ 'string', ], 'tlsCertificate': '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,githubEnterprise.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.
vpcConfiguration (dict) –
The VPC configuration used to connect to the self-managed GitLab instance in a private network. For publicly accessible instances, omit this field.
vpcId (string) – [REQUIRED]
The ID of the VPC that Amazon Inspector connects through to reach the repository provider.
vpcEndpointId (string) – [REQUIRED]
The ID of the VPC endpoint used for the connection.
codeConnectionsHostArn (string) –
The Amazon Resource Name (ARN) of the AWS CodeConnections host used for the connection.
subnetIds (list) –
The IDs of the subnets used for the connection.
(string) –
securityGroups (list) –
The IDs of the security groups used for the connection.
(string) –
tlsCertificate (string) –
The TLS certificate used to establish a trusted connection to the repository provider.
githubEnterprise (dict) –
Details specific to creating an integration with a GitHub Enterprise Server instance.
instanceUrl (string) – [REQUIRED]
The URL of the GitHub Enterprise Server instance.
vpcConfiguration (dict) –
The VPC configuration used to connect to the GitHub Enterprise Server instance in a private network. For publicly accessible instances, omit this field.
vpcId (string) – [REQUIRED]
The ID of the VPC that Amazon Inspector connects through to reach the repository provider.
vpcEndpointId (string) – [REQUIRED]
The ID of the VPC endpoint used for the connection.
codeConnectionsHostArn (string) –
The Amazon Resource Name (ARN) of the AWS CodeConnections host used for the connection.
subnetIds (list) –
The IDs of the subnets used for the connection.
(string) –
securityGroups (list) –
The IDs of the security groups used for the connection.
(string) –
tlsCertificate (string) –
The TLS certificate used to establish a trusted connection to the repository provider.
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'|'ESTABLISHING_CONNECTION_IN_PROGRESS'|'ESTABLISHING_CONNECTION_COMPLETED'|'ESTABLISHING_CONNECTION_FAILED'|'PENDING_MANIFEST_CODE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED', '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