{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ec2.amazonaws.com/schemas/transit-gateway",
  "title": "Amazon Transit Gateway",
  "description": "Schema representing an Amazon Transit Gateway resource.",
  "type": "object",
  "required": [],
  "properties": {
    "TransitGatewayId": {
      "type": "string",
      "description": "The ID of the transit gateway.",
      "pattern": "^tgw-[a-f0-9]+$"
    },
    "TransitGatewayArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the transit gateway.",
      "pattern": "^arn:aws:ec2:.+:.+:transit-gateway/.+"
    },
    "State": {
      "type": "string",
      "description": "The state of the transit gateway.",
      "enum": [
        "pending",
        "available",
        "modifying",
        "deleting",
        "deleted"
      ]
    },
    "OwnerId": {
      "type": "string",
      "description": "The ID of the AWS account that owns the transit gateway."
    },
    "Description": {
      "type": "string",
      "description": "The description of the transit gateway."
    },
    "Options": {
      "type": "object",
      "description": "The transit gateway options.",
      "properties": {
        "AmazonSideAsn": {
          "type": "integer",
          "format": "int64",
          "description": "A private Autonomous System Number (ASN) for the Amazon side of a BGP session."
        },
        "AutoAcceptSharedAttachments": {
          "type": "string",
          "description": "Indicates whether attachment requests are automatically accepted.",
          "enum": [
            "enable",
            "disable"
          ]
        },
        "DefaultRouteTableAssociation": {
          "type": "string",
          "description": "Indicates whether resource attachments are automatically associated with the default route table.",
          "enum": [
            "enable",
            "disable"
          ]
        },
        "DefaultRouteTablePropagation": {
          "type": "string",
          "description": "Indicates whether resource attachments automatically propagate routes to the default route table.",
          "enum": [
            "enable",
            "disable"
          ]
        },
        "DnsSupport": {
          "type": "string",
          "description": "Indicates whether DNS support is enabled.",
          "enum": [
            "enable",
            "disable"
          ]
        },
        "VpnEcmpSupport": {
          "type": "string",
          "description": "Indicates whether Equal Cost Multipath Protocol support is enabled.",
          "enum": [
            "enable",
            "disable"
          ]
        },
        "AssociationDefaultRouteTableId": {
          "type": "string",
          "description": "The ID of the default association route table."
        },
        "PropagationDefaultRouteTableId": {
          "type": "string",
          "description": "The ID of the default propagation route table."
        }
      }
    },
    "CreationTime": {
      "type": "string",
      "format": "date-time",
      "description": "The creation date and time of the transit gateway."
    },
    "Tags": {
      "type": "array",
      "description": "The tags assigned to the transit gateway.",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "$defs": {
    "Tag": {
      "type": "object",
      "description": "A key-value pair for tagging resources.",
      "required": [
        "Key",
        "Value"
      ],
      "properties": {
        "Key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "Value": {
          "type": "string",
          "minLength": 0,
          "maxLength": 256
        }
      }
    }
  }
}
