{
  "typeName" : "AWS::Backup::Framework",
  "description" : "Contains detailed information about a framework. Frameworks contain controls, which evaluate and report on your backup events and resources. Frameworks generate daily compliance results.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "properties" : {
    "FrameworkName" : {
      "description" : "The unique name of a framework. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).",
      "type" : "string",
      "pattern" : "[a-zA-Z][_a-zA-Z0-9]*",
      "minLength" : 1,
      "maxLength" : 256
    },
    "FrameworkDescription" : {
      "description" : "An optional description of the framework with a maximum 1,024 characters.",
      "type" : "string",
      "minLength" : 0,
      "maxLength" : 1024
    },
    "FrameworkArn" : {
      "description" : "An Amazon Resource Name (ARN) that uniquely identifies Framework as a resource",
      "type" : "string"
    },
    "DeploymentStatus" : {
      "description" : "The deployment status of a framework. The statuses are: `CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED`",
      "type" : "string"
    },
    "CreationTime" : {
      "description" : "The date and time that a framework is created, in ISO 8601 representation. The value of CreationTime is accurate to milliseconds. For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July 2020 at 3:00 PM 8 hours behind UTC.",
      "type" : "string"
    },
    "FrameworkControls" : {
      "description" : "Contains detailed information about all of the controls of a framework. Each framework must contain at least one control.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/FrameworkControl"
      }
    },
    "FrameworkStatus" : {
      "type" : "string",
      "description" : "A framework consists of one or more controls. Each control governs a resource, such as backup plans, backup selections, backup vaults, or recovery points. You can also turn AWS Config recording on or off for each resource. The statuses are:\n\n`ACTIVE` when recording is turned on for all resources governed by the framework.\n\n`PARTIALLY_ACTIVE` when recording is turned off for at least one resource governed by the framework.\n\n`INACTIVE` when recording is turned off for all resources governed by the framework.\n\n`UNAVAILABLE` when AWS Backup is unable to validate recording status at this time."
    },
    "FrameworkTags" : {
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "description" : "Metadata that you can assign to help organize the frameworks that you create. Each tag is a key-value pair."
    }
  },
  "definitions" : {
    "FrameworkControl" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ControlName" : {
          "description" : "The name of a control. This name is between 1 and 256 characters.",
          "type" : "string"
        },
        "ControlInputParameters" : {
          "type" : "array",
          "description" : "A list of ParameterName and ParameterValue pairs.",
          "uniqueItems" : true,
          "insertionOrder" : false,
          "items" : {
            "$ref" : "#/definitions/ControlInputParameter"
          }
        },
        "ControlScope" : {
          "type" : "object",
          "description" : "The scope of a control. The control scope defines what the control will evaluate. Three examples of control scopes are: a specific backup plan, all backup plans with a specific tag, or all backup plans.",
          "additionalProperties" : false,
          "properties" : {
            "ComplianceResourceIds" : {
              "description" : "The ID of the only AWS resource that you want your control scope to contain.",
              "type" : "array",
              "insertionOrder" : false,
              "items" : {
                "type" : "string"
              }
            },
            "ComplianceResourceTypes" : {
              "type" : "array",
              "description" : "Describes whether the control scope includes one or more types of resources, such as `EFS` or `RDS`.",
              "insertionOrder" : false,
              "items" : {
                "type" : "string"
              }
            },
            "Tags" : {
              "type" : "array",
              "description" : "Describes whether the control scope includes resources with one or more tags. Each tag is a key-value pair.",
              "insertionOrder" : false,
              "items" : {
                "$ref" : "#/definitions/Tag"
              }
            }
          }
        }
      },
      "required" : [ "ControlName" ]
    },
    "ControlInputParameter" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ParameterName" : {
          "type" : "string"
        },
        "ParameterValue" : {
          "type" : "string"
        }
      },
      "required" : [ "ParameterName", "ParameterValue" ]
    },
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "additionalProperties" : false
    }
  },
  "additionalProperties" : false,
  "taggable" : true,
  "required" : [ "FrameworkControls" ],
  "readOnlyProperties" : [ "/properties/FrameworkArn", "/properties/CreationTime", "/properties/FrameworkStatus", "/properties/DeploymentStatus" ],
  "createOnlyProperties" : [ "/properties/FrameworkName" ],
  "primaryIdentifier" : [ "/properties/FrameworkArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "backup:CreateFramework", "backup:DescribeFramework", "backup:TagResource", "iam:CreateServiceLinkedRole" ]
    },
    "read" : {
      "permissions" : [ "backup:DescribeFramework", "backup:ListTags" ]
    },
    "update" : {
      "permissions" : [ "backup:UpdateFramework", "backup:ListTags", "backup:TagResource", "backup:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "backup:DeleteFramework", "backup:DescribeFramework" ]
    },
    "list" : {
      "permissions" : [ "backup:ListFrameworks" ]
    }
  }
}