EC2 / Client / get_flow_logs_integration_template

get_flow_logs_integration_template#

EC2.Client.get_flow_logs_integration_template(**kwargs)#

Generates a CloudFormation template that streamlines and automates the integration of VPC flow logs with Amazon Athena. This make it easier for you to query and gain insights from VPC flow logs data. Based on the information that you provide, we configure resources in the template to do the following:

  • Create a table in Athena that maps fields to a custom log format

  • Create a Lambda function that updates the table with new partitions on a daily, weekly, or monthly basis

  • Create a table partitioned between two timestamps in the past

  • Create a set of named queries in Athena that you can use to get started quickly

See also: AWS API Documentation

Request Syntax

response = client.get_flow_logs_integration_template(
    DryRun=True|False,
    FlowLogId='string',
    ConfigDeliveryS3DestinationArn='string',
    IntegrateServices={
        'AthenaIntegrations': [
            {
                'IntegrationResultS3DestinationArn': 'string',
                'PartitionLoadFrequency': 'none'|'daily'|'weekly'|'monthly',
                'PartitionStartDate': datetime(2015, 1, 1),
                'PartitionEndDate': datetime(2015, 1, 1)
            },
        ]
    }
)
Parameters:
  • DryRun (boolean) – Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • FlowLogId (string) –

    [REQUIRED]

    The ID of the flow log.

  • ConfigDeliveryS3DestinationArn (string) –

    [REQUIRED]

    To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.

  • IntegrateServices (dict) –

    [REQUIRED]

    Information about the service integration.

    • AthenaIntegrations (list) –

      Information about the integration with Amazon Athena.

      • (dict) –

        Describes integration options for Amazon Athena.

        • IntegrationResultS3DestinationArn (string) – [REQUIRED]

          The location in Amazon S3 to store the generated CloudFormation template.

        • PartitionLoadFrequency (string) – [REQUIRED]

          The schedule for adding new partitions to the table.

        • PartitionStartDate (datetime) –

          The start date for the partition.

        • PartitionEndDate (datetime) –

          The end date for the partition.

Return type:

dict

Returns:

Response Syntax

{
    'Result': 'string'
}

Response Structure

  • (dict) –

    • Result (string) –

      The generated CloudFormation template.