Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OAS] Amazon Bedrock connector #168662

Merged
merged 5 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ AWS Bedrock connectors have the following configuration properties:
Name:: The name of the connector.
API URL:: The AWS Bedrock request URL.
Default model:: The GAI model for AWS 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 AWS Bedrock request URL.
lcawl marked this conversation as resolved.
Show resolved Hide resolved
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 AWS Bedrock connector",
"description": "Defines properties for connectors when type is `.bedrock`.",
"type": "object",
"required": [
"apiUrl"
],
"properties": {
"apiUrl": {
"type": "string",
"description": "The AWS Bedrock request URL."
},
"defaultModel": {
"type": "string",
"description": "The generative artificial intelligence model for AWS 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 AWS 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 AWS Bedrock connector request",
"description": "The AWS Bedrock connector uses axios to send a POST request to AWS 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 AWS Bedrock connector
description: Defines properties for connectors when type is `.bedrock`.
type: object
required:
- apiUrl
properties:
apiUrl:
type: string
description: The AWS Bedrock request URL.
defaultModel:
type: string
description: |
The generative artificial intelligence model for AWS Bedrock to use. Current support is for the Anthropic Claude models.
default: anthropic.claude-v2
secrets_properties_bedrock:
title: Connector secrets properties for an AWS 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 AWS Bedrock connector request
description: The AWS Bedrock connector uses axios to send a POST request to AWS 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 AWS Bedrock connector
description: Defines properties for connectors when type is `.bedrock`.
type: object
required:
- apiUrl
properties:
apiUrl:
type: string
description: The AWS Bedrock request URL.
defaultModel:
type: string
description: >
The generative artificial intelligence model for AWS 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 AWS 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 AWS Bedrock connector request
description: The AWS Bedrock connector uses axios to send a POST request to AWS 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 AWS 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 AWS 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