Skip to main content

code_security_integrations

Creates, updates, deletes, gets or lists a code_security_integrations resource.

Overview

Namecode_security_integrations
TypeResource
Idaws.inspector2.code_security_integrations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the code security integration. (pattern: <code>[a-zA-Z0-9-_$:.]*</code>)
authorization_urlstringThe URL used to authorize the integration with the repository provider. This is only returned if reauthorization is required to fix a connection issue. Otherwise, it is null.
created_onstring (date-time)The timestamp when the code security integration was created.
integration_arnstringarn:aws:inspector2:::codesecurity-integration/ (pattern: <code>arn:(aws[a-zA-Z-]*)?:inspector2:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:codesecurity-integration/[a-f0-9-]{36}</code>)
last_update_onstring (date-time)The timestamp when the code security integration was last updated.
statusstringThe current status of the code security integration. (PENDING, IN_PROGRESS, ACTIVE, INACTIVE, DISABLING)
status_reasonstringThe reason for the current status of the code security integration.
tagsobjectThe tags associated with the code security integration.
type_stringThe type of repository provider for the integration. (GITLAB_SELF_MANAGED, GITHUB)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_code_security_integrationselectregionRetrieves information about a code security integration.
list_code_security_integrationsselectregionnextToken, maxResultsLists all code security integrations in your account.
create_code_security_integrationinsertregion, name, typeCreates 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
update_code_security_integrationupdateregion, integrationArn, detailsUpdates an existing code security integration. 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
delete_code_security_integrationdeleteregionDeletes a code security integration.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return in a single call.
nextTokenstringA token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

SELECT examples

Retrieves information about a code security integration.

SELECT
name,
authorization_url,
created_on,
integration_arn,
last_update_on,
status,
status_reason,
tags,
type_
FROM aws.inspector2.code_security_integrations
WHERE region = '{{ region }}' -- required
;

INSERT examples

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

INSERT INTO aws.inspector2.code_security_integrations (
name,
type,
details,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ type }}' /* required */,
'{{ details }}',
'{{ tags }}',
'{{ region }}'
RETURNING
authorization_url,
integration_arn,
status
;

UPDATE examples

Updates an existing code security integration. 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

UPDATE aws.inspector2.code_security_integrations
SET
integrationArn = '{{ integrationArn }}',
details = '{{ details }}'
WHERE
region = '{{ region }}' --required
AND integrationArn = '{{ integrationArn }}' --required
AND details = '{{ details }}' --required
RETURNING
integration_arn,
status;

DELETE examples

Deletes a code security integration.

DELETE FROM aws.inspector2.code_security_integrations
WHERE region = '{{ region }}' --required
;