Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates one or more flow logs to capture information about IP traffic for a specific network interface, subnet, or VPC.
Flow log data for a monitored network interface is recorded as flow log records, which are log events consisting of fields that describe the traffic flow. For more information, see Flow log records in the Amazon Virtual Private Cloud User Guide.
When publishing to CloudWatch Logs, flow log records are published to a log group, and each network interface has a unique log stream in the log group. When publishing to Amazon S3, flow log records for all of the monitored network interfaces are published to a single log file object that is stored in the specified bucket.
For more information, see VPC Flow Logs in the Amazon Virtual Private Cloud User Guide.
Synopsis
- data CreateFlowLogs = CreateFlowLogs' {
- clientToken :: Maybe Text
- deliverCrossAccountRole :: Maybe Text
- deliverLogsPermissionArn :: Maybe Text
- destinationOptions :: Maybe DestinationOptionsRequest
- dryRun :: Maybe Bool
- logDestination :: Maybe Text
- logDestinationType :: Maybe LogDestinationType
- logFormat :: Maybe Text
- logGroupName :: Maybe Text
- maxAggregationInterval :: Maybe Int
- tagSpecifications :: Maybe [TagSpecification]
- trafficType :: Maybe TrafficType
- resourceIds :: [Text]
- resourceType :: FlowLogsResourceType
- newCreateFlowLogs :: FlowLogsResourceType -> CreateFlowLogs
- createFlowLogs_clientToken :: Lens' CreateFlowLogs (Maybe Text)
- createFlowLogs_deliverCrossAccountRole :: Lens' CreateFlowLogs (Maybe Text)
- createFlowLogs_deliverLogsPermissionArn :: Lens' CreateFlowLogs (Maybe Text)
- createFlowLogs_destinationOptions :: Lens' CreateFlowLogs (Maybe DestinationOptionsRequest)
- createFlowLogs_dryRun :: Lens' CreateFlowLogs (Maybe Bool)
- createFlowLogs_logDestination :: Lens' CreateFlowLogs (Maybe Text)
- createFlowLogs_logDestinationType :: Lens' CreateFlowLogs (Maybe LogDestinationType)
- createFlowLogs_logFormat :: Lens' CreateFlowLogs (Maybe Text)
- createFlowLogs_logGroupName :: Lens' CreateFlowLogs (Maybe Text)
- createFlowLogs_maxAggregationInterval :: Lens' CreateFlowLogs (Maybe Int)
- createFlowLogs_tagSpecifications :: Lens' CreateFlowLogs (Maybe [TagSpecification])
- createFlowLogs_trafficType :: Lens' CreateFlowLogs (Maybe TrafficType)
- createFlowLogs_resourceIds :: Lens' CreateFlowLogs [Text]
- createFlowLogs_resourceType :: Lens' CreateFlowLogs FlowLogsResourceType
- data CreateFlowLogsResponse = CreateFlowLogsResponse' {
- clientToken :: Maybe Text
- flowLogIds :: Maybe [Text]
- unsuccessful :: Maybe [UnsuccessfulItem]
- httpStatus :: Int
- newCreateFlowLogsResponse :: Int -> CreateFlowLogsResponse
- createFlowLogsResponse_clientToken :: Lens' CreateFlowLogsResponse (Maybe Text)
- createFlowLogsResponse_flowLogIds :: Lens' CreateFlowLogsResponse (Maybe [Text])
- createFlowLogsResponse_unsuccessful :: Lens' CreateFlowLogsResponse (Maybe [UnsuccessfulItem])
- createFlowLogsResponse_httpStatus :: Lens' CreateFlowLogsResponse Int
Creating a Request
data CreateFlowLogs Source #
See: newCreateFlowLogs
smart constructor.
CreateFlowLogs' | |
|
Instances
Create a value of CreateFlowLogs
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateFlowLogs
, createFlowLogs_clientToken
- Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. For more information, see
How to ensure idempotency.
CreateFlowLogs
, createFlowLogs_deliverCrossAccountRole
- The ARN of the IAM role that allows Amazon EC2 to publish flow logs
across accounts.
CreateFlowLogs
, createFlowLogs_deliverLogsPermissionArn
- The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a
CloudWatch Logs log group in your account.
This parameter is required if the destination type is cloud-watch-logs
and unsupported otherwise.
CreateFlowLogs
, createFlowLogs_destinationOptions
- The destination options.
$sel:dryRun:CreateFlowLogs'
, createFlowLogs_dryRun
- 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
.
CreateFlowLogs
, createFlowLogs_logDestination
- The destination for the flow log data. The meaning of this parameter
depends on the destination type.
If the destination type is
cloud-watch-logs
, specify the ARN of a CloudWatch Logs log group. For example:arn:aws:logs:region:account_id:log-group:my_group
Alternatively, use the
LogGroupName
parameter.If the destination type is
s3
, specify the ARN of an S3 bucket. For example:arn:aws:s3:::my_bucket/my_subfolder/
The subfolder is optional. Note that you can't use
AWSLogs
as a subfolder name.If the destination type is
kinesis-data-firehose
, specify the ARN of a Kinesis Data Firehose delivery stream. For example:arn:aws:firehose:region:account_id:deliverystream:my_stream
CreateFlowLogs
, createFlowLogs_logDestinationType
- The type of destination for the flow log data.
Default: cloud-watch-logs
CreateFlowLogs
, createFlowLogs_logFormat
- The fields to include in the flow log record. List the fields in the
order in which they should appear. If you omit this parameter, the flow
log is created using the default format. If you specify this parameter,
you must include at least one field. For more information about the
available fields, see
Flow log records
in the Amazon VPC User Guide or
Transit Gateway Flow Log records
in the Amazon Web Services Transit Gateway Guide.
Specify the fields using the ${field-id}
format, separated by spaces.
For the CLI, surround this parameter value with single quotes on Linux
or double quotes on Windows.
CreateFlowLogs
, createFlowLogs_logGroupName
- The name of a new or existing CloudWatch Logs log group where Amazon EC2
publishes your flow logs.
This parameter is valid only if the destination type is
cloud-watch-logs
.
CreateFlowLogs
, createFlowLogs_maxAggregationInterval
- The maximum interval of time during which a flow of packets is captured
and aggregated into a flow log record. The possible values are 60
seconds (1 minute) or 600 seconds (10 minutes). This parameter must be
60 seconds for transit gateway resource types.
When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify.
Default: 600
CreateFlowLogs
, createFlowLogs_tagSpecifications
- The tags to apply to the flow logs.
CreateFlowLogs
, createFlowLogs_trafficType
- The type of traffic to monitor (accepted traffic, rejected traffic, or
all traffic). This parameter is not supported for transit gateway
resource types. It is required for the other resource types.
$sel:resourceIds:CreateFlowLogs'
, createFlowLogs_resourceIds
- The IDs of the resources to monitor. For example, if the resource type
is VPC
, specify the IDs of the VPCs.
Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types.
CreateFlowLogs
, createFlowLogs_resourceType
- The type of resource to monitor.
Request Lenses
createFlowLogs_clientToken :: Lens' CreateFlowLogs (Maybe Text) Source #
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
createFlowLogs_deliverCrossAccountRole :: Lens' CreateFlowLogs (Maybe Text) Source #
The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts.
createFlowLogs_deliverLogsPermissionArn :: Lens' CreateFlowLogs (Maybe Text) Source #
The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account.
This parameter is required if the destination type is cloud-watch-logs
and unsupported otherwise.
createFlowLogs_destinationOptions :: Lens' CreateFlowLogs (Maybe DestinationOptionsRequest) Source #
The destination options.
createFlowLogs_dryRun :: Lens' CreateFlowLogs (Maybe Bool) Source #
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
.
createFlowLogs_logDestination :: Lens' CreateFlowLogs (Maybe Text) Source #
The destination for the flow log data. The meaning of this parameter depends on the destination type.
If the destination type is
cloud-watch-logs
, specify the ARN of a CloudWatch Logs log group. For example:arn:aws:logs:region:account_id:log-group:my_group
Alternatively, use the
LogGroupName
parameter.If the destination type is
s3
, specify the ARN of an S3 bucket. For example:arn:aws:s3:::my_bucket/my_subfolder/
The subfolder is optional. Note that you can't use
AWSLogs
as a subfolder name.If the destination type is
kinesis-data-firehose
, specify the ARN of a Kinesis Data Firehose delivery stream. For example:arn:aws:firehose:region:account_id:deliverystream:my_stream
createFlowLogs_logDestinationType :: Lens' CreateFlowLogs (Maybe LogDestinationType) Source #
The type of destination for the flow log data.
Default: cloud-watch-logs
createFlowLogs_logFormat :: Lens' CreateFlowLogs (Maybe Text) Source #
The fields to include in the flow log record. List the fields in the order in which they should appear. If you omit this parameter, the flow log is created using the default format. If you specify this parameter, you must include at least one field. For more information about the available fields, see Flow log records in the Amazon VPC User Guide or Transit Gateway Flow Log records in the Amazon Web Services Transit Gateway Guide.
Specify the fields using the ${field-id}
format, separated by spaces.
For the CLI, surround this parameter value with single quotes on Linux
or double quotes on Windows.
createFlowLogs_logGroupName :: Lens' CreateFlowLogs (Maybe Text) Source #
The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.
This parameter is valid only if the destination type is
cloud-watch-logs
.
createFlowLogs_maxAggregationInterval :: Lens' CreateFlowLogs (Maybe Int) Source #
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for transit gateway resource types.
When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify.
Default: 600
createFlowLogs_tagSpecifications :: Lens' CreateFlowLogs (Maybe [TagSpecification]) Source #
The tags to apply to the flow logs.
createFlowLogs_trafficType :: Lens' CreateFlowLogs (Maybe TrafficType) Source #
The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not supported for transit gateway resource types. It is required for the other resource types.
createFlowLogs_resourceIds :: Lens' CreateFlowLogs [Text] Source #
The IDs of the resources to monitor. For example, if the resource type
is VPC
, specify the IDs of the VPCs.
Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types.
createFlowLogs_resourceType :: Lens' CreateFlowLogs FlowLogsResourceType Source #
The type of resource to monitor.
Destructuring the Response
data CreateFlowLogsResponse Source #
See: newCreateFlowLogsResponse
smart constructor.
CreateFlowLogsResponse' | |
|
Instances
newCreateFlowLogsResponse Source #
Create a value of CreateFlowLogsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateFlowLogs
, createFlowLogsResponse_clientToken
- Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
$sel:flowLogIds:CreateFlowLogsResponse'
, createFlowLogsResponse_flowLogIds
- The IDs of the flow logs.
$sel:unsuccessful:CreateFlowLogsResponse'
, createFlowLogsResponse_unsuccessful
- Information about the flow logs that could not be created successfully.
$sel:httpStatus:CreateFlowLogsResponse'
, createFlowLogsResponse_httpStatus
- The response's http status code.
Response Lenses
createFlowLogsResponse_clientToken :: Lens' CreateFlowLogsResponse (Maybe Text) Source #
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
createFlowLogsResponse_flowLogIds :: Lens' CreateFlowLogsResponse (Maybe [Text]) Source #
The IDs of the flow logs.
createFlowLogsResponse_unsuccessful :: Lens' CreateFlowLogsResponse (Maybe [UnsuccessfulItem]) Source #
Information about the flow logs that could not be created successfully.
createFlowLogsResponse_httpStatus :: Lens' CreateFlowLogsResponse Int Source #
The response's http status code.