Inspector2 / Client / batch_associate_code_security_scan_configuration

batch_associate_code_security_scan_configuration

Inspector2.Client.batch_associate_code_security_scan_configuration(**kwargs)

Associates multiple code repositories with an Amazon Inspector code security scan configuration.

See also: AWS API Documentation

Request Syntax

response = client.batch_associate_code_security_scan_configuration(
    associateConfigurationRequests=[
        {
            'resource': {
                'projectId': 'string'
            },
            'scanConfigurationArn': 'string'
        },
    ]
)
Parameters:

associateConfigurationRequests (list) –

[REQUIRED]

A list of code repositories to associate with the specified scan configuration.

  • (dict) –

    Contains details about a request to associate a code repository with a scan configuration.

    • resource (dict) – [REQUIRED]

      Identifies a specific resource in a code repository that will be scanned.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: projectId.

      • projectId (string) –

        The unique identifier of the project in the code repository.

    • scanConfigurationArn (string) – [REQUIRED]

      The Amazon Resource Name (ARN) of the scan configuration.

Return type:

dict

Returns:

Response Syntax

{
    'failedAssociations': [
        {
            'resource': {
                'projectId': 'string'
            },
            'scanConfigurationArn': 'string',
            'statusCode': 'INTERNAL_ERROR'|'ACCESS_DENIED'|'SCAN_CONFIGURATION_NOT_FOUND'|'INVALID_INPUT'|'RESOURCE_NOT_FOUND'|'QUOTA_EXCEEDED',
            'statusMessage': 'string'
        },
    ],
    'successfulAssociations': [
        {
            'resource': {
                'projectId': 'string'
            },
            'scanConfigurationArn': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • failedAssociations (list) –

      Details of any code repositories that failed to be associated with the scan configuration.

      • (dict) –

        Details about a failed attempt to associate or disassociate a code repository with a scan configuration.

        • resource (dict) –

          Identifies a specific resource in a code repository that will be scanned.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: projectId. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          
          • projectId (string) –

            The unique identifier of the project in the code repository.

        • scanConfigurationArn (string) –

          The Amazon Resource Name (ARN) of the scan configuration that failed to be associated or disassociated.

        • statusCode (string) –

          The status code indicating why the association or disassociation failed.

        • statusMessage (string) –

          A message explaining why the association or disassociation failed.

    • successfulAssociations (list) –

      Details of code repositories that were successfully associated with the scan configuration.

      • (dict) –

        Details about a successful association or disassociation between a code repository and a scan configuration.

        • resource (dict) –

          Identifies a specific resource in a code repository that will be scanned.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: projectId. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          
          • projectId (string) –

            The unique identifier of the project in the code repository.

        • scanConfigurationArn (string) –

          The Amazon Resource Name (ARN) of the scan configuration that was successfully associated or disassociated.

Exceptions

  • Inspector2.Client.exceptions.ConflictException

  • Inspector2.Client.exceptions.AccessDeniedException

  • Inspector2.Client.exceptions.ValidationException

  • Inspector2.Client.exceptions.ResourceNotFoundException

  • Inspector2.Client.exceptions.ThrottlingException

  • Inspector2.Client.exceptions.InternalServerException