{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-ec2-flowlog.json",
  "title": "AWSEC2FlowLogProperties",
  "description": "Specifies a VPC flow log, which enables you to capture IP traffic for a specific network interface, subnet, or VPC.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ec2-flowlog.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-ec2-flowlog.json",
    "sourceSha256": "55b4001eb52476e4ea071981552df7a0b9366ce8c369d4772111eb4a98050298"
  },
  "type": "object",
  "properties": {
    "DeliverLogsPermissionArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The 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."
    },
    "LogDestination": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Specifies 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."
    },
    "LogDestinationType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "cloud-watch-logs",
            "s3",
            "kinesis-data-firehose"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Specifies 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."
    },
    "LogFormat": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The fields to include in the flow log record, in the order in which they should appear."
    },
    "LogGroupName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The 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."
    },
    "MaxAggregationInterval": {
      "description": "The 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).",
      "type": "integer"
    },
    "ResourceId": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ID of the subnet, network interface, or VPC for which you want to create a flow log."
    },
    "ResourceType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "NetworkInterface",
            "Subnet",
            "VPC",
            "TransitGateway",
            "TransitGatewayAttachment"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The 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."
    },
    "Tags": {
      "description": "The tags to apply to the flow logs.",
      "type": "array",
      "uniqueItems": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "TrafficType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ACCEPT",
            "ALL",
            "REJECT"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic."
    },
    "DestinationOptions": {
      "type": "object",
      "required": [
        "FileFormat",
        "HiveCompatiblePartitions",
        "PerHourPartition"
      ],
      "properties": {
        "FileFormat": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "plain-text",
                "parquet"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "HiveCompatiblePartitions": {
          "type": "boolean"
        },
        "PerHourPartition": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "typeName": "AWS::EC2::FlowLog",
  "$defs": {
    "Tag": {
      "type": "object",
      "title": "AWSEC2FlowLogTagDefinition",
      "properties": {
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Key": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Value",
        "Key"
      ],
      "additionalProperties": false
    }
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ec2-flowlog.git",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/Id"
  ],
  "required": [
    "ResourceType",
    "ResourceId"
  ],
  "createOnlyProperties": [
    "/properties/DeliverLogsPermissionArn",
    "/properties/LogGroupName",
    "/properties/LogDestination",
    "/properties/ResourceId",
    "/properties/TrafficType",
    "/properties/LogDestinationType",
    "/properties/ResourceType",
    "/properties/LogFormat",
    "/properties/MaxAggregationInterval",
    "/properties/DestinationOptions"
  ],
  "readOnlyProperties": [
    "/properties/Id"
  ],
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  }
}
