{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-mediaconnect/json-schema/amazon-mediaconnect-update-flow-request-schema.json",
  "title": "UpdateFlowRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-mediaconnect-flows-api-openapi.yml#/components/schemas/UpdateFlowRequest",
  "type": "object",
  "properties": {
    "FlowArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the flow that you want to update."
    },
    "SourceFailoverConfig": {
      "$ref": "#/$defs/UpdateFailoverConfig"
    },
    "Maintenance": {
      "$ref": "#/$defs/UpdateMaintenance"
    },
    "SourceMonitoringConfig": {
      "$ref": "#/$defs/MonitoringConfig"
    },
    "NdiConfig": {
      "$ref": "#/$defs/NdiConfig"
    },
    "FlowSize": {
      "type": "string",
      "enum": [
        "MEDIUM",
        "LARGE",
        "LARGE_4X"
      ],
      "description": "Determines the processing capacity and feature set of the flow."
    },
    "EncodingConfig": {
      "$ref": "#/$defs/EncodingConfig"
    }
  },
  "required": [
    "FlowArn"
  ],
  "$defs": {
    "AudioMonitoringSetting": {
      "type": "object",
      "properties": {
        "SilentAudio": {
          "$ref": "#/$defs/SilentAudio"
        }
      }
    },
    "BlackFrames": {
      "type": "object",
      "properties": {
        "State": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Indicates whether the BlackFrames metric is enabled or disabled."
        },
        "ThresholdSeconds": {
          "type": "integer",
          "description": "Specifies the number of consecutive seconds of black frames that triggers an event or alert."
        }
      }
    },
    "EncodingConfig": {
      "type": "object",
      "properties": {
        "EncodingProfile": {
          "type": "string",
          "enum": [
            "DISTRIBUTION_H264_DEFAULT",
            "CONTRIBUTION_H264_DEFAULT"
          ],
          "description": "The encoding profile to use when transcoding the NDI source content to a transport stream. You can change this value while the flow is running."
        },
        "VideoMaxBitrate": {
          "type": "integer",
          "description": "The maximum video bitrate to use when transcoding the NDI source to a transport stream. This parameter enables you to override the default video bitrate within the encoding profile's supported range. The supported range is 10,000,000 - 50,000,000 bits per second (bps). If you don't specify a value, MediaConnect uses the default value of 20,000,000 bps."
        }
      }
    },
    "FrozenFrames": {
      "type": "object",
      "properties": {
        "State": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Indicates whether the FrozenFrames metric is enabled or disabled."
        },
        "ThresholdSeconds": {
          "type": "integer",
          "description": "Specifies the number of consecutive seconds of a static image that triggers an event or alert."
        }
      }
    },
    "MonitoringConfig": {
      "type": "object",
      "properties": {
        "ThumbnailState": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Indicates whether thumbnails are enabled or disabled."
        },
        "AudioMonitoringSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AudioMonitoringSetting"
          },
          "description": "Contains the settings for audio stream metrics monitoring."
        },
        "ContentQualityAnalysisState": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Indicates whether content quality analysis is enabled or disabled."
        },
        "VideoMonitoringSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VideoMonitoringSetting"
          },
          "description": "Contains the settings for video stream metrics monitoring."
        }
      }
    },
    "NdiConfig": {
      "type": "object",
      "properties": {
        "NdiState": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "A setting that controls whether NDI® sources or outputs can be used in the flow. The default value is DISABLED. This value must be set as ENABLED for your flow to support NDI sources or outputs."
        },
        "MachineName": {
          "type": "string",
          "description": "A prefix for the names of the NDI sources that the flow creates. If a custom name isn't specified, MediaConnect generates a unique 12-character ID as the prefix."
        },
        "NdiDiscoveryServers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NdiDiscoveryServerConfig"
          },
          "description": "A list of up to three NDI discovery server configurations. While not required by the API, this configuration is necessary for NDI functionality to work properly."
        }
      }
    },
    "NdiDiscoveryServerConfig": {
      "type": "object",
      "properties": {
        "DiscoveryServerAddress": {
          "type": "string",
          "description": "The unique network address of the NDI discovery server."
        },
        "DiscoveryServerPort": {
          "type": "integer",
          "description": "The port for the NDI discovery server. Defaults to 5959 if a custom port isn't specified."
        },
        "VpcInterfaceAdapter": {
          "type": "string",
          "description": "The identifier for the Virtual Private Cloud (VPC) network interface used by the flow."
        }
      },
      "required": [
        "DiscoveryServerAddress",
        "VpcInterfaceAdapter"
      ]
    },
    "SilentAudio": {
      "type": "object",
      "properties": {
        "State": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Indicates whether the SilentAudio metric is enabled or disabled."
        },
        "ThresholdSeconds": {
          "type": "integer",
          "description": "Specifies the number of consecutive seconds of silence that triggers an event or alert."
        }
      }
    },
    "SourcePriority": {
      "type": "object",
      "properties": {
        "PrimarySource": {
          "type": "string",
          "description": "The name of the source you choose as the primary source for this flow."
        }
      }
    },
    "UpdateFailoverConfig": {
      "type": "object",
      "properties": {
        "FailoverMode": {
          "type": "string",
          "enum": [
            "MERGE",
            "FAILOVER"
          ],
          "description": "The type of failover you choose for this flow. MERGE combines the source streams into a single stream, allowing graceful recovery from any single-source loss. FAILOVER allows switching between different streams."
        },
        "RecoveryWindow": {
          "type": "integer",
          "description": "Recovery window time to look for dash-7 packets."
        },
        "SourcePriority": {
          "$ref": "#/$defs/SourcePriority"
        },
        "State": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The state of source failover on the flow. If the state is inactive, the flow can have only one source. If the state is active, the flow can have one or two sources."
        }
      }
    },
    "UpdateMaintenance": {
      "type": "object",
      "properties": {
        "MaintenanceDay": {
          "type": "string",
          "enum": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday",
            "Saturday",
            "Sunday"
          ],
          "description": "A day of a week when the maintenance will happen."
        },
        "MaintenanceScheduledDate": {
          "type": "string",
          "description": "A scheduled date in ISO UTC format when the maintenance will happen. Use YYYY-MM-DD format. Example: 2021-01-30."
        },
        "MaintenanceStartHour": {
          "type": "string",
          "description": "UTC time when the maintenance will happen. Use 24-hour HH:MM format. Minutes must be 00. Example: 13:00. The default value is 02:00."
        }
      }
    },
    "VideoMonitoringSetting": {
      "type": "object",
      "properties": {
        "BlackFrames": {
          "$ref": "#/$defs/BlackFrames"
        },
        "FrozenFrames": {
          "$ref": "#/$defs/FrozenFrames"
        }
      }
    }
  }
}