{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-mediaconnect/json-schema/amazon-mediaconnect-add-flow-sources-request-schema.json",
  "title": "AddFlowSourcesRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-mediaconnect-source-api-openapi.yml#/components/schemas/AddFlowSourcesRequest",
  "type": "object",
  "properties": {
    "FlowArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the flow that you want to update."
    },
    "Sources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SetSourceRequest"
      },
      "description": "A list of sources that you want to add to the flow."
    }
  },
  "required": [
    "FlowArn",
    "Sources"
  ],
  "$defs": {
    "AutomaticEncryptionKeyConfiguration": {
      "type": "object",
      "properties": {}
    },
    "Encryption": {
      "type": "object",
      "properties": {
        "Algorithm": {
          "type": "string",
          "enum": [
            "aes128",
            "aes192",
            "aes256"
          ],
          "description": "The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256)."
        },
        "ConstantInitializationVector": {
          "type": "string",
          "description": "A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption."
        },
        "DeviceId": {
          "type": "string",
          "description": "The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption."
        },
        "KeyType": {
          "type": "string",
          "enum": [
            "speke",
            "static-key",
            "srt-password"
          ],
          "description": "The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key)."
        },
        "Region": {
          "type": "string",
          "description": "The Amazon Web Services Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption."
        },
        "ResourceId": {
          "type": "string",
          "description": "An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption."
        },
        "RoleArn": {
          "type": "string",
          "description": "The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity)."
        },
        "SecretArn": {
          "type": "string",
          "description": "The ARN of the secret that you created in Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption."
        },
        "Url": {
          "type": "string",
          "description": "The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption."
        }
      },
      "required": [
        "RoleArn"
      ]
    },
    "FlowTransitEncryption": {
      "type": "object",
      "properties": {
        "EncryptionKeyType": {
          "type": "string",
          "enum": [
            "SECRETS_MANAGER",
            "AUTOMATIC"
          ],
          "description": "The type of encryption key to use for flow transit encryption."
        },
        "EncryptionKeyConfiguration": {
          "$ref": "#/$defs/FlowTransitEncryptionKeyConfiguration"
        }
      },
      "required": [
        "EncryptionKeyConfiguration"
      ]
    },
    "FlowTransitEncryptionKeyConfiguration": {
      "type": "object",
      "properties": {
        "SecretsManager": {
          "$ref": "#/$defs/SecretsManagerEncryptionKeyConfiguration"
        },
        "Automatic": {
          "$ref": "#/$defs/AutomaticEncryptionKeyConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "InputConfigurationRequest": {
      "type": "object",
      "properties": {
        "InputPort": {
          "type": "integer",
          "description": "The port that you want the flow to listen on for an incoming media stream."
        },
        "Interface": {
          "$ref": "#/$defs/InterfaceRequest"
        }
      },
      "required": [
        "InputPort",
        "Interface"
      ]
    },
    "InterfaceRequest": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the VPC interface."
        }
      },
      "required": [
        "Name"
      ]
    },
    "MediaStreamSourceConfigurationRequest": {
      "type": "object",
      "properties": {
        "EncodingName": {
          "type": "string",
          "enum": [
            "jxsv",
            "raw",
            "smpte291",
            "pcm"
          ],
          "description": "The format that was used to encode the data. For ancillary data streams, set the encoding name to smpte291. For audio streams, set the encoding name to pcm. For video, 2110 streams, set the encoding name to raw. For video, JPEG XS streams, set the encoding name to jxsv."
        },
        "InputConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InputConfigurationRequest"
          },
          "description": "The media streams that you want to associate with the source."
        },
        "MediaStreamName": {
          "type": "string",
          "description": "The name of the media stream."
        }
      },
      "required": [
        "EncodingName",
        "MediaStreamName"
      ]
    },
    "NdiSourceSettings": {
      "type": "object",
      "properties": {
        "SourceName": {
          "type": "string",
          "description": "The exact name of an existing NDI sender that's registered with your discovery server. If included, the format of this name must be MACHINENAME (ProgramName)."
        },
        "AudioReferenceLevel": {
          "type": "integer",
          "description": "The audio reference level of the NDI sender, in decibels relative to full scale (dBFS). Common values are -20 (NDI and SMPTE) and -18 (EBU). If you don't specify this field, MediaConnect uses -20."
        }
      }
    },
    "SecretsManagerEncryptionKeyConfiguration": {
      "type": "object",
      "properties": {
        "SecretArn": {
          "type": "string",
          "description": "The ARN of the Secrets Manager secret used for transit encryption."
        },
        "RoleArn": {
          "type": "string",
          "description": "The ARN of the IAM role assumed by MediaConnect to access the Secrets Manager secret."
        }
      },
      "required": [
        "SecretArn",
        "RoleArn"
      ]
    },
    "SetGatewayBridgeSourceRequest": {
      "type": "object",
      "properties": {
        "BridgeArn": {
          "type": "string",
          "description": "The ARN of the bridge feeding this flow."
        },
        "VpcInterfaceAttachment": {
          "$ref": "#/$defs/VpcInterfaceAttachment"
        }
      },
      "required": [
        "BridgeArn"
      ]
    },
    "SetSourceRequest": {
      "type": "object",
      "properties": {
        "Decryption": {
          "$ref": "#/$defs/Encryption"
        },
        "Description": {
          "type": "string",
          "description": "A description for the source. This value is not used or seen outside of the current MediaConnect account."
        },
        "EntitlementArn": {
          "type": "string",
          "description": "The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator's flow."
        },
        "IngestPort": {
          "type": "integer",
          "description": "The port that the flow will be listening on for incoming content."
        },
        "MaxBitrate": {
          "type": "integer",
          "description": "The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams."
        },
        "MaxLatency": {
          "type": "integer",
          "description": "The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams."
        },
        "MaxSyncBuffer": {
          "type": "integer",
          "description": "The size of the buffer (in milliseconds) to use to sync incoming source data."
        },
        "MediaStreamSourceConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MediaStreamSourceConfigurationRequest"
          },
          "description": "The media streams that are associated with the source, and the parameters for those associations."
        },
        "MinLatency": {
          "type": "integer",
          "description": "The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency."
        },
        "Name": {
          "type": "string",
          "description": "The name of the source."
        },
        "Protocol": {
          "type": "string",
          "enum": [
            "zixi-push",
            "rtp-fec",
            "rtp",
            "zixi-pull",
            "rist",
            "st2110-jpegxs",
            "cdi",
            "srt-listener",
            "srt-caller",
            "fujitsu-qos",
            "udp",
            "ndi-speed-hq"
          ],
          "description": "The protocol that is used by the source. Elemental MediaConnect no longer supports the Fujitsu QoS protocol. This reference is maintained for legacy purposes only."
        },
        "SenderControlPort": {
          "type": "integer",
          "description": "The port that the flow uses to send outbound requests to initiate connection with the sender."
        },
        "SenderIpAddress": {
          "type": "string",
          "description": "The IP address that the flow communicates with to initiate connection with the sender."
        },
        "SourceListenerAddress": {
          "type": "string",
          "description": "Source IP or domain name for SRT-caller protocol."
        },
        "SourceListenerPort": {
          "type": "integer",
          "description": "Source port for SRT-caller protocol."
        },
        "StreamId": {
          "type": "string",
          "description": "The stream ID that you want to use for this transport. This parameter applies only to Zixi and SRT caller-based streams."
        },
        "VpcInterfaceName": {
          "type": "string",
          "description": "The name of the VPC interface to use for this source."
        },
        "WhitelistCidr": {
          "type": "string",
          "description": "The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16."
        },
        "GatewayBridgeSource": {
          "$ref": "#/$defs/SetGatewayBridgeSourceRequest"
        },
        "NdiSourceSettings": {
          "$ref": "#/$defs/NdiSourceSettings"
        },
        "SourceTags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The key-value pairs that can be used to tag and organize the source."
        },
        "RouterIntegrationState": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Indicates whether to enable or disable router integration when setting a flow source."
        },
        "RouterIntegrationTransitDecryption": {
          "$ref": "#/$defs/FlowTransitEncryption"
        }
      }
    },
    "VpcInterfaceAttachment": {
      "type": "object",
      "properties": {
        "VpcInterfaceName": {
          "type": "string",
          "description": "The name of the VPC interface to use for this resource."
        }
      }
    }
  }
}