AgentsforBedrockRuntime / Client / get_invocation_step
get_invocation_step¶
- AgentsforBedrockRuntime.Client.get_invocation_step(**kwargs)¶
- Retrieves the details of a specific invocation step within an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions. - See also: AWS API Documentation - Request Syntax- response = client.get_invocation_step( invocationIdentifier='string', invocationStepId='string', sessionIdentifier='string' ) - Parameters:
- invocationIdentifier (string) – - [REQUIRED] - The unique identifier for the invocation in UUID format. 
- invocationStepId (string) – - [REQUIRED] - The unique identifier (in UUID format) for the specific invocation step to retrieve. 
- sessionIdentifier (string) – - [REQUIRED] - The unique identifier for the invocation step’s associated session. You can specify either the session’s - sessionIdor its Amazon Resource Name (ARN).
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'invocationStep': { 'sessionId': 'string', 'invocationId': 'string', 'invocationStepId': 'string', 'invocationStepTime': datetime(2015, 1, 1), 'payload': { 'contentBlocks': [ { 'text': 'string', 'image': { 'format': 'png'|'jpeg'|'gif'|'webp', 'source': { 'bytes': b'bytes', 's3Location': { 'uri': 'string' } } } }, ] } } } - Response Structure- (dict) – - invocationStep (dict) – - The complete details of the requested invocation step. - sessionId (string) – - The unique identifier of the session containing the invocation step. 
- invocationId (string) – - The unique identifier (in UUID format) for the invocation that includes the invocation step. 
- invocationStepId (string) – - The unique identifier (in UUID format) for the invocation step. 
- invocationStepTime (datetime) – - The timestamp for when the invocation step was created. 
- payload (dict) – - Payload content, such as text and images, for the invocation step. - Note- This is a Tagged Union structure. Only one of the following top level keys will be set: - contentBlocks. If a client receives an unknown member it will set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis as follows:- 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} - contentBlocks (list) – - The content for the invocation step. - (dict) – - A block of content that you pass to, or receive from, a Amazon Bedrock session in an invocation step. You pass the content to a session in the - payLoadof the PutInvocationStep API operation. You retrieve the content with the GetInvocationStep API operation.- For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions. - Note- This is a Tagged Union structure. Only one of the following top level keys will be set: - text,- image. If a client receives an unknown member it will set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis as follows:- 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} - text (string) – - The text in the invocation step. 
- image (dict) – - The image in the invocation step. - format (string) – - The format of the image. 
- source (dict) – - The source for the image. - Note- This is a Tagged Union structure. Only one of the following top level keys will be set: - bytes,- s3Location. If a client receives an unknown member it will set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis as follows:- 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} - bytes (bytes) – - The raw image bytes for the image. If you use an Amazon Web Services SDK, you don’t need to encode the image bytes in base64. 
- s3Location (dict) – - The path to the Amazon S3 bucket where the image is stored. - uri (string) – - The path to the Amazon S3 bucket where the image is stored. 
 
 
 
 
 
 
 
 
 
 - Exceptions- AgentsforBedrockRuntime.Client.exceptions.ResourceNotFoundException
- AgentsforBedrockRuntime.Client.exceptions.ValidationException
- AgentsforBedrockRuntime.Client.exceptions.InternalServerException
- AgentsforBedrockRuntime.Client.exceptions.ThrottlingException
- AgentsforBedrockRuntime.Client.exceptions.AccessDeniedException