AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Bedrock Agent Runtime Retrieve API operation.

Syntax

Invoke-BARRetrieve
-KnowledgeBaseId <String>
-Filter_AndAll <RetrievalFilter[]>
-Equals_Key <String>
-GreaterThan_Key <String>
-GreaterThanOrEquals_Key <String>
-In_Key <String>
-LessThan_Key <String>
-LessThanOrEquals_Key <String>
-ListContains_Key <String>
-NotEquals_Key <String>
-NotIn_Key <String>
-StartsWith_Key <String>
-StringContains_Key <String>
-VectorSearchConfiguration_NumberOfResult <Int32>
-Filter_OrAll <RetrievalFilter[]>
-VectorSearchConfiguration_OverrideSearchType <SearchType>
-RetrievalQuery_Text <String>
-Equals_Value <PSObject>
-GreaterThan_Value <PSObject>
-GreaterThanOrEquals_Value <PSObject>
-In_Value <PSObject>
-LessThan_Value <PSObject>
-LessThanOrEquals_Value <PSObject>
-ListContains_Value <PSObject>
-NotEquals_Value <PSObject>
-NotIn_Value <PSObject>
-StartsWith_Value <PSObject>
-StringContains_Value <PSObject>
-NextToken <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonBedrockAgentRuntimeConfig>

Description

Queries a knowledge base and retrieves information from it.

Parameters

Amazon.PowerShell.Cmdlets.BAR.AmazonBedrockAgentRuntimeClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Equals_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_Equals_Key
-Equals_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_Equals_Value
-Filter_AndAll <RetrievalFilter[]>
Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_AndAll
-Filter_OrAll <RetrievalFilter[]>
Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_OrAll
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-GreaterThan_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_GreaterThan_Key
-GreaterThan_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_GreaterThan_Value
-GreaterThanOrEquals_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_GreaterThanOrEquals_Key
-GreaterThanOrEquals_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_GreaterThanOrEquals_Value
-In_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_In_Key
-In_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_In_Value
-KnowledgeBaseId <String>
The unique identifier of the knowledge base to query.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-LessThan_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_LessThan_Key
-LessThan_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_LessThan_Value
-LessThanOrEquals_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_LessThanOrEquals_Key
-LessThanOrEquals_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_LessThanOrEquals_Value
-ListContains_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_ListContains_Key
-ListContains_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_ListContains_Value
-NextToken <String>
If there are more results than can fit in the response, the response returns a nextToken. Use this token in the nextToken field of another request to retrieve the next batch of results.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NotEquals_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_NotEquals_Key
-NotEquals_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_NotEquals_Value
-NotIn_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_NotIn_Key
-NotIn_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_NotIn_Value
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the KnowledgeBaseId parameter. The -PassThru parameter is deprecated, use -Select '^KnowledgeBaseId' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RetrievalQuery_Text <String>
The text of the query made to the knowledge base.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BedrockAgentRuntime.Model.RetrieveResponse). Specifying the name of a property of type Amazon.BedrockAgentRuntime.Model.RetrieveResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StartsWith_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_StartsWith_Key
-StartsWith_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_StartsWith_Value
-StringContains_Key <String>
The name that the metadata attribute must match.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_StringContains_Key
-StringContains_Value <PSObject>
The value to whcih to compare the value of the metadata attribute.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_Filter_StringContains_Value
-VectorSearchConfiguration_NumberOfResult <Int32>
The number of source chunks to retrieve.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_NumberOfResults
-VectorSearchConfiguration_OverrideSearchType <SearchType>
By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a HYBRID search using both vector embeddings and raw text, or SEMANTIC search using only vector embeddings. For other vector store configurations, only SEMANTIC search is available. For more information, see Test a knowledge base.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetrievalConfiguration_VectorSearchConfiguration_OverrideSearchType

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.BedrockAgentRuntime.Model.RetrieveResponse object containing multiple properties.

Supported Version

AWS Tools for PowerShell: 2.x.y.z