Class: Aws::BedrockAgent::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::BedrockAgent::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb
Overview
An API client for BedrockAgent. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::BedrockAgent::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#associate_agent_collaborator(params = {}) ⇒ Types::AssociateAgentCollaboratorResponse
Makes an agent a collaborator for another agent.
-
#associate_agent_knowledge_base(params = {}) ⇒ Types::AssociateAgentKnowledgeBaseResponse
Associates a knowledge base with an agent.
-
#create_agent(params = {}) ⇒ Types::CreateAgentResponse
Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.
-
#create_agent_action_group(params = {}) ⇒ Types::CreateAgentActionGroupResponse
Creates an action group for an agent.
-
#create_agent_alias(params = {}) ⇒ Types::CreateAgentAliasResponse
Creates an alias of an agent that can be used to deploy the agent.
-
#create_data_source(params = {}) ⇒ Types::CreateDataSourceResponse
Connects a knowledge base to a data source.
-
#create_flow(params = {}) ⇒ Types::CreateFlowResponse
Creates a prompt flow that you can use to send an input through various steps to yield an output.
-
#create_flow_alias(params = {}) ⇒ Types::CreateFlowAliasResponse
Creates an alias of a flow for deployment.
-
#create_flow_version(params = {}) ⇒ Types::CreateFlowVersionResponse
Creates a version of the flow that you can deploy.
-
#create_knowledge_base(params = {}) ⇒ Types::CreateKnowledgeBaseResponse
Creates a knowledge base.
-
#create_prompt(params = {}) ⇒ Types::CreatePromptResponse
Creates a prompt in your prompt library that you can add to a flow.
-
#create_prompt_version(params = {}) ⇒ Types::CreatePromptVersionResponse
Creates a static snapshot of your prompt that can be deployed to production.
-
#delete_agent(params = {}) ⇒ Types::DeleteAgentResponse
Deletes an agent.
-
#delete_agent_action_group(params = {}) ⇒ Struct
Deletes an action group in an agent.
-
#delete_agent_alias(params = {}) ⇒ Types::DeleteAgentAliasResponse
Deletes an alias of an agent.
-
#delete_agent_version(params = {}) ⇒ Types::DeleteAgentVersionResponse
Deletes a version of an agent.
-
#delete_data_source(params = {}) ⇒ Types::DeleteDataSourceResponse
Deletes a data source from a knowledge base.
-
#delete_flow(params = {}) ⇒ Types::DeleteFlowResponse
Deletes a flow.
-
#delete_flow_alias(params = {}) ⇒ Types::DeleteFlowAliasResponse
Deletes an alias of a flow.
-
#delete_flow_version(params = {}) ⇒ Types::DeleteFlowVersionResponse
Deletes a version of a flow.
-
#delete_knowledge_base(params = {}) ⇒ Types::DeleteKnowledgeBaseResponse
Deletes a knowledge base.
-
#delete_knowledge_base_documents(params = {}) ⇒ Types::DeleteKnowledgeBaseDocumentsResponse
Deletes documents from a data source and syncs the changes to the knowledge base that is connected to it.
-
#delete_prompt(params = {}) ⇒ Types::DeletePromptResponse
Deletes a prompt or a version of it, depending on whether you include the
promptVersion
field or not. -
#disassociate_agent_collaborator(params = {}) ⇒ Struct
Disassociates an agent collaborator.
-
#disassociate_agent_knowledge_base(params = {}) ⇒ Struct
Disassociates a knowledge base from an agent.
-
#get_agent(params = {}) ⇒ Types::GetAgentResponse
Gets information about an agent.
-
#get_agent_action_group(params = {}) ⇒ Types::GetAgentActionGroupResponse
Gets information about an action group for an agent.
-
#get_agent_alias(params = {}) ⇒ Types::GetAgentAliasResponse
Gets information about an alias of an agent.
-
#get_agent_collaborator(params = {}) ⇒ Types::GetAgentCollaboratorResponse
Retrieves information about an agent's collaborator.
-
#get_agent_knowledge_base(params = {}) ⇒ Types::GetAgentKnowledgeBaseResponse
Gets information about a knowledge base associated with an agent.
-
#get_agent_version(params = {}) ⇒ Types::GetAgentVersionResponse
Gets details about a version of an agent.
-
#get_data_source(params = {}) ⇒ Types::GetDataSourceResponse
Gets information about a data source.
-
#get_flow(params = {}) ⇒ Types::GetFlowResponse
Retrieves information about a flow.
-
#get_flow_alias(params = {}) ⇒ Types::GetFlowAliasResponse
Retrieves information about a flow.
-
#get_flow_version(params = {}) ⇒ Types::GetFlowVersionResponse
Retrieves information about a version of a flow.
-
#get_ingestion_job(params = {}) ⇒ Types::GetIngestionJobResponse
Gets information about a data ingestion job.
-
#get_knowledge_base(params = {}) ⇒ Types::GetKnowledgeBaseResponse
Gets information about a knoweldge base.
-
#get_knowledge_base_documents(params = {}) ⇒ Types::GetKnowledgeBaseDocumentsResponse
Retrieves specific documents from a data source that is connected to a knowledge base.
-
#get_prompt(params = {}) ⇒ Types::GetPromptResponse
Retrieves information about the working draft (
DRAFT
version) of a prompt or a version of it, depending on whether you include thepromptVersion
field or not. -
#ingest_knowledge_base_documents(params = {}) ⇒ Types::IngestKnowledgeBaseDocumentsResponse
Ingests documents directly into the knowledge base that is connected to the data source.
-
#list_agent_action_groups(params = {}) ⇒ Types::ListAgentActionGroupsResponse
Lists the action groups for an agent and information about each one.
-
#list_agent_aliases(params = {}) ⇒ Types::ListAgentAliasesResponse
Lists the aliases of an agent and information about each one.
-
#list_agent_collaborators(params = {}) ⇒ Types::ListAgentCollaboratorsResponse
Retrieve a list of an agent's collaborators.
-
#list_agent_knowledge_bases(params = {}) ⇒ Types::ListAgentKnowledgeBasesResponse
Lists knowledge bases associated with an agent and information about each one.
-
#list_agent_versions(params = {}) ⇒ Types::ListAgentVersionsResponse
Lists the versions of an agent and information about each version.
-
#list_agents(params = {}) ⇒ Types::ListAgentsResponse
Lists the agents belonging to an account and information about each agent.
-
#list_data_sources(params = {}) ⇒ Types::ListDataSourcesResponse
Lists the data sources in a knowledge base and information about each one.
-
#list_flow_aliases(params = {}) ⇒ Types::ListFlowAliasesResponse
Returns a list of aliases for a flow.
-
#list_flow_versions(params = {}) ⇒ Types::ListFlowVersionsResponse
Returns a list of information about each flow.
-
#list_flows(params = {}) ⇒ Types::ListFlowsResponse
Returns a list of flows and information about each flow.
-
#list_ingestion_jobs(params = {}) ⇒ Types::ListIngestionJobsResponse
Lists the data ingestion jobs for a data source.
-
#list_knowledge_base_documents(params = {}) ⇒ Types::ListKnowledgeBaseDocumentsResponse
Retrieves all the documents contained in a data source that is connected to a knowledge base.
-
#list_knowledge_bases(params = {}) ⇒ Types::ListKnowledgeBasesResponse
Lists the knowledge bases in an account.
-
#list_prompts(params = {}) ⇒ Types::ListPromptsResponse
Returns either information about the working draft (
DRAFT
version) of each prompt in an account, or information about of all versions of a prompt, depending on whether you include thepromptIdentifier
field or not. -
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all the tags for the resource you specify.
-
#prepare_agent(params = {}) ⇒ Types::PrepareAgentResponse
Creates a
DRAFT
version of the agent that can be used for internal testing. -
#prepare_flow(params = {}) ⇒ Types::PrepareFlowResponse
Prepares the
DRAFT
version of a flow so that it can be invoked. -
#start_ingestion_job(params = {}) ⇒ Types::StartIngestionJobResponse
Begins a data ingestion job.
-
#stop_ingestion_job(params = {}) ⇒ Types::StopIngestionJobResponse
Stops a currently running data ingestion job.
-
#tag_resource(params = {}) ⇒ Struct
Associate tags with a resource.
-
#untag_resource(params = {}) ⇒ Struct
Remove tags from a resource.
-
#update_agent(params = {}) ⇒ Types::UpdateAgentResponse
Updates the configuration of an agent.
-
#update_agent_action_group(params = {}) ⇒ Types::UpdateAgentActionGroupResponse
Updates the configuration for an action group for an agent.
-
#update_agent_alias(params = {}) ⇒ Types::UpdateAgentAliasResponse
Updates configurations for an alias of an agent.
-
#update_agent_collaborator(params = {}) ⇒ Types::UpdateAgentCollaboratorResponse
Updates an agent's collaborator.
-
#update_agent_knowledge_base(params = {}) ⇒ Types::UpdateAgentKnowledgeBaseResponse
Updates the configuration for a knowledge base that has been associated with an agent.
-
#update_data_source(params = {}) ⇒ Types::UpdateDataSourceResponse
Updates the configurations for a data source connector.
-
#update_flow(params = {}) ⇒ Types::UpdateFlowResponse
Modifies a flow.
-
#update_flow_alias(params = {}) ⇒ Types::UpdateFlowAliasResponse
Modifies the alias of a flow.
-
#update_knowledge_base(params = {}) ⇒ Types::UpdateKnowledgeBaseResponse
Updates the configuration of a knowledge base with the fields that you specify.
-
#update_prompt(params = {}) ⇒ Types::UpdatePromptResponse
Modifies a prompt in your prompt library.
-
#validate_flow_definition(params = {}) ⇒ Types::ValidateFlowDefinitionResponse
Validates the definition of a flow.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
Parameters:
- options (Hash)
Options Hash (options):
-
:plugins
(Array<Seahorse::Client::Plugin>)
— default:
[]]
—
A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.
-
:credentials
(required, Aws::CredentialProvider)
—
Your AWS credentials. This can be an instance of any one of the following classes:
Aws::Credentials
- Used for configuring static, non-refreshing credentials.Aws::SharedCredentials
- Used for loading static credentials from a shared file, such as~/.aws/config
.Aws::AssumeRoleCredentials
- Used when you need to assume a role.Aws::AssumeRoleWebIdentityCredentials
- Used when you need to assume a role after providing credentials via the web.Aws::SSOCredentials
- Used for loading credentials from AWS SSO using an access token generated fromaws login
.Aws::ProcessCredentials
- Used for loading credentials from a process that outputs to stdout.Aws::InstanceProfileCredentials
- Used for loading credentials from an EC2 IMDS on an EC2 instance.Aws::ECSCredentials
- Used for loading credentials from instances running in ECS.Aws::CognitoIdentityCredentials
- Used for loading credentials from the Cognito Identity service.
When
:credentials
are not configured directly, the following locations will be searched for credentials:Aws.config[:credentials]
- The
:access_key_id
,:secret_access_key
,:session_token
, and:account_id
options. - ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
~/.aws/credentials
~/.aws/config
- EC2/ECS IMDS instance profile - When used by default, the timeouts
are very aggressive. Construct and pass an instance of
Aws::InstanceProfileCredentials
orAws::ECSCredentials
to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
-
:region
(required, String)
—
The AWS region to connect to. The configured
:region
is used to determine the service:endpoint
. When not passed, a default:region
is searched for in the following locations:Aws.config[:region]
ENV['AWS_REGION']
ENV['AMAZON_REGION']
ENV['AWS_DEFAULT_REGION']
~/.aws/credentials
~/.aws/config
- :access_key_id (String)
- :account_id (String)
-
:active_endpoint_cache
(Boolean)
— default:
false
—
When set to
true
, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults tofalse
. -
:adaptive_retry_wait_to_fill
(Boolean)
— default:
true
—
Used only in
adaptive
retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise aRetryCapacityNotAvailableError
and will not retry instead of sleeping. -
:client_side_monitoring
(Boolean)
— default:
false
—
When
true
, client-side metrics will be collected for all API requests from this client. -
:client_side_monitoring_client_id
(String)
— default:
""
—
Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.
-
:client_side_monitoring_host
(String)
— default:
"127.0.0.1"
—
Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.
-
:client_side_monitoring_port
(Integer)
— default:
31000
—
Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.
-
:client_side_monitoring_publisher
(Aws::ClientSideMonitoring::Publisher)
— default:
Aws::ClientSideMonitoring::Publisher
—
Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.
-
:convert_params
(Boolean)
— default:
true
—
When
true
, an attempt is made to coerce request parameters into the required types. -
:correct_clock_skew
(Boolean)
— default:
true
—
Used only in
standard
and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks. -
:defaults_mode
(String)
— default:
"legacy"
—
See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.
-
:disable_host_prefix_injection
(Boolean)
— default:
false
—
Set to true to disable SDK automatically adding host prefix to default service endpoint when available.
-
:disable_request_compression
(Boolean)
— default:
false
—
When set to 'true' the request body will not be compressed for supported operations.
-
:endpoint
(String, URI::HTTPS, URI::HTTP)
—
Normally you should not configure the
:endpoint
option directly. This is normally constructed from the:region
option. Configuring:endpoint
is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:'http://example.com' 'https://example.com' 'http://example.com:123'
-
:endpoint_cache_max_entries
(Integer)
— default:
1000
—
Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.
-
:endpoint_cache_max_threads
(Integer)
— default:
10
—
Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
-
:endpoint_cache_poll_interval
(Integer)
— default:
60
—
When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.
-
:endpoint_discovery
(Boolean)
— default:
false
—
When set to
true
, endpoint discovery will be enabled for operations when available. -
:ignore_configured_endpoint_urls
(Boolean)
—
Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.
-
:log_formatter
(Aws::Log::Formatter)
— default:
Aws::Log::Formatter.default
—
The log formatter.
-
:log_level
(Symbol)
— default:
:info
—
The log level to send messages to the
:logger
at. -
:logger
(Logger)
—
The Logger instance to send log messages to. If this option is not set, logging will be disabled.
-
:max_attempts
(Integer)
— default:
3
—
An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in
standard
andadaptive
retry modes. -
:profile
(String)
— default:
"default"
—
Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.
-
:request_min_compression_size_bytes
(Integer)
— default:
10240
—
The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.
-
:retry_backoff
(Proc)
—
A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the
legacy
retry mode. -
:retry_base_delay
(Float)
— default:
0.3
—
The base delay in seconds used by the default backoff function. This option is only used in the
legacy
retry mode. -
:retry_jitter
(Symbol)
— default:
:none
—
A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the
legacy
retry mode.@see https://www.awsarchitectureblog.com/2015/03/backoff.html
-
:retry_limit
(Integer)
— default:
3
—
The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the
legacy
retry mode. -
:retry_max_delay
(Integer)
— default:
0
—
The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the
legacy
retry mode. -
:retry_mode
(String)
— default:
"legacy"
—
Specifies which retry algorithm to use. Values are:
legacy
- The pre-existing retry behavior. This is default value if no retry mode is provided.standard
- A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.adaptive
- An experimental retry mode that includes all the functionality ofstandard
mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.
-
:sdk_ua_app_id
(String)
—
A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
- :secret_access_key (String)
- :session_token (String)
-
:sigv4a_signing_region_set
(Array)
—
A list of regions that should be signed with SigV4a signing. When not passed, a default
:sigv4a_signing_region_set
is searched for in the following locations:Aws.config[:sigv4a_signing_region_set]
ENV['AWS_SIGV4A_SIGNING_REGION_SET']
~/.aws/config
-
:stub_responses
(Boolean)
— default:
false
—
Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.
Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.
-
:telemetry_provider
(Aws::Telemetry::TelemetryProviderBase)
— default:
Aws::Telemetry::NoOpTelemetryProvider
—
Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses
NoOpTelemetryProvider
which will not record or emit any telemetry data. The SDK supports the following telemetry providers:- OpenTelemetry (OTel) - To use the OTel provider, install and require the
opentelemetry-sdk
gem and then, pass in an instance of aAws::Telemetry::OTelProvider
for telemetry provider.
- OpenTelemetry (OTel) - To use the OTel provider, install and require the
-
:token_provider
(Aws::TokenProvider)
—
A Bearer Token Provider. This can be an instance of any one of the following classes:
Aws::StaticTokenProvider
- Used for configuring static, non-refreshing tokens.Aws::SSOTokenProvider
- Used for loading tokens from AWS SSO using an access token generated fromaws login
.
When
:token_provider
is not configured directly, theAws::TokenProviderChain
will be used to search for tokens configured for your profile in shared configuration files. -
:use_dualstack_endpoint
(Boolean)
—
When set to
true
, dualstack enabled endpoints (with.aws
TLD) will be used if available. -
:use_fips_endpoint
(Boolean)
—
When set to
true
, fips compatible endpoints will be used if available. When afips
region is used, the region is normalized and this config is set totrue
. -
:validate_params
(Boolean)
— default:
true
—
When
true
, request parameters are validated before sending the request. -
:endpoint_provider
(Aws::BedrockAgent::EndpointProvider)
—
The endpoint provider used to resolve endpoints. Any object that responds to
#resolve_endpoint(parameters)
whereparameters
is a Struct similar toAws::BedrockAgent::EndpointParameters
. -
:http_continue_timeout
(Float)
— default:
1
—
The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to
nil
which disables this behaviour. This value can safely be set per request on the session. -
:http_idle_timeout
(Float)
— default:
5
—
The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.
-
:http_open_timeout
(Float)
— default:
15
—
The default number of seconds to wait for response data. This value can safely be set per-request on the session.
-
:http_proxy
(URI::HTTP, String)
—
A proxy to send requests through. Formatted like 'http://proxy.com:123'.
-
:http_read_timeout
(Float)
— default:
60
—
The default number of seconds to wait for response data. This value can safely be set per-request on the session.
-
:http_wire_trace
(Boolean)
— default:
false
—
When
true
, HTTP debug output will be sent to the:logger
. -
:on_chunk_received
(Proc)
—
When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a
content-length
). -
:on_chunk_sent
(Proc)
—
When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.
-
:raise_response_errors
(Boolean)
— default:
true
—
When
true
, response errors are raised. -
:ssl_ca_bundle
(String)
—
Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass
:ssl_ca_bundle
or:ssl_ca_directory
the the system default will be used if available. -
:ssl_ca_directory
(String)
—
Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass
:ssl_ca_bundle
or:ssl_ca_directory
the the system default will be used if available. -
:ssl_ca_store
(String)
—
Sets the X509::Store to verify peer certificate.
-
:ssl_cert
(OpenSSL::X509::Certificate)
—
Sets a client certificate when creating http connections.
-
:ssl_key
(OpenSSL::PKey)
—
Sets a client key when creating http connections.
-
:ssl_timeout
(Float)
—
Sets the SSL timeout in seconds
-
:ssl_verify_peer
(Boolean)
— default:
true
—
When
true
, SSL peer certificates are verified when establishing a connection.
444 445 446 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 444 def initialize(*args) super end |
Instance Method Details
#associate_agent_collaborator(params = {}) ⇒ Types::AssociateAgentCollaboratorResponse
Makes an agent a collaborator for another agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.associate_agent_collaborator({
agent_descriptor: { # required
alias_arn: "AgentAliasArn",
},
agent_id: "Id", # required
agent_version: "DraftVersion", # required
client_token: "ClientToken",
collaboration_instruction: "CollaborationInstruction", # required
collaborator_name: "Name", # required
relay_conversation_history: "TO_COLLABORATOR", # accepts TO_COLLABORATOR, DISABLED
})
Response structure
Response structure
resp.agent_collaborator.agent_descriptor.alias_arn #=> String
resp.agent_collaborator.agent_id #=> String
resp.agent_collaborator.agent_version #=> String
resp.agent_collaborator.client_token #=> String
resp.agent_collaborator.collaboration_instruction #=> String
resp.agent_collaborator.collaborator_id #=> String
resp.agent_collaborator.collaborator_name #=> String
resp.agent_collaborator.created_at #=> Time
resp.agent_collaborator.last_updated_at #=> Time
resp.agent_collaborator.relay_conversation_history #=> String, one of "TO_COLLABORATOR", "DISABLED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_descriptor
(required, Types::AgentDescriptor)
—
The alias of the collaborator agent.
-
:agent_id
(required, String)
—
The agent's ID.
-
:agent_version
(required, String)
—
An agent version.
-
:client_token
(String)
—
A client token.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:collaboration_instruction
(required, String)
—
Instruction for the collaborator.
-
:collaborator_name
(required, String)
—
A name for the collaborator.
-
:relay_conversation_history
(String)
—
A relay conversation history for the collaborator.
Returns:
-
(Types::AssociateAgentCollaboratorResponse)
—
Returns a response object which responds to the following methods:
- #agent_collaborator => Types::AgentCollaborator
See Also:
511 512 513 514 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 511 def associate_agent_collaborator(params = {}, options = {}) req = build_request(:associate_agent_collaborator, params) req.send_request(options) end |
#associate_agent_knowledge_base(params = {}) ⇒ Types::AssociateAgentKnowledgeBaseResponse
Associates a knowledge base with an agent. If a knowledge base is
associated and its indexState
is set to Enabled
, the agent queries
the knowledge base for information to augment its response to the
user.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.associate_agent_knowledge_base({
agent_id: "Id", # required
agent_version: "DraftVersion", # required
description: "Description", # required
knowledge_base_id: "Id", # required
knowledge_base_state: "ENABLED", # accepts ENABLED, DISABLED
})
Response structure
Response structure
resp.agent_knowledge_base.agent_id #=> String
resp.agent_knowledge_base.agent_version #=> String
resp.agent_knowledge_base.created_at #=> Time
resp.agent_knowledge_base.description #=> String
resp.agent_knowledge_base.knowledge_base_id #=> String
resp.agent_knowledge_base.knowledge_base_state #=> String, one of "ENABLED", "DISABLED"
resp.agent_knowledge_base.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent with which you want to associate the knowledge base.
-
:agent_version
(required, String)
—
The version of the agent with which you want to associate the knowledge base.
-
:description
(required, String)
—
A description of what the agent should use the knowledge base for.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base to associate with the agent.
-
:knowledge_base_state
(String)
—
Specifies whether to use the knowledge base or not when sending an InvokeAgent request.
Returns:
-
(Types::AssociateAgentKnowledgeBaseResponse)
—
Returns a response object which responds to the following methods:
- #agent_knowledge_base => Types::AgentKnowledgeBase
See Also:
572 573 574 575 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 572 def associate_agent_knowledge_base(params = {}, options = {}) req = build_request(:associate_agent_knowledge_base, params) req.send_request(options) end |
#create_agent(params = {}) ⇒ Types::CreateAgentResponse
Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.
Specify the following fields for security purposes.
agentResourceRoleArn
– The Amazon Resource Name (ARN) of the role with permissions to invoke API operations on an agent.(Optional)
customerEncryptionKeyArn
– The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.(Optional)
idleSessionTTLinSeconds
– Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequentInvokeAgent
request begins a new session.
To enable your agent to retain conversational context across multiple sessions, include a
memoryConfiguration
object. For more information, see Configure memory.To override the default prompt behavior for agent orchestration and to use advanced prompts, include a
promptOverrideConfiguration
object. For more information, see Advanced prompts.If your agent fails to be created, the response returns a list of
failureReasons
alongside a list ofrecommendedActions
for you to troubleshoot.The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_agent({
agent_collaboration: "SUPERVISOR", # accepts SUPERVISOR, SUPERVISOR_ROUTER, DISABLED
agent_name: "Name", # required
agent_resource_role_arn: "AgentRoleArn",
client_token: "ClientToken",
custom_orchestration: {
executor: {
lambda: "LambdaArn",
},
},
customer_encryption_key_arn: "KmsKeyArn",
description: "Description",
foundation_model: "ModelIdentifier",
guardrail_configuration: {
guardrail_identifier: "GuardrailIdentifier",
guardrail_version: "GuardrailVersion",
},
idle_session_ttl_in_seconds: 1,
instruction: "Instruction",
memory_configuration: {
enabled_memory_types: ["SESSION_SUMMARY"], # required, accepts SESSION_SUMMARY
storage_days: 1,
},
orchestration_type: "DEFAULT", # accepts DEFAULT, CUSTOM_ORCHESTRATION
prompt_override_configuration: {
override_lambda: "LambdaArn",
prompt_configurations: [ # required
{
base_prompt_template: "BasePromptTemplate",
foundation_model: "ModelIdentifier",
inference_configuration: {
maximum_length: 1,
stop_sequences: ["String"],
temperature: 1.0,
top_k: 1,
top_p: 1.0,
},
parser_mode: "DEFAULT", # accepts DEFAULT, OVERRIDDEN
prompt_creation_mode: "DEFAULT", # accepts DEFAULT, OVERRIDDEN
prompt_state: "ENABLED", # accepts ENABLED, DISABLED
prompt_type: "PRE_PROCESSING", # accepts PRE_PROCESSING, ORCHESTRATION, POST_PROCESSING, KNOWLEDGE_BASE_RESPONSE_GENERATION
},
],
},
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.agent.agent_arn #=> String
resp.agent.agent_collaboration #=> String, one of "SUPERVISOR", "SUPERVISOR_ROUTER", "DISABLED"
resp.agent.agent_id #=> String
resp.agent.agent_name #=> String
resp.agent.agent_resource_role_arn #=> String
resp.agent.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
resp.agent.agent_version #=> String
resp.agent.client_token #=> String
resp.agent.created_at #=> Time
resp.agent.custom_orchestration.executor.lambda #=> String
resp.agent.customer_encryption_key_arn #=> String
resp.agent.description #=> String
resp.agent.failure_reasons #=> Array
resp.agent.failure_reasons[0] #=> String
resp.agent.foundation_model #=> String
resp.agent.guardrail_configuration.guardrail_identifier #=> String
resp.agent.guardrail_configuration.guardrail_version #=> String
resp.agent.idle_session_ttl_in_seconds #=> Integer
resp.agent.instruction #=> String
resp.agent.memory_configuration.enabled_memory_types #=> Array
resp.agent.memory_configuration.enabled_memory_types[0] #=> String, one of "SESSION_SUMMARY"
resp.agent.memory_configuration.storage_days #=> Integer
resp.agent.orchestration_type #=> String, one of "DEFAULT", "CUSTOM_ORCHESTRATION"
resp.agent.prepared_at #=> Time
resp.agent.prompt_override_configuration.override_lambda #=> String
resp.agent.prompt_override_configuration.prompt_configurations #=> Array
resp.agent.prompt_override_configuration.prompt_configurations[0].base_prompt_template #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].foundation_model #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.maximum_length #=> Integer
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences #=> Array
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences[0] #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.temperature #=> Float
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_k #=> Integer
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_p #=> Float
resp.agent.prompt_override_configuration.prompt_configurations[0].parser_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_creation_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_state #=> String, one of "ENABLED", "DISABLED"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "POST_PROCESSING", "KNOWLEDGE_BASE_RESPONSE_GENERATION"
resp.agent.recommended_actions #=> Array
resp.agent.recommended_actions[0] #=> String
resp.agent.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_collaboration
(String)
—
The agent's collaboration role.
-
:agent_name
(required, String)
—
A name for the agent that you create.
-
:agent_resource_role_arn
(String)
—
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:custom_orchestration
(Types::CustomOrchestration)
—
Contains details of the custom orchestration configured for the agent.
-
:customer_encryption_key_arn
(String)
—
The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.
-
:description
(String)
—
A description of the agent.
-
:foundation_model
(String)
—
The identifier for the model that you want to be used for orchestration by the agent you create.
The
modelId
to provide depends on the type of model or throughput that you use:If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for cross-region inference in the Amazon Bedrock User Guide.
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
If you use an imported model, specify the ARN of the imported model. You can get the model ARN from a successful call to CreateModelImportJob or from the Imported models page in the Amazon Bedrock console.
-
:guardrail_configuration
(Types::GuardrailConfiguration)
—
The unique Guardrail configuration assigned to the agent when it is created.
-
:idle_session_ttl_in_seconds
(Integer)
—
The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.
-
:instruction
(String)
—
Instructions that tell the agent what it should do and how it should interact with users.
-
:memory_configuration
(Types::MemoryConfiguration)
—
Contains the details of the memory configured for the agent.
-
:orchestration_type
(String)
—
Specifies the type of orchestration strategy for the agent. This is set to
DEFAULT
orchestration type, by default. -
:prompt_override_configuration
(Types::PromptOverrideConfiguration)
—
Contains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts.
-
:tags
(Hash<String,String>)
—
Any tags that you want to attach to the agent.
Returns:
See Also:
823 824 825 826 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 823 def create_agent(params = {}, options = {}) req = build_request(:create_agent, params) req.send_request(options) end |
#create_agent_action_group(params = {}) ⇒ Types::CreateAgentActionGroupResponse
Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them.
To allow your agent to request the user for additional information
when trying to complete a task, add an action group with the
parentActionGroupSignature
field set to AMAZON.UserInput
.
To allow your agent to generate, run, and troubleshoot code when
trying to complete a task, add an action group with the
parentActionGroupSignature
field set to AMAZON.CodeInterpreter
.
You must leave the description
, apiSchema
, and
actionGroupExecutor
fields blank for this action group. During
orchestration, if your agent determines that it needs to invoke an API
in an action group, but doesn't have enough information to complete
the API request, it will invoke this action group instead and return
an Observation reprompting the user for more information.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_agent_action_group({
action_group_executor: {
custom_control: "RETURN_CONTROL", # accepts RETURN_CONTROL
lambda: "LambdaArn",
},
action_group_name: "Name", # required
action_group_state: "ENABLED", # accepts ENABLED, DISABLED
agent_id: "Id", # required
agent_version: "DraftVersion", # required
api_schema: {
payload: "Payload",
s3: {
s3_bucket_name: "S3BucketName",
s3_object_key: "S3ObjectKey",
},
},
client_token: "ClientToken",
description: "Description",
function_schema: {
functions: [
{
description: "FunctionDescription",
name: "Name", # required
parameters: {
"Name" => {
description: "ParameterDescription",
required: false,
type: "string", # required, accepts string, number, integer, boolean, array
},
},
require_confirmation: "ENABLED", # accepts ENABLED, DISABLED
},
],
},
parent_action_group_signature: "AMAZON.UserInput", # accepts AMAZON.UserInput, AMAZON.CodeInterpreter
})
Response structure
Response structure
resp.agent_action_group.action_group_executor.custom_control #=> String, one of "RETURN_CONTROL"
resp.agent_action_group.action_group_executor.lambda #=> String
resp.agent_action_group.action_group_id #=> String
resp.agent_action_group.action_group_name #=> String
resp.agent_action_group.action_group_state #=> String, one of "ENABLED", "DISABLED"
resp.agent_action_group.agent_id #=> String
resp.agent_action_group.agent_version #=> String
resp.agent_action_group.api_schema.payload #=> String
resp.agent_action_group.api_schema.s3.s3_bucket_name #=> String
resp.agent_action_group.api_schema.s3.s3_object_key #=> String
resp.agent_action_group.client_token #=> String
resp.agent_action_group.created_at #=> Time
resp.agent_action_group.description #=> String
resp.agent_action_group.function_schema.functions #=> Array
resp.agent_action_group.function_schema.functions[0].description #=> String
resp.agent_action_group.function_schema.functions[0].name #=> String
resp.agent_action_group.function_schema.functions[0].parameters #=> Hash
resp.agent_action_group.function_schema.functions[0].parameters["Name"].description #=> String
resp.agent_action_group.function_schema.functions[0].parameters["Name"].required #=> Boolean
resp.agent_action_group.function_schema.functions[0].parameters["Name"].type #=> String, one of "string", "number", "integer", "boolean", "array"
resp.agent_action_group.function_schema.functions[0].require_confirmation #=> String, one of "ENABLED", "DISABLED"
resp.agent_action_group.parent_action_signature #=> String, one of "AMAZON.UserInput", "AMAZON.CodeInterpreter"
resp.agent_action_group.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:action_group_executor
(Types::ActionGroupExecutor)
—
The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user.
-
:action_group_name
(required, String)
—
The name to give the action group.
-
:action_group_state
(String)
—
Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.
-
:agent_id
(required, String)
—
The unique identifier of the agent for which to create the action group.
-
:agent_version
(required, String)
—
The version of the agent for which to create the action group.
-
:api_schema
(Types::APISchema)
—
Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema. For more information, see Action group OpenAPI schemas.
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:description
(String)
—
A description of the action group.
-
:function_schema
(Types::FunctionSchema)
—
Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.
-
:parent_action_group_signature
(String)
—
To allow your agent to request the user for additional information when trying to complete a task, set this field to
AMAZON.UserInput
. You must leave thedescription
,apiSchema
, andactionGroupExecutor
fields blank for this action group.To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to
AMAZON.CodeInterpreter
. You must leave thedescription
,apiSchema
, andactionGroupExecutor
fields blank for this action group.During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.
Returns:
-
(Types::CreateAgentActionGroupResponse)
—
Returns a response object which responds to the following methods:
- #agent_action_group => Types::AgentActionGroup
See Also:
998 999 1000 1001 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 998 def create_agent_action_group(params = {}, options = {}) req = build_request(:create_agent_action_group, params) req.send_request(options) end |
#create_agent_alias(params = {}) ⇒ Types::CreateAgentAliasResponse
Creates an alias of an agent that can be used to deploy the agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_agent_alias({
agent_alias_name: "Name", # required
agent_id: "Id", # required
client_token: "ClientToken",
description: "Description",
routing_configuration: [
{
agent_version: "Version",
provisioned_throughput: "ProvisionedModelIdentifier",
},
],
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.agent_alias.agent_alias_arn #=> String
resp.agent_alias.agent_alias_history_events #=> Array
resp.agent_alias.agent_alias_history_events[0].end_date #=> Time
resp.agent_alias.agent_alias_history_events[0].routing_configuration #=> Array
resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].agent_version #=> String
resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].provisioned_throughput #=> String
resp.agent_alias.agent_alias_history_events[0].start_date #=> Time
resp.agent_alias.agent_alias_id #=> String
resp.agent_alias.agent_alias_name #=> String
resp.agent_alias.agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
resp.agent_alias.agent_id #=> String
resp.agent_alias.client_token #=> String
resp.agent_alias.created_at #=> Time
resp.agent_alias.description #=> String
resp.agent_alias.failure_reasons #=> Array
resp.agent_alias.failure_reasons[0] #=> String
resp.agent_alias.routing_configuration #=> Array
resp.agent_alias.routing_configuration[0].agent_version #=> String
resp.agent_alias.routing_configuration[0].provisioned_throughput #=> String
resp.agent_alias.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_alias_name
(required, String)
—
The name of the alias.
-
:agent_id
(required, String)
—
The unique identifier of the agent.
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:description
(String)
—
A description of the alias of the agent.
-
:routing_configuration
(Array<Types::AgentAliasRoutingConfigurationListItem>)
—
Contains details about the routing configuration of the alias.
-
:tags
(Hash<String,String>)
—
Any tags that you want to attach to the alias of the agent.
Returns:
-
(Types::CreateAgentAliasResponse)
—
Returns a response object which responds to the following methods:
- #agent_alias => Types::AgentAlias
See Also:
1082 1083 1084 1085 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 1082 def create_agent_alias(params = {}, options = {}) req = build_request(:create_agent_alias, params) req.send_request(options) end |
#create_data_source(params = {}) ⇒ Types::CreateDataSourceResponse
Connects a knowledge base to a data source. You specify the
configuration for the specific data source service in the
dataSourceConfiguration
field.
You can't change the chunkingConfiguration
after you create the
data source connector.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_data_source({
client_token: "ClientToken",
data_deletion_policy: "RETAIN", # accepts RETAIN, DELETE
data_source_configuration: { # required
confluence_configuration: {
crawler_configuration: {
filter_configuration: {
pattern_object_filter: {
filters: [ # required
{
exclusion_filters: ["FilterPattern"],
inclusion_filters: ["FilterPattern"],
object_type: "FilteredObjectType", # required
},
],
},
type: "PATTERN", # required, accepts PATTERN
},
},
source_configuration: { # required
auth_type: "BASIC", # required, accepts BASIC, OAUTH2_CLIENT_CREDENTIALS
credentials_secret_arn: "SecretArn", # required
host_type: "SAAS", # required, accepts SAAS
host_url: "HttpsUrl", # required
},
},
s3_configuration: {
bucket_arn: "S3BucketArn", # required
bucket_owner_account_id: "BucketOwnerAccountId",
inclusion_prefixes: ["S3Prefix"],
},
salesforce_configuration: {
crawler_configuration: {
filter_configuration: {
pattern_object_filter: {
filters: [ # required
{
exclusion_filters: ["FilterPattern"],
inclusion_filters: ["FilterPattern"],
object_type: "FilteredObjectType", # required
},
],
},
type: "PATTERN", # required, accepts PATTERN
},
},
source_configuration: { # required
auth_type: "OAUTH2_CLIENT_CREDENTIALS", # required, accepts OAUTH2_CLIENT_CREDENTIALS
credentials_secret_arn: "SecretArn", # required
host_url: "HttpsUrl", # required
},
},
share_point_configuration: {
crawler_configuration: {
filter_configuration: {
pattern_object_filter: {
filters: [ # required
{
exclusion_filters: ["FilterPattern"],
inclusion_filters: ["FilterPattern"],
object_type: "FilteredObjectType", # required
},
],
},
type: "PATTERN", # required, accepts PATTERN
},
},
source_configuration: { # required
auth_type: "OAUTH2_CLIENT_CREDENTIALS", # required, accepts OAUTH2_CLIENT_CREDENTIALS
credentials_secret_arn: "SecretArn", # required
domain: "SharePointDomain", # required
host_type: "ONLINE", # required, accepts ONLINE
site_urls: ["HttpsUrl"], # required
tenant_id: "Microsoft365TenantId",
},
},
type: "S3", # required, accepts S3, WEB, CONFLUENCE, SALESFORCE, SHAREPOINT, CUSTOM, REDSHIFT_METADATA
web_configuration: {
crawler_configuration: {
crawler_limits: {
rate_limit: 1,
},
exclusion_filters: ["FilterPattern"],
inclusion_filters: ["FilterPattern"],
scope: "HOST_ONLY", # accepts HOST_ONLY, SUBDOMAINS
},
source_configuration: { # required
url_configuration: { # required
seed_urls: [
{
url: "Url",
},
],
},
},
},
},
description: "Description",
knowledge_base_id: "Id", # required
name: "Name", # required
server_side_encryption_configuration: {
kms_key_arn: "KmsKeyArn",
},
vector_ingestion_configuration: {
chunking_configuration: {
chunking_strategy: "FIXED_SIZE", # required, accepts FIXED_SIZE, NONE, HIERARCHICAL, SEMANTIC
fixed_size_chunking_configuration: {
max_tokens: 1, # required
overlap_percentage: 1, # required
},
hierarchical_chunking_configuration: {
level_configurations: [ # required
{
max_tokens: 1, # required
},
],
overlap_tokens: 1, # required
},
semantic_chunking_configuration: {
breakpoint_percentile_threshold: 1, # required
buffer_size: 1, # required
max_tokens: 1, # required
},
},
custom_transformation_configuration: {
intermediate_storage: { # required
s3_location: { # required
uri: "S3BucketUri", # required
},
},
transformations: [ # required
{
step_to_apply: "POST_CHUNKING", # required, accepts POST_CHUNKING
transformation_function: { # required
transformation_lambda_configuration: { # required
lambda_arn: "LambdaArn", # required
},
},
},
],
},
parsing_configuration: {
bedrock_data_automation_configuration: {
parsing_modality: "MULTIMODAL", # accepts MULTIMODAL
},
bedrock_foundation_model_configuration: {
model_arn: "BedrockModelArn", # required
parsing_modality: "MULTIMODAL", # accepts MULTIMODAL
parsing_prompt: {
parsing_prompt_text: "ParsingPromptText", # required
},
},
parsing_strategy: "BEDROCK_FOUNDATION_MODEL", # required, accepts BEDROCK_FOUNDATION_MODEL, BEDROCK_DATA_AUTOMATION
},
},
})
Response structure
Response structure
resp.data_source.created_at #=> Time
resp.data_source.data_deletion_policy #=> String, one of "RETAIN", "DELETE"
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.auth_type #=> String, one of "BASIC", "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.host_type #=> String, one of "SAAS"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.host_url #=> String
resp.data_source.data_source_configuration.s3_configuration.bucket_arn #=> String
resp.data_source.data_source_configuration.s3_configuration.bucket_owner_account_id #=> String
resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes #=> Array
resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.auth_type #=> String, one of "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.host_url #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.auth_type #=> String, one of "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.domain #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.host_type #=> String, one of "ONLINE"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.site_urls #=> Array
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.site_urls[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.tenant_id #=> String
resp.data_source.data_source_configuration.type #=> String, one of "S3", "WEB", "CONFLUENCE", "SALESFORCE", "SHAREPOINT", "CUSTOM", "REDSHIFT_METADATA"
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.crawler_limits.rate_limit #=> Integer
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.exclusion_filters #=> Array
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.inclusion_filters #=> Array
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.scope #=> String, one of "HOST_ONLY", "SUBDOMAINS"
resp.data_source.data_source_configuration.web_configuration.source_configuration.url_configuration.seed_urls #=> Array
resp.data_source.data_source_configuration.web_configuration.source_configuration.url_configuration.seed_urls[0].url #=> String
resp.data_source.data_source_id #=> String
resp.data_source.description #=> String
resp.data_source.failure_reasons #=> Array
resp.data_source.failure_reasons[0] #=> String
resp.data_source.knowledge_base_id #=> String
resp.data_source.name #=> String
resp.data_source.server_side_encryption_configuration.kms_key_arn #=> String
resp.data_source.status #=> String, one of "AVAILABLE", "DELETING", "DELETE_UNSUCCESSFUL"
resp.data_source.updated_at #=> Time
resp.data_source.vector_ingestion_configuration.chunking_configuration.chunking_strategy #=> String, one of "FIXED_SIZE", "NONE", "HIERARCHICAL", "SEMANTIC"
resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.overlap_percentage #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.level_configurations #=> Array
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.level_configurations[0].max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.overlap_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.breakpoint_percentile_threshold #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.buffer_size #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.intermediate_storage.s3_location.uri #=> String
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations #=> Array
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations[0].step_to_apply #=> String, one of "POST_CHUNKING"
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations[0].transformation_function.transformation_lambda_configuration.lambda_arn #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_data_automation_configuration.parsing_modality #=> String, one of "MULTIMODAL"
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.model_arn #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.parsing_modality #=> String, one of "MULTIMODAL"
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.parsing_prompt.parsing_prompt_text #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.parsing_strategy #=> String, one of "BEDROCK_FOUNDATION_MODEL", "BEDROCK_DATA_AUTOMATION"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:data_deletion_policy
(String)
—
The data deletion policy for the data source.
You can set the data deletion policy to:
DELETE: Deletes all data from your data source that’s converted into vector embeddings upon deletion of a knowledge base or data source resource. Note that the vector store itself is not deleted, only the data. This flag is ignored if an Amazon Web Services account is deleted.
RETAIN: Retains all data from your data source that’s converted into vector embeddings upon deletion of a knowledge base or data source resource. Note that the vector store itself is not deleted if you delete a knowledge base or data source resource.
-
:data_source_configuration
(required, Types::DataSourceConfiguration)
—
The connection configuration for the data source.
-
:description
(String)
—
A description of the data source.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base to which to add the data source.
-
:name
(required, String)
—
The name of the data source.
-
:server_side_encryption_configuration
(Types::ServerSideEncryptionConfiguration)
—
Contains details about the server-side encryption for the data source.
-
:vector_ingestion_configuration
(Types::VectorIngestionConfiguration)
—
Contains details about how to ingest the documents in the data source.
Returns:
-
(Types::CreateDataSourceResponse)
—
Returns a response object which responds to the following methods:
- #data_source => Types::DataSource
See Also:
1389 1390 1391 1392 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 1389 def create_data_source(params = {}, options = {}) req = build_request(:create_data_source, params) req.send_request(options) end |
#create_flow(params = {}) ⇒ Types::CreateFlowResponse
Creates a prompt flow that you can use to send an input through various steps to yield an output. Configure nodes, each of which corresponds to a step of the flow, and create connections between the nodes to create paths to different outputs. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_flow({
client_token: "ClientToken",
customer_encryption_key_arn: "KmsKeyArn",
definition: {
connections: [
{
configuration: {
conditional: {
condition: "FlowConditionName", # required
},
data: {
source_output: "FlowNodeOutputName", # required
target_input: "FlowNodeInputName", # required
},
},
name: "FlowConnectionName", # required
source: "FlowNodeName", # required
target: "FlowNodeName", # required
type: "Data", # required, accepts Data, Conditional
},
],
nodes: [
{
configuration: {
agent: {
agent_alias_arn: "AgentAliasArn", # required
},
collector: {
},
condition: {
conditions: [ # required
{
expression: "FlowConditionExpression",
name: "FlowConditionName", # required
},
],
},
input: {
},
iterator: {
},
knowledge_base: {
guardrail_configuration: {
guardrail_identifier: "GuardrailIdentifier",
guardrail_version: "GuardrailVersion",
},
knowledge_base_id: "KnowledgeBaseId", # required
model_id: "KnowledgeBaseModelIdentifier",
},
lambda_function: {
lambda_arn: "LambdaArn", # required
},
lex: {
bot_alias_arn: "LexBotAliasArn", # required
locale_id: "LexBotLocaleId", # required
},
output: {
},
prompt: {
guardrail_configuration: {
guardrail_identifier: "GuardrailIdentifier",
guardrail_version: "GuardrailVersion",
},
source_configuration: { # required
inline: {
additional_model_request_fields: {
},
inference_configuration: {
text: {
max_tokens: 1,
stop_sequences: ["String"],
temperature: 1.0,
top_p: 1.0,
},
},
model_id: "PromptModelIdentifier", # required
template_configuration: { # required
chat: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
messages: [ # required
{
content: [ # required
{
text: "String",
},
],
role: "user", # required, accepts user, assistant
},
],
system: [
{
text: "NonEmptyString",
},
],
tool_configuration: {
tool_choice: {
any: {
},
auto: {
},
tool: {
name: "ToolName", # required
},
},
tools: [ # required
{
tool_spec: {
description: "NonEmptyString",
input_schema: { # required
json: {
},
},
name: "ToolName", # required
},
},
],
},
},
text: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
text: "TextPrompt", # required
},
},
template_type: "TEXT", # required, accepts TEXT, CHAT
},
resource: {
prompt_arn: "PromptArn", # required
},
},
},
retrieval: {
service_configuration: { # required
s3: {
bucket_name: "S3BucketName", # required
},
},
},
storage: {
service_configuration: { # required
s3: {
bucket_name: "S3BucketName", # required
},
},
},
},
inputs: [
{
expression: "FlowNodeInputExpression", # required
name: "FlowNodeInputName", # required
type: "String", # required, accepts String, Number, Boolean, Object, Array
},
],
name: "FlowNodeName", # required
outputs: [
{
name: "FlowNodeOutputName", # required
type: "String", # required, accepts String, Number, Boolean, Object, Array
},
],
type: "Input", # required, accepts Input, Output, KnowledgeBase, Condition, Lex, Prompt, LambdaFunction, Storage, Agent, Retrieval, Iterator, Collector
},
],
},
description: "FlowDescription",
execution_role_arn: "FlowExecutionRoleArn", # required
name: "FlowName", # required
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.definition.connections #=> Array
resp.definition.connections[0].configuration.conditional.condition #=> String
resp.definition.connections[0].configuration.data.source_output #=> String
resp.definition.connections[0].configuration.data.target_input #=> String
resp.definition.connections[0].name #=> String
resp.definition.connections[0].source #=> String
resp.definition.connections[0].target #=> String
resp.definition.connections[0].type #=> String, one of "Data", "Conditional"
resp.definition.nodes #=> Array
resp.definition.nodes[0].configuration.agent.agent_alias_arn #=> String
resp.definition.nodes[0].configuration.condition.conditions #=> Array
resp.definition.nodes[0].configuration.condition.conditions[0].expression #=> String
resp.definition.nodes[0].configuration.condition.conditions[0].name #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.knowledge_base.knowledge_base_id #=> String
resp.definition.nodes[0].configuration.knowledge_base.model_id #=> String
resp.definition.nodes[0].configuration.lambda_function.lambda_arn #=> String
resp.definition.nodes[0].configuration.lex.bot_alias_arn #=> String
resp.definition.nodes[0].configuration.lex.locale_id #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.max_tokens #=> Integer
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences[0] #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.temperature #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.top_p #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.model_id #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_type #=> String, one of "TEXT", "CHAT"
resp.definition.nodes[0].configuration.prompt.source_configuration.resource.prompt_arn #=> String
resp.definition.nodes[0].configuration.retrieval.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].configuration.storage.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].inputs #=> Array
resp.definition.nodes[0].inputs[0].expression #=> String
resp.definition.nodes[0].inputs[0].name #=> String
resp.definition.nodes[0].inputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].name #=> String
resp.definition.nodes[0].outputs #=> Array
resp.definition.nodes[0].outputs[0].name #=> String
resp.definition.nodes[0].outputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].type #=> String, one of "Input", "Output", "KnowledgeBase", "Condition", "Lex", "Prompt", "LambdaFunction", "Storage", "Agent", "Retrieval", "Iterator", "Collector"
resp.description #=> String
resp.execution_role_arn #=> String
resp.id #=> String
resp.name #=> String
resp.status #=> String, one of "Failed", "Prepared", "Preparing", "NotPrepared"
resp.updated_at #=> Time
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:customer_encryption_key_arn
(String)
—
The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.
-
:definition
(Types::FlowDefinition)
—
A definition of the nodes and connections between nodes in the flow.
-
:description
(String)
—
A description for the flow.
-
:execution_role_arn
(required, String)
—
The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide.
-
:name
(required, String)
—
A name for the flow.
-
:tags
(Hash<String,String>)
—
Any tags that you want to attach to the flow. For more information, see Tagging resources in Amazon Bedrock.
Returns:
-
(Types::CreateFlowResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #definition => Types::FlowDefinition
- #description => String
- #execution_role_arn => String
- #id => String
- #name => String
- #status => String
- #updated_at => Time
- #version => String
See Also:
1716 1717 1718 1719 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 1716 def create_flow(params = {}, options = {}) req = build_request(:create_flow, params) req.send_request(options) end |
#create_flow_alias(params = {}) ⇒ Types::CreateFlowAliasResponse
Creates an alias of a flow for deployment. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_flow_alias({
client_token: "ClientToken",
description: "Description",
flow_identifier: "FlowIdentifier", # required
name: "Name", # required
routing_configuration: [ # required
{
flow_version: "Version",
},
],
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.description #=> String
resp.flow_id #=> String
resp.id #=> String
resp.name #=> String
resp.routing_configuration #=> Array
resp.routing_configuration[0].flow_version #=> String
resp.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:description
(String)
—
A description for the alias.
-
:flow_identifier
(required, String)
—
The unique identifier of the flow for which to create an alias.
-
:name
(required, String)
—
A name for the alias.
-
:routing_configuration
(required, Array<Types::FlowAliasRoutingConfigurationListItem>)
—
Contains information about the version to which to map the alias.
-
:tags
(Hash<String,String>)
—
Any tags that you want to attach to the alias of the flow. For more information, see Tagging resources in Amazon Bedrock.
Returns:
-
(Types::CreateFlowAliasResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #description => String
- #flow_id => String
- #id => String
- #name => String
- #routing_configuration => Array<Types::FlowAliasRoutingConfigurationListItem>
- #updated_at => Time
See Also:
1805 1806 1807 1808 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 1805 def create_flow_alias(params = {}, options = {}) req = build_request(:create_flow_alias, params) req.send_request(options) end |
#create_flow_version(params = {}) ⇒ Types::CreateFlowVersionResponse
Creates a version of the flow that you can deploy. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_flow_version({
client_token: "ClientToken",
description: "FlowDescription",
flow_identifier: "FlowIdentifier", # required
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.definition.connections #=> Array
resp.definition.connections[0].configuration.conditional.condition #=> String
resp.definition.connections[0].configuration.data.source_output #=> String
resp.definition.connections[0].configuration.data.target_input #=> String
resp.definition.connections[0].name #=> String
resp.definition.connections[0].source #=> String
resp.definition.connections[0].target #=> String
resp.definition.connections[0].type #=> String, one of "Data", "Conditional"
resp.definition.nodes #=> Array
resp.definition.nodes[0].configuration.agent.agent_alias_arn #=> String
resp.definition.nodes[0].configuration.condition.conditions #=> Array
resp.definition.nodes[0].configuration.condition.conditions[0].expression #=> String
resp.definition.nodes[0].configuration.condition.conditions[0].name #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.knowledge_base.knowledge_base_id #=> String
resp.definition.nodes[0].configuration.knowledge_base.model_id #=> String
resp.definition.nodes[0].configuration.lambda_function.lambda_arn #=> String
resp.definition.nodes[0].configuration.lex.bot_alias_arn #=> String
resp.definition.nodes[0].configuration.lex.locale_id #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.max_tokens #=> Integer
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences[0] #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.temperature #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.top_p #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.model_id #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_type #=> String, one of "TEXT", "CHAT"
resp.definition.nodes[0].configuration.prompt.source_configuration.resource.prompt_arn #=> String
resp.definition.nodes[0].configuration.retrieval.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].configuration.storage.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].inputs #=> Array
resp.definition.nodes[0].inputs[0].expression #=> String
resp.definition.nodes[0].inputs[0].name #=> String
resp.definition.nodes[0].inputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].name #=> String
resp.definition.nodes[0].outputs #=> Array
resp.definition.nodes[0].outputs[0].name #=> String
resp.definition.nodes[0].outputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].type #=> String, one of "Input", "Output", "KnowledgeBase", "Condition", "Lex", "Prompt", "LambdaFunction", "Storage", "Agent", "Retrieval", "Iterator", "Collector"
resp.description #=> String
resp.execution_role_arn #=> String
resp.id #=> String
resp.name #=> String
resp.status #=> String, one of "Failed", "Prepared", "Preparing", "NotPrepared"
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:description
(String)
—
A description of the version of the flow.
-
:flow_identifier
(required, String)
—
The unique identifier of the flow that you want to create a version of.
Returns:
-
(Types::CreateFlowVersionResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #definition => Types::FlowDefinition
- #description => String
- #execution_role_arn => String
- #id => String
- #name => String
- #status => String
- #version => String
See Also:
1931 1932 1933 1934 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 1931 def create_flow_version(params = {}, options = {}) req = build_request(:create_flow_version, params) req.send_request(options) end |
#create_knowledge_base(params = {}) ⇒ Types::CreateKnowledgeBaseResponse
Creates a knowledge base. A knowledge base contains your data sources so that Large Language Models (LLMs) can use your data. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see Set up a knowledge base.
Provide the
name
and an optionaldescription
.Provide the Amazon Resource Name (ARN) with permissions to create a knowledge base in the
roleArn
field.Provide the embedding model to use in the
embeddingModelArn
field in theknowledgeBaseConfiguration
object.Provide the configuration for your vector store in the
storageConfiguration
object.For an Amazon OpenSearch Service database, use the
opensearchServerlessConfiguration
object. For more information, see Create a vector store in Amazon OpenSearch Service.For an Amazon Aurora database, use the
RdsConfiguration
object. For more information, see Create a vector store in Amazon Aurora.For a Pinecone database, use the
pineconeConfiguration
object. For more information, see Create a vector store in Pinecone.For a Redis Enterprise Cloud database, use the
redisEnterpriseCloudConfiguration
object. For more information, see Create a vector store in Redis Enterprise Cloud.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_knowledge_base({
client_token: "ClientToken",
description: "Description",
knowledge_base_configuration: { # required
kendra_knowledge_base_configuration: {
kendra_index_arn: "KendraIndexArn", # required
},
sql_knowledge_base_configuration: {
redshift_configuration: {
query_engine_configuration: { # required
provisioned_configuration: {
auth_configuration: { # required
database_user: "String",
type: "IAM", # required, accepts IAM, USERNAME_PASSWORD, USERNAME
username_password_secret_arn: "SecretArn",
},
cluster_identifier: "RedshiftClusterIdentifier", # required
},
serverless_configuration: {
auth_configuration: { # required
type: "IAM", # required, accepts IAM, USERNAME_PASSWORD
username_password_secret_arn: "SecretArn",
},
workgroup_arn: "WorkgroupArn", # required
},
type: "SERVERLESS", # required, accepts SERVERLESS, PROVISIONED
},
query_generation_configuration: {
execution_timeout_seconds: 1,
generation_context: {
curated_queries: [
{
natural_language: "NaturalLanguageString", # required
sql: "SqlString", # required
},
],
tables: [
{
columns: [
{
description: "DescriptionString",
inclusion: "INCLUDE", # accepts INCLUDE, EXCLUDE
name: "QueryGenerationColumnName",
},
],
description: "DescriptionString",
inclusion: "INCLUDE", # accepts INCLUDE, EXCLUDE
name: "QueryGenerationTableName", # required
},
],
},
},
storage_configurations: [ # required
{
aws_data_catalog_configuration: {
table_names: ["AwsDataCatalogTableName"], # required
},
redshift_configuration: {
database_name: "RedshiftDatabase", # required
},
type: "REDSHIFT", # required, accepts REDSHIFT, AWS_DATA_CATALOG
},
],
},
type: "REDSHIFT", # required, accepts REDSHIFT
},
type: "VECTOR", # required, accepts VECTOR, KENDRA, SQL
vector_knowledge_base_configuration: {
embedding_model_arn: "BedrockEmbeddingModelArn", # required
embedding_model_configuration: {
bedrock_embedding_model_configuration: {
dimensions: 1,
embedding_data_type: "FLOAT32", # accepts FLOAT32, BINARY
},
},
supplemental_data_storage_configuration: {
storage_locations: [ # required
{
s3_location: {
uri: "S3BucketUri", # required
},
type: "S3", # required, accepts S3
},
],
},
},
},
name: "Name", # required
role_arn: "KnowledgeBaseRoleArn", # required
storage_configuration: {
mongo_db_atlas_configuration: {
collection_name: "MongoDbAtlasCollectionName", # required
credentials_secret_arn: "SecretArn", # required
database_name: "MongoDbAtlasDatabaseName", # required
endpoint: "MongoDbAtlasEndpoint", # required
endpoint_service_name: "MongoDbAtlasEndpointServiceName",
field_mapping: { # required
metadata_field: "FieldName", # required
text_field: "FieldName", # required
vector_field: "FieldName", # required
},
vector_index_name: "MongoDbAtlasIndexName", # required
},
opensearch_serverless_configuration: {
collection_arn: "OpenSearchServerlessCollectionArn", # required
field_mapping: { # required
metadata_field: "FieldName", # required
text_field: "FieldName", # required
vector_field: "FieldName", # required
},
vector_index_name: "OpenSearchServerlessIndexName", # required
},
pinecone_configuration: {
connection_string: "PineconeConnectionString", # required
credentials_secret_arn: "SecretArn", # required
field_mapping: { # required
metadata_field: "FieldName", # required
text_field: "FieldName", # required
},
namespace: "PineconeNamespace",
},
rds_configuration: {
credentials_secret_arn: "SecretArn", # required
database_name: "RdsDatabaseName", # required
field_mapping: { # required
metadata_field: "ColumnName", # required
primary_key_field: "ColumnName", # required
text_field: "ColumnName", # required
vector_field: "ColumnName", # required
},
resource_arn: "RdsArn", # required
table_name: "RdsTableName", # required
},
redis_enterprise_cloud_configuration: {
credentials_secret_arn: "SecretArn", # required
endpoint: "RedisEnterpriseCloudEndpoint", # required
field_mapping: { # required
metadata_field: "FieldName", # required
text_field: "FieldName", # required
vector_field: "FieldName", # required
},
vector_index_name: "RedisEnterpriseCloudIndexName", # required
},
type: "OPENSEARCH_SERVERLESS", # required, accepts OPENSEARCH_SERVERLESS, PINECONE, REDIS_ENTERPRISE_CLOUD, RDS, MONGO_DB_ATLAS
},
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.knowledge_base.created_at #=> Time
resp.knowledge_base.description #=> String
resp.knowledge_base.failure_reasons #=> Array
resp.knowledge_base.failure_reasons[0] #=> String
resp.knowledge_base.knowledge_base_arn #=> String
resp.knowledge_base.knowledge_base_configuration.kendra_knowledge_base_configuration.kendra_index_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.database_user #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.type #=> String, one of "IAM", "USERNAME_PASSWORD", "USERNAME"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.username_password_secret_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.cluster_identifier #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.auth_configuration.type #=> String, one of "IAM", "USERNAME_PASSWORD"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.auth_configuration.username_password_secret_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.workgroup_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.type #=> String, one of "SERVERLESS", "PROVISIONED"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.execution_timeout_seconds #=> Integer
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries[0].natural_language #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries[0].sql #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].description #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].inclusion #=> String, one of "INCLUDE", "EXCLUDE"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].description #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].inclusion #=> String, one of "INCLUDE", "EXCLUDE"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].aws_data_catalog_configuration.table_names #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].aws_data_catalog_configuration.table_names[0] #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].redshift_configuration.database_name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].type #=> String, one of "REDSHIFT", "AWS_DATA_CATALOG"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.type #=> String, one of "REDSHIFT"
resp.knowledge_base.knowledge_base_configuration.type #=> String, one of "VECTOR", "KENDRA", "SQL"
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_arn #=> String
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_configuration.bedrock_embedding_model_configuration.dimensions #=> Integer
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_configuration.bedrock_embedding_model_configuration.embedding_data_type #=> String, one of "FLOAT32", "BINARY"
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations #=> Array
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations[0].s3_location.uri #=> String
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations[0].type #=> String, one of "S3"
resp.knowledge_base.knowledge_base_id #=> String
resp.knowledge_base.name #=> String
resp.knowledge_base.role_arn #=> String
resp.knowledge_base.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED", "DELETE_UNSUCCESSFUL"
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.collection_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.database_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.endpoint #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.endpoint_service_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.collection_arn #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.connection_string #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.namespace #=> String
resp.knowledge_base.storage_configuration.rds_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.rds_configuration.database_name #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.primary_key_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.resource_arn #=> String
resp.knowledge_base.storage_configuration.rds_configuration.table_name #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.endpoint #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.type #=> String, one of "OPENSEARCH_SERVERLESS", "PINECONE", "REDIS_ENTERPRISE_CLOUD", "RDS", "MONGO_DB_ATLAS"
resp.knowledge_base.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:description
(String)
—
A description of the knowledge base.
-
:knowledge_base_configuration
(required, Types::KnowledgeBaseConfiguration)
—
Contains details about the embeddings model used for the knowledge base.
-
:name
(required, String)
—
A name for the knowledge base.
-
:role_arn
(required, String)
—
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
-
:storage_configuration
(Types::StorageConfiguration)
—
Contains details about the configuration of the vector database used for the knowledge base.
-
:tags
(Hash<String,String>)
—
Specify the key-value pairs for the tags that you want to attach to your knowledge base in this object.
Returns:
-
(Types::CreateKnowledgeBaseResponse)
—
Returns a response object which responds to the following methods:
- #knowledge_base => Types::KnowledgeBase
See Also:
2259 2260 2261 2262 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2259 def create_knowledge_base(params = {}, options = {}) req = build_request(:create_knowledge_base, params) req.send_request(options) end |
#create_prompt(params = {}) ⇒ Types::CreatePromptResponse
Creates a prompt in your prompt library that you can add to a flow. For more information, see Prompt management in Amazon Bedrock, Create a prompt using Prompt management and Prompt flows in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_prompt({
client_token: "ClientToken",
customer_encryption_key_arn: "KmsKeyArn",
default_variant: "PromptVariantName",
description: "PromptDescription",
name: "PromptName", # required
tags: {
"TagKey" => "TagValue",
},
variants: [
{
additional_model_request_fields: {
},
gen_ai_resource: {
agent: {
agent_identifier: "AgentAliasArn", # required
},
},
inference_configuration: {
text: {
max_tokens: 1,
stop_sequences: ["String"],
temperature: 1.0,
top_p: 1.0,
},
},
metadata: [
{
key: "PromptMetadataKey", # required
value: "PromptMetadataValue", # required
},
],
model_id: "PromptModelIdentifier",
name: "PromptVariantName", # required
template_configuration: { # required
chat: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
messages: [ # required
{
content: [ # required
{
text: "String",
},
],
role: "user", # required, accepts user, assistant
},
],
system: [
{
text: "NonEmptyString",
},
],
tool_configuration: {
tool_choice: {
any: {
},
auto: {
},
tool: {
name: "ToolName", # required
},
},
tools: [ # required
{
tool_spec: {
description: "NonEmptyString",
input_schema: { # required
json: {
},
},
name: "ToolName", # required
},
},
],
},
},
text: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
text: "TextPrompt", # required
},
},
template_type: "TEXT", # required, accepts TEXT, CHAT
},
],
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.default_variant #=> String
resp.description #=> String
resp.id #=> String
resp.name #=> String
resp.updated_at #=> Time
resp.variants #=> Array
resp.variants[0].gen_ai_resource.agent.agent_identifier #=> String
resp.variants[0].inference_configuration.text.max_tokens #=> Integer
resp.variants[0].inference_configuration.text.stop_sequences #=> Array
resp.variants[0].inference_configuration.text.stop_sequences[0] #=> String
resp.variants[0].inference_configuration.text.temperature #=> Float
resp.variants[0].inference_configuration.text.top_p #=> Float
resp.variants[0].metadata #=> Array
resp.variants[0].metadata[0].key #=> String
resp.variants[0].metadata[0].value #=> String
resp.variants[0].model_id #=> String
resp.variants[0].name #=> String
resp.variants[0].template_configuration.chat.input_variables #=> Array
resp.variants[0].template_configuration.chat.input_variables[0].name #=> String
resp.variants[0].template_configuration.chat.messages #=> Array
resp.variants[0].template_configuration.chat.messages[0].content #=> Array
resp.variants[0].template_configuration.chat.messages[0].content[0].text #=> String
resp.variants[0].template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.variants[0].template_configuration.chat.system #=> Array
resp.variants[0].template_configuration.chat.system[0].text #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tools #=> Array
resp.variants[0].template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.variants[0].template_configuration.text.input_variables #=> Array
resp.variants[0].template_configuration.text.input_variables[0].name #=> String
resp.variants[0].template_configuration.text.text #=> String
resp.variants[0].template_type #=> String, one of "TEXT", "CHAT"
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:customer_encryption_key_arn
(String)
—
The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
-
:default_variant
(String)
—
The name of the default variant for the prompt. This value must match the
name
field in the relevant PromptVariant object. -
:description
(String)
—
A description for the prompt.
-
:name
(required, String)
—
A name for the prompt.
-
:tags
(Hash<String,String>)
—
Any tags that you want to attach to the prompt. For more information, see Tagging resources in Amazon Bedrock.
-
:variants
(Array<Types::PromptVariant>)
—
A list of objects, each containing details about a variant of the prompt.
Returns:
-
(Types::CreatePromptResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #default_variant => String
- #description => String
- #id => String
- #name => String
- #updated_at => Time
- #variants => Array<Types::PromptVariant>
- #version => String
See Also:
2470 2471 2472 2473 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2470 def create_prompt(params = {}, options = {}) req = build_request(:create_prompt, params) req.send_request(options) end |
#create_prompt_version(params = {}) ⇒ Types::CreatePromptVersionResponse
Creates a static snapshot of your prompt that can be deployed to production. For more information, see Deploy prompts using Prompt management by creating versions in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_prompt_version({
client_token: "ClientToken",
description: "PromptDescription",
prompt_identifier: "PromptIdentifier", # required
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.default_variant #=> String
resp.description #=> String
resp.id #=> String
resp.name #=> String
resp.updated_at #=> Time
resp.variants #=> Array
resp.variants[0].gen_ai_resource.agent.agent_identifier #=> String
resp.variants[0].inference_configuration.text.max_tokens #=> Integer
resp.variants[0].inference_configuration.text.stop_sequences #=> Array
resp.variants[0].inference_configuration.text.stop_sequences[0] #=> String
resp.variants[0].inference_configuration.text.temperature #=> Float
resp.variants[0].inference_configuration.text.top_p #=> Float
resp.variants[0].metadata #=> Array
resp.variants[0].metadata[0].key #=> String
resp.variants[0].metadata[0].value #=> String
resp.variants[0].model_id #=> String
resp.variants[0].name #=> String
resp.variants[0].template_configuration.chat.input_variables #=> Array
resp.variants[0].template_configuration.chat.input_variables[0].name #=> String
resp.variants[0].template_configuration.chat.messages #=> Array
resp.variants[0].template_configuration.chat.messages[0].content #=> Array
resp.variants[0].template_configuration.chat.messages[0].content[0].text #=> String
resp.variants[0].template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.variants[0].template_configuration.chat.system #=> Array
resp.variants[0].template_configuration.chat.system[0].text #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tools #=> Array
resp.variants[0].template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.variants[0].template_configuration.text.input_variables #=> Array
resp.variants[0].template_configuration.text.input_variables[0].name #=> String
resp.variants[0].template_configuration.text.text #=> String
resp.variants[0].template_type #=> String, one of "TEXT", "CHAT"
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:description
(String)
—
A description for the version of the prompt.
-
:prompt_identifier
(required, String)
—
The unique identifier of the prompt that you want to create a version of.
-
:tags
(Hash<String,String>)
—
Any tags that you want to attach to the version of the prompt. For more information, see Tagging resources in Amazon Bedrock.
Returns:
-
(Types::CreatePromptVersionResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #default_variant => String
- #description => String
- #id => String
- #name => String
- #updated_at => Time
- #variants => Array<Types::PromptVariant>
- #version => String
See Also:
2579 2580 2581 2582 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2579 def create_prompt_version(params = {}, options = {}) req = build_request(:create_prompt_version, params) req.send_request(options) end |
#delete_agent(params = {}) ⇒ Types::DeleteAgentResponse
Deletes an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_agent({
agent_id: "Id", # required
skip_resource_in_use_check: false,
})
Response structure
Response structure
resp.agent_id #=> String
resp.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent to delete.
-
:skip_resource_in_use_check
(Boolean)
—
By default, this value is
false
and deletion is stopped if the resource is in use. If you set it totrue
, the resource will be deleted even if the resource is in use.
Returns:
-
(Types::DeleteAgentResponse)
—
Returns a response object which responds to the following methods:
- #agent_id => String
- #agent_status => String
See Also:
2615 2616 2617 2618 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2615 def delete_agent(params = {}, options = {}) req = build_request(:delete_agent, params) req.send_request(options) end |
#delete_agent_action_group(params = {}) ⇒ Struct
Deletes an action group in an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_agent_action_group({
action_group_id: "Id", # required
agent_id: "Id", # required
agent_version: "DraftVersion", # required
skip_resource_in_use_check: false,
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:action_group_id
(required, String)
—
The unique identifier of the action group to delete.
-
:agent_id
(required, String)
—
The unique identifier of the agent that the action group belongs to.
-
:agent_version
(required, String)
—
The version of the agent that the action group belongs to.
-
:skip_resource_in_use_check
(Boolean)
—
By default, this value is
false
and deletion is stopped if the resource is in use. If you set it totrue
, the resource will be deleted even if the resource is in use.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2651 2652 2653 2654 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2651 def delete_agent_action_group(params = {}, options = {}) req = build_request(:delete_agent_action_group, params) req.send_request(options) end |
#delete_agent_alias(params = {}) ⇒ Types::DeleteAgentAliasResponse
Deletes an alias of an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_agent_alias({
agent_alias_id: "AgentAliasId", # required
agent_id: "Id", # required
})
Response structure
Response structure
resp.agent_alias_id #=> String
resp.agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
resp.agent_id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_alias_id
(required, String)
—
The unique identifier of the alias to delete.
-
:agent_id
(required, String)
—
The unique identifier of the agent that the alias belongs to.
Returns:
-
(Types::DeleteAgentAliasResponse)
—
Returns a response object which responds to the following methods:
- #agent_alias_id => String
- #agent_alias_status => String
- #agent_id => String
See Also:
2687 2688 2689 2690 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2687 def delete_agent_alias(params = {}, options = {}) req = build_request(:delete_agent_alias, params) req.send_request(options) end |
#delete_agent_version(params = {}) ⇒ Types::DeleteAgentVersionResponse
Deletes a version of an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_agent_version({
agent_id: "Id", # required
agent_version: "NumericalVersion", # required
skip_resource_in_use_check: false,
})
Response structure
Response structure
resp.agent_id #=> String
resp.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
resp.agent_version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent that the version belongs to.
-
:agent_version
(required, String)
—
The version of the agent to delete.
-
:skip_resource_in_use_check
(Boolean)
—
By default, this value is
false
and deletion is stopped if the resource is in use. If you set it totrue
, the resource will be deleted even if the resource is in use.
Returns:
-
(Types::DeleteAgentVersionResponse)
—
Returns a response object which responds to the following methods:
- #agent_id => String
- #agent_status => String
- #agent_version => String
See Also:
2729 2730 2731 2732 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2729 def delete_agent_version(params = {}, options = {}) req = build_request(:delete_agent_version, params) req.send_request(options) end |
#delete_data_source(params = {}) ⇒ Types::DeleteDataSourceResponse
Deletes a data source from a knowledge base.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_data_source({
data_source_id: "Id", # required
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.data_source_id #=> String
resp.knowledge_base_id #=> String
resp.status #=> String, one of "AVAILABLE", "DELETING", "DELETE_UNSUCCESSFUL"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:data_source_id
(required, String)
—
The unique identifier of the data source to delete.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base from which to delete the data source.
Returns:
-
(Types::DeleteDataSourceResponse)
—
Returns a response object which responds to the following methods:
- #data_source_id => String
- #knowledge_base_id => String
- #status => String
See Also:
2766 2767 2768 2769 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2766 def delete_data_source(params = {}, options = {}) req = build_request(:delete_data_source, params) req.send_request(options) end |
#delete_flow(params = {}) ⇒ Types::DeleteFlowResponse
Deletes a flow.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_flow({
flow_identifier: "FlowIdentifier", # required
skip_resource_in_use_check: false,
})
Response structure
Response structure
resp.id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:flow_identifier
(required, String)
—
The unique identifier of the flow.
-
:skip_resource_in_use_check
(Boolean)
—
By default, this value is
false
and deletion is stopped if the resource is in use. If you set it totrue
, the resource will be deleted even if the resource is in use.
Returns:
See Also:
2800 2801 2802 2803 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2800 def delete_flow(params = {}, options = {}) req = build_request(:delete_flow, params) req.send_request(options) end |
#delete_flow_alias(params = {}) ⇒ Types::DeleteFlowAliasResponse
Deletes an alias of a flow.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_flow_alias({
alias_identifier: "FlowAliasIdentifier", # required
flow_identifier: "FlowIdentifier", # required
})
Response structure
Response structure
resp.flow_id #=> String
resp.id #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:alias_identifier
(required, String)
—
The unique identifier of the alias to be deleted.
-
:flow_identifier
(required, String)
—
The unique identifier of the flow that the alias belongs to.
Returns:
See Also:
2834 2835 2836 2837 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2834 def delete_flow_alias(params = {}, options = {}) req = build_request(:delete_flow_alias, params) req.send_request(options) end |
#delete_flow_version(params = {}) ⇒ Types::DeleteFlowVersionResponse
Deletes a version of a flow.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_flow_version({
flow_identifier: "FlowIdentifier", # required
flow_version: "NumericalVersion", # required
skip_resource_in_use_check: false,
})
Response structure
Response structure
resp.id #=> String
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:flow_identifier
(required, String)
—
The unique identifier of the flow whose version that you want to delete
-
:flow_version
(required, String)
—
The version of the flow that you want to delete.
-
:skip_resource_in_use_check
(Boolean)
—
By default, this value is
false
and deletion is stopped if the resource is in use. If you set it totrue
, the resource will be deleted even if the resource is in use.
Returns:
See Also:
2875 2876 2877 2878 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2875 def delete_flow_version(params = {}, options = {}) req = build_request(:delete_flow_version, params) req.send_request(options) end |
#delete_knowledge_base(params = {}) ⇒ Types::DeleteKnowledgeBaseResponse
Deletes a knowledge base. Before deleting a knowledge base, you should disassociate the knowledge base from any agents that it is associated with by making a DisassociateAgentKnowledgeBase request.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_knowledge_base({
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.knowledge_base_id #=> String
resp.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED", "DELETE_UNSUCCESSFUL"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base to delete.
Returns:
-
(Types::DeleteKnowledgeBaseResponse)
—
Returns a response object which responds to the following methods:
- #knowledge_base_id => String
- #status => String
See Also:
2911 2912 2913 2914 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2911 def delete_knowledge_base(params = {}, options = {}) req = build_request(:delete_knowledge_base, params) req.send_request(options) end |
#delete_knowledge_base_documents(params = {}) ⇒ Types::DeleteKnowledgeBaseDocumentsResponse
Deletes documents from a data source and syncs the changes to the knowledge base that is connected to it. For more information, see Ingest documents into a knowledge base in real-time in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_knowledge_base_documents({
client_token: "ClientToken",
data_source_id: "Id", # required
document_identifiers: [ # required
{
custom: {
id: "CustomDocumentIdentifierIdString", # required
},
data_source_type: "CUSTOM", # required, accepts CUSTOM, S3
s3: {
uri: "S3BucketUri", # required
},
},
],
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.document_details #=> Array
resp.document_details[0].data_source_id #=> String
resp.document_details[0].identifier.custom.id #=> String
resp.document_details[0].identifier.data_source_type #=> String, one of "CUSTOM", "S3"
resp.document_details[0].identifier.s3.uri #=> String
resp.document_details[0].knowledge_base_id #=> String
resp.document_details[0].status #=> String, one of "INDEXED", "PARTIALLY_INDEXED", "PENDING", "FAILED", "METADATA_PARTIALLY_INDEXED", "METADATA_UPDATE_FAILED", "IGNORED", "NOT_FOUND", "STARTING", "IN_PROGRESS", "DELETING", "DELETE_IN_PROGRESS"
resp.document_details[0].status_reason #=> String
resp.document_details[0].updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:data_source_id
(required, String)
—
The unique identifier of the data source that contains the documents.
-
:document_identifiers
(required, Array<Types::DocumentIdentifier>)
—
A list of objects, each of which contains information to identify a document to delete.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base that is connected to the data source.
Returns:
-
(Types::DeleteKnowledgeBaseDocumentsResponse)
—
Returns a response object which responds to the following methods:
- #document_details => Array<Types::KnowledgeBaseDocumentDetail>
See Also:
2988 2989 2990 2991 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 2988 def delete_knowledge_base_documents(params = {}, options = {}) req = build_request(:delete_knowledge_base_documents, params) req.send_request(options) end |
#delete_prompt(params = {}) ⇒ Types::DeletePromptResponse
Deletes a prompt or a version of it, depending on whether you include
the promptVersion
field or not. For more information, see Delete
prompts from the Prompt management tool and Delete a version of a
prompt from the Prompt management tool in the Amazon Bedrock User
Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_prompt({
prompt_identifier: "PromptIdentifier", # required
prompt_version: "NumericalVersion",
})
Response structure
Response structure
resp.id #=> String
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:prompt_identifier
(required, String)
—
The unique identifier of the prompt.
-
:prompt_version
(String)
—
The version of the prompt to delete. To delete the prompt, omit this field.
Returns:
See Also:
3032 3033 3034 3035 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3032 def delete_prompt(params = {}, options = {}) req = build_request(:delete_prompt, params) req.send_request(options) end |
#disassociate_agent_collaborator(params = {}) ⇒ Struct
Disassociates an agent collaborator.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.disassociate_agent_collaborator({
agent_id: "Id", # required
agent_version: "DraftVersion", # required
collaborator_id: "Id", # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
An agent ID.
-
:agent_version
(required, String)
—
The agent's version.
-
:collaborator_id
(required, String)
—
The collaborator's ID.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
3062 3063 3064 3065 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3062 def disassociate_agent_collaborator(params = {}, options = {}) req = build_request(:disassociate_agent_collaborator, params) req.send_request(options) end |
#disassociate_agent_knowledge_base(params = {}) ⇒ Struct
Disassociates a knowledge base from an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.disassociate_agent_knowledge_base({
agent_id: "Id", # required
agent_version: "DraftVersion", # required
knowledge_base_id: "Id", # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent from which to disassociate the knowledge base.
-
:agent_version
(required, String)
—
The version of the agent from which to disassociate the knowledge base.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base to disassociate.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
3094 3095 3096 3097 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3094 def disassociate_agent_knowledge_base(params = {}, options = {}) req = build_request(:disassociate_agent_knowledge_base, params) req.send_request(options) end |
#get_agent(params = {}) ⇒ Types::GetAgentResponse
Gets information about an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_agent({
agent_id: "Id", # required
})
Response structure
Response structure
resp.agent.agent_arn #=> String
resp.agent.agent_collaboration #=> String, one of "SUPERVISOR", "SUPERVISOR_ROUTER", "DISABLED"
resp.agent.agent_id #=> String
resp.agent.agent_name #=> String
resp.agent.agent_resource_role_arn #=> String
resp.agent.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
resp.agent.agent_version #=> String
resp.agent.client_token #=> String
resp.agent.created_at #=> Time
resp.agent.custom_orchestration.executor.lambda #=> String
resp.agent.customer_encryption_key_arn #=> String
resp.agent.description #=> String
resp.agent.failure_reasons #=> Array
resp.agent.failure_reasons[0] #=> String
resp.agent.foundation_model #=> String
resp.agent.guardrail_configuration.guardrail_identifier #=> String
resp.agent.guardrail_configuration.guardrail_version #=> String
resp.agent.idle_session_ttl_in_seconds #=> Integer
resp.agent.instruction #=> String
resp.agent.memory_configuration.enabled_memory_types #=> Array
resp.agent.memory_configuration.enabled_memory_types[0] #=> String, one of "SESSION_SUMMARY"
resp.agent.memory_configuration.storage_days #=> Integer
resp.agent.orchestration_type #=> String, one of "DEFAULT", "CUSTOM_ORCHESTRATION"
resp.agent.prepared_at #=> Time
resp.agent.prompt_override_configuration.override_lambda #=> String
resp.agent.prompt_override_configuration.prompt_configurations #=> Array
resp.agent.prompt_override_configuration.prompt_configurations[0].base_prompt_template #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].foundation_model #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.maximum_length #=> Integer
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences #=> Array
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences[0] #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.temperature #=> Float
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_k #=> Integer
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_p #=> Float
resp.agent.prompt_override_configuration.prompt_configurations[0].parser_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_creation_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_state #=> String, one of "ENABLED", "DISABLED"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "POST_PROCESSING", "KNOWLEDGE_BASE_RESPONSE_GENERATION"
resp.agent.recommended_actions #=> Array
resp.agent.recommended_actions[0] #=> String
resp.agent.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent.
Returns:
See Also:
3162 3163 3164 3165 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3162 def get_agent(params = {}, options = {}) req = build_request(:get_agent, params) req.send_request(options) end |
#get_agent_action_group(params = {}) ⇒ Types::GetAgentActionGroupResponse
Gets information about an action group for an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_agent_action_group({
action_group_id: "Id", # required
agent_id: "Id", # required
agent_version: "Version", # required
})
Response structure
Response structure
resp.agent_action_group.action_group_executor.custom_control #=> String, one of "RETURN_CONTROL"
resp.agent_action_group.action_group_executor.lambda #=> String
resp.agent_action_group.action_group_id #=> String
resp.agent_action_group.action_group_name #=> String
resp.agent_action_group.action_group_state #=> String, one of "ENABLED", "DISABLED"
resp.agent_action_group.agent_id #=> String
resp.agent_action_group.agent_version #=> String
resp.agent_action_group.api_schema.payload #=> String
resp.agent_action_group.api_schema.s3.s3_bucket_name #=> String
resp.agent_action_group.api_schema.s3.s3_object_key #=> String
resp.agent_action_group.client_token #=> String
resp.agent_action_group.created_at #=> Time
resp.agent_action_group.description #=> String
resp.agent_action_group.function_schema.functions #=> Array
resp.agent_action_group.function_schema.functions[0].description #=> String
resp.agent_action_group.function_schema.functions[0].name #=> String
resp.agent_action_group.function_schema.functions[0].parameters #=> Hash
resp.agent_action_group.function_schema.functions[0].parameters["Name"].description #=> String
resp.agent_action_group.function_schema.functions[0].parameters["Name"].required #=> Boolean
resp.agent_action_group.function_schema.functions[0].parameters["Name"].type #=> String, one of "string", "number", "integer", "boolean", "array"
resp.agent_action_group.function_schema.functions[0].require_confirmation #=> String, one of "ENABLED", "DISABLED"
resp.agent_action_group.parent_action_signature #=> String, one of "AMAZON.UserInput", "AMAZON.CodeInterpreter"
resp.agent_action_group.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:action_group_id
(required, String)
—
The unique identifier of the action group for which to get information.
-
:agent_id
(required, String)
—
The unique identifier of the agent that the action group belongs to.
-
:agent_version
(required, String)
—
The version of the agent that the action group belongs to.
Returns:
-
(Types::GetAgentActionGroupResponse)
—
Returns a response object which responds to the following methods:
- #agent_action_group => Types::AgentActionGroup
See Also:
3221 3222 3223 3224 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3221 def get_agent_action_group(params = {}, options = {}) req = build_request(:get_agent_action_group, params) req.send_request(options) end |
#get_agent_alias(params = {}) ⇒ Types::GetAgentAliasResponse
Gets information about an alias of an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_agent_alias({
agent_alias_id: "AgentAliasId", # required
agent_id: "Id", # required
})
Response structure
Response structure
resp.agent_alias.agent_alias_arn #=> String
resp.agent_alias.agent_alias_history_events #=> Array
resp.agent_alias.agent_alias_history_events[0].end_date #=> Time
resp.agent_alias.agent_alias_history_events[0].routing_configuration #=> Array
resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].agent_version #=> String
resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].provisioned_throughput #=> String
resp.agent_alias.agent_alias_history_events[0].start_date #=> Time
resp.agent_alias.agent_alias_id #=> String
resp.agent_alias.agent_alias_name #=> String
resp.agent_alias.agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
resp.agent_alias.agent_id #=> String
resp.agent_alias.client_token #=> String
resp.agent_alias.created_at #=> Time
resp.agent_alias.description #=> String
resp.agent_alias.failure_reasons #=> Array
resp.agent_alias.failure_reasons[0] #=> String
resp.agent_alias.routing_configuration #=> Array
resp.agent_alias.routing_configuration[0].agent_version #=> String
resp.agent_alias.routing_configuration[0].provisioned_throughput #=> String
resp.agent_alias.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_alias_id
(required, String)
—
The unique identifier of the alias for which to get information.
-
:agent_id
(required, String)
—
The unique identifier of the agent to which the alias to get information belongs.
Returns:
-
(Types::GetAgentAliasResponse)
—
Returns a response object which responds to the following methods:
- #agent_alias => Types::AgentAlias
See Also:
3273 3274 3275 3276 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3273 def get_agent_alias(params = {}, options = {}) req = build_request(:get_agent_alias, params) req.send_request(options) end |
#get_agent_collaborator(params = {}) ⇒ Types::GetAgentCollaboratorResponse
Retrieves information about an agent's collaborator.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_agent_collaborator({
agent_id: "Id", # required
agent_version: "Version", # required
collaborator_id: "Id", # required
})
Response structure
Response structure
resp.agent_collaborator.agent_descriptor.alias_arn #=> String
resp.agent_collaborator.agent_id #=> String
resp.agent_collaborator.agent_version #=> String
resp.agent_collaborator.client_token #=> String
resp.agent_collaborator.collaboration_instruction #=> String
resp.agent_collaborator.collaborator_id #=> String
resp.agent_collaborator.collaborator_name #=> String
resp.agent_collaborator.created_at #=> Time
resp.agent_collaborator.last_updated_at #=> Time
resp.agent_collaborator.relay_conversation_history #=> String, one of "TO_COLLABORATOR", "DISABLED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The agent's ID.
-
:agent_version
(required, String)
—
The agent's version.
-
:collaborator_id
(required, String)
—
The collaborator's ID.
Returns:
-
(Types::GetAgentCollaboratorResponse)
—
Returns a response object which responds to the following methods:
- #agent_collaborator => Types::AgentCollaborator
See Also:
3318 3319 3320 3321 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3318 def get_agent_collaborator(params = {}, options = {}) req = build_request(:get_agent_collaborator, params) req.send_request(options) end |
#get_agent_knowledge_base(params = {}) ⇒ Types::GetAgentKnowledgeBaseResponse
Gets information about a knowledge base associated with an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_agent_knowledge_base({
agent_id: "Id", # required
agent_version: "Version", # required
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.agent_knowledge_base.agent_id #=> String
resp.agent_knowledge_base.agent_version #=> String
resp.agent_knowledge_base.created_at #=> Time
resp.agent_knowledge_base.description #=> String
resp.agent_knowledge_base.knowledge_base_id #=> String
resp.agent_knowledge_base.knowledge_base_state #=> String, one of "ENABLED", "DISABLED"
resp.agent_knowledge_base.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent with which the knowledge base is associated.
-
:agent_version
(required, String)
—
The version of the agent with which the knowledge base is associated.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base associated with the agent.
Returns:
-
(Types::GetAgentKnowledgeBaseResponse)
—
Returns a response object which responds to the following methods:
- #agent_knowledge_base => Types::AgentKnowledgeBase
See Also:
3361 3362 3363 3364 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3361 def get_agent_knowledge_base(params = {}, options = {}) req = build_request(:get_agent_knowledge_base, params) req.send_request(options) end |
#get_agent_version(params = {}) ⇒ Types::GetAgentVersionResponse
Gets details about a version of an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_agent_version({
agent_id: "Id", # required
agent_version: "NumericalVersion", # required
})
Response structure
Response structure
resp.agent_version.agent_arn #=> String
resp.agent_version.agent_collaboration #=> String, one of "SUPERVISOR", "SUPERVISOR_ROUTER", "DISABLED"
resp.agent_version.agent_id #=> String
resp.agent_version.agent_name #=> String
resp.agent_version.agent_resource_role_arn #=> String
resp.agent_version.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
resp.agent_version.created_at #=> Time
resp.agent_version.customer_encryption_key_arn #=> String
resp.agent_version.description #=> String
resp.agent_version.failure_reasons #=> Array
resp.agent_version.failure_reasons[0] #=> String
resp.agent_version.foundation_model #=> String
resp.agent_version.guardrail_configuration.guardrail_identifier #=> String
resp.agent_version.guardrail_configuration.guardrail_version #=> String
resp.agent_version.idle_session_ttl_in_seconds #=> Integer
resp.agent_version.instruction #=> String
resp.agent_version.memory_configuration.enabled_memory_types #=> Array
resp.agent_version.memory_configuration.enabled_memory_types[0] #=> String, one of "SESSION_SUMMARY"
resp.agent_version.memory_configuration.storage_days #=> Integer
resp.agent_version.prompt_override_configuration.override_lambda #=> String
resp.agent_version.prompt_override_configuration.prompt_configurations #=> Array
resp.agent_version.prompt_override_configuration.prompt_configurations[0].base_prompt_template #=> String
resp.agent_version.prompt_override_configuration.prompt_configurations[0].foundation_model #=> String
resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.maximum_length #=> Integer
resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences #=> Array
resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences[0] #=> String
resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.temperature #=> Float
resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_k #=> Integer
resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_p #=> Float
resp.agent_version.prompt_override_configuration.prompt_configurations[0].parser_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
resp.agent_version.prompt_override_configuration.prompt_configurations[0].prompt_creation_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
resp.agent_version.prompt_override_configuration.prompt_configurations[0].prompt_state #=> String, one of "ENABLED", "DISABLED"
resp.agent_version.prompt_override_configuration.prompt_configurations[0].prompt_type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "POST_PROCESSING", "KNOWLEDGE_BASE_RESPONSE_GENERATION"
resp.agent_version.recommended_actions #=> Array
resp.agent_version.recommended_actions[0] #=> String
resp.agent_version.updated_at #=> Time
resp.agent_version.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent.
-
:agent_version
(required, String)
—
The version of the agent.
Returns:
-
(Types::GetAgentVersionResponse)
—
Returns a response object which responds to the following methods:
- #agent_version => Types::AgentVersion
See Also:
3429 3430 3431 3432 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3429 def get_agent_version(params = {}, options = {}) req = build_request(:get_agent_version, params) req.send_request(options) end |
#get_data_source(params = {}) ⇒ Types::GetDataSourceResponse
Gets information about a data source.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_data_source({
data_source_id: "Id", # required
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.data_source.created_at #=> Time
resp.data_source.data_deletion_policy #=> String, one of "RETAIN", "DELETE"
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.auth_type #=> String, one of "BASIC", "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.host_type #=> String, one of "SAAS"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.host_url #=> String
resp.data_source.data_source_configuration.s3_configuration.bucket_arn #=> String
resp.data_source.data_source_configuration.s3_configuration.bucket_owner_account_id #=> String
resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes #=> Array
resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.auth_type #=> String, one of "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.host_url #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.auth_type #=> String, one of "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.domain #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.host_type #=> String, one of "ONLINE"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.site_urls #=> Array
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.site_urls[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.tenant_id #=> String
resp.data_source.data_source_configuration.type #=> String, one of "S3", "WEB", "CONFLUENCE", "SALESFORCE", "SHAREPOINT", "CUSTOM", "REDSHIFT_METADATA"
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.crawler_limits.rate_limit #=> Integer
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.exclusion_filters #=> Array
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.inclusion_filters #=> Array
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.scope #=> String, one of "HOST_ONLY", "SUBDOMAINS"
resp.data_source.data_source_configuration.web_configuration.source_configuration.url_configuration.seed_urls #=> Array
resp.data_source.data_source_configuration.web_configuration.source_configuration.url_configuration.seed_urls[0].url #=> String
resp.data_source.data_source_id #=> String
resp.data_source.description #=> String
resp.data_source.failure_reasons #=> Array
resp.data_source.failure_reasons[0] #=> String
resp.data_source.knowledge_base_id #=> String
resp.data_source.name #=> String
resp.data_source.server_side_encryption_configuration.kms_key_arn #=> String
resp.data_source.status #=> String, one of "AVAILABLE", "DELETING", "DELETE_UNSUCCESSFUL"
resp.data_source.updated_at #=> Time
resp.data_source.vector_ingestion_configuration.chunking_configuration.chunking_strategy #=> String, one of "FIXED_SIZE", "NONE", "HIERARCHICAL", "SEMANTIC"
resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.overlap_percentage #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.level_configurations #=> Array
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.level_configurations[0].max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.overlap_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.breakpoint_percentile_threshold #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.buffer_size #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.intermediate_storage.s3_location.uri #=> String
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations #=> Array
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations[0].step_to_apply #=> String, one of "POST_CHUNKING"
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations[0].transformation_function.transformation_lambda_configuration.lambda_arn #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_data_automation_configuration.parsing_modality #=> String, one of "MULTIMODAL"
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.model_arn #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.parsing_modality #=> String, one of "MULTIMODAL"
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.parsing_prompt.parsing_prompt_text #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.parsing_strategy #=> String, one of "BEDROCK_FOUNDATION_MODEL", "BEDROCK_DATA_AUTOMATION"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:data_source_id
(required, String)
—
The unique identifier of the data source.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base for the data source.
Returns:
-
(Types::GetDataSourceResponse)
—
Returns a response object which responds to the following methods:
- #data_source => Types::DataSource
See Also:
3537 3538 3539 3540 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3537 def get_data_source(params = {}, options = {}) req = build_request(:get_data_source, params) req.send_request(options) end |
#get_flow(params = {}) ⇒ Types::GetFlowResponse
Retrieves information about a flow. For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_flow({
flow_identifier: "FlowIdentifier", # required
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.definition.connections #=> Array
resp.definition.connections[0].configuration.conditional.condition #=> String
resp.definition.connections[0].configuration.data.source_output #=> String
resp.definition.connections[0].configuration.data.target_input #=> String
resp.definition.connections[0].name #=> String
resp.definition.connections[0].source #=> String
resp.definition.connections[0].target #=> String
resp.definition.connections[0].type #=> String, one of "Data", "Conditional"
resp.definition.nodes #=> Array
resp.definition.nodes[0].configuration.agent.agent_alias_arn #=> String
resp.definition.nodes[0].configuration.condition.conditions #=> Array
resp.definition.nodes[0].configuration.condition.conditions[0].expression #=> String
resp.definition.nodes[0].configuration.condition.conditions[0].name #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.knowledge_base.knowledge_base_id #=> String
resp.definition.nodes[0].configuration.knowledge_base.model_id #=> String
resp.definition.nodes[0].configuration.lambda_function.lambda_arn #=> String
resp.definition.nodes[0].configuration.lex.bot_alias_arn #=> String
resp.definition.nodes[0].configuration.lex.locale_id #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.max_tokens #=> Integer
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences[0] #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.temperature #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.top_p #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.model_id #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_type #=> String, one of "TEXT", "CHAT"
resp.definition.nodes[0].configuration.prompt.source_configuration.resource.prompt_arn #=> String
resp.definition.nodes[0].configuration.retrieval.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].configuration.storage.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].inputs #=> Array
resp.definition.nodes[0].inputs[0].expression #=> String
resp.definition.nodes[0].inputs[0].name #=> String
resp.definition.nodes[0].inputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].name #=> String
resp.definition.nodes[0].outputs #=> Array
resp.definition.nodes[0].outputs[0].name #=> String
resp.definition.nodes[0].outputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].type #=> String, one of "Input", "Output", "KnowledgeBase", "Condition", "Lex", "Prompt", "LambdaFunction", "Storage", "Agent", "Retrieval", "Iterator", "Collector"
resp.description #=> String
resp.execution_role_arn #=> String
resp.id #=> String
resp.name #=> String
resp.status #=> String, one of "Failed", "Prepared", "Preparing", "NotPrepared"
resp.updated_at #=> Time
resp.validations #=> Array
resp.validations[0].details.cyclic_connection.connection #=> String
resp.validations[0].details.duplicate_condition_expression.expression #=> String
resp.validations[0].details.duplicate_condition_expression.node #=> String
resp.validations[0].details.duplicate_connections.source #=> String
resp.validations[0].details.duplicate_connections.target #=> String
resp.validations[0].details.incompatible_connection_data_type.connection #=> String
resp.validations[0].details.malformed_condition_expression.cause #=> String
resp.validations[0].details.malformed_condition_expression.condition #=> String
resp.validations[0].details.malformed_condition_expression.node #=> String
resp.validations[0].details.malformed_node_input_expression.cause #=> String
resp.validations[0].details.malformed_node_input_expression.input #=> String
resp.validations[0].details.malformed_node_input_expression.node #=> String
resp.validations[0].details.mismatched_node_input_type.expected_type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.validations[0].details.mismatched_node_input_type.input #=> String
resp.validations[0].details.mismatched_node_input_type.node #=> String
resp.validations[0].details.mismatched_node_output_type.expected_type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.validations[0].details.mismatched_node_output_type.node #=> String
resp.validations[0].details.mismatched_node_output_type.output #=> String
resp.validations[0].details.missing_connection_configuration.connection #=> String
resp.validations[0].details.missing_default_condition.node #=> String
resp.validations[0].details.missing_node_configuration.node #=> String
resp.validations[0].details.missing_node_input.input #=> String
resp.validations[0].details.missing_node_input.node #=> String
resp.validations[0].details.missing_node_output.node #=> String
resp.validations[0].details.missing_node_output.output #=> String
resp.validations[0].details.multiple_node_input_connections.input #=> String
resp.validations[0].details.multiple_node_input_connections.node #=> String
resp.validations[0].details.unfulfilled_node_input.input #=> String
resp.validations[0].details.unfulfilled_node_input.node #=> String
resp.validations[0].details.unknown_connection_condition.connection #=> String
resp.validations[0].details.unknown_connection_source.connection #=> String
resp.validations[0].details.unknown_connection_source_output.connection #=> String
resp.validations[0].details.unknown_connection_target.connection #=> String
resp.validations[0].details.unknown_connection_target_input.connection #=> String
resp.validations[0].details.unreachable_node.node #=> String
resp.validations[0].details.unsatisfied_connection_conditions.connection #=> String
resp.validations[0].message #=> String
resp.validations[0].severity #=> String, one of "Warning", "Error"
resp.validations[0].type #=> String, one of "CyclicConnection", "DuplicateConnections", "DuplicateConditionExpression", "UnreachableNode", "UnknownConnectionSource", "UnknownConnectionSourceOutput", "UnknownConnectionTarget", "UnknownConnectionTargetInput", "UnknownConnectionCondition", "MalformedConditionExpression", "MalformedNodeInputExpression", "MismatchedNodeInputType", "MismatchedNodeOutputType", "IncompatibleConnectionDataType", "MissingConnectionConfiguration", "MissingDefaultCondition", "MissingEndingNodes", "MissingNodeConfiguration", "MissingNodeInput", "MissingNodeOutput", "MissingStartingNodes", "MultipleNodeInputConnections", "UnfulfilledNodeInput", "UnsatisfiedConnectionConditions", "Unspecified"
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:flow_identifier
(required, String)
—
The unique identifier of the flow.
Returns:
-
(Types::GetFlowResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #definition => Types::FlowDefinition
- #description => String
- #execution_role_arn => String
- #id => String
- #name => String
- #status => String
- #updated_at => Time
- #validations => Array<Types::FlowValidation>
- #version => String
See Also:
3686 3687 3688 3689 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3686 def get_flow(params = {}, options = {}) req = build_request(:get_flow, params) req.send_request(options) end |
#get_flow_alias(params = {}) ⇒ Types::GetFlowAliasResponse
Retrieves information about a flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_flow_alias({
alias_identifier: "FlowAliasIdentifier", # required
flow_identifier: "FlowIdentifier", # required
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.description #=> String
resp.flow_id #=> String
resp.id #=> String
resp.name #=> String
resp.routing_configuration #=> Array
resp.routing_configuration[0].flow_version #=> String
resp.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:alias_identifier
(required, String)
—
The unique identifier of the alias for which to retrieve information.
-
:flow_identifier
(required, String)
—
The unique identifier of the flow that the alias belongs to.
Returns:
-
(Types::GetFlowAliasResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #description => String
- #flow_id => String
- #id => String
- #name => String
- #routing_configuration => Array<Types::FlowAliasRoutingConfigurationListItem>
- #updated_at => Time
See Also:
3738 3739 3740 3741 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3738 def get_flow_alias(params = {}, options = {}) req = build_request(:get_flow_alias, params) req.send_request(options) end |
#get_flow_version(params = {}) ⇒ Types::GetFlowVersionResponse
Retrieves information about a version of a flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_flow_version({
flow_identifier: "FlowIdentifier", # required
flow_version: "NumericalVersion", # required
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.definition.connections #=> Array
resp.definition.connections[0].configuration.conditional.condition #=> String
resp.definition.connections[0].configuration.data.source_output #=> String
resp.definition.connections[0].configuration.data.target_input #=> String
resp.definition.connections[0].name #=> String
resp.definition.connections[0].source #=> String
resp.definition.connections[0].target #=> String
resp.definition.connections[0].type #=> String, one of "Data", "Conditional"
resp.definition.nodes #=> Array
resp.definition.nodes[0].configuration.agent.agent_alias_arn #=> String
resp.definition.nodes[0].configuration.condition.conditions #=> Array
resp.definition.nodes[0].configuration.condition.conditions[0].expression #=> String
resp.definition.nodes[0].configuration.condition.conditions[0].name #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.knowledge_base.knowledge_base_id #=> String
resp.definition.nodes[0].configuration.knowledge_base.model_id #=> String
resp.definition.nodes[0].configuration.lambda_function.lambda_arn #=> String
resp.definition.nodes[0].configuration.lex.bot_alias_arn #=> String
resp.definition.nodes[0].configuration.lex.locale_id #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.max_tokens #=> Integer
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences[0] #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.temperature #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.top_p #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.model_id #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_type #=> String, one of "TEXT", "CHAT"
resp.definition.nodes[0].configuration.prompt.source_configuration.resource.prompt_arn #=> String
resp.definition.nodes[0].configuration.retrieval.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].configuration.storage.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].inputs #=> Array
resp.definition.nodes[0].inputs[0].expression #=> String
resp.definition.nodes[0].inputs[0].name #=> String
resp.definition.nodes[0].inputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].name #=> String
resp.definition.nodes[0].outputs #=> Array
resp.definition.nodes[0].outputs[0].name #=> String
resp.definition.nodes[0].outputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].type #=> String, one of "Input", "Output", "KnowledgeBase", "Condition", "Lex", "Prompt", "LambdaFunction", "Storage", "Agent", "Retrieval", "Iterator", "Collector"
resp.description #=> String
resp.execution_role_arn #=> String
resp.id #=> String
resp.name #=> String
resp.status #=> String, one of "Failed", "Prepared", "Preparing", "NotPrepared"
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:flow_identifier
(required, String)
—
The unique identifier of the flow for which to get information.
-
:flow_version
(required, String)
—
The version of the flow for which to get information.
Returns:
-
(Types::GetFlowVersionResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #definition => Types::FlowDefinition
- #description => String
- #execution_role_arn => String
- #id => String
- #name => String
- #status => String
- #version => String
See Also:
3849 3850 3851 3852 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3849 def get_flow_version(params = {}, options = {}) req = build_request(:get_flow_version, params) req.send_request(options) end |
#get_ingestion_job(params = {}) ⇒ Types::GetIngestionJobResponse
Gets information about a data ingestion job. Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_ingestion_job({
data_source_id: "Id", # required
ingestion_job_id: "Id", # required
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.ingestion_job.data_source_id #=> String
resp.ingestion_job.description #=> String
resp.ingestion_job.failure_reasons #=> Array
resp.ingestion_job.failure_reasons[0] #=> String
resp.ingestion_job.ingestion_job_id #=> String
resp.ingestion_job.knowledge_base_id #=> String
resp.ingestion_job.started_at #=> Time
resp.ingestion_job.statistics.number_of_documents_deleted #=> Integer
resp.ingestion_job.statistics.number_of_documents_failed #=> Integer
resp.ingestion_job.statistics.number_of_documents_scanned #=> Integer
resp.ingestion_job.statistics.number_of_metadata_documents_modified #=> Integer
resp.ingestion_job.statistics.number_of_metadata_documents_scanned #=> Integer
resp.ingestion_job.statistics.number_of_modified_documents_indexed #=> Integer
resp.ingestion_job.statistics.number_of_new_documents_indexed #=> Integer
resp.ingestion_job.status #=> String, one of "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED", "STOPPING", "STOPPED"
resp.ingestion_job.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:data_source_id
(required, String)
—
The unique identifier of the data source for the data ingestion job you want to get information on.
-
:ingestion_job_id
(required, String)
—
The unique identifier of the data ingestion job you want to get information on.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base for the data ingestion job you want to get information on.
Returns:
-
(Types::GetIngestionJobResponse)
—
Returns a response object which responds to the following methods:
- #ingestion_job => Types::IngestionJob
See Also:
3905 3906 3907 3908 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 3905 def get_ingestion_job(params = {}, options = {}) req = build_request(:get_ingestion_job, params) req.send_request(options) end |
#get_knowledge_base(params = {}) ⇒ Types::GetKnowledgeBaseResponse
Gets information about a knoweldge base.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_knowledge_base({
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.knowledge_base.created_at #=> Time
resp.knowledge_base.description #=> String
resp.knowledge_base.failure_reasons #=> Array
resp.knowledge_base.failure_reasons[0] #=> String
resp.knowledge_base.knowledge_base_arn #=> String
resp.knowledge_base.knowledge_base_configuration.kendra_knowledge_base_configuration.kendra_index_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.database_user #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.type #=> String, one of "IAM", "USERNAME_PASSWORD", "USERNAME"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.username_password_secret_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.cluster_identifier #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.auth_configuration.type #=> String, one of "IAM", "USERNAME_PASSWORD"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.auth_configuration.username_password_secret_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.workgroup_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.type #=> String, one of "SERVERLESS", "PROVISIONED"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.execution_timeout_seconds #=> Integer
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries[0].natural_language #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries[0].sql #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].description #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].inclusion #=> String, one of "INCLUDE", "EXCLUDE"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].description #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].inclusion #=> String, one of "INCLUDE", "EXCLUDE"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].aws_data_catalog_configuration.table_names #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].aws_data_catalog_configuration.table_names[0] #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].redshift_configuration.database_name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].type #=> String, one of "REDSHIFT", "AWS_DATA_CATALOG"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.type #=> String, one of "REDSHIFT"
resp.knowledge_base.knowledge_base_configuration.type #=> String, one of "VECTOR", "KENDRA", "SQL"
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_arn #=> String
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_configuration.bedrock_embedding_model_configuration.dimensions #=> Integer
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_configuration.bedrock_embedding_model_configuration.embedding_data_type #=> String, one of "FLOAT32", "BINARY"
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations #=> Array
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations[0].s3_location.uri #=> String
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations[0].type #=> String, one of "S3"
resp.knowledge_base.knowledge_base_id #=> String
resp.knowledge_base.name #=> String
resp.knowledge_base.role_arn #=> String
resp.knowledge_base.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED", "DELETE_UNSUCCESSFUL"
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.collection_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.database_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.endpoint #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.endpoint_service_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.collection_arn #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.connection_string #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.namespace #=> String
resp.knowledge_base.storage_configuration.rds_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.rds_configuration.database_name #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.primary_key_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.resource_arn #=> String
resp.knowledge_base.storage_configuration.rds_configuration.table_name #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.endpoint #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.type #=> String, one of "OPENSEARCH_SERVERLESS", "PINECONE", "REDIS_ENTERPRISE_CLOUD", "RDS", "MONGO_DB_ATLAS"
resp.knowledge_base.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base you want to get information on.
Returns:
-
(Types::GetKnowledgeBaseResponse)
—
Returns a response object which responds to the following methods:
- #knowledge_base => Types::KnowledgeBase
See Also:
4011 4012 4013 4014 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4011 def get_knowledge_base(params = {}, options = {}) req = build_request(:get_knowledge_base, params) req.send_request(options) end |
#get_knowledge_base_documents(params = {}) ⇒ Types::GetKnowledgeBaseDocumentsResponse
Retrieves specific documents from a data source that is connected to a knowledge base. For more information, see Ingest documents into a knowledge base in real-time in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_knowledge_base_documents({
data_source_id: "Id", # required
document_identifiers: [ # required
{
custom: {
id: "CustomDocumentIdentifierIdString", # required
},
data_source_type: "CUSTOM", # required, accepts CUSTOM, S3
s3: {
uri: "S3BucketUri", # required
},
},
],
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.document_details #=> Array
resp.document_details[0].data_source_id #=> String
resp.document_details[0].identifier.custom.id #=> String
resp.document_details[0].identifier.data_source_type #=> String, one of "CUSTOM", "S3"
resp.document_details[0].identifier.s3.uri #=> String
resp.document_details[0].knowledge_base_id #=> String
resp.document_details[0].status #=> String, one of "INDEXED", "PARTIALLY_INDEXED", "PENDING", "FAILED", "METADATA_PARTIALLY_INDEXED", "METADATA_UPDATE_FAILED", "IGNORED", "NOT_FOUND", "STARTING", "IN_PROGRESS", "DELETING", "DELETE_IN_PROGRESS"
resp.document_details[0].status_reason #=> String
resp.document_details[0].updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:data_source_id
(required, String)
—
The unique identifier of the data source that contains the documents.
-
:document_identifiers
(required, Array<Types::DocumentIdentifier>)
—
A list of objects, each of which contains information to identify a document for which to retrieve information.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base that is connected to the data source.
Returns:
-
(Types::GetKnowledgeBaseDocumentsResponse)
—
Returns a response object which responds to the following methods:
- #document_details => Array<Types::KnowledgeBaseDocumentDetail>
See Also:
4073 4074 4075 4076 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4073 def get_knowledge_base_documents(params = {}, options = {}) req = build_request(:get_knowledge_base_documents, params) req.send_request(options) end |
#get_prompt(params = {}) ⇒ Types::GetPromptResponse
Retrieves information about the working draft (DRAFT
version) of a
prompt or a version of it, depending on whether you include the
promptVersion
field or not. For more information, see View
information about prompts using Prompt management and View
information about a version of your prompt in the Amazon Bedrock
User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_prompt({
prompt_identifier: "PromptIdentifier", # required
prompt_version: "Version",
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.default_variant #=> String
resp.description #=> String
resp.id #=> String
resp.name #=> String
resp.updated_at #=> Time
resp.variants #=> Array
resp.variants[0].gen_ai_resource.agent.agent_identifier #=> String
resp.variants[0].inference_configuration.text.max_tokens #=> Integer
resp.variants[0].inference_configuration.text.stop_sequences #=> Array
resp.variants[0].inference_configuration.text.stop_sequences[0] #=> String
resp.variants[0].inference_configuration.text.temperature #=> Float
resp.variants[0].inference_configuration.text.top_p #=> Float
resp.variants[0].metadata #=> Array
resp.variants[0].metadata[0].key #=> String
resp.variants[0].metadata[0].value #=> String
resp.variants[0].model_id #=> String
resp.variants[0].name #=> String
resp.variants[0].template_configuration.chat.input_variables #=> Array
resp.variants[0].template_configuration.chat.input_variables[0].name #=> String
resp.variants[0].template_configuration.chat.messages #=> Array
resp.variants[0].template_configuration.chat.messages[0].content #=> Array
resp.variants[0].template_configuration.chat.messages[0].content[0].text #=> String
resp.variants[0].template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.variants[0].template_configuration.chat.system #=> Array
resp.variants[0].template_configuration.chat.system[0].text #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tools #=> Array
resp.variants[0].template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.variants[0].template_configuration.text.input_variables #=> Array
resp.variants[0].template_configuration.text.input_variables[0].name #=> String
resp.variants[0].template_configuration.text.text #=> String
resp.variants[0].template_type #=> String, one of "TEXT", "CHAT"
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:prompt_identifier
(required, String)
—
The unique identifier of the prompt.
-
:prompt_version
(String)
—
The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt.
Returns:
-
(Types::GetPromptResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #default_variant => String
- #description => String
- #id => String
- #name => String
- #updated_at => Time
- #variants => Array<Types::PromptVariant>
- #version => String
See Also:
4162 4163 4164 4165 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4162 def get_prompt(params = {}, options = {}) req = build_request(:get_prompt, params) req.send_request(options) end |
#ingest_knowledge_base_documents(params = {}) ⇒ Types::IngestKnowledgeBaseDocumentsResponse
Ingests documents directly into the knowledge base that is connected
to the data source. The dataSourceType
specified in the content for
each document must match the type of the data source that you specify
in the header. For more information, see Ingest documents into a
knowledge base in real-time in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.ingest_knowledge_base_documents({
client_token: "ClientToken",
data_source_id: "Id", # required
documents: [ # required
{
content: { # required
custom: {
custom_document_identifier: { # required
id: "CustomDocumentIdentifierIdString", # required
},
inline_content: {
byte_content: {
data: "data", # required
mime_type: "ByteContentDocMimeTypeString", # required
},
text_content: {
data: "Data", # required
},
type: "BYTE", # required, accepts BYTE, TEXT
},
s3_location: {
bucket_owner_account_id: "BucketOwnerAccountId",
uri: "S3ObjectUri", # required
},
source_type: "IN_LINE", # required, accepts IN_LINE, S3_LOCATION
},
data_source_type: "CUSTOM", # required, accepts CUSTOM, S3
s3: {
s3_location: { # required
uri: "S3BucketUri", # required
},
},
},
metadata: {
inline_attributes: [
{
key: "Key", # required
value: { # required
boolean_value: false,
number_value: 1.0,
string_list_value: ["StringValue"],
string_value: "StringValue",
type: "BOOLEAN", # required, accepts BOOLEAN, NUMBER, STRING, STRING_LIST
},
},
],
s3_location: {
bucket_owner_account_id: "BucketOwnerAccountId",
uri: "S3ObjectUri", # required
},
type: "IN_LINE_ATTRIBUTE", # required, accepts IN_LINE_ATTRIBUTE, S3_LOCATION
},
},
],
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.document_details #=> Array
resp.document_details[0].data_source_id #=> String
resp.document_details[0].identifier.custom.id #=> String
resp.document_details[0].identifier.data_source_type #=> String, one of "CUSTOM", "S3"
resp.document_details[0].identifier.s3.uri #=> String
resp.document_details[0].knowledge_base_id #=> String
resp.document_details[0].status #=> String, one of "INDEXED", "PARTIALLY_INDEXED", "PENDING", "FAILED", "METADATA_PARTIALLY_INDEXED", "METADATA_UPDATE_FAILED", "IGNORED", "NOT_FOUND", "STARTING", "IN_PROGRESS", "DELETING", "DELETE_IN_PROGRESS"
resp.document_details[0].status_reason #=> String
resp.document_details[0].updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:data_source_id
(required, String)
—
The unique identifier of the data source connected to the knowledge base that you're adding documents to.
-
:documents
(required, Array<Types::KnowledgeBaseDocument>)
—
A list of objects, each of which contains information about the documents to add.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base to ingest the documents into.
Returns:
-
(Types::IngestKnowledgeBaseDocumentsResponse)
—
Returns a response object which responds to the following methods:
- #document_details => Array<Types::KnowledgeBaseDocumentDetail>
See Also:
4281 4282 4283 4284 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4281 def ingest_knowledge_base_documents(params = {}, options = {}) req = build_request(:ingest_knowledge_base_documents, params) req.send_request(options) end |
#list_agent_action_groups(params = {}) ⇒ Types::ListAgentActionGroupsResponse
Lists the action groups for an agent and information about each one.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_agent_action_groups({
agent_id: "Id", # required
agent_version: "Version", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.action_group_summaries #=> Array
resp.action_group_summaries[0].action_group_id #=> String
resp.action_group_summaries[0].action_group_name #=> String
resp.action_group_summaries[0].action_group_state #=> String, one of "ENABLED", "DISABLED"
resp.action_group_summaries[0].description #=> String
resp.action_group_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent.
-
:agent_version
(required, String)
—
The version of the agent.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListAgentActionGroupsResponse)
—
Returns a response object which responds to the following methods:
- #action_group_summaries => Array<Types::ActionGroupSummary>
- #next_token => String
See Also:
4336 4337 4338 4339 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4336 def list_agent_action_groups(params = {}, options = {}) req = build_request(:list_agent_action_groups, params) req.send_request(options) end |
#list_agent_aliases(params = {}) ⇒ Types::ListAgentAliasesResponse
Lists the aliases of an agent and information about each one.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_agent_aliases({
agent_id: "Id", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.agent_alias_summaries #=> Array
resp.agent_alias_summaries[0].agent_alias_id #=> String
resp.agent_alias_summaries[0].agent_alias_name #=> String
resp.agent_alias_summaries[0].agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
resp.agent_alias_summaries[0].created_at #=> Time
resp.agent_alias_summaries[0].description #=> String
resp.agent_alias_summaries[0].routing_configuration #=> Array
resp.agent_alias_summaries[0].routing_configuration[0].agent_version #=> String
resp.agent_alias_summaries[0].routing_configuration[0].provisioned_throughput #=> String
resp.agent_alias_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListAgentAliasesResponse)
—
Returns a response object which responds to the following methods:
- #agent_alias_summaries => Array<Types::AgentAliasSummary>
- #next_token => String
See Also:
4391 4392 4393 4394 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4391 def list_agent_aliases(params = {}, options = {}) req = build_request(:list_agent_aliases, params) req.send_request(options) end |
#list_agent_collaborators(params = {}) ⇒ Types::ListAgentCollaboratorsResponse
Retrieve a list of an agent's collaborators.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_agent_collaborators({
agent_id: "Id", # required
agent_version: "Version", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.agent_collaborator_summaries #=> Array
resp.agent_collaborator_summaries[0].agent_descriptor.alias_arn #=> String
resp.agent_collaborator_summaries[0].agent_id #=> String
resp.agent_collaborator_summaries[0].agent_version #=> String
resp.agent_collaborator_summaries[0].collaboration_instruction #=> String
resp.agent_collaborator_summaries[0].collaborator_id #=> String
resp.agent_collaborator_summaries[0].collaborator_name #=> String
resp.agent_collaborator_summaries[0].created_at #=> Time
resp.agent_collaborator_summaries[0].last_updated_at #=> Time
resp.agent_collaborator_summaries[0].relay_conversation_history #=> String, one of "TO_COLLABORATOR", "DISABLED"
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The agent's ID.
-
:agent_version
(required, String)
—
The agent's version.
-
:max_results
(Integer)
—
The maximum number of agent collaborators to return in one page of results.
-
:next_token
(String)
—
Specify the pagination token from a previous request to retrieve the next page of results.
Returns:
-
(Types::ListAgentCollaboratorsResponse)
—
Returns a response object which responds to the following methods:
- #agent_collaborator_summaries => Array<Types::AgentCollaboratorSummary>
- #next_token => String
See Also:
4446 4447 4448 4449 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4446 def list_agent_collaborators(params = {}, options = {}) req = build_request(:list_agent_collaborators, params) req.send_request(options) end |
#list_agent_knowledge_bases(params = {}) ⇒ Types::ListAgentKnowledgeBasesResponse
Lists knowledge bases associated with an agent and information about each one.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_agent_knowledge_bases({
agent_id: "Id", # required
agent_version: "Version", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.agent_knowledge_base_summaries #=> Array
resp.agent_knowledge_base_summaries[0].description #=> String
resp.agent_knowledge_base_summaries[0].knowledge_base_id #=> String
resp.agent_knowledge_base_summaries[0].knowledge_base_state #=> String, one of "ENABLED", "DISABLED"
resp.agent_knowledge_base_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent for which to return information about knowledge bases associated with it.
-
:agent_version
(required, String)
—
The version of the agent for which to return information about knowledge bases associated with it.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListAgentKnowledgeBasesResponse)
—
Returns a response object which responds to the following methods:
- #agent_knowledge_base_summaries => Array<Types::AgentKnowledgeBaseSummary>
- #next_token => String
See Also:
4503 4504 4505 4506 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4503 def list_agent_knowledge_bases(params = {}, options = {}) req = build_request(:list_agent_knowledge_bases, params) req.send_request(options) end |
#list_agent_versions(params = {}) ⇒ Types::ListAgentVersionsResponse
Lists the versions of an agent and information about each version.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_agent_versions({
agent_id: "Id", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.agent_version_summaries #=> Array
resp.agent_version_summaries[0].agent_name #=> String
resp.agent_version_summaries[0].agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
resp.agent_version_summaries[0].agent_version #=> String
resp.agent_version_summaries[0].created_at #=> Time
resp.agent_version_summaries[0].description #=> String
resp.agent_version_summaries[0].guardrail_configuration.guardrail_identifier #=> String
resp.agent_version_summaries[0].guardrail_configuration.guardrail_version #=> String
resp.agent_version_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListAgentVersionsResponse)
—
Returns a response object which responds to the following methods:
- #agent_version_summaries => Array<Types::AgentVersionSummary>
- #next_token => String
See Also:
4557 4558 4559 4560 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4557 def list_agent_versions(params = {}, options = {}) req = build_request(:list_agent_versions, params) req.send_request(options) end |
#list_agents(params = {}) ⇒ Types::ListAgentsResponse
Lists the agents belonging to an account and information about each agent.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_agents({
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.agent_summaries #=> Array
resp.agent_summaries[0].agent_id #=> String
resp.agent_summaries[0].agent_name #=> String
resp.agent_summaries[0].agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
resp.agent_summaries[0].description #=> String
resp.agent_summaries[0].guardrail_configuration.guardrail_identifier #=> String
resp.agent_summaries[0].guardrail_configuration.guardrail_version #=> String
resp.agent_summaries[0].latest_agent_version #=> String
resp.agent_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListAgentsResponse)
—
Returns a response object which responds to the following methods:
- #agent_summaries => Array<Types::AgentSummary>
- #next_token => String
See Also:
4608 4609 4610 4611 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4608 def list_agents(params = {}, options = {}) req = build_request(:list_agents, params) req.send_request(options) end |
#list_data_sources(params = {}) ⇒ Types::ListDataSourcesResponse
Lists the data sources in a knowledge base and information about each one.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_data_sources({
knowledge_base_id: "Id", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.data_source_summaries #=> Array
resp.data_source_summaries[0].data_source_id #=> String
resp.data_source_summaries[0].description #=> String
resp.data_source_summaries[0].knowledge_base_id #=> String
resp.data_source_summaries[0].name #=> String
resp.data_source_summaries[0].status #=> String, one of "AVAILABLE", "DELETING", "DELETE_UNSUCCESSFUL"
resp.data_source_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base for which to return a list of information.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListDataSourcesResponse)
—
Returns a response object which responds to the following methods:
- #data_source_summaries => Array<Types::DataSourceSummary>
- #next_token => String
See Also:
4662 4663 4664 4665 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4662 def list_data_sources(params = {}, options = {}) req = build_request(:list_data_sources, params) req.send_request(options) end |
#list_flow_aliases(params = {}) ⇒ Types::ListFlowAliasesResponse
Returns a list of aliases for a flow.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_flow_aliases({
flow_identifier: "FlowIdentifier", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.flow_alias_summaries #=> Array
resp.flow_alias_summaries[0].arn #=> String
resp.flow_alias_summaries[0].created_at #=> Time
resp.flow_alias_summaries[0].description #=> String
resp.flow_alias_summaries[0].flow_id #=> String
resp.flow_alias_summaries[0].id #=> String
resp.flow_alias_summaries[0].name #=> String
resp.flow_alias_summaries[0].routing_configuration #=> Array
resp.flow_alias_summaries[0].routing_configuration[0].flow_version #=> String
resp.flow_alias_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:flow_identifier
(required, String)
—
The unique identifier of the flow for which aliases are being returned.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListFlowAliasesResponse)
—
Returns a response object which responds to the following methods:
- #flow_alias_summaries => Array<Types::FlowAliasSummary>
- #next_token => String
See Also:
4718 4719 4720 4721 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4718 def list_flow_aliases(params = {}, options = {}) req = build_request(:list_flow_aliases, params) req.send_request(options) end |
#list_flow_versions(params = {}) ⇒ Types::ListFlowVersionsResponse
Returns a list of information about each flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_flow_versions({
flow_identifier: "FlowIdentifier", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.flow_version_summaries #=> Array
resp.flow_version_summaries[0].arn #=> String
resp.flow_version_summaries[0].created_at #=> Time
resp.flow_version_summaries[0].id #=> String
resp.flow_version_summaries[0].status #=> String, one of "Failed", "Prepared", "Preparing", "NotPrepared"
resp.flow_version_summaries[0].version #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:flow_identifier
(required, String)
—
The unique identifier of the flow.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListFlowVersionsResponse)
—
Returns a response object which responds to the following methods:
- #flow_version_summaries => Array<Types::FlowVersionSummary>
- #next_token => String
See Also:
4775 4776 4777 4778 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4775 def list_flow_versions(params = {}, options = {}) req = build_request(:list_flow_versions, params) req.send_request(options) end |
#list_flows(params = {}) ⇒ Types::ListFlowsResponse
Returns a list of flows and information about each flow. For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_flows({
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.flow_summaries #=> Array
resp.flow_summaries[0].arn #=> String
resp.flow_summaries[0].created_at #=> Time
resp.flow_summaries[0].description #=> String
resp.flow_summaries[0].id #=> String
resp.flow_summaries[0].name #=> String
resp.flow_summaries[0].status #=> String, one of "Failed", "Prepared", "Preparing", "NotPrepared"
resp.flow_summaries[0].updated_at #=> Time
resp.flow_summaries[0].version #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListFlowsResponse)
—
Returns a response object which responds to the following methods:
- #flow_summaries => Array<Types::FlowSummary>
- #next_token => String
See Also:
4831 4832 4833 4834 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4831 def list_flows(params = {}, options = {}) req = build_request(:list_flows, params) req.send_request(options) end |
#list_ingestion_jobs(params = {}) ⇒ Types::ListIngestionJobsResponse
Lists the data ingestion jobs for a data source. The list also includes information about each job.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_ingestion_jobs({
data_source_id: "Id", # required
filters: [
{
attribute: "STATUS", # required, accepts STATUS
operator: "EQ", # required, accepts EQ
values: ["IngestionJobFilterValue"], # required
},
],
knowledge_base_id: "Id", # required
max_results: 1,
next_token: "NextToken",
sort_by: {
attribute: "STATUS", # required, accepts STATUS, STARTED_AT
order: "ASCENDING", # required, accepts ASCENDING, DESCENDING
},
})
Response structure
Response structure
resp.ingestion_job_summaries #=> Array
resp.ingestion_job_summaries[0].data_source_id #=> String
resp.ingestion_job_summaries[0].description #=> String
resp.ingestion_job_summaries[0].ingestion_job_id #=> String
resp.ingestion_job_summaries[0].knowledge_base_id #=> String
resp.ingestion_job_summaries[0].started_at #=> Time
resp.ingestion_job_summaries[0].statistics.number_of_documents_deleted #=> Integer
resp.ingestion_job_summaries[0].statistics.number_of_documents_failed #=> Integer
resp.ingestion_job_summaries[0].statistics.number_of_documents_scanned #=> Integer
resp.ingestion_job_summaries[0].statistics.number_of_metadata_documents_modified #=> Integer
resp.ingestion_job_summaries[0].statistics.number_of_metadata_documents_scanned #=> Integer
resp.ingestion_job_summaries[0].statistics.number_of_modified_documents_indexed #=> Integer
resp.ingestion_job_summaries[0].statistics.number_of_new_documents_indexed #=> Integer
resp.ingestion_job_summaries[0].status #=> String, one of "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED", "STOPPING", "STOPPED"
resp.ingestion_job_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:data_source_id
(required, String)
—
The unique identifier of the data source for the list of data ingestion jobs.
-
:filters
(Array<Types::IngestionJobFilter>)
—
Contains information about the filters for filtering the data.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base for the list of data ingestion jobs.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results. -
:sort_by
(Types::IngestionJobSortBy)
—
Contains details about how to sort the data.
Returns:
-
(Types::ListIngestionJobsResponse)
—
Returns a response object which responds to the following methods:
- #ingestion_job_summaries => Array<Types::IngestionJobSummary>
- #next_token => String
See Also:
4915 4916 4917 4918 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4915 def list_ingestion_jobs(params = {}, options = {}) req = build_request(:list_ingestion_jobs, params) req.send_request(options) end |
#list_knowledge_base_documents(params = {}) ⇒ Types::ListKnowledgeBaseDocumentsResponse
Retrieves all the documents contained in a data source that is connected to a knowledge base. For more information, see Ingest documents into a knowledge base in real-time in the Amazon Bedrock User Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_knowledge_base_documents({
data_source_id: "Id", # required
knowledge_base_id: "Id", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.document_details #=> Array
resp.document_details[0].data_source_id #=> String
resp.document_details[0].identifier.custom.id #=> String
resp.document_details[0].identifier.data_source_type #=> String, one of "CUSTOM", "S3"
resp.document_details[0].identifier.s3.uri #=> String
resp.document_details[0].knowledge_base_id #=> String
resp.document_details[0].status #=> String, one of "INDEXED", "PARTIALLY_INDEXED", "PENDING", "FAILED", "METADATA_PARTIALLY_INDEXED", "METADATA_UPDATE_FAILED", "IGNORED", "NOT_FOUND", "STARTING", "IN_PROGRESS", "DELETING", "DELETE_IN_PROGRESS"
resp.document_details[0].status_reason #=> String
resp.document_details[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:data_source_id
(required, String)
—
The unique identifier of the data source that contains the documents.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base that is connected to the data source.
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListKnowledgeBaseDocumentsResponse)
—
Returns a response object which responds to the following methods:
- #document_details => Array<Types::KnowledgeBaseDocumentDetail>
- #next_token => String
See Also:
4981 4982 4983 4984 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 4981 def list_knowledge_base_documents(params = {}, options = {}) req = build_request(:list_knowledge_base_documents, params) req.send_request(options) end |
#list_knowledge_bases(params = {}) ⇒ Types::ListKnowledgeBasesResponse
Lists the knowledge bases in an account. The list also includesinformation about each knowledge base.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_knowledge_bases({
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.knowledge_base_summaries #=> Array
resp.knowledge_base_summaries[0].description #=> String
resp.knowledge_base_summaries[0].knowledge_base_id #=> String
resp.knowledge_base_summaries[0].name #=> String
resp.knowledge_base_summaries[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED", "DELETE_UNSUCCESSFUL"
resp.knowledge_base_summaries[0].updated_at #=> Time
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results.
Returns:
-
(Types::ListKnowledgeBasesResponse)
—
Returns a response object which responds to the following methods:
- #knowledge_base_summaries => Array<Types::KnowledgeBaseSummary>
- #next_token => String
See Also:
5029 5030 5031 5032 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5029 def list_knowledge_bases(params = {}, options = {}) req = build_request(:list_knowledge_bases, params) req.send_request(options) end |
#list_prompts(params = {}) ⇒ Types::ListPromptsResponse
Returns either information about the working draft (DRAFT
version)
of each prompt in an account, or information about of all versions of
a prompt, depending on whether you include the promptIdentifier
field or not. For more information, see View information about
prompts using Prompt management in the Amazon Bedrock User Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_prompts({
max_results: 1,
next_token: "NextToken",
prompt_identifier: "PromptIdentifier",
})
Response structure
Response structure
resp.next_token #=> String
resp.prompt_summaries #=> Array
resp.prompt_summaries[0].arn #=> String
resp.prompt_summaries[0].created_at #=> Time
resp.prompt_summaries[0].description #=> String
resp.prompt_summaries[0].id #=> String
resp.prompt_summaries[0].name #=> String
resp.prompt_summaries[0].updated_at #=> Time
resp.prompt_summaries[0].version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the
nextToken
field when making another request to return the next batch of results. -
:next_token
(String)
—
If the total number of results is greater than the
maxResults
value provided in the request, enter the token returned in thenextToken
field in the response in this field to return the next batch of results. -
:prompt_identifier
(String)
—
The unique identifier of the prompt for whose versions you want to return information. Omit this field to list information about all prompts in an account.
Returns:
-
(Types::ListPromptsResponse)
—
Returns a response object which responds to the following methods:
- #next_token => String
- #prompt_summaries => Array<Types::PromptSummary>
See Also:
5092 5093 5094 5095 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5092 def list_prompts(params = {}, options = {}) req = build_request(:list_prompts, params) req.send_request(options) end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all the tags for the resource you specify.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_tags_for_resource({
resource_arn: "TaggableResourcesArn", # required
})
Response structure
Response structure
resp.tags #=> Hash
resp.tags["TagKey"] #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
The Amazon Resource Name (ARN) of the resource for which to list tags.
Returns:
See Also:
5121 5122 5123 5124 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5121 def list_tags_for_resource(params = {}, options = {}) req = build_request(:list_tags_for_resource, params) req.send_request(options) end |
#prepare_agent(params = {}) ⇒ Types::PrepareAgentResponse
Creates a DRAFT
version of the agent that can be used for internal
testing.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.prepare_agent({
agent_id: "Id", # required
})
Response structure
Response structure
resp.agent_id #=> String
resp.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
resp.agent_version #=> String
resp.prepared_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent for which to create a
DRAFT
version.
Returns:
-
(Types::PrepareAgentResponse)
—
Returns a response object which responds to the following methods:
- #agent_id => String
- #agent_status => String
- #agent_version => String
- #prepared_at => Time
See Also:
5157 5158 5159 5160 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5157 def prepare_agent(params = {}, options = {}) req = build_request(:prepare_agent, params) req.send_request(options) end |
#prepare_flow(params = {}) ⇒ Types::PrepareFlowResponse
Prepares the DRAFT
version of a flow so that it can be invoked. For
more information, see Test a flow in Amazon Bedrock in the Amazon
Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.prepare_flow({
flow_identifier: "FlowIdentifier", # required
})
Response structure
Response structure
resp.id #=> String
resp.status #=> String, one of "Failed", "Prepared", "Preparing", "NotPrepared"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:flow_identifier
(required, String)
—
The unique identifier of the flow.
Returns:
See Also:
5193 5194 5195 5196 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5193 def prepare_flow(params = {}, options = {}) req = build_request(:prepare_flow, params) req.send_request(options) end |
#start_ingestion_job(params = {}) ⇒ Types::StartIngestionJobResponse
Begins a data ingestion job. Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.start_ingestion_job({
client_token: "ClientToken",
data_source_id: "Id", # required
description: "Description",
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.ingestion_job.data_source_id #=> String
resp.ingestion_job.description #=> String
resp.ingestion_job.failure_reasons #=> Array
resp.ingestion_job.failure_reasons[0] #=> String
resp.ingestion_job.ingestion_job_id #=> String
resp.ingestion_job.knowledge_base_id #=> String
resp.ingestion_job.started_at #=> Time
resp.ingestion_job.statistics.number_of_documents_deleted #=> Integer
resp.ingestion_job.statistics.number_of_documents_failed #=> Integer
resp.ingestion_job.statistics.number_of_documents_scanned #=> Integer
resp.ingestion_job.statistics.number_of_metadata_documents_modified #=> Integer
resp.ingestion_job.statistics.number_of_metadata_documents_scanned #=> Integer
resp.ingestion_job.statistics.number_of_modified_documents_indexed #=> Integer
resp.ingestion_job.statistics.number_of_new_documents_indexed #=> Integer
resp.ingestion_job.status #=> String, one of "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED", "STOPPING", "STOPPED"
resp.ingestion_job.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:client_token
(String)
—
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
A suitable default value is auto-generated. You should normally not need to pass this option.**
-
:data_source_id
(required, String)
—
The unique identifier of the data source you want to ingest into your knowledge base.
-
:description
(String)
—
A description of the data ingestion job.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base for the data ingestion job.
Returns:
-
(Types::StartIngestionJobResponse)
—
Returns a response object which responds to the following methods:
- #ingestion_job => Types::IngestionJob
See Also:
5261 5262 5263 5264 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5261 def start_ingestion_job(params = {}, options = {}) req = build_request(:start_ingestion_job, params) req.send_request(options) end |
#stop_ingestion_job(params = {}) ⇒ Types::StopIngestionJobResponse
Stops a currently running data ingestion job. You can send a
StartIngestionJob
request again to ingest the rest of your data when
you are ready.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.stop_ingestion_job({
data_source_id: "Id", # required
ingestion_job_id: "Id", # required
knowledge_base_id: "Id", # required
})
Response structure
Response structure
resp.ingestion_job.data_source_id #=> String
resp.ingestion_job.description #=> String
resp.ingestion_job.failure_reasons #=> Array
resp.ingestion_job.failure_reasons[0] #=> String
resp.ingestion_job.ingestion_job_id #=> String
resp.ingestion_job.knowledge_base_id #=> String
resp.ingestion_job.started_at #=> Time
resp.ingestion_job.statistics.number_of_documents_deleted #=> Integer
resp.ingestion_job.statistics.number_of_documents_failed #=> Integer
resp.ingestion_job.statistics.number_of_documents_scanned #=> Integer
resp.ingestion_job.statistics.number_of_metadata_documents_modified #=> Integer
resp.ingestion_job.statistics.number_of_metadata_documents_scanned #=> Integer
resp.ingestion_job.statistics.number_of_modified_documents_indexed #=> Integer
resp.ingestion_job.statistics.number_of_new_documents_indexed #=> Integer
resp.ingestion_job.status #=> String, one of "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED", "STOPPING", "STOPPED"
resp.ingestion_job.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:data_source_id
(required, String)
—
The unique identifier of the data source for the data ingestion job you want to stop.
-
:ingestion_job_id
(required, String)
—
The unique identifier of the data ingestion job you want to stop.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base for the data ingestion job you want to stop.
Returns:
-
(Types::StopIngestionJobResponse)
—
Returns a response object which responds to the following methods:
- #ingestion_job => Types::IngestionJob
See Also:
5316 5317 5318 5319 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5316 def stop_ingestion_job(params = {}, options = {}) req = build_request(:stop_ingestion_job, params) req.send_request(options) end |
#tag_resource(params = {}) ⇒ Struct
Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.tag_resource({
resource_arn: "TaggableResourcesArn", # required
tags: { # required
"TagKey" => "TagValue",
},
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
The Amazon Resource Name (ARN) of the resource to tag.
-
:tags
(required, Hash<String,String>)
—
An object containing key-value pairs that define the tags to attach to the resource.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
5350 5351 5352 5353 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5350 def tag_resource(params = {}, options = {}) req = build_request(:tag_resource, params) req.send_request(options) end |
#untag_resource(params = {}) ⇒ Struct
Remove tags from a resource.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.untag_resource({
resource_arn: "TaggableResourcesArn", # required
tag_keys: ["TagKey"], # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:resource_arn
(required, String)
—
The Amazon Resource Name (ARN) of the resource from which to remove tags.
-
:tag_keys
(required, Array<String>)
—
A list of keys of the tags to remove from the resource.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
5377 5378 5379 5380 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5377 def untag_resource(params = {}, options = {}) req = build_request(:untag_resource, params) req.send_request(options) end |
#update_agent(params = {}) ⇒ Types::UpdateAgentResponse
Updates the configuration of an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_agent({
agent_collaboration: "SUPERVISOR", # accepts SUPERVISOR, SUPERVISOR_ROUTER, DISABLED
agent_id: "Id", # required
agent_name: "Name", # required
agent_resource_role_arn: "AgentRoleArn", # required
custom_orchestration: {
executor: {
lambda: "LambdaArn",
},
},
customer_encryption_key_arn: "KmsKeyArn",
description: "Description",
foundation_model: "ModelIdentifier", # required
guardrail_configuration: {
guardrail_identifier: "GuardrailIdentifier",
guardrail_version: "GuardrailVersion",
},
idle_session_ttl_in_seconds: 1,
instruction: "Instruction",
memory_configuration: {
enabled_memory_types: ["SESSION_SUMMARY"], # required, accepts SESSION_SUMMARY
storage_days: 1,
},
orchestration_type: "DEFAULT", # accepts DEFAULT, CUSTOM_ORCHESTRATION
prompt_override_configuration: {
override_lambda: "LambdaArn",
prompt_configurations: [ # required
{
base_prompt_template: "BasePromptTemplate",
foundation_model: "ModelIdentifier",
inference_configuration: {
maximum_length: 1,
stop_sequences: ["String"],
temperature: 1.0,
top_k: 1,
top_p: 1.0,
},
parser_mode: "DEFAULT", # accepts DEFAULT, OVERRIDDEN
prompt_creation_mode: "DEFAULT", # accepts DEFAULT, OVERRIDDEN
prompt_state: "ENABLED", # accepts ENABLED, DISABLED
prompt_type: "PRE_PROCESSING", # accepts PRE_PROCESSING, ORCHESTRATION, POST_PROCESSING, KNOWLEDGE_BASE_RESPONSE_GENERATION
},
],
},
})
Response structure
Response structure
resp.agent.agent_arn #=> String
resp.agent.agent_collaboration #=> String, one of "SUPERVISOR", "SUPERVISOR_ROUTER", "DISABLED"
resp.agent.agent_id #=> String
resp.agent.agent_name #=> String
resp.agent.agent_resource_role_arn #=> String
resp.agent.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
resp.agent.agent_version #=> String
resp.agent.client_token #=> String
resp.agent.created_at #=> Time
resp.agent.custom_orchestration.executor.lambda #=> String
resp.agent.customer_encryption_key_arn #=> String
resp.agent.description #=> String
resp.agent.failure_reasons #=> Array
resp.agent.failure_reasons[0] #=> String
resp.agent.foundation_model #=> String
resp.agent.guardrail_configuration.guardrail_identifier #=> String
resp.agent.guardrail_configuration.guardrail_version #=> String
resp.agent.idle_session_ttl_in_seconds #=> Integer
resp.agent.instruction #=> String
resp.agent.memory_configuration.enabled_memory_types #=> Array
resp.agent.memory_configuration.enabled_memory_types[0] #=> String, one of "SESSION_SUMMARY"
resp.agent.memory_configuration.storage_days #=> Integer
resp.agent.orchestration_type #=> String, one of "DEFAULT", "CUSTOM_ORCHESTRATION"
resp.agent.prepared_at #=> Time
resp.agent.prompt_override_configuration.override_lambda #=> String
resp.agent.prompt_override_configuration.prompt_configurations #=> Array
resp.agent.prompt_override_configuration.prompt_configurations[0].base_prompt_template #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].foundation_model #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.maximum_length #=> Integer
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences #=> Array
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences[0] #=> String
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.temperature #=> Float
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_k #=> Integer
resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_p #=> Float
resp.agent.prompt_override_configuration.prompt_configurations[0].parser_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_creation_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_state #=> String, one of "ENABLED", "DISABLED"
resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "POST_PROCESSING", "KNOWLEDGE_BASE_RESPONSE_GENERATION"
resp.agent.recommended_actions #=> Array
resp.agent.recommended_actions[0] #=> String
resp.agent.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_collaboration
(String)
—
The agent's collaboration role.
-
:agent_id
(required, String)
—
The unique identifier of the agent.
-
:agent_name
(required, String)
—
Specifies a new name for the agent.
-
:agent_resource_role_arn
(required, String)
—
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
-
:custom_orchestration
(Types::CustomOrchestration)
—
Contains details of the custom orchestration configured for the agent.
-
:customer_encryption_key_arn
(String)
—
The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.
-
:description
(String)
—
Specifies a new description of the agent.
-
:foundation_model
(required, String)
—
The identifier for the model that you want to be used for orchestration by the agent you create.
The
modelId
to provide depends on the type of model or throughput that you use:If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for cross-region inference in the Amazon Bedrock User Guide.
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
If you use an imported model, specify the ARN of the imported model. You can get the model ARN from a successful call to CreateModelImportJob or from the Imported models page in the Amazon Bedrock console.
-
:guardrail_configuration
(Types::GuardrailConfiguration)
—
The unique Guardrail configuration assigned to the agent when it is updated.
-
:idle_session_ttl_in_seconds
(Integer)
—
The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.
-
:instruction
(String)
—
Specifies new instructions that tell the agent what it should do and how it should interact with users.
-
:memory_configuration
(Types::MemoryConfiguration)
—
Specifies the new memory configuration for the agent.
-
:orchestration_type
(String)
—
Specifies the type of orchestration strategy for the agent. This is set to
DEFAULT
orchestration type, by default. -
:prompt_override_configuration
(Types::PromptOverrideConfiguration)
—
Contains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts.
Returns:
See Also:
5577 5578 5579 5580 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5577 def update_agent(params = {}, options = {}) req = build_request(:update_agent, params) req.send_request(options) end |
#update_agent_action_group(params = {}) ⇒ Types::UpdateAgentActionGroupResponse
Updates the configuration for an action group for an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_agent_action_group({
action_group_executor: {
custom_control: "RETURN_CONTROL", # accepts RETURN_CONTROL
lambda: "LambdaArn",
},
action_group_id: "Id", # required
action_group_name: "Name", # required
action_group_state: "ENABLED", # accepts ENABLED, DISABLED
agent_id: "Id", # required
agent_version: "DraftVersion", # required
api_schema: {
payload: "Payload",
s3: {
s3_bucket_name: "S3BucketName",
s3_object_key: "S3ObjectKey",
},
},
description: "Description",
function_schema: {
functions: [
{
description: "FunctionDescription",
name: "Name", # required
parameters: {
"Name" => {
description: "ParameterDescription",
required: false,
type: "string", # required, accepts string, number, integer, boolean, array
},
},
require_confirmation: "ENABLED", # accepts ENABLED, DISABLED
},
],
},
parent_action_group_signature: "AMAZON.UserInput", # accepts AMAZON.UserInput, AMAZON.CodeInterpreter
})
Response structure
Response structure
resp.agent_action_group.action_group_executor.custom_control #=> String, one of "RETURN_CONTROL"
resp.agent_action_group.action_group_executor.lambda #=> String
resp.agent_action_group.action_group_id #=> String
resp.agent_action_group.action_group_name #=> String
resp.agent_action_group.action_group_state #=> String, one of "ENABLED", "DISABLED"
resp.agent_action_group.agent_id #=> String
resp.agent_action_group.agent_version #=> String
resp.agent_action_group.api_schema.payload #=> String
resp.agent_action_group.api_schema.s3.s3_bucket_name #=> String
resp.agent_action_group.api_schema.s3.s3_object_key #=> String
resp.agent_action_group.client_token #=> String
resp.agent_action_group.created_at #=> Time
resp.agent_action_group.description #=> String
resp.agent_action_group.function_schema.functions #=> Array
resp.agent_action_group.function_schema.functions[0].description #=> String
resp.agent_action_group.function_schema.functions[0].name #=> String
resp.agent_action_group.function_schema.functions[0].parameters #=> Hash
resp.agent_action_group.function_schema.functions[0].parameters["Name"].description #=> String
resp.agent_action_group.function_schema.functions[0].parameters["Name"].required #=> Boolean
resp.agent_action_group.function_schema.functions[0].parameters["Name"].type #=> String, one of "string", "number", "integer", "boolean", "array"
resp.agent_action_group.function_schema.functions[0].require_confirmation #=> String, one of "ENABLED", "DISABLED"
resp.agent_action_group.parent_action_signature #=> String, one of "AMAZON.UserInput", "AMAZON.CodeInterpreter"
resp.agent_action_group.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:action_group_executor
(Types::ActionGroupExecutor)
—
The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
-
:action_group_id
(required, String)
—
The unique identifier of the action group.
-
:action_group_name
(required, String)
—
Specifies a new name for the action group.
-
:action_group_state
(String)
—
Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.
-
:agent_id
(required, String)
—
The unique identifier of the agent for which to update the action group.
-
:agent_version
(required, String)
—
The unique identifier of the agent version for which to update the action group.
-
:api_schema
(Types::APISchema)
—
Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema. For more information, see Action group OpenAPI schemas.
-
:description
(String)
—
Specifies a new name for the action group.
-
:function_schema
(Types::FunctionSchema)
—
Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.
-
:parent_action_group_signature
(String)
—
To allow your agent to request the user for additional information when trying to complete a task, set this field to
AMAZON.UserInput
. You must leave thedescription
,apiSchema
, andactionGroupExecutor
fields blank for this action group.During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.
Returns:
-
(Types::UpdateAgentActionGroupResponse)
—
Returns a response object which responds to the following methods:
- #agent_action_group => Types::AgentActionGroup
See Also:
5715 5716 5717 5718 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5715 def update_agent_action_group(params = {}, options = {}) req = build_request(:update_agent_action_group, params) req.send_request(options) end |
#update_agent_alias(params = {}) ⇒ Types::UpdateAgentAliasResponse
Updates configurations for an alias of an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_agent_alias({
agent_alias_id: "AgentAliasId", # required
agent_alias_name: "Name", # required
agent_id: "Id", # required
description: "Description",
routing_configuration: [
{
agent_version: "Version",
provisioned_throughput: "ProvisionedModelIdentifier",
},
],
})
Response structure
Response structure
resp.agent_alias.agent_alias_arn #=> String
resp.agent_alias.agent_alias_history_events #=> Array
resp.agent_alias.agent_alias_history_events[0].end_date #=> Time
resp.agent_alias.agent_alias_history_events[0].routing_configuration #=> Array
resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].agent_version #=> String
resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].provisioned_throughput #=> String
resp.agent_alias.agent_alias_history_events[0].start_date #=> Time
resp.agent_alias.agent_alias_id #=> String
resp.agent_alias.agent_alias_name #=> String
resp.agent_alias.agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
resp.agent_alias.agent_id #=> String
resp.agent_alias.client_token #=> String
resp.agent_alias.created_at #=> Time
resp.agent_alias.description #=> String
resp.agent_alias.failure_reasons #=> Array
resp.agent_alias.failure_reasons[0] #=> String
resp.agent_alias.routing_configuration #=> Array
resp.agent_alias.routing_configuration[0].agent_version #=> String
resp.agent_alias.routing_configuration[0].provisioned_throughput #=> String
resp.agent_alias.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_alias_id
(required, String)
—
The unique identifier of the alias.
-
:agent_alias_name
(required, String)
—
Specifies a new name for the alias.
-
:agent_id
(required, String)
—
The unique identifier of the agent.
-
:description
(String)
—
Specifies a new description for the alias.
-
:routing_configuration
(Array<Types::AgentAliasRoutingConfigurationListItem>)
—
Contains details about the routing configuration of the alias.
Returns:
-
(Types::UpdateAgentAliasResponse)
—
Returns a response object which responds to the following methods:
- #agent_alias => Types::AgentAlias
See Also:
5783 5784 5785 5786 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5783 def update_agent_alias(params = {}, options = {}) req = build_request(:update_agent_alias, params) req.send_request(options) end |
#update_agent_collaborator(params = {}) ⇒ Types::UpdateAgentCollaboratorResponse
Updates an agent's collaborator.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_agent_collaborator({
agent_descriptor: { # required
alias_arn: "AgentAliasArn",
},
agent_id: "Id", # required
agent_version: "DraftVersion", # required
collaboration_instruction: "CollaborationInstruction", # required
collaborator_id: "Id", # required
collaborator_name: "Name", # required
relay_conversation_history: "TO_COLLABORATOR", # accepts TO_COLLABORATOR, DISABLED
})
Response structure
Response structure
resp.agent_collaborator.agent_descriptor.alias_arn #=> String
resp.agent_collaborator.agent_id #=> String
resp.agent_collaborator.agent_version #=> String
resp.agent_collaborator.client_token #=> String
resp.agent_collaborator.collaboration_instruction #=> String
resp.agent_collaborator.collaborator_id #=> String
resp.agent_collaborator.collaborator_name #=> String
resp.agent_collaborator.created_at #=> Time
resp.agent_collaborator.last_updated_at #=> Time
resp.agent_collaborator.relay_conversation_history #=> String, one of "TO_COLLABORATOR", "DISABLED"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_descriptor
(required, Types::AgentDescriptor)
—
An agent descriptor for the agent collaborator.
-
:agent_id
(required, String)
—
The agent's ID.
-
:agent_version
(required, String)
—
The agent's version.
-
:collaboration_instruction
(required, String)
—
Instruction for the collaborator.
-
:collaborator_id
(required, String)
—
The collaborator's ID.
-
:collaborator_name
(required, String)
—
The collaborator's name.
-
:relay_conversation_history
(String)
—
A relay conversation history for the collaborator.
Returns:
-
(Types::UpdateAgentCollaboratorResponse)
—
Returns a response object which responds to the following methods:
- #agent_collaborator => Types::AgentCollaborator
See Also:
5846 5847 5848 5849 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5846 def update_agent_collaborator(params = {}, options = {}) req = build_request(:update_agent_collaborator, params) req.send_request(options) end |
#update_agent_knowledge_base(params = {}) ⇒ Types::UpdateAgentKnowledgeBaseResponse
Updates the configuration for a knowledge base that has been associated with an agent.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_agent_knowledge_base({
agent_id: "Id", # required
agent_version: "DraftVersion", # required
description: "Description",
knowledge_base_id: "Id", # required
knowledge_base_state: "ENABLED", # accepts ENABLED, DISABLED
})
Response structure
Response structure
resp.agent_knowledge_base.agent_id #=> String
resp.agent_knowledge_base.agent_version #=> String
resp.agent_knowledge_base.created_at #=> Time
resp.agent_knowledge_base.description #=> String
resp.agent_knowledge_base.knowledge_base_id #=> String
resp.agent_knowledge_base.knowledge_base_state #=> String, one of "ENABLED", "DISABLED"
resp.agent_knowledge_base.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:agent_id
(required, String)
—
The unique identifier of the agent associated with the knowledge base that you want to update.
-
:agent_version
(required, String)
—
The version of the agent associated with the knowledge base that you want to update.
-
:description
(String)
—
Specifies a new description for the knowledge base associated with an agent.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base that has been associated with an agent.
-
:knowledge_base_state
(String)
—
Specifies whether the agent uses the knowledge base or not when sending an InvokeAgent request.
Returns:
-
(Types::UpdateAgentKnowledgeBaseResponse)
—
Returns a response object which responds to the following methods:
- #agent_knowledge_base => Types::AgentKnowledgeBase
See Also:
5906 5907 5908 5909 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 5906 def update_agent_knowledge_base(params = {}, options = {}) req = build_request(:update_agent_knowledge_base, params) req.send_request(options) end |
#update_data_source(params = {}) ⇒ Types::UpdateDataSourceResponse
Updates the configurations for a data source connector.
You can't change the chunkingConfiguration
after you create the
data source connector. Specify the existing chunkingConfiguration
.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_data_source({
data_deletion_policy: "RETAIN", # accepts RETAIN, DELETE
data_source_configuration: { # required
confluence_configuration: {
crawler_configuration: {
filter_configuration: {
pattern_object_filter: {
filters: [ # required
{
exclusion_filters: ["FilterPattern"],
inclusion_filters: ["FilterPattern"],
object_type: "FilteredObjectType", # required
},
],
},
type: "PATTERN", # required, accepts PATTERN
},
},
source_configuration: { # required
auth_type: "BASIC", # required, accepts BASIC, OAUTH2_CLIENT_CREDENTIALS
credentials_secret_arn: "SecretArn", # required
host_type: "SAAS", # required, accepts SAAS
host_url: "HttpsUrl", # required
},
},
s3_configuration: {
bucket_arn: "S3BucketArn", # required
bucket_owner_account_id: "BucketOwnerAccountId",
inclusion_prefixes: ["S3Prefix"],
},
salesforce_configuration: {
crawler_configuration: {
filter_configuration: {
pattern_object_filter: {
filters: [ # required
{
exclusion_filters: ["FilterPattern"],
inclusion_filters: ["FilterPattern"],
object_type: "FilteredObjectType", # required
},
],
},
type: "PATTERN", # required, accepts PATTERN
},
},
source_configuration: { # required
auth_type: "OAUTH2_CLIENT_CREDENTIALS", # required, accepts OAUTH2_CLIENT_CREDENTIALS
credentials_secret_arn: "SecretArn", # required
host_url: "HttpsUrl", # required
},
},
share_point_configuration: {
crawler_configuration: {
filter_configuration: {
pattern_object_filter: {
filters: [ # required
{
exclusion_filters: ["FilterPattern"],
inclusion_filters: ["FilterPattern"],
object_type: "FilteredObjectType", # required
},
],
},
type: "PATTERN", # required, accepts PATTERN
},
},
source_configuration: { # required
auth_type: "OAUTH2_CLIENT_CREDENTIALS", # required, accepts OAUTH2_CLIENT_CREDENTIALS
credentials_secret_arn: "SecretArn", # required
domain: "SharePointDomain", # required
host_type: "ONLINE", # required, accepts ONLINE
site_urls: ["HttpsUrl"], # required
tenant_id: "Microsoft365TenantId",
},
},
type: "S3", # required, accepts S3, WEB, CONFLUENCE, SALESFORCE, SHAREPOINT, CUSTOM, REDSHIFT_METADATA
web_configuration: {
crawler_configuration: {
crawler_limits: {
rate_limit: 1,
},
exclusion_filters: ["FilterPattern"],
inclusion_filters: ["FilterPattern"],
scope: "HOST_ONLY", # accepts HOST_ONLY, SUBDOMAINS
},
source_configuration: { # required
url_configuration: { # required
seed_urls: [
{
url: "Url",
},
],
},
},
},
},
data_source_id: "Id", # required
description: "Description",
knowledge_base_id: "Id", # required
name: "Name", # required
server_side_encryption_configuration: {
kms_key_arn: "KmsKeyArn",
},
vector_ingestion_configuration: {
chunking_configuration: {
chunking_strategy: "FIXED_SIZE", # required, accepts FIXED_SIZE, NONE, HIERARCHICAL, SEMANTIC
fixed_size_chunking_configuration: {
max_tokens: 1, # required
overlap_percentage: 1, # required
},
hierarchical_chunking_configuration: {
level_configurations: [ # required
{
max_tokens: 1, # required
},
],
overlap_tokens: 1, # required
},
semantic_chunking_configuration: {
breakpoint_percentile_threshold: 1, # required
buffer_size: 1, # required
max_tokens: 1, # required
},
},
custom_transformation_configuration: {
intermediate_storage: { # required
s3_location: { # required
uri: "S3BucketUri", # required
},
},
transformations: [ # required
{
step_to_apply: "POST_CHUNKING", # required, accepts POST_CHUNKING
transformation_function: { # required
transformation_lambda_configuration: { # required
lambda_arn: "LambdaArn", # required
},
},
},
],
},
parsing_configuration: {
bedrock_data_automation_configuration: {
parsing_modality: "MULTIMODAL", # accepts MULTIMODAL
},
bedrock_foundation_model_configuration: {
model_arn: "BedrockModelArn", # required
parsing_modality: "MULTIMODAL", # accepts MULTIMODAL
parsing_prompt: {
parsing_prompt_text: "ParsingPromptText", # required
},
},
parsing_strategy: "BEDROCK_FOUNDATION_MODEL", # required, accepts BEDROCK_FOUNDATION_MODEL, BEDROCK_DATA_AUTOMATION
},
},
})
Response structure
Response structure
resp.data_source.created_at #=> Time
resp.data_source.data_deletion_policy #=> String, one of "RETAIN", "DELETE"
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.confluence_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.auth_type #=> String, one of "BASIC", "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.host_type #=> String, one of "SAAS"
resp.data_source.data_source_configuration.confluence_configuration.source_configuration.host_url #=> String
resp.data_source.data_source_configuration.s3_configuration.bucket_arn #=> String
resp.data_source.data_source_configuration.s3_configuration.bucket_owner_account_id #=> String
resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes #=> Array
resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.salesforce_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.auth_type #=> String, one of "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.salesforce_configuration.source_configuration.host_url #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters #=> Array
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.pattern_object_filter.filters[0].object_type #=> String
resp.data_source.data_source_configuration.share_point_configuration.crawler_configuration.filter_configuration.type #=> String, one of "PATTERN"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.auth_type #=> String, one of "OAUTH2_CLIENT_CREDENTIALS"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.credentials_secret_arn #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.domain #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.host_type #=> String, one of "ONLINE"
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.site_urls #=> Array
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.site_urls[0] #=> String
resp.data_source.data_source_configuration.share_point_configuration.source_configuration.tenant_id #=> String
resp.data_source.data_source_configuration.type #=> String, one of "S3", "WEB", "CONFLUENCE", "SALESFORCE", "SHAREPOINT", "CUSTOM", "REDSHIFT_METADATA"
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.crawler_limits.rate_limit #=> Integer
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.exclusion_filters #=> Array
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.exclusion_filters[0] #=> String
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.inclusion_filters #=> Array
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.inclusion_filters[0] #=> String
resp.data_source.data_source_configuration.web_configuration.crawler_configuration.scope #=> String, one of "HOST_ONLY", "SUBDOMAINS"
resp.data_source.data_source_configuration.web_configuration.source_configuration.url_configuration.seed_urls #=> Array
resp.data_source.data_source_configuration.web_configuration.source_configuration.url_configuration.seed_urls[0].url #=> String
resp.data_source.data_source_id #=> String
resp.data_source.description #=> String
resp.data_source.failure_reasons #=> Array
resp.data_source.failure_reasons[0] #=> String
resp.data_source.knowledge_base_id #=> String
resp.data_source.name #=> String
resp.data_source.server_side_encryption_configuration.kms_key_arn #=> String
resp.data_source.status #=> String, one of "AVAILABLE", "DELETING", "DELETE_UNSUCCESSFUL"
resp.data_source.updated_at #=> Time
resp.data_source.vector_ingestion_configuration.chunking_configuration.chunking_strategy #=> String, one of "FIXED_SIZE", "NONE", "HIERARCHICAL", "SEMANTIC"
resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.overlap_percentage #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.level_configurations #=> Array
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.level_configurations[0].max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.hierarchical_chunking_configuration.overlap_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.breakpoint_percentile_threshold #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.buffer_size #=> Integer
resp.data_source.vector_ingestion_configuration.chunking_configuration.semantic_chunking_configuration.max_tokens #=> Integer
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.intermediate_storage.s3_location.uri #=> String
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations #=> Array
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations[0].step_to_apply #=> String, one of "POST_CHUNKING"
resp.data_source.vector_ingestion_configuration.custom_transformation_configuration.transformations[0].transformation_function.transformation_lambda_configuration.lambda_arn #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_data_automation_configuration.parsing_modality #=> String, one of "MULTIMODAL"
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.model_arn #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.parsing_modality #=> String, one of "MULTIMODAL"
resp.data_source.vector_ingestion_configuration.parsing_configuration.bedrock_foundation_model_configuration.parsing_prompt.parsing_prompt_text #=> String
resp.data_source.vector_ingestion_configuration.parsing_configuration.parsing_strategy #=> String, one of "BEDROCK_FOUNDATION_MODEL", "BEDROCK_DATA_AUTOMATION"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:data_deletion_policy
(String)
—
The data deletion policy for the data source that you want to update.
-
:data_source_configuration
(required, Types::DataSourceConfiguration)
—
The connection configuration for the data source that you want to update.
-
:data_source_id
(required, String)
—
The unique identifier of the data source.
-
:description
(String)
—
Specifies a new description for the data source.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base for the data source.
-
:name
(required, String)
—
Specifies a new name for the data source.
-
:server_side_encryption_configuration
(Types::ServerSideEncryptionConfiguration)
—
Contains details about server-side encryption of the data source.
-
:vector_ingestion_configuration
(Types::VectorIngestionConfiguration)
—
Contains details about how to ingest the documents in the data source.
Returns:
-
(Types::UpdateDataSourceResponse)
—
Returns a response object which responds to the following methods:
- #data_source => Types::DataSource
See Also:
6188 6189 6190 6191 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 6188 def update_data_source(params = {}, options = {}) req = build_request(:update_data_source, params) req.send_request(options) end |
#update_flow(params = {}) ⇒ Types::UpdateFlowResponse
Modifies a flow. Include both fields that you want to keep and fields that you want to change. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_flow({
customer_encryption_key_arn: "KmsKeyArn",
definition: {
connections: [
{
configuration: {
conditional: {
condition: "FlowConditionName", # required
},
data: {
source_output: "FlowNodeOutputName", # required
target_input: "FlowNodeInputName", # required
},
},
name: "FlowConnectionName", # required
source: "FlowNodeName", # required
target: "FlowNodeName", # required
type: "Data", # required, accepts Data, Conditional
},
],
nodes: [
{
configuration: {
agent: {
agent_alias_arn: "AgentAliasArn", # required
},
collector: {
},
condition: {
conditions: [ # required
{
expression: "FlowConditionExpression",
name: "FlowConditionName", # required
},
],
},
input: {
},
iterator: {
},
knowledge_base: {
guardrail_configuration: {
guardrail_identifier: "GuardrailIdentifier",
guardrail_version: "GuardrailVersion",
},
knowledge_base_id: "KnowledgeBaseId", # required
model_id: "KnowledgeBaseModelIdentifier",
},
lambda_function: {
lambda_arn: "LambdaArn", # required
},
lex: {
bot_alias_arn: "LexBotAliasArn", # required
locale_id: "LexBotLocaleId", # required
},
output: {
},
prompt: {
guardrail_configuration: {
guardrail_identifier: "GuardrailIdentifier",
guardrail_version: "GuardrailVersion",
},
source_configuration: { # required
inline: {
additional_model_request_fields: {
},
inference_configuration: {
text: {
max_tokens: 1,
stop_sequences: ["String"],
temperature: 1.0,
top_p: 1.0,
},
},
model_id: "PromptModelIdentifier", # required
template_configuration: { # required
chat: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
messages: [ # required
{
content: [ # required
{
text: "String",
},
],
role: "user", # required, accepts user, assistant
},
],
system: [
{
text: "NonEmptyString",
},
],
tool_configuration: {
tool_choice: {
any: {
},
auto: {
},
tool: {
name: "ToolName", # required
},
},
tools: [ # required
{
tool_spec: {
description: "NonEmptyString",
input_schema: { # required
json: {
},
},
name: "ToolName", # required
},
},
],
},
},
text: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
text: "TextPrompt", # required
},
},
template_type: "TEXT", # required, accepts TEXT, CHAT
},
resource: {
prompt_arn: "PromptArn", # required
},
},
},
retrieval: {
service_configuration: { # required
s3: {
bucket_name: "S3BucketName", # required
},
},
},
storage: {
service_configuration: { # required
s3: {
bucket_name: "S3BucketName", # required
},
},
},
},
inputs: [
{
expression: "FlowNodeInputExpression", # required
name: "FlowNodeInputName", # required
type: "String", # required, accepts String, Number, Boolean, Object, Array
},
],
name: "FlowNodeName", # required
outputs: [
{
name: "FlowNodeOutputName", # required
type: "String", # required, accepts String, Number, Boolean, Object, Array
},
],
type: "Input", # required, accepts Input, Output, KnowledgeBase, Condition, Lex, Prompt, LambdaFunction, Storage, Agent, Retrieval, Iterator, Collector
},
],
},
description: "FlowDescription",
execution_role_arn: "FlowExecutionRoleArn", # required
flow_identifier: "FlowIdentifier", # required
name: "FlowName", # required
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.definition.connections #=> Array
resp.definition.connections[0].configuration.conditional.condition #=> String
resp.definition.connections[0].configuration.data.source_output #=> String
resp.definition.connections[0].configuration.data.target_input #=> String
resp.definition.connections[0].name #=> String
resp.definition.connections[0].source #=> String
resp.definition.connections[0].target #=> String
resp.definition.connections[0].type #=> String, one of "Data", "Conditional"
resp.definition.nodes #=> Array
resp.definition.nodes[0].configuration.agent.agent_alias_arn #=> String
resp.definition.nodes[0].configuration.condition.conditions #=> Array
resp.definition.nodes[0].configuration.condition.conditions[0].expression #=> String
resp.definition.nodes[0].configuration.condition.conditions[0].name #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.knowledge_base.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.knowledge_base.knowledge_base_id #=> String
resp.definition.nodes[0].configuration.knowledge_base.model_id #=> String
resp.definition.nodes[0].configuration.lambda_function.lambda_arn #=> String
resp.definition.nodes[0].configuration.lex.bot_alias_arn #=> String
resp.definition.nodes[0].configuration.lex.locale_id #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_identifier #=> String
resp.definition.nodes[0].configuration.prompt.guardrail_configuration.guardrail_version #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.max_tokens #=> Integer
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences[0] #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.temperature #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.inference_configuration.text.top_p #=> Float
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.model_id #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].content[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.system[0].text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables #=> Array
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables[0].name #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_configuration.text.text #=> String
resp.definition.nodes[0].configuration.prompt.source_configuration.inline.template_type #=> String, one of "TEXT", "CHAT"
resp.definition.nodes[0].configuration.prompt.source_configuration.resource.prompt_arn #=> String
resp.definition.nodes[0].configuration.retrieval.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].configuration.storage.service_configuration.s3.bucket_name #=> String
resp.definition.nodes[0].inputs #=> Array
resp.definition.nodes[0].inputs[0].expression #=> String
resp.definition.nodes[0].inputs[0].name #=> String
resp.definition.nodes[0].inputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].name #=> String
resp.definition.nodes[0].outputs #=> Array
resp.definition.nodes[0].outputs[0].name #=> String
resp.definition.nodes[0].outputs[0].type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.definition.nodes[0].type #=> String, one of "Input", "Output", "KnowledgeBase", "Condition", "Lex", "Prompt", "LambdaFunction", "Storage", "Agent", "Retrieval", "Iterator", "Collector"
resp.description #=> String
resp.execution_role_arn #=> String
resp.id #=> String
resp.name #=> String
resp.status #=> String, one of "Failed", "Prepared", "Preparing", "NotPrepared"
resp.updated_at #=> Time
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:customer_encryption_key_arn
(String)
—
The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.
-
:definition
(Types::FlowDefinition)
—
A definition of the nodes and the connections between the nodes in the flow.
-
:description
(String)
—
A description for the flow.
-
:execution_role_arn
(required, String)
—
The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide.
-
:flow_identifier
(required, String)
—
The unique identifier of the flow.
-
:name
(required, String)
—
A name for the flow.
Returns:
-
(Types::UpdateFlowResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #definition => Types::FlowDefinition
- #description => String
- #execution_role_arn => String
- #id => String
- #name => String
- #status => String
- #updated_at => Time
- #version => String
See Also:
6493 6494 6495 6496 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 6493 def update_flow(params = {}, options = {}) req = build_request(:update_flow, params) req.send_request(options) end |
#update_flow_alias(params = {}) ⇒ Types::UpdateFlowAliasResponse
Modifies the alias of a flow. Include both fields that you want to keep and ones that you want to change. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_flow_alias({
alias_identifier: "FlowAliasIdentifier", # required
description: "Description",
flow_identifier: "FlowIdentifier", # required
name: "Name", # required
routing_configuration: [ # required
{
flow_version: "Version",
},
],
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.description #=> String
resp.flow_id #=> String
resp.id #=> String
resp.name #=> String
resp.routing_configuration #=> Array
resp.routing_configuration[0].flow_version #=> String
resp.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:alias_identifier
(required, String)
—
The unique identifier of the alias.
-
:description
(String)
—
A description for the alias.
-
:flow_identifier
(required, String)
—
The unique identifier of the flow.
-
:name
(required, String)
—
The name of the alias.
-
:routing_configuration
(required, Array<Types::FlowAliasRoutingConfigurationListItem>)
—
Contains information about the version to which to map the alias.
Returns:
-
(Types::UpdateFlowAliasResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #description => String
- #flow_id => String
- #id => String
- #name => String
- #routing_configuration => Array<Types::FlowAliasRoutingConfigurationListItem>
- #updated_at => Time
See Also:
6562 6563 6564 6565 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 6562 def update_flow_alias(params = {}, options = {}) req = build_request(:update_flow_alias, params) req.send_request(options) end |
#update_knowledge_base(params = {}) ⇒ Types::UpdateKnowledgeBaseResponse
Updates the configuration of a knowledge base with the fields that you specify. Because all fields will be overwritten, you must include the same values for fields that you want to keep the same.
You can change the following fields:
name
description
roleArn
You can't change the knowledgeBaseConfiguration
or
storageConfiguration
fields, so you must specify the same
configurations as when you created the knowledge base. You can send a
GetKnowledgeBase request and copy the same configurations.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_knowledge_base({
description: "Description",
knowledge_base_configuration: { # required
kendra_knowledge_base_configuration: {
kendra_index_arn: "KendraIndexArn", # required
},
sql_knowledge_base_configuration: {
redshift_configuration: {
query_engine_configuration: { # required
provisioned_configuration: {
auth_configuration: { # required
database_user: "String",
type: "IAM", # required, accepts IAM, USERNAME_PASSWORD, USERNAME
username_password_secret_arn: "SecretArn",
},
cluster_identifier: "RedshiftClusterIdentifier", # required
},
serverless_configuration: {
auth_configuration: { # required
type: "IAM", # required, accepts IAM, USERNAME_PASSWORD
username_password_secret_arn: "SecretArn",
},
workgroup_arn: "WorkgroupArn", # required
},
type: "SERVERLESS", # required, accepts SERVERLESS, PROVISIONED
},
query_generation_configuration: {
execution_timeout_seconds: 1,
generation_context: {
curated_queries: [
{
natural_language: "NaturalLanguageString", # required
sql: "SqlString", # required
},
],
tables: [
{
columns: [
{
description: "DescriptionString",
inclusion: "INCLUDE", # accepts INCLUDE, EXCLUDE
name: "QueryGenerationColumnName",
},
],
description: "DescriptionString",
inclusion: "INCLUDE", # accepts INCLUDE, EXCLUDE
name: "QueryGenerationTableName", # required
},
],
},
},
storage_configurations: [ # required
{
aws_data_catalog_configuration: {
table_names: ["AwsDataCatalogTableName"], # required
},
redshift_configuration: {
database_name: "RedshiftDatabase", # required
},
type: "REDSHIFT", # required, accepts REDSHIFT, AWS_DATA_CATALOG
},
],
},
type: "REDSHIFT", # required, accepts REDSHIFT
},
type: "VECTOR", # required, accepts VECTOR, KENDRA, SQL
vector_knowledge_base_configuration: {
embedding_model_arn: "BedrockEmbeddingModelArn", # required
embedding_model_configuration: {
bedrock_embedding_model_configuration: {
dimensions: 1,
embedding_data_type: "FLOAT32", # accepts FLOAT32, BINARY
},
},
supplemental_data_storage_configuration: {
storage_locations: [ # required
{
s3_location: {
uri: "S3BucketUri", # required
},
type: "S3", # required, accepts S3
},
],
},
},
},
knowledge_base_id: "Id", # required
name: "Name", # required
role_arn: "KnowledgeBaseRoleArn", # required
storage_configuration: {
mongo_db_atlas_configuration: {
collection_name: "MongoDbAtlasCollectionName", # required
credentials_secret_arn: "SecretArn", # required
database_name: "MongoDbAtlasDatabaseName", # required
endpoint: "MongoDbAtlasEndpoint", # required
endpoint_service_name: "MongoDbAtlasEndpointServiceName",
field_mapping: { # required
metadata_field: "FieldName", # required
text_field: "FieldName", # required
vector_field: "FieldName", # required
},
vector_index_name: "MongoDbAtlasIndexName", # required
},
opensearch_serverless_configuration: {
collection_arn: "OpenSearchServerlessCollectionArn", # required
field_mapping: { # required
metadata_field: "FieldName", # required
text_field: "FieldName", # required
vector_field: "FieldName", # required
},
vector_index_name: "OpenSearchServerlessIndexName", # required
},
pinecone_configuration: {
connection_string: "PineconeConnectionString", # required
credentials_secret_arn: "SecretArn", # required
field_mapping: { # required
metadata_field: "FieldName", # required
text_field: "FieldName", # required
},
namespace: "PineconeNamespace",
},
rds_configuration: {
credentials_secret_arn: "SecretArn", # required
database_name: "RdsDatabaseName", # required
field_mapping: { # required
metadata_field: "ColumnName", # required
primary_key_field: "ColumnName", # required
text_field: "ColumnName", # required
vector_field: "ColumnName", # required
},
resource_arn: "RdsArn", # required
table_name: "RdsTableName", # required
},
redis_enterprise_cloud_configuration: {
credentials_secret_arn: "SecretArn", # required
endpoint: "RedisEnterpriseCloudEndpoint", # required
field_mapping: { # required
metadata_field: "FieldName", # required
text_field: "FieldName", # required
vector_field: "FieldName", # required
},
vector_index_name: "RedisEnterpriseCloudIndexName", # required
},
type: "OPENSEARCH_SERVERLESS", # required, accepts OPENSEARCH_SERVERLESS, PINECONE, REDIS_ENTERPRISE_CLOUD, RDS, MONGO_DB_ATLAS
},
})
Response structure
Response structure
resp.knowledge_base.created_at #=> Time
resp.knowledge_base.description #=> String
resp.knowledge_base.failure_reasons #=> Array
resp.knowledge_base.failure_reasons[0] #=> String
resp.knowledge_base.knowledge_base_arn #=> String
resp.knowledge_base.knowledge_base_configuration.kendra_knowledge_base_configuration.kendra_index_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.database_user #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.type #=> String, one of "IAM", "USERNAME_PASSWORD", "USERNAME"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.auth_configuration.username_password_secret_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.provisioned_configuration.cluster_identifier #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.auth_configuration.type #=> String, one of "IAM", "USERNAME_PASSWORD"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.auth_configuration.username_password_secret_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.serverless_configuration.workgroup_arn #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_engine_configuration.type #=> String, one of "SERVERLESS", "PROVISIONED"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.execution_timeout_seconds #=> Integer
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries[0].natural_language #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.curated_queries[0].sql #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].description #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].inclusion #=> String, one of "INCLUDE", "EXCLUDE"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].columns[0].name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].description #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].inclusion #=> String, one of "INCLUDE", "EXCLUDE"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.query_generation_configuration.generation_context.tables[0].name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].aws_data_catalog_configuration.table_names #=> Array
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].aws_data_catalog_configuration.table_names[0] #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].redshift_configuration.database_name #=> String
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.redshift_configuration.storage_configurations[0].type #=> String, one of "REDSHIFT", "AWS_DATA_CATALOG"
resp.knowledge_base.knowledge_base_configuration.sql_knowledge_base_configuration.type #=> String, one of "REDSHIFT"
resp.knowledge_base.knowledge_base_configuration.type #=> String, one of "VECTOR", "KENDRA", "SQL"
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_arn #=> String
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_configuration.bedrock_embedding_model_configuration.dimensions #=> Integer
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_configuration.bedrock_embedding_model_configuration.embedding_data_type #=> String, one of "FLOAT32", "BINARY"
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations #=> Array
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations[0].s3_location.uri #=> String
resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.supplemental_data_storage_configuration.storage_locations[0].type #=> String, one of "S3"
resp.knowledge_base.knowledge_base_id #=> String
resp.knowledge_base.name #=> String
resp.knowledge_base.role_arn #=> String
resp.knowledge_base.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED", "DELETE_UNSUCCESSFUL"
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.collection_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.database_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.endpoint #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.endpoint_service_name #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.mongo_db_atlas_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.collection_arn #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.connection_string #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.pinecone_configuration.namespace #=> String
resp.knowledge_base.storage_configuration.rds_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.rds_configuration.database_name #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.primary_key_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.rds_configuration.resource_arn #=> String
resp.knowledge_base.storage_configuration.rds_configuration.table_name #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.credentials_secret_arn #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.endpoint #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.metadata_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.text_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.vector_field #=> String
resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.vector_index_name #=> String
resp.knowledge_base.storage_configuration.type #=> String, one of "OPENSEARCH_SERVERLESS", "PINECONE", "REDIS_ENTERPRISE_CLOUD", "RDS", "MONGO_DB_ATLAS"
resp.knowledge_base.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:description
(String)
—
Specifies a new description for the knowledge base.
-
:knowledge_base_configuration
(required, Types::KnowledgeBaseConfiguration)
—
Specifies the configuration for the embeddings model used for the knowledge base. You must use the same configuration as when the knowledge base was created.
-
:knowledge_base_id
(required, String)
—
The unique identifier of the knowledge base to update.
-
:name
(required, String)
—
Specifies a new name for the knowledge base.
-
:role_arn
(required, String)
—
Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
-
:storage_configuration
(Types::StorageConfiguration)
—
Specifies the configuration for the vector store used for the knowledge base. You must use the same configuration as when the knowledge base was created.
Returns:
-
(Types::UpdateKnowledgeBaseResponse)
—
Returns a response object which responds to the following methods:
- #knowledge_base => Types::KnowledgeBase
See Also:
6849 6850 6851 6852 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 6849 def update_knowledge_base(params = {}, options = {}) req = build_request(:update_knowledge_base, params) req.send_request(options) end |
#update_prompt(params = {}) ⇒ Types::UpdatePromptResponse
Modifies a prompt in your prompt library. Include both fields that you want to keep and fields that you want to replace. For more information, see Prompt management in Amazon Bedrock and Edit prompts in your prompt library in the Amazon Bedrock User Guide.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_prompt({
customer_encryption_key_arn: "KmsKeyArn",
default_variant: "PromptVariantName",
description: "PromptDescription",
name: "PromptName", # required
prompt_identifier: "PromptIdentifier", # required
variants: [
{
additional_model_request_fields: {
},
gen_ai_resource: {
agent: {
agent_identifier: "AgentAliasArn", # required
},
},
inference_configuration: {
text: {
max_tokens: 1,
stop_sequences: ["String"],
temperature: 1.0,
top_p: 1.0,
},
},
metadata: [
{
key: "PromptMetadataKey", # required
value: "PromptMetadataValue", # required
},
],
model_id: "PromptModelIdentifier",
name: "PromptVariantName", # required
template_configuration: { # required
chat: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
messages: [ # required
{
content: [ # required
{
text: "String",
},
],
role: "user", # required, accepts user, assistant
},
],
system: [
{
text: "NonEmptyString",
},
],
tool_configuration: {
tool_choice: {
any: {
},
auto: {
},
tool: {
name: "ToolName", # required
},
},
tools: [ # required
{
tool_spec: {
description: "NonEmptyString",
input_schema: { # required
json: {
},
},
name: "ToolName", # required
},
},
],
},
},
text: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
text: "TextPrompt", # required
},
},
template_type: "TEXT", # required, accepts TEXT, CHAT
},
],
})
Response structure
Response structure
resp.arn #=> String
resp.created_at #=> Time
resp.customer_encryption_key_arn #=> String
resp.default_variant #=> String
resp.description #=> String
resp.id #=> String
resp.name #=> String
resp.updated_at #=> Time
resp.variants #=> Array
resp.variants[0].gen_ai_resource.agent.agent_identifier #=> String
resp.variants[0].inference_configuration.text.max_tokens #=> Integer
resp.variants[0].inference_configuration.text.stop_sequences #=> Array
resp.variants[0].inference_configuration.text.stop_sequences[0] #=> String
resp.variants[0].inference_configuration.text.temperature #=> Float
resp.variants[0].inference_configuration.text.top_p #=> Float
resp.variants[0].metadata #=> Array
resp.variants[0].metadata[0].key #=> String
resp.variants[0].metadata[0].value #=> String
resp.variants[0].model_id #=> String
resp.variants[0].name #=> String
resp.variants[0].template_configuration.chat.input_variables #=> Array
resp.variants[0].template_configuration.chat.input_variables[0].name #=> String
resp.variants[0].template_configuration.chat.messages #=> Array
resp.variants[0].template_configuration.chat.messages[0].content #=> Array
resp.variants[0].template_configuration.chat.messages[0].content[0].text #=> String
resp.variants[0].template_configuration.chat.messages[0].role #=> String, one of "user", "assistant"
resp.variants[0].template_configuration.chat.system #=> Array
resp.variants[0].template_configuration.chat.system[0].text #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tool_choice.tool.name #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tools #=> Array
resp.variants[0].template_configuration.chat.tool_configuration.tools[0].tool_spec.description #=> String
resp.variants[0].template_configuration.chat.tool_configuration.tools[0].tool_spec.name #=> String
resp.variants[0].template_configuration.text.input_variables #=> Array
resp.variants[0].template_configuration.text.input_variables[0].name #=> String
resp.variants[0].template_configuration.text.text #=> String
resp.variants[0].template_type #=> String, one of "TEXT", "CHAT"
resp.version #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:customer_encryption_key_arn
(String)
—
The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
-
:default_variant
(String)
—
The name of the default variant for the prompt. This value must match the
name
field in the relevant PromptVariant object. -
:description
(String)
—
A description for the prompt.
-
:name
(required, String)
—
A name for the prompt.
-
:prompt_identifier
(required, String)
—
The unique identifier of the prompt.
-
:variants
(Array<Types::PromptVariant>)
—
A list of objects, each containing details about a variant of the prompt.
Returns:
-
(Types::UpdatePromptResponse)
—
Returns a response object which responds to the following methods:
- #arn => String
- #created_at => Time
- #customer_encryption_key_arn => String
- #default_variant => String
- #description => String
- #id => String
- #name => String
- #updated_at => Time
- #variants => Array<Types::PromptVariant>
- #version => String
See Also:
7038 7039 7040 7041 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 7038 def update_prompt(params = {}, options = {}) req = build_request(:update_prompt, params) req.send_request(options) end |
#validate_flow_definition(params = {}) ⇒ Types::ValidateFlowDefinitionResponse
Validates the definition of a flow.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.validate_flow_definition({
definition: { # required
connections: [
{
configuration: {
conditional: {
condition: "FlowConditionName", # required
},
data: {
source_output: "FlowNodeOutputName", # required
target_input: "FlowNodeInputName", # required
},
},
name: "FlowConnectionName", # required
source: "FlowNodeName", # required
target: "FlowNodeName", # required
type: "Data", # required, accepts Data, Conditional
},
],
nodes: [
{
configuration: {
agent: {
agent_alias_arn: "AgentAliasArn", # required
},
collector: {
},
condition: {
conditions: [ # required
{
expression: "FlowConditionExpression",
name: "FlowConditionName", # required
},
],
},
input: {
},
iterator: {
},
knowledge_base: {
guardrail_configuration: {
guardrail_identifier: "GuardrailIdentifier",
guardrail_version: "GuardrailVersion",
},
knowledge_base_id: "KnowledgeBaseId", # required
model_id: "KnowledgeBaseModelIdentifier",
},
lambda_function: {
lambda_arn: "LambdaArn", # required
},
lex: {
bot_alias_arn: "LexBotAliasArn", # required
locale_id: "LexBotLocaleId", # required
},
output: {
},
prompt: {
guardrail_configuration: {
guardrail_identifier: "GuardrailIdentifier",
guardrail_version: "GuardrailVersion",
},
source_configuration: { # required
inline: {
additional_model_request_fields: {
},
inference_configuration: {
text: {
max_tokens: 1,
stop_sequences: ["String"],
temperature: 1.0,
top_p: 1.0,
},
},
model_id: "PromptModelIdentifier", # required
template_configuration: { # required
chat: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
messages: [ # required
{
content: [ # required
{
text: "String",
},
],
role: "user", # required, accepts user, assistant
},
],
system: [
{
text: "NonEmptyString",
},
],
tool_configuration: {
tool_choice: {
any: {
},
auto: {
},
tool: {
name: "ToolName", # required
},
},
tools: [ # required
{
tool_spec: {
description: "NonEmptyString",
input_schema: { # required
json: {
},
},
name: "ToolName", # required
},
},
],
},
},
text: {
input_variables: [
{
name: "PromptInputVariableName",
},
],
text: "TextPrompt", # required
},
},
template_type: "TEXT", # required, accepts TEXT, CHAT
},
resource: {
prompt_arn: "PromptArn", # required
},
},
},
retrieval: {
service_configuration: { # required
s3: {
bucket_name: "S3BucketName", # required
},
},
},
storage: {
service_configuration: { # required
s3: {
bucket_name: "S3BucketName", # required
},
},
},
},
inputs: [
{
expression: "FlowNodeInputExpression", # required
name: "FlowNodeInputName", # required
type: "String", # required, accepts String, Number, Boolean, Object, Array
},
],
name: "FlowNodeName", # required
outputs: [
{
name: "FlowNodeOutputName", # required
type: "String", # required, accepts String, Number, Boolean, Object, Array
},
],
type: "Input", # required, accepts Input, Output, KnowledgeBase, Condition, Lex, Prompt, LambdaFunction, Storage, Agent, Retrieval, Iterator, Collector
},
],
},
})
Response structure
Response structure
resp.validations #=> Array
resp.validations[0].details.cyclic_connection.connection #=> String
resp.validations[0].details.duplicate_condition_expression.expression #=> String
resp.validations[0].details.duplicate_condition_expression.node #=> String
resp.validations[0].details.duplicate_connections.source #=> String
resp.validations[0].details.duplicate_connections.target #=> String
resp.validations[0].details.incompatible_connection_data_type.connection #=> String
resp.validations[0].details.malformed_condition_expression.cause #=> String
resp.validations[0].details.malformed_condition_expression.condition #=> String
resp.validations[0].details.malformed_condition_expression.node #=> String
resp.validations[0].details.malformed_node_input_expression.cause #=> String
resp.validations[0].details.malformed_node_input_expression.input #=> String
resp.validations[0].details.malformed_node_input_expression.node #=> String
resp.validations[0].details.mismatched_node_input_type.expected_type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.validations[0].details.mismatched_node_input_type.input #=> String
resp.validations[0].details.mismatched_node_input_type.node #=> String
resp.validations[0].details.mismatched_node_output_type.expected_type #=> String, one of "String", "Number", "Boolean", "Object", "Array"
resp.validations[0].details.mismatched_node_output_type.node #=> String
resp.validations[0].details.mismatched_node_output_type.output #=> String
resp.validations[0].details.missing_connection_configuration.connection #=> String
resp.validations[0].details.missing_default_condition.node #=> String
resp.validations[0].details.missing_node_configuration.node #=> String
resp.validations[0].details.missing_node_input.input #=> String
resp.validations[0].details.missing_node_input.node #=> String
resp.validations[0].details.missing_node_output.node #=> String
resp.validations[0].details.missing_node_output.output #=> String
resp.validations[0].details.multiple_node_input_connections.input #=> String
resp.validations[0].details.multiple_node_input_connections.node #=> String
resp.validations[0].details.unfulfilled_node_input.input #=> String
resp.validations[0].details.unfulfilled_node_input.node #=> String
resp.validations[0].details.unknown_connection_condition.connection #=> String
resp.validations[0].details.unknown_connection_source.connection #=> String
resp.validations[0].details.unknown_connection_source_output.connection #=> String
resp.validations[0].details.unknown_connection_target.connection #=> String
resp.validations[0].details.unknown_connection_target_input.connection #=> String
resp.validations[0].details.unreachable_node.node #=> String
resp.validations[0].details.unsatisfied_connection_conditions.connection #=> String
resp.validations[0].message #=> String
resp.validations[0].severity #=> String, one of "Warning", "Error"
resp.validations[0].type #=> String, one of "CyclicConnection", "DuplicateConnections", "DuplicateConditionExpression", "UnreachableNode", "UnknownConnectionSource", "UnknownConnectionSourceOutput", "UnknownConnectionTarget", "UnknownConnectionTargetInput", "UnknownConnectionCondition", "MalformedConditionExpression", "MalformedNodeInputExpression", "MismatchedNodeInputType", "MismatchedNodeOutputType", "IncompatibleConnectionDataType", "MissingConnectionConfiguration", "MissingDefaultCondition", "MissingEndingNodes", "MissingNodeConfiguration", "MissingNodeInput", "MissingNodeOutput", "MissingStartingNodes", "MultipleNodeInputConnections", "UnfulfilledNodeInput", "UnsatisfiedConnectionConditions", "Unspecified"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:definition
(required, Types::FlowDefinition)
—
The definition of a flow to validate.
Returns:
-
(Types::ValidateFlowDefinitionResponse)
—
Returns a response object which responds to the following methods:
- #validations => Array<Types::FlowValidation>
See Also:
7272 7273 7274 7275 |
# File 'gems/aws-sdk-bedrockagent/lib/aws-sdk-bedrockagent/client.rb', line 7272 def validate_flow_definition(params = {}, options = {}) req = build_request(:validate_flow_definition, params) req.send_request(options) end |