{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-create-plugin-request-schema.json",
  "title": "CreatePluginRequest",
  "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/CreatePluginRequest",
  "type": "object",
  "properties": {
    "applicationId": {
      "type": "string",
      "description": "The identifier of the application that will contain the plugin."
    },
    "displayName": {
      "type": "string",
      "description": "A the name for your plugin."
    },
    "type": {
      "type": "string",
      "enum": [
        "SERVICE_NOW",
        "SALESFORCE",
        "JIRA",
        "ZENDESK",
        "CUSTOM",
        "QUICKSIGHT",
        "SERVICENOW_NOW_PLATFORM",
        "JIRA_CLOUD",
        "SALESFORCE_CRM",
        "ZENDESK_SUITE",
        "ATLASSIAN_CONFLUENCE",
        "GOOGLE_CALENDAR",
        "MICROSOFT_TEAMS",
        "MICROSOFT_EXCHANGE",
        "PAGERDUTY_ADVANCE",
        "SMARTSHEET",
        "ASANA"
      ],
      "description": "The type of plugin you want to create."
    },
    "authConfiguration": {
      "$ref": "#/$defs/PluginAuthConfiguration"
    },
    "serverUrl": {
      "type": "string",
      "description": "The source URL used for plugin configuration."
    },
    "customPluginConfiguration": {
      "$ref": "#/$defs/CustomPluginConfiguration"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @."
    },
    "clientToken": {
      "type": "string",
      "description": "A token that you provide to identify the request to create your Amazon Q Business plugin."
    }
  },
  "required": [
    "applicationId",
    "displayName",
    "type",
    "authConfiguration"
  ],
  "$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"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key for the tag. Keys are not case sensitive and must be unique for the Amazon Q Business application or data source."
        },
        "value": {
          "type": "string",
          "description": "The value associated with the tag. The value may be an empty string but it can't be null."
        }
      },
      "required": [
        "key",
        "value"
      ]
    }
  }
}