{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-appsync/json-schema/amazon-appsync-update-channel-namespace-request-schema.json",
  "title": "UpdateChannelNamespaceRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-appsync-channelnamespaces-api-openapi.yml#/components/schemas/UpdateChannelNamespaceRequest",
  "type": "object",
  "properties": {
    "apiId": {
      "type": "string",
      "description": "The Api ID."
    },
    "name": {
      "type": "string",
      "description": "The name of the ChannelNamespace."
    },
    "subscribeAuthModes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AuthMode"
      },
      "description": "The authorization mode to use for subscribing to messages on the channel namespace. This configuration overrides the default Api authorization configuration."
    },
    "publishAuthModes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AuthMode"
      },
      "description": "The authorization mode to use for publishing messages on the channel namespace. This configuration overrides the default Api authorization configuration."
    },
    "codeHandlers": {
      "type": "string",
      "description": "The event handler functions that run custom business logic to process published events and subscribe requests."
    },
    "handlerConfigs": {
      "$ref": "#/$defs/HandlerConfigs"
    }
  },
  "required": [
    "apiId",
    "name"
  ],
  "$defs": {
    "AuthMode": {
      "type": "object",
      "properties": {
        "authType": {
          "type": "string",
          "enum": [
            "API_KEY",
            "AWS_IAM",
            "AMAZON_COGNITO_USER_POOLS",
            "OPENID_CONNECT",
            "AWS_LAMBDA"
          ],
          "description": "The authorization type."
        }
      },
      "required": [
        "authType"
      ]
    },
    "HandlerConfig": {
      "type": "object",
      "properties": {
        "behavior": {
          "type": "string",
          "enum": [
            "CODE",
            "DIRECT"
          ],
          "description": "The behavior for the handler."
        },
        "integration": {
          "$ref": "#/$defs/Integration"
        }
      },
      "required": [
        "behavior",
        "integration"
      ]
    },
    "HandlerConfigs": {
      "type": "object",
      "properties": {
        "onPublish": {
          "$ref": "#/$defs/HandlerConfig"
        },
        "onSubscribe": {
          "$ref": "#/$defs/HandlerConfig"
        }
      }
    },
    "Integration": {
      "type": "object",
      "properties": {
        "dataSourceName": {
          "type": "string",
          "description": "The unique name of the data source that has been configured on the API."
        },
        "lambdaConfig": {
          "$ref": "#/$defs/LambdaConfig"
        }
      },
      "required": [
        "dataSourceName"
      ]
    },
    "LambdaConfig": {
      "type": "object",
      "properties": {
        "invokeType": {
          "type": "string",
          "enum": [
            "REQUEST_RESPONSE",
            "EVENT"
          ],
          "description": "The invocation type for a Lambda data source."
        }
      }
    }
  }
}