Skip to content

get_flow_logs_integration_template async

get_flow_logs_integration_template(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    flow_log_id: Optional[VpcFlowLogId] = None,
    config_delivery_s3_destination_arn: Optional[String] = None,
    integrate_services: Optional[IntegrateServices] = None,
) -> GetFlowLogsIntegrationTemplateResult

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

GetFlowLogsIntegrationTemplate does not support integration between Amazon Web Services Transit Gateway Flow Logs and Amazon Athena.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    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.

  • flow_log_id (Optional[VpcFlowLogId], default: None ) –

    The ID of the flow log.

  • config_delivery_s3_destination_arn (Optional[String], default: None ) –

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

  • integrate_services (Optional[IntegrateServices], default: None ) –

    Information about the service integration.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def get_flow_logs_integration_template(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    flow_log_id: Optional["capo_ec2.types.vpc_flow_log_id.VpcFlowLogId"] = None,
    config_delivery_s3_destination_arn: Optional[
        "capo_ec2.types.string.String"
    ] = None,
    integrate_services: Optional[
        "capo_ec2.types.integrate_services.IntegrateServices"
    ] = None,
) -> "capo_ec2.types.get_flow_logs_integration_template_result.GetFlowLogsIntegrationTemplateResult":
    """<p>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:</p> <ul> <li> <p>Create a table in Athena that maps fields to a custom log format</p> </li> <li> <p>Create a Lambda function that updates the table with new partitions on a daily, weekly, or monthly basis</p> </li> <li> <p>Create a table partitioned between two timestamps in the past</p> </li> <li> <p>Create a set of named queries in Athena that you can use to get started quickly</p> </li> </ul> <note> <p> <code>GetFlowLogsIntegrationTemplate</code> does not support integration between Amazon Web Services Transit Gateway Flow Logs and Amazon Athena.</p> </note>

    Args:
        dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        flow_log_id: <p>The ID of the flow log.</p>
        config_delivery_s3_destination_arn: <p>To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.</p>
        integrate_services: <p>Information about the service integration.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.get_flow_logs_integration_template_request.GetFlowLogsIntegrationTemplateRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.get_flow_logs_integration_template_result.GetFlowLogsIntegrationTemplateResult"
    ]:
        import capo_ec2._operations.amazon_ec2.get_flow_logs_integration_template

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.get_flow_logs_integration_template.async_get_flow_logs_integration_template(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetFlowLogsIntegrationTemplate")
    )
    input_: capo_ec2.types.get_flow_logs_integration_template_request.GetFlowLogsIntegrationTemplateRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if flow_log_id is not None:
        input_["flow_log_id"] = flow_log_id
    if config_delivery_s3_destination_arn is not None:
        input_["config_delivery_s3_destination_arn"] = (
            config_delivery_s3_destination_arn
        )
    if integrate_services is not None:
        input_["integrate_services"] = integrate_services

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output