{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kinesis/json-schema/kinesis-recorder-config-schema.json",
  "title": "RecorderConfig",
  "description": "The recorder configuration consists of the local <code>MediaSourceConfig</code> details that are used as credentials to accesss the local media files streamed on the camera. ",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kinesis-start-edge-configuration-update-api-openapi.yml#/components/schemas/RecorderConfig",
  "type": "object",
  "required": [
    "MediaSourceConfig"
  ],
  "properties": {
    "MediaSourceConfig": {
      "allOf": [
        {
          "$ref": "#/$defs/MediaSourceConfig"
        },
        {
          "description": "The configuration details that consist of the credentials required (<code>MediaUriSecretArn</code> and <code>MediaUriType</code>) to access the media files streamed to the camera. "
        }
      ]
    },
    "ScheduleConfig": {
      "allOf": [
        {
          "$ref": "#/$defs/ScheduleConfig"
        },
        {
          "description": "The configuration that consists of the <code>ScheduleExpression</code> and the <code>DurationInMinutes</code> details that specify the scheduling to record from a camera, or local media file, onto the Edge Agent. If the <code>ScheduleExpression</code> attribute is not provided, then the Edge Agent will always be set to recording mode."
        }
      ]
    }
  },
  "$defs": {
    "DurationInSeconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 3600
    },
    "MediaSourceConfig": {
      "type": "object",
      "required": [
        "MediaUriSecretArn",
        "MediaUriType"
      ],
      "properties": {
        "MediaUriSecretArn": {
          "allOf": [
            {
              "$ref": "#/$defs/MediaUriSecretArn"
            },
            {
              "description": "The AWS Secrets Manager ARN for the username and password of the camera, or a local media file location."
            }
          ]
        },
        "MediaUriType": {
          "allOf": [
            {
              "$ref": "#/$defs/MediaUriType"
            },
            {
              "description": "<p>The Uniform Resource Identifier (URI) type. The <code>FILE_URI</code> value can be used to stream local media files.</p> <note> <p>Preview only supports the <code>RTSP_URI</code> media source URI format .</p> </note>"
            }
          ]
        }
      },
      "description": "The configuration details that consist of the credentials required (<code>MediaUriSecretArn</code> and <code>MediaUriType</code>) to access the media files that are streamed to the camera."
    },
    "MediaUriSecretArn": {
      "type": "string",
      "pattern": "arn:[a-z\\d-]+:secretsmanager:[a-z0-9-]+:[0-9]+:secret:[a-zA-Z0-9_.-]+",
      "minLength": 20,
      "maxLength": 2048,
      "format": "password"
    },
    "MediaUriType": {
      "type": "string",
      "enum": [
        "RTSP_URI",
        "FILE_URI"
      ]
    },
    "ScheduleConfig": {
      "type": "object",
      "required": [
        "ScheduleExpression",
        "DurationInSeconds"
      ],
      "properties": {
        "ScheduleExpression": {
          "allOf": [
            {
              "$ref": "#/$defs/ScheduleExpression"
            },
            {
              "description": "<p>The Quartz cron expression that takes care of scheduling jobs to record from the camera, or local media file, onto the Edge Agent. If the <code>ScheduleExpression</code> is not provided for the <code>RecorderConfig</code>, then the Edge Agent will always be set to recording mode.</p> <p>For more information about Quartz, refer to the <a href=\"http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html\"> <i>Cron Trigger Tutorial</i> </a> page to understand the valid expressions and its use.</p>"
            }
          ]
        },
        "DurationInSeconds": {
          "allOf": [
            {
              "$ref": "#/$defs/DurationInSeconds"
            },
            {
              "description": "The total duration to record the media. If the <code>ScheduleExpression</code> attribute is provided, then the <code>DurationInSeconds</code> attribute should also be specified."
            }
          ]
        }
      },
      "description": "<p>This API enables you to specify the duration that the camera, or local media file, should record onto the Edge Agent. The <code>ScheduleConfig</code> consists of the <code>ScheduleExpression</code> and the <code>DurationInMinutes</code> attributes. </p> <p>If the <code>ScheduleExpression</code> is not provided, then the Edge Agent will always be set to recording mode.</p>"
    },
    "ScheduleExpression": {
      "type": "string",
      "pattern": "[^\\n]{11,100}",
      "minLength": 11,
      "maxLength": 100
    }
  }
}