{
  "typeName" : "AWS::EC2::TransitGatewayConnectPeer",
  "description" : "Resource Type definition for AWS::EC2::TransitGatewayConnectPeer",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-myservice",
  "replacementStrategy" : "delete_then_create",
  "properties" : {
    "TransitGatewayAttachmentId" : {
      "description" : "The ID of the Connect attachment.",
      "type" : "string"
    },
    "TransitGatewayConnectPeerId" : {
      "description" : "The ID of the Connect peer.",
      "type" : "string"
    },
    "State" : {
      "description" : "The state of the Connect peer.",
      "type" : "string"
    },
    "CreationTime" : {
      "description" : "The creation time.",
      "type" : "string"
    },
    "ConnectPeerConfiguration" : {
      "description" : "The Connect peer details.",
      "$ref" : "#/definitions/TransitGatewayConnectPeerConfiguration"
    },
    "Tags" : {
      "description" : "The tags for the Connect Peer.",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "definitions" : {
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Value" : {
          "description" : "The value of the tag. Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.",
          "type" : "string"
        },
        "Key" : {
          "description" : "The key of the tag. Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .",
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "TransitGatewayConnectPeerConfiguration" : {
      "type" : "object",
      "properties" : {
        "TransitGatewayAddress" : {
          "description" : "The Connect peer IP address on the transit gateway side of the tunnel.",
          "type" : "string"
        },
        "PeerAddress" : {
          "description" : "The peer IP address (GRE outer IP address) on the appliance side of the Connect peer.",
          "type" : "string"
        },
        "InsideCidrBlocks" : {
          "description" : "The range of interior BGP peer IP addresses.",
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "Protocol" : {
          "description" : "The tunnel protocol.",
          "type" : "string"
        },
        "BgpConfigurations" : {
          "description" : "The BGP configuration details.",
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/TransitGatewayAttachmentBgpConfiguration"
          }
        }
      },
      "required" : [ "PeerAddress", "InsideCidrBlocks" ],
      "additionalProperties" : false
    },
    "TransitGatewayAttachmentBgpConfiguration" : {
      "type" : "object",
      "properties" : {
        "TransitGatewayAsn" : {
          "description" : "The transit gateway Autonomous System Number (ASN).",
          "type" : "number"
        },
        "PeerAsn" : {
          "description" : "The peer Autonomous System Number (ASN).",
          "type" : "number"
        },
        "TransitGatewayAddress" : {
          "description" : "The interior BGP peer IP address for the transit gateway.",
          "type" : "string"
        },
        "PeerAddress" : {
          "description" : "The interior BGP peer IP address for the appliance.",
          "type" : "string"
        },
        "BgpStatus" : {
          "description" : "The BGP status.",
          "type" : "string"
        }
      },
      "additionalProperties" : false
    }
  },
  "required" : [ "TransitGatewayAttachmentId", "ConnectPeerConfiguration" ],
  "additionalProperties" : false,
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "ec2:CreateTags", "ec2:DeleteTags" ]
  },
  "createOnlyProperties" : [ "/properties/TransitGatewayAttachmentId", "/properties/ConnectPeerConfiguration", "/properties/ConnectPeerConfiguration/PeerAddress", "/properties/ConnectPeerConfiguration/InsideCidrBlocks", "/properties/ConnectPeerConfiguration/TransitGatewayAddress", "/properties/ConnectPeerConfiguration/BgpConfigurations/*/PeerAsn" ],
  "primaryIdentifier" : [ "/properties/TransitGatewayConnectPeerId" ],
  "readOnlyProperties" : [ "/properties/TransitGatewayConnectPeerId", "/properties/ConnectPeerConfiguration/Protocol", "/properties/ConnectPeerConfiguration/BgpConfigurations", "/properties/ConnectPeerConfiguration/BgpConfigurations/*/TransitGatewayAddress", "/properties/ConnectPeerConfiguration/BgpConfigurations/*/BgpStatus", "/properties/ConnectPeerConfiguration/BgpConfigurations/*/PeerAddress", "/properties/ConnectPeerConfiguration/BgpConfigurations/*/TransitGatewayAsn", "/properties/State", "/properties/CreationTime" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "ec2:CreateTransitGatewayConnectPeer", "ec2:DescribeTransitGatewayConnectPeers", "ec2:CreateTags", "ec2:DescribeTags" ]
    },
    "read" : {
      "permissions" : [ "ec2:DescribeTransitGatewayConnectPeers", "ec2:DescribeTags" ]
    },
    "update" : {
      "permissions" : [ "ec2:DescribeTransitGatewayConnectPeers", "ec2:DeleteTags", "ec2:CreateTags" ]
    },
    "delete" : {
      "permissions" : [ "ec2:DeleteTransitGatewayConnectPeer", "ec2:DescribeTransitGatewayConnectPeers", "ec2:DeleteTags", "ec2:DescribeTags" ]
    },
    "list" : {
      "permissions" : [ "ec2:DescribeTransitGatewayConnectPeers", "ec2:DescribeTags" ]
    }
  }
}