{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-rekognition/json-schema/amazon-rekognition-create-stream-processor-request-schema.json",
  "title": "CreateStreamProcessorRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-rekognition-stream-processor-api-openapi.yml#/components/schemas/CreateStreamProcessorRequest",
  "type": "object",
  "properties": {
    "Input": {
      "$ref": "#/$defs/StreamProcessorInput"
    },
    "Output": {
      "$ref": "#/$defs/StreamProcessorOutput"
    },
    "Name": {
      "type": "string",
      "description": "An identifier you assign to the stream processor. You can use Name to manage the stream processor. For example, you can get the current status of the stream processor by calling DescribeStreamProcessor. Name is idempotent. This is required for both face search and label detection stream processors."
    },
    "Settings": {
      "$ref": "#/$defs/StreamProcessorSettings"
    },
    "RoleArn": {
      "type": "string",
      "description": "The Amazon Resource Number (ARN) of the IAM role that allows access to the stream processor. The IAM role provides Rekognition read permissions for a Kinesis stream. It also provides write permissions to an Amazon S3 bucket and Amazon Simple Notification Service topic for a label detection stream processor. This is required for both face search and label detection stream processors."
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A set of tags (key-value pairs) that you want to attach to the stream processor."
    },
    "NotificationChannel": {
      "$ref": "#/$defs/StreamProcessorNotificationChannel"
    },
    "KmsKeyId": {
      "type": "string",
      "description": "The identifier for your AWS Key Management Service key (AWS KMS key). This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor. You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. The key is used to encrypt results and data published to your Amazon S3 bucket, which includes image frames and hero images. Your source images are unaffected."
    },
    "RegionsOfInterest": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RegionOfInterest"
      },
      "description": "Specifies locations in the frames where Amazon Rekognition checks for objects or people. You can specify up to 10 regions of interest, and each region has either a polygon or a bounding box. This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor."
    },
    "DataSharingPreference": {
      "$ref": "#/$defs/StreamProcessorDataSharingPreference"
    }
  },
  "required": [
    "Input",
    "Output",
    "Name",
    "Settings",
    "RoleArn"
  ],
  "$defs": {
    "BoundingBox": {
      "type": "object",
      "properties": {
        "Width": {
          "type": "number",
          "description": "Width of the bounding box as a ratio of the overall image width."
        },
        "Height": {
          "type": "number",
          "description": "Height of the bounding box as a ratio of the overall image height."
        },
        "Left": {
          "type": "number",
          "description": "Left coordinate of the bounding box as a ratio of overall image width."
        },
        "Top": {
          "type": "number",
          "description": "Top coordinate of the bounding box as a ratio of overall image height."
        }
      }
    },
    "ConnectedHomeSettings": {
      "type": "object",
      "properties": {
        "Labels": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Specifies what you want to detect in the video, such as people, packages, or pets. The current valid labels you can include in this list are: \"PERSON\", \"PET\", \"PACKAGE\", and \"ALL\"."
        },
        "MinConfidence": {
          "type": "number",
          "description": "The minimum confidence required to label an object in the video."
        }
      },
      "required": [
        "Labels"
      ]
    },
    "FaceSearchSettings": {
      "type": "object",
      "properties": {
        "CollectionId": {
          "type": "string",
          "description": "The ID of a collection that contains faces that you want to search for."
        },
        "FaceMatchThreshold": {
          "type": "number",
          "description": "Minimum face match confidence score that must be met to return a result for a recognized face. The default is 80. 0 is the lowest confidence. 100 is the highest confidence. Values between 0 and 100 are accepted, and values lower than 80 are set to 80."
        }
      }
    },
    "KinesisDataStream": {
      "type": "object",
      "properties": {
        "Arn": {
          "type": "string",
          "description": "ARN of the output Amazon Kinesis Data Streams stream."
        }
      }
    },
    "KinesisVideoStream": {
      "type": "object",
      "properties": {
        "Arn": {
          "type": "string",
          "description": "ARN of the Kinesis video stream stream that streams the source video."
        }
      }
    },
    "Point": {
      "type": "object",
      "properties": {
        "X": {
          "type": "number",
          "description": "The value of the X coordinate for a point on a Polygon."
        },
        "Y": {
          "type": "number",
          "description": "The value of the Y coordinate for a point on a Polygon."
        }
      }
    },
    "RegionOfInterest": {
      "type": "object",
      "properties": {
        "BoundingBox": {
          "$ref": "#/$defs/BoundingBox"
        },
        "Polygon": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Point"
          },
          "description": "Specifies a shape made up of up to 10 Point objects to define a region of interest."
        }
      }
    },
    "S3Destination": {
      "type": "object",
      "properties": {
        "Bucket": {
          "type": "string",
          "description": "The name of the Amazon S3 bucket you want to associate with the streaming video project. You must be the owner of the Amazon S3 bucket."
        },
        "KeyPrefix": {
          "type": "string",
          "description": "The prefix value of the location within the bucket that you want the information to be published to. For more information, see Using prefixes."
        }
      }
    },
    "StreamProcessorDataSharingPreference": {
      "type": "object",
      "properties": {
        "OptIn": {
          "type": "boolean",
          "description": "If this option is set to true, you choose to share data with Rekognition to improve model performance."
        }
      },
      "required": [
        "OptIn"
      ]
    },
    "StreamProcessorInput": {
      "type": "object",
      "properties": {
        "KinesisVideoStream": {
          "$ref": "#/$defs/KinesisVideoStream"
        }
      }
    },
    "StreamProcessorNotificationChannel": {
      "type": "object",
      "properties": {
        "SNSTopicArn": {
          "type": "string",
          "description": "The Amazon Resource Number (ARN) of the Amazon Amazon Simple Notification Service topic to which Amazon Rekognition posts the completion status."
        }
      },
      "required": [
        "SNSTopicArn"
      ]
    },
    "StreamProcessorOutput": {
      "type": "object",
      "properties": {
        "KinesisDataStream": {
          "$ref": "#/$defs/KinesisDataStream"
        },
        "S3Destination": {
          "$ref": "#/$defs/S3Destination"
        }
      }
    },
    "StreamProcessorSettings": {
      "type": "object",
      "properties": {
        "FaceSearch": {
          "$ref": "#/$defs/FaceSearchSettings"
        },
        "ConnectedHome": {
          "$ref": "#/$defs/ConnectedHomeSettings"
        }
      }
    }
  }
}