aws-sdk-bedrockagentruntime 1.46.0 → 1.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -481,6 +481,162 @@ module Aws::BedrockAgentRuntime
481
481
 
482
482
  # @!group API Operations
483
483
 
484
+ # Creates a new invocation within a session. An invocation groups the
485
+ # related invocation steps that store the content from a conversation.
486
+ # For more information about sessions, see [Store and retrieve
487
+ # conversation history and context with Amazon Bedrock sessions][1].
488
+ #
489
+ # Related APIs
490
+ #
491
+ # * [ListInvocations][2]
492
+ #
493
+ # * [ListSessions][3]
494
+ #
495
+ # * [GetSession][4]
496
+ #
497
+ #
498
+ #
499
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
500
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListInvocations.html
501
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListSessions.html
502
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_GetSession.html
503
+ #
504
+ # @option params [String] :description
505
+ # A description for the interactions in the invocation. For example,
506
+ # "User asking about weather in Seattle".
507
+ #
508
+ # @option params [String] :invocation_id
509
+ # A unique identifier for the invocation in UUID format.
510
+ #
511
+ # @option params [required, String] :session_identifier
512
+ # The unique identifier for the associated session for the invocation.
513
+ # You can specify either the session's `sessionId` or its Amazon
514
+ # Resource Name (ARN).
515
+ #
516
+ # @return [Types::CreateInvocationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
517
+ #
518
+ # * {Types::CreateInvocationResponse#created_at #created_at} => Time
519
+ # * {Types::CreateInvocationResponse#invocation_id #invocation_id} => String
520
+ # * {Types::CreateInvocationResponse#session_id #session_id} => String
521
+ #
522
+ # @example Request syntax with placeholder values
523
+ #
524
+ # resp = client.create_invocation({
525
+ # description: "InvocationDescription",
526
+ # invocation_id: "Uuid",
527
+ # session_identifier: "SessionIdentifier", # required
528
+ # })
529
+ #
530
+ # @example Response structure
531
+ #
532
+ # resp.created_at #=> Time
533
+ # resp.invocation_id #=> String
534
+ # resp.session_id #=> String
535
+ #
536
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/CreateInvocation AWS API Documentation
537
+ #
538
+ # @overload create_invocation(params = {})
539
+ # @param [Hash] params ({})
540
+ def create_invocation(params = {}, options = {})
541
+ req = build_request(:create_invocation, params)
542
+ req.send_request(options)
543
+ end
544
+
545
+ # Creates a session to temporarily store conversations for generative AI
546
+ # (GenAI) applications built with open-source frameworks such as
547
+ # LangGraph and LlamaIndex. Sessions enable you to save the state of
548
+ # conversations at checkpoints, with the added security and
549
+ # infrastructure of Amazon Web Services. For more information, see
550
+ # [Store and retrieve conversation history and context with Amazon
551
+ # Bedrock sessions][1].
552
+ #
553
+ # By default, Amazon Bedrock uses Amazon Web Services-managed keys for
554
+ # session encryption, including session metadata, or you can use your
555
+ # own KMS key. For more information, see [Amazon Bedrock session
556
+ # encryption][2].
557
+ #
558
+ # <note markdown="1"> You use a session to store state and conversation history for
559
+ # generative AI applications built with open-source frameworks. For
560
+ # Amazon Bedrock Agents, the service automatically manages conversation
561
+ # context and associates them with the agent-specific sessionId you
562
+ # specify in the [InvokeAgent][3] API operation.
563
+ #
564
+ # </note>
565
+ #
566
+ # Related APIs:
567
+ #
568
+ # * [ListSessions][4]
569
+ #
570
+ # * [GetSession][5]
571
+ #
572
+ # * [EndSession][6]
573
+ #
574
+ # * [DeleteSession][7]
575
+ #
576
+ #
577
+ #
578
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
579
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/session-encryption.html
580
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/API_agent-runtime_InvokeAgent.html
581
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListSessions.html
582
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_GetSession.html
583
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_EndSession.html
584
+ # [7]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_DeleteSession.html
585
+ #
586
+ # @option params [String] :encryption_key_arn
587
+ # The Amazon Resource Name (ARN) of the KMS key to use to encrypt the
588
+ # session data. The user or role creating the session must have
589
+ # permission to use the key. For more information, see [Amazon Bedrock
590
+ # session encryption][1].
591
+ #
592
+ #
593
+ #
594
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/session-encryption.html
595
+ #
596
+ # @option params [Hash<String,String>] :session_metadata
597
+ # A map of key-value pairs containing attributes to be persisted across
598
+ # the session. For example, the user's ID, their language preference,
599
+ # and the type of device they are using.
600
+ #
601
+ # @option params [Hash<String,String>] :tags
602
+ # Specify the key-value pairs for the tags that you want to attach to
603
+ # the session.
604
+ #
605
+ # @return [Types::CreateSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
606
+ #
607
+ # * {Types::CreateSessionResponse#created_at #created_at} => Time
608
+ # * {Types::CreateSessionResponse#session_arn #session_arn} => String
609
+ # * {Types::CreateSessionResponse#session_id #session_id} => String
610
+ # * {Types::CreateSessionResponse#session_status #session_status} => String
611
+ #
612
+ # @example Request syntax with placeholder values
613
+ #
614
+ # resp = client.create_session({
615
+ # encryption_key_arn: "KmsKeyArn",
616
+ # session_metadata: {
617
+ # "SessionMetadataKey" => "SessionMetadataValue",
618
+ # },
619
+ # tags: {
620
+ # "TagKey" => "TagValue",
621
+ # },
622
+ # })
623
+ #
624
+ # @example Response structure
625
+ #
626
+ # resp.created_at #=> Time
627
+ # resp.session_arn #=> String
628
+ # resp.session_id #=> String
629
+ # resp.session_status #=> String, one of "ACTIVE", "EXPIRED", "ENDED"
630
+ #
631
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/CreateSession AWS API Documentation
632
+ #
633
+ # @overload create_session(params = {})
634
+ # @param [Hash] params ({})
635
+ def create_session(params = {}, options = {})
636
+ req = build_request(:create_session, params)
637
+ req.send_request(options)
638
+ end
639
+
484
640
  # Deletes memory from the specified memory identifier.
485
641
  #
486
642
  # @option params [required, String] :agent_alias_id
@@ -515,6 +671,79 @@ module Aws::BedrockAgentRuntime
515
671
  req.send_request(options)
516
672
  end
517
673
 
674
+ # Deletes a session that you ended. You can't delete a session with an
675
+ # `ACTIVE` status. To delete an active session, you must first end it
676
+ # with the [EndSession][1] API operation. For more information about
677
+ # sessions, see [Store and retrieve conversation history and context
678
+ # with Amazon Bedrock sessions][2].
679
+ #
680
+ #
681
+ #
682
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_EndSession.html
683
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
684
+ #
685
+ # @option params [required, String] :session_identifier
686
+ # The unique identifier for the session to be deleted. You can specify
687
+ # either the session's `sessionId` or its Amazon Resource Name (ARN).
688
+ #
689
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
690
+ #
691
+ # @example Request syntax with placeholder values
692
+ #
693
+ # resp = client.delete_session({
694
+ # session_identifier: "SessionIdentifier", # required
695
+ # })
696
+ #
697
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/DeleteSession AWS API Documentation
698
+ #
699
+ # @overload delete_session(params = {})
700
+ # @param [Hash] params ({})
701
+ def delete_session(params = {}, options = {})
702
+ req = build_request(:delete_session, params)
703
+ req.send_request(options)
704
+ end
705
+
706
+ # Ends the session. After you end a session, you can still access its
707
+ # content but you can’t add to it. To delete the session and it's
708
+ # content, you use the DeleteSession API operation. For more information
709
+ # about sessions, see [Store and retrieve conversation history and
710
+ # context with Amazon Bedrock sessions][1].
711
+ #
712
+ #
713
+ #
714
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
715
+ #
716
+ # @option params [required, String] :session_identifier
717
+ # The unique identifier for the session to end. You can specify either
718
+ # the session's `sessionId` or its Amazon Resource Name (ARN).
719
+ #
720
+ # @return [Types::EndSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
721
+ #
722
+ # * {Types::EndSessionResponse#session_arn #session_arn} => String
723
+ # * {Types::EndSessionResponse#session_id #session_id} => String
724
+ # * {Types::EndSessionResponse#session_status #session_status} => String
725
+ #
726
+ # @example Request syntax with placeholder values
727
+ #
728
+ # resp = client.end_session({
729
+ # session_identifier: "SessionIdentifier", # required
730
+ # })
731
+ #
732
+ # @example Response structure
733
+ #
734
+ # resp.session_arn #=> String
735
+ # resp.session_id #=> String
736
+ # resp.session_status #=> String, one of "ACTIVE", "EXPIRED", "ENDED"
737
+ #
738
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/EndSession AWS API Documentation
739
+ #
740
+ # @overload end_session(params = {})
741
+ # @param [Hash] params ({})
742
+ def end_session(params = {}, options = {})
743
+ req = build_request(:end_session, params)
744
+ req.send_request(options)
745
+ end
746
+
518
747
  # Generates an SQL query from a natural language query. For more
519
748
  # information, see [Generate a query for structured data][1] in the
520
749
  # Amazon Bedrock User Guide.
@@ -631,6 +860,108 @@ module Aws::BedrockAgentRuntime
631
860
  req.send_request(options)
632
861
  end
633
862
 
863
+ # Retrieves the details of a specific invocation step within an
864
+ # invocation in a session. For more information about sessions, see
865
+ # [Store and retrieve conversation history and context with Amazon
866
+ # Bedrock sessions][1].
867
+ #
868
+ #
869
+ #
870
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
871
+ #
872
+ # @option params [required, String] :invocation_identifier
873
+ # The unique identifier for the invocation in UUID format.
874
+ #
875
+ # @option params [required, String] :invocation_step_id
876
+ # The unique identifier (in UUID format) for the specific invocation
877
+ # step to retrieve.
878
+ #
879
+ # @option params [required, String] :session_identifier
880
+ # The unique identifier for the invocation step's associated session.
881
+ # You can specify either the session's `sessionId` or its Amazon
882
+ # Resource Name (ARN).
883
+ #
884
+ # @return [Types::GetInvocationStepResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
885
+ #
886
+ # * {Types::GetInvocationStepResponse#invocation_step #invocation_step} => Types::InvocationStep
887
+ #
888
+ # @example Request syntax with placeholder values
889
+ #
890
+ # resp = client.get_invocation_step({
891
+ # invocation_identifier: "InvocationIdentifier", # required
892
+ # invocation_step_id: "Uuid", # required
893
+ # session_identifier: "SessionIdentifier", # required
894
+ # })
895
+ #
896
+ # @example Response structure
897
+ #
898
+ # resp.invocation_step.invocation_id #=> String
899
+ # resp.invocation_step.invocation_step_id #=> String
900
+ # resp.invocation_step.invocation_step_time #=> Time
901
+ # resp.invocation_step.payload.content_blocks #=> Array
902
+ # resp.invocation_step.payload.content_blocks[0].image.format #=> String, one of "png", "jpeg", "gif", "webp"
903
+ # resp.invocation_step.payload.content_blocks[0].image.source.bytes #=> String
904
+ # resp.invocation_step.payload.content_blocks[0].image.source.s3_location.uri #=> String
905
+ # resp.invocation_step.payload.content_blocks[0].text #=> String
906
+ # resp.invocation_step.session_id #=> String
907
+ #
908
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GetInvocationStep AWS API Documentation
909
+ #
910
+ # @overload get_invocation_step(params = {})
911
+ # @param [Hash] params ({})
912
+ def get_invocation_step(params = {}, options = {})
913
+ req = build_request(:get_invocation_step, params)
914
+ req.send_request(options)
915
+ end
916
+
917
+ # Retrieves details about a specific session. For more information about
918
+ # sessions, see [Store and retrieve conversation history and context
919
+ # with Amazon Bedrock sessions][1].
920
+ #
921
+ #
922
+ #
923
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
924
+ #
925
+ # @option params [required, String] :session_identifier
926
+ # A unique identifier for the session to retrieve. You can specify
927
+ # either the session's `sessionId` or its Amazon Resource Name (ARN).
928
+ #
929
+ # @return [Types::GetSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
930
+ #
931
+ # * {Types::GetSessionResponse#created_at #created_at} => Time
932
+ # * {Types::GetSessionResponse#encryption_key_arn #encryption_key_arn} => String
933
+ # * {Types::GetSessionResponse#last_updated_at #last_updated_at} => Time
934
+ # * {Types::GetSessionResponse#session_arn #session_arn} => String
935
+ # * {Types::GetSessionResponse#session_id #session_id} => String
936
+ # * {Types::GetSessionResponse#session_metadata #session_metadata} => Hash&lt;String,String&gt;
937
+ # * {Types::GetSessionResponse#session_status #session_status} => String
938
+ #
939
+ # @example Request syntax with placeholder values
940
+ #
941
+ # resp = client.get_session({
942
+ # session_identifier: "SessionIdentifier", # required
943
+ # })
944
+ #
945
+ # @example Response structure
946
+ #
947
+ # resp.created_at #=> Time
948
+ # resp.encryption_key_arn #=> String
949
+ # resp.last_updated_at #=> Time
950
+ # resp.session_arn #=> String
951
+ # resp.session_id #=> String
952
+ # resp.session_metadata #=> Hash
953
+ # resp.session_metadata["SessionMetadataKey"] #=> String
954
+ # resp.session_status #=> String, one of "ACTIVE", "EXPIRED", "ENDED"
955
+ #
956
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GetSession AWS API Documentation
957
+ #
958
+ # @overload get_session(params = {})
959
+ # @param [Hash] params ({})
960
+ def get_session(params = {}, options = {})
961
+ req = build_request(:get_session, params)
962
+ req.send_request(options)
963
+ end
964
+
634
965
  # <note> </note>
635
966
  #
636
967
  # Sends a prompt for the agent to process and respond to. Note the
@@ -3028,6 +3359,209 @@ module Aws::BedrockAgentRuntime
3028
3359
  req.send_request(options, &block)
3029
3360
  end
3030
3361
 
3362
+ # Lists all invocation steps associated with a session and optionally,
3363
+ # an invocation within the session. For more information about sessions,
3364
+ # see [Store and retrieve conversation history and context with Amazon
3365
+ # Bedrock sessions][1].
3366
+ #
3367
+ #
3368
+ #
3369
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
3370
+ #
3371
+ # @option params [String] :invocation_identifier
3372
+ # The unique identifier (in UUID format) for the invocation to list
3373
+ # invocation steps for.
3374
+ #
3375
+ # @option params [Integer] :max_results
3376
+ # The maximum number of results to return in the response. If the total
3377
+ # number of results is greater than this value, use the token returned
3378
+ # in the response in the `nextToken` field when making another request
3379
+ # to return the next batch of results.
3380
+ #
3381
+ # @option params [String] :next_token
3382
+ # If the total number of results is greater than the `maxResults` value
3383
+ # provided in the request, enter the token returned in the `nextToken`
3384
+ # field in the response in this field to return the next batch of
3385
+ # results.
3386
+ #
3387
+ # @option params [required, String] :session_identifier
3388
+ # The unique identifier for the session associated with the invocation
3389
+ # steps. You can specify either the session's `sessionId` or its Amazon
3390
+ # Resource Name (ARN).
3391
+ #
3392
+ # @return [Types::ListInvocationStepsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3393
+ #
3394
+ # * {Types::ListInvocationStepsResponse#invocation_step_summaries #invocation_step_summaries} => Array&lt;Types::InvocationStepSummary&gt;
3395
+ # * {Types::ListInvocationStepsResponse#next_token #next_token} => String
3396
+ #
3397
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3398
+ #
3399
+ # @example Request syntax with placeholder values
3400
+ #
3401
+ # resp = client.list_invocation_steps({
3402
+ # invocation_identifier: "InvocationIdentifier",
3403
+ # max_results: 1,
3404
+ # next_token: "NextToken",
3405
+ # session_identifier: "SessionIdentifier", # required
3406
+ # })
3407
+ #
3408
+ # @example Response structure
3409
+ #
3410
+ # resp.invocation_step_summaries #=> Array
3411
+ # resp.invocation_step_summaries[0].invocation_id #=> String
3412
+ # resp.invocation_step_summaries[0].invocation_step_id #=> String
3413
+ # resp.invocation_step_summaries[0].invocation_step_time #=> Time
3414
+ # resp.invocation_step_summaries[0].session_id #=> String
3415
+ # resp.next_token #=> String
3416
+ #
3417
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ListInvocationSteps AWS API Documentation
3418
+ #
3419
+ # @overload list_invocation_steps(params = {})
3420
+ # @param [Hash] params ({})
3421
+ def list_invocation_steps(params = {}, options = {})
3422
+ req = build_request(:list_invocation_steps, params)
3423
+ req.send_request(options)
3424
+ end
3425
+
3426
+ # Lists all invocations associated with a specific session. For more
3427
+ # information about sessions, see [Store and retrieve conversation
3428
+ # history and context with Amazon Bedrock sessions][1].
3429
+ #
3430
+ #
3431
+ #
3432
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
3433
+ #
3434
+ # @option params [Integer] :max_results
3435
+ # The maximum number of results to return in the response. If the total
3436
+ # number of results is greater than this value, use the token returned
3437
+ # in the response in the `nextToken` field when making another request
3438
+ # to return the next batch of results.
3439
+ #
3440
+ # @option params [String] :next_token
3441
+ # If the total number of results is greater than the `maxResults` value
3442
+ # provided in the request, enter the token returned in the `nextToken`
3443
+ # field in the response in this field to return the next batch of
3444
+ # results.
3445
+ #
3446
+ # @option params [required, String] :session_identifier
3447
+ # The unique identifier for the session to list invocations for. You can
3448
+ # specify either the session's `sessionId` or its Amazon Resource Name
3449
+ # (ARN).
3450
+ #
3451
+ # @return [Types::ListInvocationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3452
+ #
3453
+ # * {Types::ListInvocationsResponse#invocation_summaries #invocation_summaries} => Array&lt;Types::InvocationSummary&gt;
3454
+ # * {Types::ListInvocationsResponse#next_token #next_token} => String
3455
+ #
3456
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3457
+ #
3458
+ # @example Request syntax with placeholder values
3459
+ #
3460
+ # resp = client.list_invocations({
3461
+ # max_results: 1,
3462
+ # next_token: "NextToken",
3463
+ # session_identifier: "SessionIdentifier", # required
3464
+ # })
3465
+ #
3466
+ # @example Response structure
3467
+ #
3468
+ # resp.invocation_summaries #=> Array
3469
+ # resp.invocation_summaries[0].created_at #=> Time
3470
+ # resp.invocation_summaries[0].invocation_id #=> String
3471
+ # resp.invocation_summaries[0].session_id #=> String
3472
+ # resp.next_token #=> String
3473
+ #
3474
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ListInvocations AWS API Documentation
3475
+ #
3476
+ # @overload list_invocations(params = {})
3477
+ # @param [Hash] params ({})
3478
+ def list_invocations(params = {}, options = {})
3479
+ req = build_request(:list_invocations, params)
3480
+ req.send_request(options)
3481
+ end
3482
+
3483
+ # Lists all sessions in your Amazon Web Services account. For more
3484
+ # information about sessions, see [Store and retrieve conversation
3485
+ # history and context with Amazon Bedrock sessions][1].
3486
+ #
3487
+ #
3488
+ #
3489
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
3490
+ #
3491
+ # @option params [Integer] :max_results
3492
+ # The maximum number of results to return in the response. If the total
3493
+ # number of results is greater than this value, use the token returned
3494
+ # in the response in the `nextToken` field when making another request
3495
+ # to return the next batch of results.
3496
+ #
3497
+ # @option params [String] :next_token
3498
+ # If the total number of results is greater than the `maxResults` value
3499
+ # provided in the request, enter the token returned in the `nextToken`
3500
+ # field in the response in this field to return the next batch of
3501
+ # results.
3502
+ #
3503
+ # @return [Types::ListSessionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3504
+ #
3505
+ # * {Types::ListSessionsResponse#next_token #next_token} => String
3506
+ # * {Types::ListSessionsResponse#session_summaries #session_summaries} => Array&lt;Types::SessionSummary&gt;
3507
+ #
3508
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3509
+ #
3510
+ # @example Request syntax with placeholder values
3511
+ #
3512
+ # resp = client.list_sessions({
3513
+ # max_results: 1,
3514
+ # next_token: "NextToken",
3515
+ # })
3516
+ #
3517
+ # @example Response structure
3518
+ #
3519
+ # resp.next_token #=> String
3520
+ # resp.session_summaries #=> Array
3521
+ # resp.session_summaries[0].created_at #=> Time
3522
+ # resp.session_summaries[0].last_updated_at #=> Time
3523
+ # resp.session_summaries[0].session_arn #=> String
3524
+ # resp.session_summaries[0].session_id #=> String
3525
+ # resp.session_summaries[0].session_status #=> String, one of "ACTIVE", "EXPIRED", "ENDED"
3526
+ #
3527
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ListSessions AWS API Documentation
3528
+ #
3529
+ # @overload list_sessions(params = {})
3530
+ # @param [Hash] params ({})
3531
+ def list_sessions(params = {}, options = {})
3532
+ req = build_request(:list_sessions, params)
3533
+ req.send_request(options)
3534
+ end
3535
+
3536
+ # List all the tags for the resource you specify.
3537
+ #
3538
+ # @option params [required, String] :resource_arn
3539
+ # The Amazon Resource Name (ARN) of the resource for which to list tags.
3540
+ #
3541
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3542
+ #
3543
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Hash&lt;String,String&gt;
3544
+ #
3545
+ # @example Request syntax with placeholder values
3546
+ #
3547
+ # resp = client.list_tags_for_resource({
3548
+ # resource_arn: "TaggableResourcesArn", # required
3549
+ # })
3550
+ #
3551
+ # @example Response structure
3552
+ #
3553
+ # resp.tags #=> Hash
3554
+ # resp.tags["TagKey"] #=> String
3555
+ #
3556
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ListTagsForResource AWS API Documentation
3557
+ #
3558
+ # @overload list_tags_for_resource(params = {})
3559
+ # @param [Hash] params ({})
3560
+ def list_tags_for_resource(params = {}, options = {})
3561
+ req = build_request(:list_tags_for_resource, params)
3562
+ req.send_request(options)
3563
+ end
3564
+
3031
3565
  # Optimizes a prompt for the task that you specify. For more
3032
3566
  # information, see [Optimize a prompt][1] in the [Amazon Bedrock User
3033
3567
  # Guide][2].
@@ -3265,6 +3799,90 @@ module Aws::BedrockAgentRuntime
3265
3799
  req.send_request(options, &block)
3266
3800
  end
3267
3801
 
3802
+ # Add an invocation step to an invocation in a session. An invocation
3803
+ # step stores fine-grained state checkpoints, including text and images,
3804
+ # for each interaction. For more information about sessions, see [Store
3805
+ # and retrieve conversation history and context with Amazon Bedrock
3806
+ # sessions][1].
3807
+ #
3808
+ # Related APIs:
3809
+ #
3810
+ # * [GetInvocationStep][2]
3811
+ #
3812
+ # * [ListInvocationSteps][3]
3813
+ #
3814
+ # * [ListInvocations][4]
3815
+ #
3816
+ # * [ListSessions][4]
3817
+ #
3818
+ #
3819
+ #
3820
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
3821
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_GetInvocationStep.html
3822
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListInvocationSteps.html
3823
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_ListInvocations.html
3824
+ #
3825
+ # @option params [required, String] :invocation_identifier
3826
+ # The unique identifier (in UUID format) of the invocation to add the
3827
+ # invocation step to.
3828
+ #
3829
+ # @option params [String] :invocation_step_id
3830
+ # The unique identifier of the invocation step in UUID format.
3831
+ #
3832
+ # @option params [required, Time,DateTime,Date,Integer,String] :invocation_step_time
3833
+ # The timestamp for when the invocation step occurred.
3834
+ #
3835
+ # @option params [required, Types::InvocationStepPayload] :payload
3836
+ # The payload for the invocation step, including text and images for the
3837
+ # interaction.
3838
+ #
3839
+ # @option params [required, String] :session_identifier
3840
+ # The unique identifier for the session to add the invocation step to.
3841
+ # You can specify either the session's `sessionId` or its Amazon
3842
+ # Resource Name (ARN).
3843
+ #
3844
+ # @return [Types::PutInvocationStepResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3845
+ #
3846
+ # * {Types::PutInvocationStepResponse#invocation_step_id #invocation_step_id} => String
3847
+ #
3848
+ # @example Request syntax with placeholder values
3849
+ #
3850
+ # resp = client.put_invocation_step({
3851
+ # invocation_identifier: "InvocationIdentifier", # required
3852
+ # invocation_step_id: "Uuid",
3853
+ # invocation_step_time: Time.now, # required
3854
+ # payload: { # required
3855
+ # content_blocks: [
3856
+ # {
3857
+ # image: {
3858
+ # format: "png", # required, accepts png, jpeg, gif, webp
3859
+ # source: { # required
3860
+ # bytes: "data",
3861
+ # s3_location: {
3862
+ # uri: "S3Uri", # required
3863
+ # },
3864
+ # },
3865
+ # },
3866
+ # text: "BedrockSessionContentBlockTextString",
3867
+ # },
3868
+ # ],
3869
+ # },
3870
+ # session_identifier: "SessionIdentifier", # required
3871
+ # })
3872
+ #
3873
+ # @example Response structure
3874
+ #
3875
+ # resp.invocation_step_id #=> String
3876
+ #
3877
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PutInvocationStep AWS API Documentation
3878
+ #
3879
+ # @overload put_invocation_step(params = {})
3880
+ # @param [Hash] params ({})
3881
+ def put_invocation_step(params = {}, options = {})
3882
+ req = build_request(:put_invocation_step, params)
3883
+ req.send_request(options)
3884
+ end
3885
+
3268
3886
  # Reranks the relevance of sources based on queries. For more
3269
3887
  # information, see [Improve the relevance of query responses with a
3270
3888
  # reranker model][1].
@@ -4387,6 +5005,118 @@ module Aws::BedrockAgentRuntime
4387
5005
  req.send_request(options, &block)
4388
5006
  end
4389
5007
 
5008
+ # Associate tags with a resource. For more information, see [Tagging
5009
+ # resources][1] in the Amazon Bedrock User Guide.
5010
+ #
5011
+ #
5012
+ #
5013
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html
5014
+ #
5015
+ # @option params [required, String] :resource_arn
5016
+ # The Amazon Resource Name (ARN) of the resource to tag.
5017
+ #
5018
+ # @option params [required, Hash<String,String>] :tags
5019
+ # An object containing key-value pairs that define the tags to attach to
5020
+ # the resource.
5021
+ #
5022
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5023
+ #
5024
+ # @example Request syntax with placeholder values
5025
+ #
5026
+ # resp = client.tag_resource({
5027
+ # resource_arn: "TaggableResourcesArn", # required
5028
+ # tags: { # required
5029
+ # "TagKey" => "TagValue",
5030
+ # },
5031
+ # })
5032
+ #
5033
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/TagResource AWS API Documentation
5034
+ #
5035
+ # @overload tag_resource(params = {})
5036
+ # @param [Hash] params ({})
5037
+ def tag_resource(params = {}, options = {})
5038
+ req = build_request(:tag_resource, params)
5039
+ req.send_request(options)
5040
+ end
5041
+
5042
+ # Remove tags from a resource.
5043
+ #
5044
+ # @option params [required, String] :resource_arn
5045
+ # The Amazon Resource Name (ARN) of the resource from which to remove
5046
+ # tags.
5047
+ #
5048
+ # @option params [required, Array<String>] :tag_keys
5049
+ # A list of keys of the tags to remove from the resource.
5050
+ #
5051
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5052
+ #
5053
+ # @example Request syntax with placeholder values
5054
+ #
5055
+ # resp = client.untag_resource({
5056
+ # resource_arn: "TaggableResourcesArn", # required
5057
+ # tag_keys: ["TagKey"], # required
5058
+ # })
5059
+ #
5060
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/UntagResource AWS API Documentation
5061
+ #
5062
+ # @overload untag_resource(params = {})
5063
+ # @param [Hash] params ({})
5064
+ def untag_resource(params = {}, options = {})
5065
+ req = build_request(:untag_resource, params)
5066
+ req.send_request(options)
5067
+ end
5068
+
5069
+ # Updates the metadata or encryption settings of a session. For more
5070
+ # information about sessions, see [Store and retrieve conversation
5071
+ # history and context with Amazon Bedrock sessions][1].
5072
+ #
5073
+ #
5074
+ #
5075
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html
5076
+ #
5077
+ # @option params [required, String] :session_identifier
5078
+ # The unique identifier of the session to modify. You can specify either
5079
+ # the session's `sessionId` or its Amazon Resource Name (ARN).
5080
+ #
5081
+ # @option params [Hash<String,String>] :session_metadata
5082
+ # A map of key-value pairs containing attributes to be persisted across
5083
+ # the session. For example the user's ID, their language preference,
5084
+ # and the type of device they are using.
5085
+ #
5086
+ # @return [Types::UpdateSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5087
+ #
5088
+ # * {Types::UpdateSessionResponse#created_at #created_at} => Time
5089
+ # * {Types::UpdateSessionResponse#last_updated_at #last_updated_at} => Time
5090
+ # * {Types::UpdateSessionResponse#session_arn #session_arn} => String
5091
+ # * {Types::UpdateSessionResponse#session_id #session_id} => String
5092
+ # * {Types::UpdateSessionResponse#session_status #session_status} => String
5093
+ #
5094
+ # @example Request syntax with placeholder values
5095
+ #
5096
+ # resp = client.update_session({
5097
+ # session_identifier: "SessionIdentifier", # required
5098
+ # session_metadata: {
5099
+ # "SessionMetadataKey" => "SessionMetadataValue",
5100
+ # },
5101
+ # })
5102
+ #
5103
+ # @example Response structure
5104
+ #
5105
+ # resp.created_at #=> Time
5106
+ # resp.last_updated_at #=> Time
5107
+ # resp.session_arn #=> String
5108
+ # resp.session_id #=> String
5109
+ # resp.session_status #=> String, one of "ACTIVE", "EXPIRED", "ENDED"
5110
+ #
5111
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/UpdateSession AWS API Documentation
5112
+ #
5113
+ # @overload update_session(params = {})
5114
+ # @param [Hash] params ({})
5115
+ def update_session(params = {}, options = {})
5116
+ req = build_request(:update_session, params)
5117
+ req.send_request(options)
5118
+ end
5119
+
4390
5120
  # @!endgroup
4391
5121
 
4392
5122
  # @param params ({})
@@ -4405,7 +5135,7 @@ module Aws::BedrockAgentRuntime
4405
5135
  tracer: tracer
4406
5136
  )
4407
5137
  context[:gem_name] = 'aws-sdk-bedrockagentruntime'
4408
- context[:gem_version] = '1.46.0'
5138
+ context[:gem_version] = '1.47.0'
4409
5139
  Seahorse::Client::Request.new(handlers, context)
4410
5140
  end
4411
5141