{
  "typeName" : "AWS::EC2::NetworkInsightsAccessScope",
  "description" : "Resource schema for AWS::EC2::NetworkInsightsAccessScope",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ec2-ni.git",
  "definitions" : {
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "required" : [ "Key" ]
    },
    "AccessScopePathRequest" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/PathStatementRequest"
        },
        "Destination" : {
          "$ref" : "#/definitions/PathStatementRequest"
        },
        "ThroughResources" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "$ref" : "#/definitions/ThroughResourcesStatementRequest"
          }
        }
      }
    },
    "PathStatementRequest" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "PacketHeaderStatement" : {
          "$ref" : "#/definitions/PacketHeaderStatementRequest"
        },
        "ResourceStatement" : {
          "$ref" : "#/definitions/ResourceStatementRequest"
        }
      }
    },
    "PacketHeaderStatementRequest" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "SourceAddresses" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          }
        },
        "DestinationAddresses" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          }
        },
        "SourcePorts" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          }
        },
        "DestinationPorts" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          }
        },
        "SourcePrefixLists" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          }
        },
        "DestinationPrefixLists" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          }
        },
        "Protocols" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "$ref" : "#/definitions/Protocol"
          }
        }
      }
    },
    "Protocol" : {
      "type" : "string",
      "enum" : [ "tcp", "udp" ]
    },
    "ResourceStatementRequest" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Resources" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          }
        },
        "ResourceTypes" : {
          "type" : "array",
          "insertionOrder" : true,
          "items" : {
            "type" : "string"
          }
        }
      }
    },
    "ThroughResourcesStatementRequest" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ResourceStatement" : {
          "$ref" : "#/definitions/ResourceStatementRequest"
        }
      }
    }
  },
  "properties" : {
    "NetworkInsightsAccessScopeId" : {
      "type" : "string"
    },
    "NetworkInsightsAccessScopeArn" : {
      "type" : "string"
    },
    "CreatedDate" : {
      "type" : "string"
    },
    "UpdatedDate" : {
      "type" : "string"
    },
    "Tags" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "MatchPaths" : {
      "type" : "array",
      "insertionOrder" : true,
      "items" : {
        "$ref" : "#/definitions/AccessScopePathRequest"
      }
    },
    "ExcludePaths" : {
      "type" : "array",
      "insertionOrder" : true,
      "items" : {
        "$ref" : "#/definitions/AccessScopePathRequest"
      }
    }
  },
  "additionalProperties" : false,
  "readOnlyProperties" : [ "/properties/NetworkInsightsAccessScopeId", "/properties/NetworkInsightsAccessScopeArn", "/properties/CreatedDate", "/properties/UpdatedDate" ],
  "createOnlyProperties" : [ "/properties/MatchPaths", "/properties/ExcludePaths" ],
  "writeOnlyProperties" : [ "/properties/MatchPaths", "/properties/ExcludePaths" ],
  "primaryIdentifier" : [ "/properties/NetworkInsightsAccessScopeId" ],
  "additionalIdentifiers" : [ [ "/properties/NetworkInsightsAccessScopeArn" ] ],
  "handlers" : {
    "create" : {
      "permissions" : [ "ec2:CreateNetworkInsightsAccessScope", "tiros:CreateQuery" ]
    },
    "read" : {
      "permissions" : [ "ec2:DescribeNetworkInsightsAccessScopes", "ec2:GetNetworkInsightsAccessScopeContent" ]
    },
    "update" : {
      "permissions" : [ "ec2:DescribeNetworkInsightsAccessScopes", "ec2:GetNetworkInsightsAccessScopeContent", "ec2:CreateTags", "ec2:DeleteTags" ]
    },
    "delete" : {
      "permissions" : [ "ec2:DeleteNetworkInsightsAccessScope" ]
    },
    "list" : {
      "permissions" : [ "ec2:DescribeNetworkInsightsAccessScopes" ]
    }
  }
}