code_security_integrations
Creates, updates, deletes or gets a code_security_integration resource or lists code_security_integrations in a region
Overview
| Name | code_security_integrations |
| Type | Resource |
| Description | Inspector CodeSecurityIntegration resource schema |
| Id | awscc.inspectorv2.code_security_integrations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | Code Security Integration name |
type | string | Integration Type |
create_integration_details | object | Create Integration Details |
update_integration_details | object | Update Integration Details |
status | string | Integration Status |
status_reason | string | Reason for the current status |
arn | string | Code Security Integration ARN |
authorization_url | string | Authorization URL for OAuth flow |
created_at | string | Creation timestamp |
last_updated_at | string | Last update timestamp |
tags | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Code Security Integration ARN |
region | string | AWS region. |
For more information, see AWS::InspectorV2::CodeSecurityIntegration.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | code_security_integrations | INSERT | region |
delete_resource | code_security_integrations | DELETE | Identifier, region |
update_resource | code_security_integrations | UPDATE | Identifier, PatchDocument, region |
list_resources | code_security_integrations_list_only | SELECT | region |
get_resource | code_security_integrations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual code_security_integration.
SELECT
region,
name,
type,
create_integration_details,
update_integration_details,
status,
status_reason,
arn,
authorization_url,
created_at,
last_updated_at,
tags
FROM awscc.inspectorv2.code_security_integrations
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all code_security_integrations in a region.
SELECT
region,
arn
FROM awscc.inspectorv2.code_security_integrations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new code_security_integration resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.inspectorv2.code_security_integrations (
Name,
Type,
CreateIntegrationDetails,
UpdateIntegrationDetails,
Tags,
region
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ create_integration_details }}',
'{{ update_integration_details }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.inspectorv2.code_security_integrations (
Name,
Type,
CreateIntegrationDetails,
UpdateIntegrationDetails,
Tags,
region
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ create_integration_details }}',
'{{ update_integration_details }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: code_security_integration
props:
- name: name
value: '{{ name }}'
- name: type
value: '{{ type }}'
- name: create_integration_details
value:
gitlab_self_managed:
instance_url: '{{ instance_url }}'
access_token: '{{ access_token }}'
- name: update_integration_details
value:
gitlab_self_managed:
auth_code: '{{ auth_code }}'
github:
code: '{{ code }}'
installation_id: '{{ installation_id }}'
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a code_security_integration resource, using stack-deploy.
/*+ update */
UPDATE awscc.inspectorv2.code_security_integrations
SET PatchDocument = string('{{ {
"Name": name,
"Type": type,
"UpdateIntegrationDetails": update_integration_details
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.inspectorv2.code_security_integrations
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the code_security_integrations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
inspector2:CreateCodeSecurityIntegration,
inspector2:GetCodeSecurityIntegration,
inspector2:TagResource
inspector2:GetCodeSecurityIntegration,
inspector2:ListTagsForResource
inspector2:UpdateCodeSecurityIntegration,
inspector2:GetCodeSecurityIntegration,
inspector2:ListTagsForResource,
inspector2:TagResource,
inspector2:UntagResource
inspector2:DeleteCodeSecurityIntegration,
inspector2:GetCodeSecurityIntegration
inspector2:ListCodeSecurityIntegrations