{
  "typeName" : "AWS::EFS::AccessPoint",
  "description" : "The ``AWS::EFS::AccessPoint`` resource creates an EFS access point. An access point is an application-specific view into an EFS file system that applies an operating system user and group, and a file system path, to any file system request made through the access point. The operating system user and group override any identity information provided by the NFS client. The file system path is exposed as the access point's root directory. Applications using the access point can only access data in its own directory and below. To learn more, see [Mounting a file system using EFS access points](https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html).\n This operation requires permissions for the ``elasticfilesystem:CreateAccessPoint`` action.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "definitions" : {
    "AccessPointTag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128,
          "description" : "The tag key (String). The key can't start with ``aws:``."
        },
        "Value" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 256,
          "description" : "The value of the tag key."
        }
      },
      "additionalProperties" : false,
      "description" : "A tag is a key-value pair attached to a file system. Allowed characters in the ``Key`` and ``Value`` properties are letters, white space, and numbers that can be represented in UTF-8, and the following characters:``+ - = . _ : /``"
    },
    "CreationInfo" : {
      "type" : "object",
      "properties" : {
        "OwnerUid" : {
          "type" : "string",
          "description" : "Specifies the POSIX user ID to apply to the ``RootDirectory``. Accepts values from 0 to 2^32 (4294967295)."
        },
        "OwnerGid" : {
          "type" : "string",
          "description" : "Specifies the POSIX group ID to apply to the ``RootDirectory``. Accepts values from 0 to 2^32 (4294967295)."
        },
        "Permissions" : {
          "type" : "string",
          "description" : "Specifies the POSIX permissions to apply to the ``RootDirectory``, in the format of an octal number representing the file's mode bits.",
          "pattern" : "^[0-7]{3,4}$"
        }
      },
      "required" : [ "OwnerUid", "OwnerGid", "Permissions" ],
      "additionalProperties" : false,
      "description" : "Required if the ``RootDirectory`` > ``Path`` specified does not exist. Specifies the POSIX IDs and permissions to apply to the access point's ``RootDirectory`` > ``Path``. If the access point root directory does not exist, EFS creates it with these settings when a client connects to the access point. When specifying ``CreationInfo``, you must include values for all properties. \n Amazon EFS creates a root directory only if you have provided the CreationInfo: OwnUid, OwnGID, and permissions for the directory. If you do not provide this information, Amazon EFS does not create the root directory. If the root directory does not exist, attempts to mount using the access point will fail.\n  If you do not provide ``CreationInfo`` and the specified ``RootDirectory`` does not exist, attempts to mount the file system using the access point will fail."
    },
    "RootDirectory" : {
      "type" : "object",
      "properties" : {
        "Path" : {
          "type" : "string",
          "description" : "Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the ``CreationInfo``.",
          "minLength" : 1,
          "maxLength" : 100
        },
        "CreationInfo" : {
          "description" : "(Optional) Specifies the POSIX IDs and permissions to apply to the access point's ``RootDirectory``. If the ``RootDirectory`` > ``Path`` specified does not exist, EFS creates the root directory using the ``CreationInfo`` settings when a client connects to an access point. When specifying the ``CreationInfo``, you must provide values for all properties. \n  If you do not provide ``CreationInfo`` and the specified ``RootDirectory`` > ``Path`` does not exist, attempts to mount the file system using the access point will fail.",
          "$ref" : "#/definitions/CreationInfo"
        }
      },
      "additionalProperties" : false,
      "description" : "Specifies the directory on the Amazon EFS file system that the access point provides access to. The access point exposes the specified file system path as the root directory of your file system to applications using the access point. NFS clients using the access point can only access data in the access point's ``RootDirectory`` and its subdirectories."
    },
    "PosixUser" : {
      "type" : "object",
      "properties" : {
        "Uid" : {
          "type" : "string",
          "description" : "The POSIX user ID used for all file system operations using this access point."
        },
        "Gid" : {
          "type" : "string",
          "description" : "The POSIX group ID used for all file system operations using this access point."
        },
        "SecondaryGids" : {
          "type" : "array",
          "description" : "Secondary POSIX group IDs used for all file system operations using this access point.",
          "items" : {
            "type" : "string"
          }
        }
      },
      "required" : [ "Uid", "Gid" ],
      "additionalProperties" : false,
      "description" : "The full POSIX identity, including the user ID, group ID, and any secondary group IDs, on the access point that is used for all file system operations performed by NFS clients using the access point."
    }
  },
  "properties" : {
    "AccessPointId" : {
      "type" : "string",
      "description" : ""
    },
    "Arn" : {
      "type" : "string",
      "description" : ""
    },
    "ClientToken" : {
      "description" : "The opaque string specified in the request to ensure idempotent creation.",
      "type" : "string"
    },
    "AccessPointTags" : {
      "type" : "array",
      "insertionOrder" : false,
      "uniqueItems" : true,
      "items" : {
        "$ref" : "#/definitions/AccessPointTag"
      },
      "description" : "An array of key-value pairs to apply to this resource.\n For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)."
    },
    "FileSystemId" : {
      "description" : "The ID of the EFS file system that the access point applies to. Accepts only the ID format for input when specifying a file system, for example ``fs-0123456789abcedf2``.",
      "type" : "string"
    },
    "PosixUser" : {
      "description" : "The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point that is used for all file operations by NFS clients using the access point.",
      "$ref" : "#/definitions/PosixUser"
    },
    "RootDirectory" : {
      "description" : "The directory on the EFS file system that the access point exposes as the root directory to NFS clients using the access point.",
      "$ref" : "#/definitions/RootDirectory"
    }
  },
  "additionalProperties" : false,
  "required" : [ "FileSystemId" ],
  "primaryIdentifier" : [ "/properties/AccessPointId" ],
  "createOnlyProperties" : [ "/properties/FileSystemId", "/properties/ClientToken", "/properties/CreationInfo", "/properties/CreationInfo/OwnerUid", "/properties/CreationInfo/OwnerGid", "/properties/CreationInfo/Permissions", "/properties/PosixUser", "/properties/PosixUser/Uid", "/properties/PosixUser/Gid", "/properties/PosixUser/SecondaryGids", "/properties/RootDirectory", "/properties/RootDirectory/Path", "/properties/RootDirectory/CreationInfo" ],
  "readOnlyProperties" : [ "/properties/AccessPointId", "/properties/Arn" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/AccessPointTags",
    "permissions" : [ "elasticfilesystem:TagResource", "elasticfilesystem:ListTagsForResource", "elasticfilesystem:UntagResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "elasticfilesystem:CreateAccessPoint", "elasticfilesystem:TagResource", "elasticfilesystem:DescribeAccessPoints" ]
    },
    "read" : {
      "permissions" : [ "elasticfilesystem:DescribeAccessPoints" ]
    },
    "delete" : {
      "permissions" : [ "elasticfilesystem:DeleteAccessPoint", "elasticfilesystem:DescribeAccessPoints" ]
    },
    "list" : {
      "permissions" : [ "elasticfilesystem:DescribeAccessPoints" ]
    },
    "update" : {
      "permissions" : [ "elasticfilesystem:DescribeAccessPoints", "elasticfilesystem:ListTagsForResource", "elasticfilesystem:TagResource", "elasticfilesystem:UntagResource" ]
    }
  }
}