Skip to content

Commit

Permalink
[OAS] Amazon Bedrock connector (elastic#168662)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored and dej611 committed Oct 17, 2023
1 parent b3378ba commit 7a807cc
Show file tree
Hide file tree
Showing 11 changed files with 239 additions and 4 deletions.
1 change: 0 additions & 1 deletion docs/management/connectors/action-types/bedrock.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ image::management/connectors/images/bedrock-connector.png[{bedrock} connector]
Name:: The name of the connector.
API URL:: The {bedrock} request URL.
Default model:: The GAI model for {bedrock} to use. Current support is for the Anthropic Claude models, defaulting to Claude 2. The model can be set on a per request basis by including a "model" parameter alongside the request body.
Region:: The {bedrock} request URL.
Access Key:: The AWS access key for authentication.
Secret:: The secret for authentication.

Expand Down
82 changes: 81 additions & 1 deletion x-pack/plugins/actions/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
"title": "Create connector request body properties",
"description": "The properties vary depending on the connector type.",
"oneOf": [
{
"$ref": "#/components/schemas/create_connector_request_bedrock"
},
{
"$ref": "#/components/schemas/create_connector_request_cases_webhook"
},
Expand Down Expand Up @@ -338,6 +341,9 @@
"title": "Create connector request body properties",
"description": "The properties vary depending on the connector type.",
"oneOf": [
{
"$ref": "#/components/schemas/create_connector_request_bedrock"
},
{
"$ref": "#/components/schemas/create_connector_request_cases_webhook"
},
Expand Down Expand Up @@ -466,6 +472,9 @@
"title": "Update connector request body properties",
"description": "The properties vary depending on the connector type.",
"oneOf": [
{
"$ref": "#/components/schemas/create_connector_request_bedrock"
},
{
"$ref": "#/components/schemas/update_connector_request_cases_webhook"
},
Expand Down Expand Up @@ -1423,6 +1432,76 @@
}
},
"schemas": {
"config_properties_bedrock": {
"title": "Connector request properties for an Amazon Bedrock connector",
"description": "Defines properties for connectors when type is `.bedrock`.",
"type": "object",
"required": [
"apiUrl"
],
"properties": {
"apiUrl": {
"type": "string",
"description": "The Amazon Bedrock request URL."
},
"defaultModel": {
"type": "string",
"description": "The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.\n",
"default": "anthropic.claude-v2"
}
}
},
"secrets_properties_bedrock": {
"title": "Connector secrets properties for an Amazon Bedrock connector",
"description": "Defines secrets for connectors when type is `.bedrock`.",
"type": "object",
"required": [
"accessKey",
"secret"
],
"properties": {
"accessKey": {
"type": "string",
"description": "The AWS access key for authentication."
},
"secret": {
"type": "string",
"description": "The AWS secret for authentication."
}
}
},
"create_connector_request_bedrock": {
"title": "Create Amazon Bedrock connector request",
"description": "The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock.",
"type": "object",
"required": [
"config",
"connector_type_id",
"name",
"secrets"
],
"properties": {
"config": {
"$ref": "#/components/schemas/config_properties_bedrock"
},
"connector_type_id": {
"type": "string",
"description": "The type of connector.",
"enum": [
".bedrock"
],
"example": ".bedrock"
},
"name": {
"type": "string",
"description": "The display name for the connector.",
"example": "my-connector"
},
"secrets": {
"$ref": "#/components/schemas/secrets_properties_bedrock"
}
}
},
"config_properties_cases_webhook": {
"title": "Connector request properties for Webhook - Case Management connector",
"required": [
Expand Down Expand Up @@ -4450,6 +4529,7 @@
"type": "string",
"description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.",
"enum": [
".bedrock",
".cases-webhook",
".d3security",
".email",
Expand Down Expand Up @@ -5722,4 +5802,4 @@
}
}
}
}
}
61 changes: 59 additions & 2 deletions x-pack/plugins/actions/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ paths:
title: Create connector request body properties
description: The properties vary depending on the connector type.
oneOf:
- $ref: '#/components/schemas/create_connector_request_bedrock'
- $ref: '#/components/schemas/create_connector_request_cases_webhook'
- $ref: '#/components/schemas/create_connector_request_d3security'
- $ref: '#/components/schemas/create_connector_request_email'
Expand Down Expand Up @@ -191,6 +192,7 @@ paths:
title: Create connector request body properties
description: The properties vary depending on the connector type.
oneOf:
- $ref: '#/components/schemas/create_connector_request_bedrock'
- $ref: '#/components/schemas/create_connector_request_cases_webhook'
- $ref: '#/components/schemas/create_connector_request_d3security'
- $ref: '#/components/schemas/create_connector_request_email'
Expand Down Expand Up @@ -250,6 +252,7 @@ paths:
title: Update connector request body properties
description: The properties vary depending on the connector type.
oneOf:
- $ref: '#/components/schemas/create_connector_request_bedrock'
- $ref: '#/components/schemas/update_connector_request_cases_webhook'
- $ref: '#/components/schemas/update_connector_request_d3security'
- $ref: '#/components/schemas/update_connector_request_email'
Expand Down Expand Up @@ -818,6 +821,59 @@ components:
type: string
example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad
schemas:
config_properties_bedrock:
title: Connector request properties for an Amazon Bedrock connector
description: Defines properties for connectors when type is `.bedrock`.
type: object
required:
- apiUrl
properties:
apiUrl:
type: string
description: The Amazon Bedrock request URL.
defaultModel:
type: string
description: |
The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.
default: anthropic.claude-v2
secrets_properties_bedrock:
title: Connector secrets properties for an Amazon Bedrock connector
description: Defines secrets for connectors when type is `.bedrock`.
type: object
required:
- accessKey
- secret
properties:
accessKey:
type: string
description: The AWS access key for authentication.
secret:
type: string
description: The AWS secret for authentication.
create_connector_request_bedrock:
title: Create Amazon Bedrock connector request
description: The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock.
type: object
required:
- config
- connector_type_id
- name
- secrets
properties:
config:
$ref: '#/components/schemas/config_properties_bedrock'
connector_type_id:
type: string
description: The type of connector.
enum:
- .bedrock
example: .bedrock
name:
type: string
description: The display name for the connector.
example: my-connector
secrets:
$ref: '#/components/schemas/secrets_properties_bedrock'
config_properties_cases_webhook:
title: Connector request properties for Webhook - Case Management connector
required:
Expand Down Expand Up @@ -1031,14 +1087,14 @@ components:
type: boolean
host:
description: |
The host name of the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
The host name of the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
type: string
oauthTokenUrl:
type: string
nullable: true
port:
description: |
The port to connect to on the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
The port to connect to on the service provider. If the `service` is `elastic_cloud` (for Elastic Cloud notifications) or one of Nodemailer's well-known email service providers, this property is ignored. If `service` is `other`, this property must be defined.
type: integer
secure:
description: |
Expand Down Expand Up @@ -3084,6 +3140,7 @@ components:
type: string
description: The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.
enum:
- .bedrock
- .cases-webhook
- .d3security
- .email
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: Connector request properties for an Amazon Bedrock connector
description: Defines properties for connectors when type is `.bedrock`.
type: object
required:
- apiUrl
properties:
apiUrl:
type: string
description: The Amazon Bedrock request URL.
defaultModel:
type: string
description: >
The generative artificial intelligence model for Amazon Bedrock to use.
Current support is for the Anthropic Claude models.
default: anthropic.claude-v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
title: Connector response properties for an Amazon Bedrock connector
type: object
required:
- config
- connector_type_id
- id
- is_deprecated
- is_preconfigured
- name
properties:
config:
$ref: 'config_properties_bedrock.yaml'
connector_type_id:
type: string
description: The type of connector.
enum:
- .bedrock
id:
type: string
description: The identifier for the connector.
is_deprecated:
$ref: 'is_deprecated.yaml'
is_missing_secrets:
$ref: 'is_missing_secrets.yaml'
is_preconfigured:
$ref: 'is_preconfigured.yaml'
is_system_action:
$ref: 'is_system_action.yaml'
name:
type: string
description: The display name for the connector.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ title: Connector types
type: string
description: The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.
enum:
- .bedrock
- .cases-webhook
- .d3security
- .email
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title: Create Amazon Bedrock connector request
description: The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock.
type: object
required:
- config
- connector_type_id
- name
- secrets
properties:
config:
$ref: 'config_properties_bedrock.yaml'
connector_type_id:
type: string
description: The type of connector.
enum:
- .bedrock
example: .bedrock
name:
type: string
description: The display name for the connector.
example: my-connector
secrets:
$ref: 'secrets_properties_bedrock.yaml'
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: Connector secrets properties for an Amazon Bedrock connector
description: Defines secrets for connectors when type is `.bedrock`.
type: object
required:
- accessKey
- secret
properties:
accessKey:
type: string
description: The AWS access key for authentication.
secret:
type: string
description: The AWS secret for authentication.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: Update Amazon Bedrock connector request
type: object
required:
- config
- name
properties:
config:
$ref: 'config_properties_bedrock.yaml'
name:
type: string
description: The display name for the connector.
secrets:
$ref: 'secrets_properties_bedrock.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ post:
title: Create connector request body properties
description: The properties vary depending on the connector type.
oneOf:
- $ref: '../components/schemas/create_connector_request_bedrock.yaml'
- $ref: '../components/schemas/create_connector_request_cases_webhook.yaml'
- $ref: '../components/schemas/create_connector_request_d3security.yaml'
- $ref: '../components/schemas/create_connector_request_email.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ post:
title: Create connector request body properties
description: The properties vary depending on the connector type.
oneOf:
- $ref: '../components/schemas/create_connector_request_bedrock.yaml'
- $ref: '../components/schemas/create_connector_request_cases_webhook.yaml'
- $ref: '../components/schemas/create_connector_request_d3security.yaml'
- $ref: '../components/schemas/create_connector_request_email.yaml'
Expand Down Expand Up @@ -160,6 +161,7 @@ put:
title: Update connector request body properties
description: The properties vary depending on the connector type.
oneOf:
- $ref: '../components/schemas/create_connector_request_bedrock.yaml'
- $ref: '../components/schemas/update_connector_request_cases_webhook.yaml'
- $ref: '../components/schemas/update_connector_request_d3security.yaml'
- $ref: '../components/schemas/update_connector_request_email.yaml'
Expand Down

0 comments on commit 7a807cc

Please sign in to comment.