/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.EC2.Model
{
///
/// Container for the parameters to the CreateFlowLogs operation.
/// 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.
///
///
public partial class CreateFlowLogsRequest : AmazonEC2Request
{
private string _clientToken;
private string _deliverCrossAccountRole;
private string _deliverLogsPermissionArn;
private DestinationOptionsRequest _destinationOptions;
private string _logDestination;
private LogDestinationType _logDestinationType;
private string _logFormat;
private string _logGroupName;
private int? _maxAggregationInterval;
private List _resourceIds = new List();
private FlowLogsResourceType _resourceType;
private List _tagSpecifications = new List();
private TrafficType _trafficType;
///
/// Gets and sets the property ClientToken.
///
/// Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see How
/// to ensure idempotency.
///
///
public string ClientToken
{
get { return this._clientToken; }
set { this._clientToken = value; }
}
// Check to see if ClientToken property is set
internal bool IsSetClientToken()
{
return this._clientToken != null;
}
///
/// Gets and sets the property DeliverCrossAccountRole.
///
/// The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts.
///
///
public string DeliverCrossAccountRole
{
get { return this._deliverCrossAccountRole; }
set { this._deliverCrossAccountRole = value; }
}
// Check to see if DeliverCrossAccountRole property is set
internal bool IsSetDeliverCrossAccountRole()
{
return this._deliverCrossAccountRole != null;
}
///
/// Gets and sets the property 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.
///
///
public string DeliverLogsPermissionArn
{
get { return this._deliverLogsPermissionArn; }
set { this._deliverLogsPermissionArn = value; }
}
// Check to see if DeliverLogsPermissionArn property is set
internal bool IsSetDeliverLogsPermissionArn()
{
return this._deliverLogsPermissionArn != null;
}
///
/// Gets and sets the property DestinationOptions.
///
/// The destination options.
///
///
public DestinationOptionsRequest DestinationOptions
{
get { return this._destinationOptions; }
set { this._destinationOptions = value; }
}
// Check to see if DestinationOptions property is set
internal bool IsSetDestinationOptions()
{
return this._destinationOptions != null;
}
///
/// Gets and sets the property 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
///
///
///
public string LogDestination
{
get { return this._logDestination; }
set { this._logDestination = value; }
}
// Check to see if LogDestination property is set
internal bool IsSetLogDestination()
{
return this._logDestination != null;
}
///
/// Gets and sets the property LogDestinationType.
///
/// The type of destination for the flow log data.
///
///
///
/// Default: cloud-watch-logs
///
///
public LogDestinationType LogDestinationType
{
get { return this._logDestinationType; }
set { this._logDestinationType = value; }
}
// Check to see if LogDestinationType property is set
internal bool IsSetLogDestinationType()
{
return this._logDestinationType != null;
}
///
/// Gets and sets the property 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.
///
///
public string LogFormat
{
get { return this._logFormat; }
set { this._logFormat = value; }
}
// Check to see if LogFormat property is set
internal bool IsSetLogFormat()
{
return this._logFormat != null;
}
///
/// Gets and sets the property 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
.
///
///
public string LogGroupName
{
get { return this._logGroupName; }
set { this._logGroupName = value; }
}
// Check to see if LogGroupName property is set
internal bool IsSetLogGroupName()
{
return this._logGroupName != null;
}
///
/// Gets and sets the property 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
///
///
public int MaxAggregationInterval
{
get { return this._maxAggregationInterval.GetValueOrDefault(); }
set { this._maxAggregationInterval = value; }
}
// Check to see if MaxAggregationInterval property is set
internal bool IsSetMaxAggregationInterval()
{
return this._maxAggregationInterval.HasValue;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Required=true)]
public List ResourceIds
{
get { return this._resourceIds; }
set { this._resourceIds = value; }
}
// Check to see if ResourceIds property is set
internal bool IsSetResourceIds()
{
return this._resourceIds != null && this._resourceIds.Count > 0;
}
///
/// Gets and sets the property ResourceType.
///
/// The type of resource to monitor.
///
///
[AWSProperty(Required=true)]
public FlowLogsResourceType ResourceType
{
get { return this._resourceType; }
set { this._resourceType = value; }
}
// Check to see if ResourceType property is set
internal bool IsSetResourceType()
{
return this._resourceType != null;
}
///
/// Gets and sets the property TagSpecifications.
///
/// The tags to apply to the flow logs.
///
///
public List TagSpecifications
{
get { return this._tagSpecifications; }
set { this._tagSpecifications = value; }
}
// Check to see if TagSpecifications property is set
internal bool IsSetTagSpecifications()
{
return this._tagSpecifications != null && this._tagSpecifications.Count > 0;
}
///
/// Gets and sets the property 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.
///
///
public TrafficType TrafficType
{
get { return this._trafficType; }
set { this._trafficType = value; }
}
// Check to see if TrafficType property is set
internal bool IsSetTrafficType()
{
return this._trafficType != null;
}
}
}