{
  "tagging" : {
    "permissions" : [ "ec2:CreateTags", "ec2:DeleteTags" ],
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "tagProperty" : "/properties/Tags",
    "cloudFormationSystemTags" : true
  },
  "handlers" : {
    "read" : {
      "permissions" : [ "ec2:DescribeCustomerGateways" ]
    },
    "create" : {
      "permissions" : [ "ec2:CreateCustomerGateway", "ec2:DescribeCustomerGateways", "ec2:CreateTags" ]
    },
    "update" : {
      "permissions" : [ "ec2:CreateTags", "ec2:DeleteTags", "ec2:DescribeCustomerGateways" ]
    },
    "list" : {
      "permissions" : [ "ec2:DescribeCustomerGateways" ]
    },
    "delete" : {
      "permissions" : [ "ec2:DeleteCustomerGateway", "ec2:DescribeCustomerGateways" ]
    }
  },
  "typeName" : "AWS::EC2::CustomerGateway",
  "readOnlyProperties" : [ "/properties/CustomerGatewayId" ],
  "description" : "Specifies a customer gateway.",
  "createOnlyProperties" : [ "/properties/CertificateArn", "/properties/BgpAsn", "/properties/BgpAsnExtended", "/properties/Type", "/properties/IpAddress", "/properties/DeviceName" ],
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/CustomerGatewayId" ],
  "definitions" : {
    "Tag" : {
      "description" : "Specifies a tag. For more information, see [Resource tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Value" : {
          "description" : "The tag value.",
          "type" : "string"
        },
        "Key" : {
          "description" : "The tag key.",
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    }
  },
  "properties" : {
    "Type" : {
      "description" : "The type of VPN connection that this customer gateway supports (``ipsec.1``).",
      "type" : "string"
    },
    "CustomerGatewayId" : {
      "description" : "",
      "type" : "string"
    },
    "IpAddress" : {
      "description" : "The IP address for the customer gateway device's outside interface. The address must be static. If ``OutsideIpAddressType`` in your VPN connection options is set to ``PrivateIpv4``, you can use an RFC6598 or RFC1918 private IPv4 address. If ``OutsideIpAddressType`` is set to ``Ipv6``, you can use an IPv6 address.",
      "type" : "string"
    },
    "BgpAsnExtended" : {
      "multipleOf" : 1,
      "maximum" : 4294967294,
      "description" : "For customer gateway devices that support BGP, specify the device's ASN. You must specify either ``BgpAsn`` or ``BgpAsnExtended`` when creating the customer gateway. If the ASN is larger than ``2,147,483,647``, you must use ``BgpAsnExtended``.\n Valid values: ``2,147,483,648`` to ``4,294,967,295``",
      "type" : "number",
      "minimum" : 2147483648
    },
    "BgpAsn" : {
      "default" : 65000,
      "description" : "For customer gateway devices that support BGP, specify the device's ASN. You must specify either ``BgpAsn`` or ``BgpAsnExtended`` when creating the customer gateway. If the ASN is larger than ``2,147,483,647``, you must use ``BgpAsnExtended``.\n Default: 65000\n Valid values: ``1`` to ``2,147,483,647``",
      "type" : "integer"
    },
    "Tags" : {
      "uniqueItems" : false,
      "description" : "One or more tags for the customer gateway.",
      "insertionOrder" : false,
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "CertificateArn" : {
      "pattern" : "^arn:(aws[a-zA-Z-]*)?:acm:[a-z]{2}((-gov)|(-iso([a-z]{1})?))?-[a-z]+-\\d{1}:\\d{12}:certificate\\/[a-zA-Z0-9-_]+$",
      "description" : "The Amazon Resource Name (ARN) for the customer gateway certificate.",
      "type" : "string"
    },
    "DeviceName" : {
      "description" : "The name of customer gateway device.",
      "type" : "string"
    }
  },
  "required" : [ "IpAddress", "Type" ]
}