Skip to main content

flow_log

Gets an individual flow_log resource

Overview

Nameflow_log
TypeResource
Descriptionflow_log
Idawscc.ec2.flow_log

Fields

NameDatatypeDescription
idstringThe Flow Log ID
deliver_cross_account_rolestringThe ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts.
deliver_logs_permission_arnstringThe ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account. If you specify LogDestinationType as s3 or kinesis-data-firehose, do not specify DeliverLogsPermissionArn or LogGroupName.
log_destinationstringSpecifies the destination to which the flow log data is to be published. Flow log data can be published to a CloudWatch Logs log group, an Amazon S3 bucket, or a Kinesis Firehose stream. The value specified for this parameter depends on the value specified for LogDestinationType.
log_destination_typestringSpecifies the type of destination to which the flow log data is to be published. Flow log data can be published to CloudWatch Logs or Amazon S3.
log_formatstringThe fields to include in the flow log record, in the order in which they should appear.
log_group_namestringThe name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. If you specify LogDestinationType as s3 or kinesis-data-firehose, do not specify DeliverLogsPermissionArn or LogGroupName.
max_aggregation_intervalintegerThe maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. You can specify 60 seconds (1 minute) or 600 seconds (10 minutes).
resource_idstringThe ID of the subnet, network interface, or VPC for which you want to create a flow log.
resource_typestringThe type of resource for which to create the flow log. For example, if you specified a VPC ID for the ResourceId property, specify VPC for this property.
tagsarrayThe tags to apply to the flow logs.
traffic_typestringThe type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic.
destination_optionsobject
regionstringAWS region.

Methods

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
id,
deliver_cross_account_role,
deliver_logs_permission_arn,
log_destination,
log_destination_type,
log_format,
log_group_name,
max_aggregation_interval,
resource_id,
resource_type,
tags,
traffic_type,
destination_options
FROM awscc.ec2.flow_log
WHERE data__Identifier = '<Id>';

Permissions

To operate on the flow_log resource, the following permissions are required:

Read

ec2:DescribeFlowLogs

Update

ec2:CreateTags,
ec2:DeleteTags,
ec2:DescribeFlowLogs

Delete

ec2:DeleteFlowLogs,
ec2:DescribeFlowLogs,
logs:DeleteLogDelivery