SecurityLake / Client / list_log_sources

list_log_sources#

SecurityLake.Client.list_log_sources(**kwargs)#

Retrieves the log sources in the current Amazon Web Services Region.

See also: AWS API Documentation

Request Syntax

response = client.list_log_sources(
    accounts=[
        'string',
    ],
    maxResults=123,
    nextToken='string',
    regions=[
        'string',
    ],
    sources=[
        {
            'awsLogSource': {
                'sourceName': 'ROUTE53'|'VPC_FLOW'|'SH_FINDINGS'|'CLOUD_TRAIL_MGMT'|'LAMBDA_EXECUTION'|'S3_DATA'|'EKS_AUDIT'|'WAF',
                'sourceVersion': 'string'
            },
            'customLogSource': {
                'attributes': {
                    'crawlerArn': 'string',
                    'databaseArn': 'string',
                    'tableArn': 'string'
                },
                'provider': {
                    'location': 'string',
                    'roleArn': 'string'
                },
                'sourceName': 'string',
                'sourceVersion': 'string'
            }
        },
    ]
)
Parameters:
  • accounts (list) –

    The list of Amazon Web Services accounts for which log sources are displayed.

    • (string) –

  • maxResults (integer) – The maximum number of accounts for which the log sources are displayed.

  • nextToken (string) – If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page.

  • regions (list) –

    The list of Regions for which log sources are displayed.

    • (string) –

  • sources (list) –

    The list of sources for which log sources are displayed.

    • (dict) –

      The supported source types from which logs and events are collected in Amazon Security Lake. For a list of supported Amazon Web Services, see the Amazon Security Lake User Guide.

      Note

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

      • awsLogSource (dict) –

        Amazon Security Lake supports log and event collection for natively supported Amazon Web Services. For more information, see the Amazon Security Lake User Guide.

        • sourceName (string) –

          The name for a Amazon Web Services source. This must be a Regionally unique value.

        • sourceVersion (string) –

          The version for a Amazon Web Services source. This must be a Regionally unique value.

      • customLogSource (dict) –

        Amazon Security Lake supports custom source types. For more information, see the Amazon Security Lake User Guide.

        • attributes (dict) –

          The attributes of a third-party custom source.

          • crawlerArn (string) –

            The ARN of the Glue crawler.

          • databaseArn (string) –

            The ARN of the Glue database where results are written, such as: arn:aws:daylight:us-east-1::database/sometable/*.

          • tableArn (string) –

            The ARN of the Glue table.

        • provider (dict) –

          The details of the log provider for a third-party custom source.

          • location (string) –

            The location of the partition in the Amazon S3 bucket for Security Lake.

          • roleArn (string) –

            The ARN of the IAM role to be used by the entity putting logs into your custom source partition. Security Lake will apply the correct access policies to this role, but you must first manually create the trust policy for this role. The IAM role name must start with the text ‘Security Lake’. The IAM role must trust the logProviderAccountId to assume the role.

        • sourceName (string) –

          The name for a third-party custom source. This must be a Regionally unique value.

        • sourceVersion (string) –

          The version for a third-party custom source. This must be a Regionally unique value.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'sources': [
        {
            'account': 'string',
            'region': 'string',
            'sources': [
                {
                    'awsLogSource': {
                        'sourceName': 'ROUTE53'|'VPC_FLOW'|'SH_FINDINGS'|'CLOUD_TRAIL_MGMT'|'LAMBDA_EXECUTION'|'S3_DATA'|'EKS_AUDIT'|'WAF',
                        'sourceVersion': 'string'
                    },
                    'customLogSource': {
                        'attributes': {
                            'crawlerArn': 'string',
                            'databaseArn': 'string',
                            'tableArn': 'string'
                        },
                        'provider': {
                            'location': 'string',
                            'roleArn': 'string'
                        },
                        'sourceName': 'string',
                        'sourceVersion': 'string'
                    }
                },
            ]
        },
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page.

    • sources (list) –

      The list of log sources in your organization that send data to the data lake.

      • (dict) –

        Amazon Security Lake can collect logs and events from natively-supported Amazon Web Services services and custom sources.

        • account (string) –

          Specify the account from which you want to collect logs.

        • region (string) –

          Specify the Regions from which you want to collect logs.

        • sources (list) –

          Specify the sources from which you want to collect logs.

          • (dict) –

            The supported source types from which logs and events are collected in Amazon Security Lake. For a list of supported Amazon Web Services, see the Amazon Security Lake User Guide.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: awsLogSource, customLogSource. 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'}
            
            • awsLogSource (dict) –

              Amazon Security Lake supports log and event collection for natively supported Amazon Web Services. For more information, see the Amazon Security Lake User Guide.

              • sourceName (string) –

                The name for a Amazon Web Services source. This must be a Regionally unique value.

              • sourceVersion (string) –

                The version for a Amazon Web Services source. This must be a Regionally unique value.

            • customLogSource (dict) –

              Amazon Security Lake supports custom source types. For more information, see the Amazon Security Lake User Guide.

              • attributes (dict) –

                The attributes of a third-party custom source.

                • crawlerArn (string) –

                  The ARN of the Glue crawler.

                • databaseArn (string) –

                  The ARN of the Glue database where results are written, such as: arn:aws:daylight:us-east-1::database/sometable/*.

                • tableArn (string) –

                  The ARN of the Glue table.

              • provider (dict) –

                The details of the log provider for a third-party custom source.

                • location (string) –

                  The location of the partition in the Amazon S3 bucket for Security Lake.

                • roleArn (string) –

                  The ARN of the IAM role to be used by the entity putting logs into your custom source partition. Security Lake will apply the correct access policies to this role, but you must first manually create the trust policy for this role. The IAM role name must start with the text ‘Security Lake’. The IAM role must trust the logProviderAccountId to assume the role.

              • sourceName (string) –

                The name for a third-party custom source. This must be a Regionally unique value.

              • sourceVersion (string) –

                The version for a third-party custom source. This must be a Regionally unique value.

Exceptions