{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-update-plugin-request-schema.json",
  "title": "UpdatePluginRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-plugins-api-openapi.yml#/components/schemas/UpdatePluginRequest",
  "type": "object",
  "properties": {
    "applicationId": {
      "type": "string",
      "description": "The identifier of the application the plugin is attached to."
    },
    "pluginId": {
      "type": "string",
      "description": "The identifier of the plugin."
    },
    "displayName": {
      "type": "string",
      "description": "The name of the plugin."
    },
    "state": {
      "type": "string",
      "enum": [
        "ENABLED",
        "DISABLED"
      ],
      "description": "The status of the plugin."
    },
    "serverUrl": {
      "type": "string",
      "description": "The source URL used for plugin configuration."
    },
    "customPluginConfiguration": {
      "$ref": "#/$defs/CustomPluginConfiguration"
    },
    "authConfiguration": {
      "$ref": "#/$defs/PluginAuthConfiguration"
    }
  },
  "required": [
    "applicationId",
    "pluginId"
  ],
  "$defs": {
    "APISchema": {
      "type": "object",
      "properties": {
        "payload": {
          "type": "string",
          "description": "The JSON or YAML-formatted payload defining the OpenAPI schema for a custom plugin."
        },
        "s3": {
          "$ref": "#/$defs/S3"
        }
      },
      "description": "Exactly one member is set."
    },
    "BasicAuthConfiguration": {
      "type": "object",
      "properties": {
        "secretArn": {
          "type": "string",
          "description": "The ARN of the Secrets Manager secret that stores the basic authentication credentials used for plugin configuration.."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of an IAM role used by Amazon Q Business to access the basic authentication credentials stored in a Secrets Manager secret."
        }
      },
      "required": [
        "secretArn",
        "roleArn"
      ]
    },
    "CustomPluginConfiguration": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "A description for your custom plugin configuration."
        },
        "apiSchemaType": {
          "type": "string",
          "enum": [
            "OPEN_API_V3"
          ],
          "description": "The type of OpenAPI schema to use."
        },
        "apiSchema": {
          "$ref": "#/$defs/APISchema"
        }
      },
      "required": [
        "description",
        "apiSchemaType"
      ]
    },
    "IdcAuthConfiguration": {
      "type": "object",
      "properties": {
        "idcApplicationArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM Identity Center Application used to configure authentication."
        },
        "roleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role with permissions to perform actions on Amazon Web Services services on your behalf."
        }
      },
      "required": [
        "idcApplicationArn",
        "roleArn"
      ]
    },
    "NoAuthConfiguration": {
      "type": "object",
      "properties": {}
    },
    "OAuth2ClientCredentialConfiguration": {
      "type": "object",
      "properties": {
        "secretArn": {
          "type": "string",
          "description": "The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token used for plugin configuration."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of an IAM role used by Amazon Q Business to access the OAuth 2.0 authentication credentials stored in a Secrets Manager secret."
        },
        "authorizationUrl": {
          "type": "string",
          "description": "The redirect URL required by the OAuth 2.0 protocol for Amazon Q Business to authenticate a plugin user through a third party authentication server."
        },
        "tokenUrl": {
          "type": "string",
          "description": "The URL required by the OAuth 2.0 protocol to exchange an end user authorization code for an access token."
        }
      },
      "required": [
        "secretArn",
        "roleArn"
      ]
    },
    "PluginAuthConfiguration": {
      "type": "object",
      "properties": {
        "basicAuthConfiguration": {
          "$ref": "#/$defs/BasicAuthConfiguration"
        },
        "oAuth2ClientCredentialConfiguration": {
          "$ref": "#/$defs/OAuth2ClientCredentialConfiguration"
        },
        "noAuthConfiguration": {
          "$ref": "#/$defs/NoAuthConfiguration"
        },
        "idcAuthConfiguration": {
          "$ref": "#/$defs/IdcAuthConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "S3": {
      "type": "object",
      "properties": {
        "bucket": {
          "type": "string",
          "description": "The name of the S3 bucket that contains the file."
        },
        "key": {
          "type": "string",
          "description": "The name of the file."
        }
      },
      "required": [
        "bucket",
        "key"
      ]
    }
  }
}