{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-resilience-hub/json-schema/amazon-resilience-hub-create-resiliency-policy-request-schema.json",
  "title": "CreateResiliencyPolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-resilience-hub-resiliency-policies-api-openapi.yml#/components/schemas/CreateResiliencyPolicyRequest",
  "type": "object",
  "properties": {
    "policyName": {
      "type": "string",
      "description": "Name of the resiliency policy."
    },
    "policyDescription": {
      "type": "string",
      "description": "Description of the resiliency policy."
    },
    "dataLocationConstraint": {
      "type": "string",
      "enum": [
        "AnyLocation",
        "SameContinent",
        "SameCountry"
      ],
      "description": "Specifies a high-level geographical location constraint for where your resilience policy data can be stored."
    },
    "tier": {
      "type": "string",
      "enum": [
        "MissionCritical",
        "Critical",
        "Important",
        "CoreServices",
        "NonCritical",
        "NotApplicable"
      ],
      "description": "The tier for this resiliency policy, ranging from the highest severity (MissionCritical) to lowest (NonCritical)."
    },
    "policy": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/FailurePolicy"
      },
      "description": "The type of resiliency policy to be created, including the recovery time objective (RTO) and recovery point objective (RPO) in seconds."
    },
    "clientToken": {
      "type": "string",
      "description": "Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key/value pair."
    }
  },
  "required": [
    "policyName",
    "tier",
    "policy"
  ],
  "$defs": {
    "FailurePolicy": {
      "type": "object",
      "properties": {
        "rtoInSecs": {
          "type": "integer",
          "description": "Recovery Time Objective (RTO) in seconds."
        },
        "rpoInSecs": {
          "type": "integer",
          "description": "Recovery Point Objective (RPO) in seconds."
        }
      },
      "required": [
        "rtoInSecs",
        "rpoInSecs"
      ]
    }
  }
}