aws-sdk-bedrock 1.82.0 → 1.83.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrock/client.rb +245 -1
- data/lib/aws-sdk-bedrock/client_api.rb +202 -0
- data/lib/aws-sdk-bedrock/types.rb +403 -0
- data/lib/aws-sdk-bedrock.rb +2 -2
- data/sig/client.rbs +92 -0
- data/sig/types.rbs +117 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1935b53ed1547d1f15529aa704303adf78db06c4803afb55a96da60c5966ec34
|
|
4
|
+
data.tar.gz: 9456b97b7f7e9f93f63747902d557f49b4495a6b66f2897d6d5617e6bbfb6dd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a855fe7fb32ceffa9f8aace77ddb3f5ed8384964124c7a55dc4e3d577f61021b9087c47be81d80af0af7f690be803afb3c10385322df6b3e44f37ef624f0a11d
|
|
7
|
+
data.tar.gz: c4add5c87e06ea50fb089b3edaf2172ea976dd0c29bdefb9636b2dace9bc74a63ca8a4d6dc49c907679596bac3054e71f424c241ab721c52ec78b07507206557
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
1.83.0 (2026-05-14)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Feature - Advanced Prompt Optimization (AdvPO) allows you to optimize and migrate your prompts for any model on Bedrock by automatically evaluating responses and rewriting prompts to improve performance. This release provides a programmatic way to create, get, list, stop, and delete AdvPO jobs.
|
|
8
|
+
|
|
4
9
|
1.82.0 (2026-05-13)
|
|
5
10
|
------------------
|
|
6
11
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.83.0
|
|
@@ -478,6 +478,41 @@ module Aws::Bedrock
|
|
|
478
478
|
|
|
479
479
|
# @!group API Operations
|
|
480
480
|
|
|
481
|
+
# Batch delete the specified advanced prompt optimization jobs.
|
|
482
|
+
#
|
|
483
|
+
# @option params [required, Array<String>] :job_identifiers
|
|
484
|
+
# List of advanced prompt optimization job identifiers to delete.
|
|
485
|
+
#
|
|
486
|
+
# @return [Types::BatchDeleteAdvancedPromptOptimizationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
487
|
+
#
|
|
488
|
+
# * {Types::BatchDeleteAdvancedPromptOptimizationJobResponse#errors #errors} => Array<Types::BatchDeleteAdvancedPromptOptimizationJobError>
|
|
489
|
+
# * {Types::BatchDeleteAdvancedPromptOptimizationJobResponse#advanced_prompt_optimization_jobs #advanced_prompt_optimization_jobs} => Array<Types::BatchDeleteAdvancedPromptOptimizationJobItem>
|
|
490
|
+
#
|
|
491
|
+
# @example Request syntax with placeholder values
|
|
492
|
+
#
|
|
493
|
+
# resp = client.batch_delete_advanced_prompt_optimization_job({
|
|
494
|
+
# job_identifiers: ["AdvancedPromptOptimizationJobIdentifier"], # required
|
|
495
|
+
# })
|
|
496
|
+
#
|
|
497
|
+
# @example Response structure
|
|
498
|
+
#
|
|
499
|
+
# resp.errors #=> Array
|
|
500
|
+
# resp.errors[0].job_identifier #=> String
|
|
501
|
+
# resp.errors[0].code #=> String
|
|
502
|
+
# resp.errors[0].message #=> String
|
|
503
|
+
# resp.advanced_prompt_optimization_jobs #=> Array
|
|
504
|
+
# resp.advanced_prompt_optimization_jobs[0].job_identifier #=> String
|
|
505
|
+
# resp.advanced_prompt_optimization_jobs[0].job_status #=> String, one of "InProgress", "Completed", "Failed", "PartiallyCompleted", "Stopping", "Stopped", "Deleting"
|
|
506
|
+
#
|
|
507
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/BatchDeleteAdvancedPromptOptimizationJob AWS API Documentation
|
|
508
|
+
#
|
|
509
|
+
# @overload batch_delete_advanced_prompt_optimization_job(params = {})
|
|
510
|
+
# @param [Hash] params ({})
|
|
511
|
+
def batch_delete_advanced_prompt_optimization_job(params = {}, options = {})
|
|
512
|
+
req = build_request(:batch_delete_advanced_prompt_optimization_job, params)
|
|
513
|
+
req.send_request(options)
|
|
514
|
+
end
|
|
515
|
+
|
|
481
516
|
# Deletes a batch of evaluation jobs. An evaluation job can only be
|
|
482
517
|
# deleted if it has following status `FAILED`, `COMPLETED`, and
|
|
483
518
|
# `STOPPED`. You can request up to 25 model evaluation jobs be deleted
|
|
@@ -577,6 +612,88 @@ module Aws::Bedrock
|
|
|
577
612
|
req.send_request(options)
|
|
578
613
|
end
|
|
579
614
|
|
|
615
|
+
# Creates an asynchronous batch job for advanced prompt optimization.
|
|
616
|
+
#
|
|
617
|
+
# @option params [required, String] :job_name
|
|
618
|
+
# Name of the advanced prompt optimization job.
|
|
619
|
+
#
|
|
620
|
+
# @option params [String] :job_description
|
|
621
|
+
# Description of the advanced prompt optimization job.
|
|
622
|
+
#
|
|
623
|
+
# @option params [String] :client_token
|
|
624
|
+
# Idempotency token for the request.
|
|
625
|
+
#
|
|
626
|
+
# **A suitable default value is auto-generated.** You should normally
|
|
627
|
+
# not need to pass this option.**
|
|
628
|
+
#
|
|
629
|
+
# @option params [required, Types::AdvancedPromptOptimizationInputConfig] :input_config
|
|
630
|
+
# Input data configuration for the advanced prompt optimization job.
|
|
631
|
+
#
|
|
632
|
+
# @option params [required, Types::AdvancedPromptOptimizationOutputConfig] :output_config
|
|
633
|
+
# Output data configuration for the advanced prompt optimization job.
|
|
634
|
+
#
|
|
635
|
+
# @option params [String] :encryption_key_arn
|
|
636
|
+
# KMS key ARN for encrypting output data.
|
|
637
|
+
#
|
|
638
|
+
# @option params [Array<Types::Tag>] :tags
|
|
639
|
+
# Tags to associate with the job.
|
|
640
|
+
#
|
|
641
|
+
# @option params [required, Array<Types::ModelConfiguration>] :model_configurations
|
|
642
|
+
# Model configurations for advanced prompt optimization.
|
|
643
|
+
#
|
|
644
|
+
# @return [Types::CreateAdvancedPromptOptimizationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
645
|
+
#
|
|
646
|
+
# * {Types::CreateAdvancedPromptOptimizationJobResponse#job_arn #job_arn} => String
|
|
647
|
+
#
|
|
648
|
+
# @example Request syntax with placeholder values
|
|
649
|
+
#
|
|
650
|
+
# resp = client.create_advanced_prompt_optimization_job({
|
|
651
|
+
# job_name: "AdvancedPromptOptimizationJobName", # required
|
|
652
|
+
# job_description: "AdvancedPromptOptimizationJobDescription",
|
|
653
|
+
# client_token: "IdempotencyToken",
|
|
654
|
+
# input_config: { # required
|
|
655
|
+
# s3_uri: "S3Uri", # required
|
|
656
|
+
# },
|
|
657
|
+
# output_config: { # required
|
|
658
|
+
# s3_uri: "S3UriFolder", # required
|
|
659
|
+
# },
|
|
660
|
+
# encryption_key_arn: "KmsKeyArn",
|
|
661
|
+
# tags: [
|
|
662
|
+
# {
|
|
663
|
+
# key: "TagKey", # required
|
|
664
|
+
# value: "TagValue", # required
|
|
665
|
+
# },
|
|
666
|
+
# ],
|
|
667
|
+
# model_configurations: [ # required
|
|
668
|
+
# {
|
|
669
|
+
# model_id: "BedrockModelId", # required
|
|
670
|
+
# inference_config: {
|
|
671
|
+
# max_tokens: 1,
|
|
672
|
+
# temperature: 1.0,
|
|
673
|
+
# top_p: 1.0,
|
|
674
|
+
# stop_sequences: ["InferenceConfigurationStopSequencesListMemberString"],
|
|
675
|
+
# },
|
|
676
|
+
# additional_model_request_fields: {
|
|
677
|
+
# "AdditionalModelRequestFieldsKey" => {
|
|
678
|
+
# },
|
|
679
|
+
# },
|
|
680
|
+
# },
|
|
681
|
+
# ],
|
|
682
|
+
# })
|
|
683
|
+
#
|
|
684
|
+
# @example Response structure
|
|
685
|
+
#
|
|
686
|
+
# resp.job_arn #=> String
|
|
687
|
+
#
|
|
688
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateAdvancedPromptOptimizationJob AWS API Documentation
|
|
689
|
+
#
|
|
690
|
+
# @overload create_advanced_prompt_optimization_job(params = {})
|
|
691
|
+
# @param [Hash] params ({})
|
|
692
|
+
def create_advanced_prompt_optimization_job(params = {}, options = {})
|
|
693
|
+
req = build_request(:create_advanced_prompt_optimization_job, params)
|
|
694
|
+
req.send_request(options)
|
|
695
|
+
end
|
|
696
|
+
|
|
580
697
|
# Creates an Automated Reasoning policy for Amazon Bedrock Guardrails.
|
|
581
698
|
# Automated Reasoning policies use mathematical techniques to detect
|
|
582
699
|
# hallucinations, suggest corrections, and highlight unstated
|
|
@@ -3275,6 +3392,62 @@ module Aws::Bedrock
|
|
|
3275
3392
|
req.send_request(options)
|
|
3276
3393
|
end
|
|
3277
3394
|
|
|
3395
|
+
# Retrieves the details and status of an advanced prompt optimization
|
|
3396
|
+
# job.
|
|
3397
|
+
#
|
|
3398
|
+
# @option params [required, String] :job_identifier
|
|
3399
|
+
# ARN or ID of the advanced prompt optimization job.
|
|
3400
|
+
#
|
|
3401
|
+
# @return [Types::GetAdvancedPromptOptimizationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
3402
|
+
#
|
|
3403
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#job_arn #job_arn} => String
|
|
3404
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#job_name #job_name} => String
|
|
3405
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#job_description #job_description} => String
|
|
3406
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#job_status #job_status} => String
|
|
3407
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#input_config #input_config} => Types::AdvancedPromptOptimizationInputConfig
|
|
3408
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#output_config #output_config} => Types::AdvancedPromptOptimizationOutputConfig
|
|
3409
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#encryption_key_arn #encryption_key_arn} => String
|
|
3410
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#creation_time #creation_time} => Time
|
|
3411
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#last_modified_time #last_modified_time} => Time
|
|
3412
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#failure_message #failure_message} => String
|
|
3413
|
+
# * {Types::GetAdvancedPromptOptimizationJobResponse#model_configurations #model_configurations} => Array<Types::ModelConfiguration>
|
|
3414
|
+
#
|
|
3415
|
+
# @example Request syntax with placeholder values
|
|
3416
|
+
#
|
|
3417
|
+
# resp = client.get_advanced_prompt_optimization_job({
|
|
3418
|
+
# job_identifier: "AdvancedPromptOptimizationJobIdentifier", # required
|
|
3419
|
+
# })
|
|
3420
|
+
#
|
|
3421
|
+
# @example Response structure
|
|
3422
|
+
#
|
|
3423
|
+
# resp.job_arn #=> String
|
|
3424
|
+
# resp.job_name #=> String
|
|
3425
|
+
# resp.job_description #=> String
|
|
3426
|
+
# resp.job_status #=> String, one of "InProgress", "Completed", "Failed", "PartiallyCompleted", "Stopping", "Stopped", "Deleting"
|
|
3427
|
+
# resp.input_config.s3_uri #=> String
|
|
3428
|
+
# resp.output_config.s3_uri #=> String
|
|
3429
|
+
# resp.encryption_key_arn #=> String
|
|
3430
|
+
# resp.creation_time #=> Time
|
|
3431
|
+
# resp.last_modified_time #=> Time
|
|
3432
|
+
# resp.failure_message #=> String
|
|
3433
|
+
# resp.model_configurations #=> Array
|
|
3434
|
+
# resp.model_configurations[0].model_id #=> String
|
|
3435
|
+
# resp.model_configurations[0].inference_config.max_tokens #=> Integer
|
|
3436
|
+
# resp.model_configurations[0].inference_config.temperature #=> Float
|
|
3437
|
+
# resp.model_configurations[0].inference_config.top_p #=> Float
|
|
3438
|
+
# resp.model_configurations[0].inference_config.stop_sequences #=> Array
|
|
3439
|
+
# resp.model_configurations[0].inference_config.stop_sequences[0] #=> String
|
|
3440
|
+
# resp.model_configurations[0].additional_model_request_fields #=> Hash
|
|
3441
|
+
#
|
|
3442
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetAdvancedPromptOptimizationJob AWS API Documentation
|
|
3443
|
+
#
|
|
3444
|
+
# @overload get_advanced_prompt_optimization_job(params = {})
|
|
3445
|
+
# @param [Hash] params ({})
|
|
3446
|
+
def get_advanced_prompt_optimization_job(params = {}, options = {})
|
|
3447
|
+
req = build_request(:get_advanced_prompt_optimization_job, params)
|
|
3448
|
+
req.send_request(options)
|
|
3449
|
+
end
|
|
3450
|
+
|
|
3278
3451
|
# Retrieves details about an Automated Reasoning policy or policy
|
|
3279
3452
|
# version. Returns information including the policy definition,
|
|
3280
3453
|
# metadata, and timestamps.
|
|
@@ -5107,6 +5280,55 @@ module Aws::Bedrock
|
|
|
5107
5280
|
req.send_request(options)
|
|
5108
5281
|
end
|
|
5109
5282
|
|
|
5283
|
+
# Lists all advanced prompt optimization jobs for the account.
|
|
5284
|
+
#
|
|
5285
|
+
# @option params [Integer] :max_results
|
|
5286
|
+
# Maximum number of results to return.
|
|
5287
|
+
#
|
|
5288
|
+
# @option params [String] :next_token
|
|
5289
|
+
# Pagination token for the next page of results.
|
|
5290
|
+
#
|
|
5291
|
+
# @option params [String] :sort_by
|
|
5292
|
+
# Field to sort by in the returned list of jobs.
|
|
5293
|
+
#
|
|
5294
|
+
# @option params [String] :sort_order
|
|
5295
|
+
# Sort order for the results.
|
|
5296
|
+
#
|
|
5297
|
+
# @return [Types::ListAdvancedPromptOptimizationJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
5298
|
+
#
|
|
5299
|
+
# * {Types::ListAdvancedPromptOptimizationJobsResponse#job_summaries #job_summaries} => Array<Types::AdvancedPromptOptimizationJobSummary>
|
|
5300
|
+
# * {Types::ListAdvancedPromptOptimizationJobsResponse#next_token #next_token} => String
|
|
5301
|
+
#
|
|
5302
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
5303
|
+
#
|
|
5304
|
+
# @example Request syntax with placeholder values
|
|
5305
|
+
#
|
|
5306
|
+
# resp = client.list_advanced_prompt_optimization_jobs({
|
|
5307
|
+
# max_results: 1,
|
|
5308
|
+
# next_token: "PaginationToken",
|
|
5309
|
+
# sort_by: "CreationTime", # accepts CreationTime
|
|
5310
|
+
# sort_order: "Ascending", # accepts Ascending, Descending
|
|
5311
|
+
# })
|
|
5312
|
+
#
|
|
5313
|
+
# @example Response structure
|
|
5314
|
+
#
|
|
5315
|
+
# resp.job_summaries #=> Array
|
|
5316
|
+
# resp.job_summaries[0].job_arn #=> String
|
|
5317
|
+
# resp.job_summaries[0].job_name #=> String
|
|
5318
|
+
# resp.job_summaries[0].job_status #=> String, one of "InProgress", "Completed", "Failed", "PartiallyCompleted", "Stopping", "Stopped", "Deleting"
|
|
5319
|
+
# resp.job_summaries[0].creation_time #=> Time
|
|
5320
|
+
# resp.job_summaries[0].last_modified_time #=> Time
|
|
5321
|
+
# resp.next_token #=> String
|
|
5322
|
+
#
|
|
5323
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListAdvancedPromptOptimizationJobs AWS API Documentation
|
|
5324
|
+
#
|
|
5325
|
+
# @overload list_advanced_prompt_optimization_jobs(params = {})
|
|
5326
|
+
# @param [Hash] params ({})
|
|
5327
|
+
def list_advanced_prompt_optimization_jobs(params = {}, options = {})
|
|
5328
|
+
req = build_request(:list_advanced_prompt_optimization_jobs, params)
|
|
5329
|
+
req.send_request(options)
|
|
5330
|
+
end
|
|
5331
|
+
|
|
5110
5332
|
# Lists all Automated Reasoning policies in your account, with optional
|
|
5111
5333
|
# filtering by policy ARN. This helps you manage and discover existing
|
|
5112
5334
|
# policies.
|
|
@@ -7190,6 +7412,28 @@ module Aws::Bedrock
|
|
|
7190
7412
|
req.send_request(options)
|
|
7191
7413
|
end
|
|
7192
7414
|
|
|
7415
|
+
# Stops an in-progress advanced prompt optimization job.
|
|
7416
|
+
#
|
|
7417
|
+
# @option params [required, String] :job_identifier
|
|
7418
|
+
# ARN or ID of the advanced prompt optimization job to stop.
|
|
7419
|
+
#
|
|
7420
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
|
7421
|
+
#
|
|
7422
|
+
# @example Request syntax with placeholder values
|
|
7423
|
+
#
|
|
7424
|
+
# resp = client.stop_advanced_prompt_optimization_job({
|
|
7425
|
+
# job_identifier: "AdvancedPromptOptimizationJobIdentifier", # required
|
|
7426
|
+
# })
|
|
7427
|
+
#
|
|
7428
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/StopAdvancedPromptOptimizationJob AWS API Documentation
|
|
7429
|
+
#
|
|
7430
|
+
# @overload stop_advanced_prompt_optimization_job(params = {})
|
|
7431
|
+
# @param [Hash] params ({})
|
|
7432
|
+
def stop_advanced_prompt_optimization_job(params = {}, options = {})
|
|
7433
|
+
req = build_request(:stop_advanced_prompt_optimization_job, params)
|
|
7434
|
+
req.send_request(options)
|
|
7435
|
+
end
|
|
7436
|
+
|
|
7193
7437
|
# Stops an evaluation job that is current being created or running.
|
|
7194
7438
|
#
|
|
7195
7439
|
# @option params [required, String] :job_identifier
|
|
@@ -8002,7 +8246,7 @@ module Aws::Bedrock
|
|
|
8002
8246
|
tracer: tracer
|
|
8003
8247
|
)
|
|
8004
8248
|
context[:gem_name] = 'aws-sdk-bedrock'
|
|
8005
|
-
context[:gem_version] = '1.
|
|
8249
|
+
context[:gem_version] = '1.83.0'
|
|
8006
8250
|
Seahorse::Client::Request.new(handlers, context)
|
|
8007
8251
|
end
|
|
8008
8252
|
|