{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/AvailabilityZoneName",
  "/properties/Encrypted",
  "/properties/KmsKeyId",
  "/properties/PerformanceMode"
 ],
 "definitions": {
  "Arn": {
   "type": "string"
  },
  "BackupPolicy": {
   "additionalProperties": false,
   "properties": {
    "Status": {
     "enum": [
      "DISABLED",
      "ENABLED"
     ],
     "type": "string"
    }
   },
   "required": [
    "Status"
   ],
   "type": "object"
  },
  "ElasticFileSystemTag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "Value": {
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  },
  "FileSystemProtection": {
   "additionalProperties": false,
   "properties": {
    "ReplicationOverwriteProtection": {
     "enum": [
      "DISABLED",
      "ENABLED"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "LifecyclePolicy": {
   "additionalProperties": false,
   "properties": {
    "TransitionToArchive": {
     "enum": [
      "AFTER_14_DAYS",
      "AFTER_180_DAYS",
      "AFTER_1_DAY",
      "AFTER_270_DAYS",
      "AFTER_30_DAYS",
      "AFTER_365_DAYS",
      "AFTER_60_DAYS",
      "AFTER_7_DAYS",
      "AFTER_90_DAYS"
     ],
     "type": "string"
    },
    "TransitionToIA": {
     "enum": [
      "AFTER_14_DAYS",
      "AFTER_180_DAYS",
      "AFTER_1_DAY",
      "AFTER_270_DAYS",
      "AFTER_30_DAYS",
      "AFTER_365_DAYS",
      "AFTER_60_DAYS",
      "AFTER_7_DAYS",
      "AFTER_90_DAYS"
     ],
     "type": "string"
    },
    "TransitionToPrimaryStorageClass": {
     "enum": [
      "AFTER_1_ACCESS"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "ReplicationConfiguration": {
   "additionalProperties": false,
   "properties": {
    "Destinations": {
     "items": {
      "$ref": "#/definitions/ReplicationDestination"
     },
     "maxItems": 1,
     "minItems": 1,
     "type": "array",
     "uniqueItems": true
    }
   },
   "type": "object"
  },
  "ReplicationDestination": {
   "additionalProperties": false,
   "properties": {
    "AvailabilityZoneName": {
     "type": "string"
    },
    "FileSystemId": {
     "pattern": "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$",
     "type": "string"
    },
    "KmsKeyId": {
     "anyOf": [
      {
       "format": "AWS::KMS::Key.Arn"
      },
      {
       "format": "AWS::KMS::Key.Id"
      },
      {
       "format": "AWS::KMS::Alias.AliasName"
      }
     ],
     "type": "string"
    },
    "Region": {
     "type": "string"
    },
    "RoleArn": {
     "format": "AWS::IAM::Role.Arn",
     "type": "string"
    },
    "Status": {
     "type": "string"
    },
    "StatusMessage": {
     "type": "string"
    }
   },
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/FileSystemId"
 ],
 "properties": {
  "Arn": {
   "$ref": "#/definitions/Arn"
  },
  "AvailabilityZoneName": {
   "maxLength": 64,
   "minLength": 1,
   "pattern": "^.+$",
   "type": "string"
  },
  "BackupPolicy": {
   "$ref": "#/definitions/BackupPolicy"
  },
  "BypassPolicyLockoutSafetyCheck": {
   "type": "boolean"
  },
  "Encrypted": {
   "type": "boolean"
  },
  "FileSystemId": {
   "maxLength": 128,
   "minLength": 0,
   "pattern": "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$",
   "type": "string"
  },
  "FileSystemPolicy": {
   "format": "json",
   "type": [
    "object",
    "string"
   ]
  },
  "FileSystemProtection": {
   "$ref": "#/definitions/FileSystemProtection"
  },
  "FileSystemTags": {
   "items": {
    "$ref": "#/definitions/ElasticFileSystemTag"
   },
   "type": "array",
   "uniqueItems": true
  },
  "KmsKeyId": {
   "anyOf": [
    {
     "format": "AWS::KMS::Key.Arn"
    },
    {
     "format": "AWS::KMS::Key.Id"
    },
    {
     "format": "AWS::KMS::Alias.AliasName"
    }
   ],
   "maxLength": 2048,
   "minLength": 0,
   "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|mrk-[0-9a-f]{32}|alias/[a-zA-Z0-9/_-]+|(arn:aws[-a-z]*:kms:[a-z0-9-]+:\\d{12}:((key/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(key/mrk-[0-9a-f]{32})|(alias/[a-zA-Z0-9/_-]+))))$",
   "type": "string"
  },
  "LifecyclePolicies": {
   "items": {
    "$ref": "#/definitions/LifecyclePolicy"
   },
   "maxItems": 3,
   "minItems": 0,
   "type": "array",
   "uniqueItems": true
  },
  "PerformanceMode": {
   "enum": [
    "generalPurpose",
    "maxIO"
   ],
   "type": "string"
  },
  "ProvisionedThroughputInMibps": {
   "minimum": 1.0,
   "type": "number"
  },
  "ReplicationConfiguration": {
   "$ref": "#/definitions/ReplicationConfiguration"
  },
  "ThroughputMode": {
   "enum": [
    "bursting",
    "elastic",
    "provisioned"
   ],
   "type": "string"
  }
 },
 "propertyTransform": {
  "/properties/FileSystemProtection/ReplicationOverwriteProtection": "$uppercase(FileSystemProtection.ReplicationOverwriteProtection)='DISABLED' ? 'REPLICATING' : $uppercase(FileSystemProtection.ReplicationOverwriteProtection)",
  "/properties/KmsKeyId": "\"arn:aws[-a-z]*:kms:[a-z0-9-]+:[0-9]{12}:key/[a-zA-Z0-9-]+\"",
  "/properties/ReplicationConfiguration/Destinations/*/FileSystemId": "$split(FileSystemId, \"/\")[-1]"
 },
 "readOnlyProperties": [
  "/properties/Arn",
  "/properties/FileSystemId",
  "/properties/ReplicationConfiguration/Destinations/*/Status",
  "/properties/ReplicationConfiguration/Destinations/*/StatusMessage"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/FileSystemTags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::EFS::FileSystem",
 "writeOnlyProperties": [
  "/properties/BypassPolicyLockoutSafetyCheck",
  "/properties/ReplicationConfiguration/Destinations/*/AvailabilityZoneName",
  "/properties/ReplicationConfiguration/Destinations/*/KmsKeyId"
 ]
}
