{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-resilience-hub/json-schema/amazon-resilience-hub-update-app-request-schema.json",
  "title": "UpdateAppRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-resilience-hub-operations-api-openapi.yml#/components/schemas/UpdateAppRequest",
  "type": "object",
  "properties": {
    "appArn": {
      "type": "string",
      "description": "Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide."
    },
    "description": {
      "type": "string",
      "description": "The optional description for an app."
    },
    "policyArn": {
      "type": "string",
      "description": "Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide."
    },
    "clearResiliencyPolicyArn": {
      "type": "boolean",
      "description": "Specifies if the resiliency policy ARN should be cleared."
    },
    "assessmentSchedule": {
      "type": "string",
      "enum": [
        "Disabled",
        "Daily"
      ],
      "description": "Assessment execution schedule with 'Daily' or 'Disabled' values."
    },
    "permissionModel": {
      "$ref": "#/$defs/PermissionModel"
    },
    "eventSubscriptions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EventSubscription"
      },
      "description": "The list of events you would like to subscribe and get notification for. Currently, Resilience Hub supports notifications only for Drift detected and Scheduled assessment failure events."
    }
  },
  "required": [
    "appArn"
  ],
  "$defs": {
    "EventSubscription": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Unique name to identify an event subscription."
        },
        "eventType": {
          "type": "string",
          "enum": [
            "ScheduledAssessmentFailure",
            "DriftDetected"
          ],
          "description": "The type of event you would like to subscribe and get notification for. Currently, Resilience Hub supports notifications only for Drift detected (DriftDetected) and Scheduled assessment failure (ScheduledAssessmentFailure) events."
        },
        "snsTopicArn": {
          "type": "string",
          "description": "Amazon Resource Name (ARN) of the Amazon Simple Notification Service topic. The format for this ARN is: arn:partition:sns:region:account:topic-name. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide."
        }
      },
      "required": [
        "name",
        "eventType"
      ]
    },
    "PermissionModel": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "LegacyIAMUser",
            "RoleBased"
          ],
          "description": "Defines how Resilience Hub scans your resources. It can scan for the resources by using a pre-existing role in your Amazon Web Services account, or by using the credentials of the current IAM user."
        },
        "invokerRoleName": {
          "type": "string",
          "description": "Existing Amazon Web Services IAM role name in the primary Amazon Web Services account that will be assumed by Resilience Hub Service Principle to obtain a read-only access to your application resources while running an assessment. If your IAM role includes a path, you must include the path in the invokerRoleName parameter. For example, if your IAM role's ARN is arn:aws:iam:123456789012:role/my-path/role-name, you should pass my-path/role-name. You must have iam:passRole permission for this role while creating or updating the application. Currently, invokerRoleName accepts only [A-Za-z0-9_+=,.@"
        },
        "crossAccountRoleArns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Defines a list of role Amazon Resource Names (ARNs) to be used in other accounts. These ARNs are used for querying purposes while importing resources and assessing your application. These ARNs are required only when your resources are in other accounts and you have different role name in these accounts. Else, the invoker role name will be used in the other accounts. These roles must have a trust policy with iam:AssumeRole permission to the invoker role in the primary account."
        }
      },
      "required": [
        "type"
      ]
    }
  }
}