{
  "typeName" : "AWS::RolesAnywhere::CRL",
  "description" : "Definition of AWS::RolesAnywhere::CRL Resource Type",
  "definitions" : {
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "maxLength" : 128,
          "minLength" : 1
        },
        "Value" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 0
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "CrlData" : {
      "type" : "string"
    },
    "CrlId" : {
      "type" : "string",
      "pattern" : "[a-f0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}"
    },
    "Enabled" : {
      "type" : "boolean"
    },
    "Name" : {
      "type" : "string"
    },
    "TrustAnchorArn" : {
      "type" : "string",
      "pattern" : "^arn:aws(-[^:]+)?:rolesanywhere(:.*){2}(:trust-anchor.*)$"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "maxItems" : 200,
      "minItems" : 0
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "rolesanywhere:UntagResource", "rolesanywhere:TagResource", "rolesanywhere:ListTagsForResource" ]
  },
  "required" : [ "Name", "CrlData" ],
  "readOnlyProperties" : [ "/properties/CrlId" ],
  "primaryIdentifier" : [ "/properties/CrlId" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "rolesanywhere:ImportCrl", "rolesanywhere:TagResource" ]
    },
    "read" : {
      "permissions" : [ "rolesanywhere:GetCrl", "rolesanywhere:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "rolesanywhere:EnableCrl", "rolesanywhere:DisableCrl", "rolesanywhere:UpdateCrl", "rolesanywhere:TagResource", "rolesanywhere:UntagResource", "rolesanywhere:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "rolesanywhere:DeleteCrl" ]
    },
    "list" : {
      "permissions" : [ "rolesanywhere:ListCrls", "rolesanywhere:ListTagsForResource" ]
    }
  },
  "additionalProperties" : false,
  "propertyTransform" : {
    "/properties/CrlData" : "$replace(CrlData, /\\s+$/, '')"
  }
}