{
  "typeName" : "AWS::S3Files::MountTarget",
  "description" : "Resource Type definition for AWS::S3Files::MountTarget",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "properties" : {
    "MountTargetId" : {
      "type" : "string",
      "minLength" : 22,
      "maxLength" : 45,
      "pattern" : "^fsmt-[0-9a-f]{17,40}$"
    },
    "Ipv4Address" : {
      "type" : "string",
      "minLength" : 7,
      "maxLength" : 15,
      "pattern" : "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$"
    },
    "Ipv6Address" : {
      "type" : "string",
      "minLength" : 3,
      "maxLength" : 39
    },
    "IpAddressType" : {
      "type" : "string",
      "enum" : [ "IPV4_ONLY", "IPV6_ONLY", "DUAL_STACK" ]
    },
    "FileSystemId" : {
      "type" : "string",
      "maxLength" : 128,
      "pattern" : "^(arn:aws[-a-z]*:s3files:[0-9a-z-:]+:file-system/fs-[0-9a-f]{17,40}|fs-[0-9a-f]{17,40})$"
    },
    "SecurityGroups" : {
      "type" : "array",
      "insertionOrder" : false,
      "uniqueItems" : true,
      "maxItems" : 100,
      "items" : {
        "type" : "string",
        "minLength" : 11,
        "maxLength" : 43,
        "pattern" : "^(sg-[0-9a-f]{8,40})$"
      }
    },
    "SubnetId" : {
      "type" : "string",
      "minLength" : 15,
      "maxLength" : 47,
      "pattern" : "^subnet-[0-9a-f]{8,40}$"
    },
    "AvailabilityZoneId" : {
      "type" : "string"
    },
    "OwnerId" : {
      "type" : "string",
      "maxLength" : 12,
      "pattern" : "^((\\d{12})|(\\d{4}-\\d{4}-\\d{4}))$"
    },
    "NetworkInterfaceId" : {
      "type" : "string"
    },
    "VpcId" : {
      "type" : "string"
    },
    "Status" : {
      "type" : "string",
      "enum" : [ "available", "creating", "updating", "deleting", "deleted", "error" ]
    },
    "StatusMessage" : {
      "type" : "string"
    }
  },
  "additionalProperties" : false,
  "required" : [ "FileSystemId", "SubnetId" ],
  "createOnlyProperties" : [ "/properties/Ipv4Address", "/properties/Ipv6Address", "/properties/IpAddressType", "/properties/SubnetId", "/properties/FileSystemId" ],
  "primaryIdentifier" : [ "/properties/MountTargetId" ],
  "readOnlyProperties" : [ "/properties/MountTargetId", "/properties/AvailabilityZoneId", "/properties/OwnerId", "/properties/NetworkInterfaceId", "/properties/VpcId", "/properties/Status", "/properties/StatusMessage" ],
  "tagging" : {
    "taggable" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "s3files:CreateMountTarget", "s3files:GetMountTarget", "s3files:ListMountTargets", "ec2:DescribeSubnets", "ec2:CreateNetworkInterface" ]
    },
    "read" : {
      "permissions" : [ "s3files:GetMountTarget" ]
    },
    "update" : {
      "permissions" : [ "s3files:GetMountTarget", "s3files:UpdateMountTarget", "ec2:ModifyNetworkInterfaceAttribute" ]
    },
    "delete" : {
      "permissions" : [ "s3files:GetMountTarget", "s3files:DeleteMountTarget", "ec2:DeleteNetworkInterface" ]
    },
    "list" : {
      "permissions" : [ "s3files:ListMountTargets" ],
      "handlerSchema" : {
        "properties" : {
          "FileSystemId" : {
            "$ref" : "resource-schema.json#/properties/FileSystemId"
          }
        },
        "required" : [ "FileSystemId" ]
      }
    }
  }
}