aws-sdk-bedrock 1.4.0 → 1.5.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 +1068 -96
- data/lib/aws-sdk-bedrock/client_api.rb +617 -0
- data/lib/aws-sdk-bedrock/endpoints.rb +140 -0
- data/lib/aws-sdk-bedrock/plugins/endpoints.rb +20 -0
- data/lib/aws-sdk-bedrock/types.rb +2103 -320
- data/lib/aws-sdk-bedrock.rb +2 -2
- data/sig/client.rbs +322 -0
- data/sig/types.rbs +414 -0
- metadata +2 -2
@@ -388,49 +388,434 @@ module Aws::Bedrock
|
|
388
388
|
|
389
389
|
# @!group API Operations
|
390
390
|
|
391
|
+
# API operation for creating and managing Amazon Bedrock automatic model
|
392
|
+
# evaluation jobs and model evaluation jobs that use human workers. To
|
393
|
+
# learn more about the requirements for creating a model evaluation job
|
394
|
+
# see, [Model evaluations][1].
|
395
|
+
#
|
396
|
+
#
|
397
|
+
#
|
398
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation.html
|
399
|
+
#
|
400
|
+
# @option params [required, String] :job_name
|
401
|
+
# The name of the model evaluation job. Model evaluation job names must
|
402
|
+
# unique with your AWS account, and your account's AWS region.
|
403
|
+
#
|
404
|
+
# @option params [String] :job_description
|
405
|
+
# A description of the model evaluation job.
|
406
|
+
#
|
407
|
+
# @option params [String] :client_request_token
|
408
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
409
|
+
# completes no more than one time. If this token matches a previous
|
410
|
+
# request, Amazon Bedrock ignores the request, but does not return an
|
411
|
+
# error. For more information, see [Ensuring idempotency][1].
|
412
|
+
#
|
413
|
+
# **A suitable default value is auto-generated.** You should normally
|
414
|
+
# not need to pass this option.**
|
415
|
+
#
|
416
|
+
#
|
417
|
+
#
|
418
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
|
419
|
+
#
|
420
|
+
# @option params [required, String] :role_arn
|
421
|
+
# The Amazon Resource Name (ARN) of an IAM service role that Amazon
|
422
|
+
# Bedrock can assume to perform tasks on your behalf. The service role
|
423
|
+
# must have Amazon Bedrock as the service principal, and provide access
|
424
|
+
# to any Amazon S3 buckets specified in the `EvaluationConfig` object.
|
425
|
+
# To pass this role to Amazon Bedrock, the caller of this API must have
|
426
|
+
# the `iam:PassRole` permission. To learn more about the required
|
427
|
+
# permissions, see [Required permissions][1].
|
428
|
+
#
|
429
|
+
#
|
430
|
+
#
|
431
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-security.html
|
432
|
+
#
|
433
|
+
# @option params [String] :customer_encryption_key_id
|
434
|
+
# Specify your customer managed key ARN that will be used to encrypt
|
435
|
+
# your model evaluation job.
|
436
|
+
#
|
437
|
+
# @option params [Array<Types::Tag>] :job_tags
|
438
|
+
# Tags to attach to the model evaluation job.
|
439
|
+
#
|
440
|
+
# @option params [required, Types::EvaluationConfig] :evaluation_config
|
441
|
+
# Specifies whether the model evaluation job is automatic or uses human
|
442
|
+
# worker.
|
443
|
+
#
|
444
|
+
# @option params [required, Types::EvaluationInferenceConfig] :inference_config
|
445
|
+
# Specify the models you want to use in your model evaluation job.
|
446
|
+
# Automatic model evaluation jobs support a single model, and model
|
447
|
+
# evaluation job that use human workers support two models.
|
448
|
+
#
|
449
|
+
# @option params [required, Types::EvaluationOutputDataConfig] :output_data_config
|
450
|
+
# An object that defines where the results of model evaluation job will
|
451
|
+
# be saved in Amazon S3.
|
452
|
+
#
|
453
|
+
# @return [Types::CreateEvaluationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
454
|
+
#
|
455
|
+
# * {Types::CreateEvaluationJobResponse#job_arn #job_arn} => String
|
456
|
+
#
|
457
|
+
# @example Request syntax with placeholder values
|
458
|
+
#
|
459
|
+
# resp = client.create_evaluation_job({
|
460
|
+
# job_name: "EvaluationJobName", # required
|
461
|
+
# job_description: "EvaluationJobDescription",
|
462
|
+
# client_request_token: "IdempotencyToken",
|
463
|
+
# role_arn: "RoleArn", # required
|
464
|
+
# customer_encryption_key_id: "KmsKeyId",
|
465
|
+
# job_tags: [
|
466
|
+
# {
|
467
|
+
# key: "TagKey", # required
|
468
|
+
# value: "TagValue", # required
|
469
|
+
# },
|
470
|
+
# ],
|
471
|
+
# evaluation_config: { # required
|
472
|
+
# automated: {
|
473
|
+
# dataset_metric_configs: [ # required
|
474
|
+
# {
|
475
|
+
# task_type: "Summarization", # required, accepts Summarization, Classification, QuestionAndAnswer, Generation, Custom
|
476
|
+
# dataset: { # required
|
477
|
+
# name: "EvaluationDatasetName", # required
|
478
|
+
# dataset_location: {
|
479
|
+
# s3_uri: "S3Uri",
|
480
|
+
# },
|
481
|
+
# },
|
482
|
+
# metric_names: ["EvaluationMetricName"], # required
|
483
|
+
# },
|
484
|
+
# ],
|
485
|
+
# },
|
486
|
+
# human: {
|
487
|
+
# human_workflow_config: {
|
488
|
+
# flow_definition_arn: "SageMakerFlowDefinitionArn", # required
|
489
|
+
# instructions: "HumanTaskInstructions",
|
490
|
+
# },
|
491
|
+
# custom_metrics: [
|
492
|
+
# {
|
493
|
+
# name: "EvaluationMetricName", # required
|
494
|
+
# description: "EvaluationMetricDescription",
|
495
|
+
# rating_method: "EvaluationRatingMethod", # required
|
496
|
+
# },
|
497
|
+
# ],
|
498
|
+
# dataset_metric_configs: [ # required
|
499
|
+
# {
|
500
|
+
# task_type: "Summarization", # required, accepts Summarization, Classification, QuestionAndAnswer, Generation, Custom
|
501
|
+
# dataset: { # required
|
502
|
+
# name: "EvaluationDatasetName", # required
|
503
|
+
# dataset_location: {
|
504
|
+
# s3_uri: "S3Uri",
|
505
|
+
# },
|
506
|
+
# },
|
507
|
+
# metric_names: ["EvaluationMetricName"], # required
|
508
|
+
# },
|
509
|
+
# ],
|
510
|
+
# },
|
511
|
+
# },
|
512
|
+
# inference_config: { # required
|
513
|
+
# models: [
|
514
|
+
# {
|
515
|
+
# bedrock_model: {
|
516
|
+
# model_identifier: "EvaluationModelIdentifier", # required
|
517
|
+
# inference_params: "EvaluationModelInferenceParams", # required
|
518
|
+
# },
|
519
|
+
# },
|
520
|
+
# ],
|
521
|
+
# },
|
522
|
+
# output_data_config: { # required
|
523
|
+
# s3_uri: "S3Uri", # required
|
524
|
+
# },
|
525
|
+
# })
|
526
|
+
#
|
527
|
+
# @example Response structure
|
528
|
+
#
|
529
|
+
# resp.job_arn #=> String
|
530
|
+
#
|
531
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateEvaluationJob AWS API Documentation
|
532
|
+
#
|
533
|
+
# @overload create_evaluation_job(params = {})
|
534
|
+
# @param [Hash] params ({})
|
535
|
+
def create_evaluation_job(params = {}, options = {})
|
536
|
+
req = build_request(:create_evaluation_job, params)
|
537
|
+
req.send_request(options)
|
538
|
+
end
|
539
|
+
|
540
|
+
# Creates a guardrail to block topics and to filter out harmful content.
|
541
|
+
#
|
542
|
+
# * Specify a `name` and optional `description`.
|
543
|
+
#
|
544
|
+
# * Specify messages for when the guardrail successfully blocks a prompt
|
545
|
+
# or a model response in the `blockedInputMessaging` and
|
546
|
+
# `blockedOutputsMessaging` fields.
|
547
|
+
#
|
548
|
+
# * Specify topics for the guardrail to deny in the `topicPolicyConfig`
|
549
|
+
# object. Each [GuardrailTopicConfig][1] object in the `topicsConfig`
|
550
|
+
# list pertains to one topic.
|
551
|
+
#
|
552
|
+
# * Give a `name` and `description` so that the guardrail can properly
|
553
|
+
# identify the topic.
|
554
|
+
#
|
555
|
+
# * Specify `DENY` in the `type` field.
|
556
|
+
#
|
557
|
+
# * (Optional) Provide up to five prompts that you would categorize as
|
558
|
+
# belonging to the topic in the `examples` list.
|
559
|
+
#
|
560
|
+
# * Specify filter strengths for the harmful categories defined in
|
561
|
+
# Amazon Bedrock in the `contentPolicyConfig` object. Each
|
562
|
+
# [GuardrailContentFilterConfig][2] object in the `filtersConfig` list
|
563
|
+
# pertains to a harmful category. For more information, see [Content
|
564
|
+
# filters][3]. For more information about the fields in a content
|
565
|
+
# filter, see [GuardrailContentFilterConfig][2].
|
566
|
+
#
|
567
|
+
# * Specify the category in the `type` field.
|
568
|
+
#
|
569
|
+
# * Specify the strength of the filter for prompts in the
|
570
|
+
# `inputStrength` field and for model responses in the `strength`
|
571
|
+
# field of the [GuardrailContentFilterConfig][2].
|
572
|
+
#
|
573
|
+
# * (Optional) For security, include the ARN of a KMS key in the
|
574
|
+
# `kmsKeyId` field.
|
575
|
+
#
|
576
|
+
# * (Optional) Attach any tags to the guardrail in the `tags` object.
|
577
|
+
# For more information, see [Tag resources][4].
|
578
|
+
#
|
579
|
+
#
|
580
|
+
#
|
581
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailTopicConfig.html
|
582
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html
|
583
|
+
# [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-filters
|
584
|
+
# [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging
|
585
|
+
#
|
586
|
+
# @option params [required, String] :name
|
587
|
+
# The name to give the guardrail.
|
588
|
+
#
|
589
|
+
# @option params [String] :description
|
590
|
+
# A description of the guardrail.
|
591
|
+
#
|
592
|
+
# @option params [Types::GuardrailTopicPolicyConfig] :topic_policy_config
|
593
|
+
# The topic policies to configure for the guardrail.
|
594
|
+
#
|
595
|
+
# @option params [Types::GuardrailContentPolicyConfig] :content_policy_config
|
596
|
+
# The content filter policies to configure for the guardrail.
|
597
|
+
#
|
598
|
+
# @option params [Types::GuardrailWordPolicyConfig] :word_policy_config
|
599
|
+
# The word policy you configure for the guardrail.
|
600
|
+
#
|
601
|
+
# @option params [Types::GuardrailSensitiveInformationPolicyConfig] :sensitive_information_policy_config
|
602
|
+
# The sensitive information policy to configure for the guardrail.
|
603
|
+
#
|
604
|
+
# @option params [required, String] :blocked_input_messaging
|
605
|
+
# The message to return when the guardrail blocks a prompt.
|
606
|
+
#
|
607
|
+
# @option params [required, String] :blocked_outputs_messaging
|
608
|
+
# The message to return when the guardrail blocks a model response.
|
609
|
+
#
|
610
|
+
# @option params [String] :kms_key_id
|
611
|
+
# The ARN of the KMS key that you use to encrypt the guardrail.
|
612
|
+
#
|
613
|
+
# @option params [Array<Types::Tag>] :tags
|
614
|
+
# The tags that you want to attach to the guardrail.
|
615
|
+
#
|
616
|
+
# @option params [String] :client_request_token
|
617
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
618
|
+
# completes no more than once. If this token matches a previous request,
|
619
|
+
# Amazon Bedrock ignores the request, but does not return an error. For
|
620
|
+
# more information, see [Ensuring idempotency][1] in the *Amazon S3 User
|
621
|
+
# Guide*.
|
622
|
+
#
|
623
|
+
# **A suitable default value is auto-generated.** You should normally
|
624
|
+
# not need to pass this option.**
|
625
|
+
#
|
626
|
+
#
|
627
|
+
#
|
628
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
|
629
|
+
#
|
630
|
+
# @return [Types::CreateGuardrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
631
|
+
#
|
632
|
+
# * {Types::CreateGuardrailResponse#guardrail_id #guardrail_id} => String
|
633
|
+
# * {Types::CreateGuardrailResponse#guardrail_arn #guardrail_arn} => String
|
634
|
+
# * {Types::CreateGuardrailResponse#version #version} => String
|
635
|
+
# * {Types::CreateGuardrailResponse#created_at #created_at} => Time
|
636
|
+
#
|
637
|
+
# @example Request syntax with placeholder values
|
638
|
+
#
|
639
|
+
# resp = client.create_guardrail({
|
640
|
+
# name: "GuardrailName", # required
|
641
|
+
# description: "GuardrailDescription",
|
642
|
+
# topic_policy_config: {
|
643
|
+
# topics_config: [ # required
|
644
|
+
# {
|
645
|
+
# name: "GuardrailTopicName", # required
|
646
|
+
# definition: "GuardrailTopicDefinition", # required
|
647
|
+
# examples: ["GuardrailTopicExample"],
|
648
|
+
# type: "DENY", # required, accepts DENY
|
649
|
+
# },
|
650
|
+
# ],
|
651
|
+
# },
|
652
|
+
# content_policy_config: {
|
653
|
+
# filters_config: [ # required
|
654
|
+
# {
|
655
|
+
# type: "SEXUAL", # required, accepts SEXUAL, VIOLENCE, HATE, INSULTS, MISCONDUCT, PROMPT_ATTACK
|
656
|
+
# input_strength: "NONE", # required, accepts NONE, LOW, MEDIUM, HIGH
|
657
|
+
# output_strength: "NONE", # required, accepts NONE, LOW, MEDIUM, HIGH
|
658
|
+
# },
|
659
|
+
# ],
|
660
|
+
# },
|
661
|
+
# word_policy_config: {
|
662
|
+
# words_config: [
|
663
|
+
# {
|
664
|
+
# text: "GuardrailWordConfigTextString", # required
|
665
|
+
# },
|
666
|
+
# ],
|
667
|
+
# managed_word_lists_config: [
|
668
|
+
# {
|
669
|
+
# type: "PROFANITY", # required, accepts PROFANITY
|
670
|
+
# },
|
671
|
+
# ],
|
672
|
+
# },
|
673
|
+
# sensitive_information_policy_config: {
|
674
|
+
# pii_entities_config: [
|
675
|
+
# {
|
676
|
+
# type: "ADDRESS", # required, accepts ADDRESS, AGE, AWS_ACCESS_KEY, AWS_SECRET_KEY, CA_HEALTH_NUMBER, CA_SOCIAL_INSURANCE_NUMBER, CREDIT_DEBIT_CARD_CVV, CREDIT_DEBIT_CARD_EXPIRY, CREDIT_DEBIT_CARD_NUMBER, DRIVER_ID, EMAIL, INTERNATIONAL_BANK_ACCOUNT_NUMBER, IP_ADDRESS, LICENSE_PLATE, MAC_ADDRESS, NAME, PASSWORD, PHONE, PIN, SWIFT_CODE, UK_NATIONAL_HEALTH_SERVICE_NUMBER, UK_NATIONAL_INSURANCE_NUMBER, UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER, URL, USERNAME, US_BANK_ACCOUNT_NUMBER, US_BANK_ROUTING_NUMBER, US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER, US_PASSPORT_NUMBER, US_SOCIAL_SECURITY_NUMBER, VEHICLE_IDENTIFICATION_NUMBER
|
677
|
+
# action: "BLOCK", # required, accepts BLOCK, ANONYMIZE
|
678
|
+
# },
|
679
|
+
# ],
|
680
|
+
# regexes_config: [
|
681
|
+
# {
|
682
|
+
# name: "GuardrailRegexConfigNameString", # required
|
683
|
+
# description: "GuardrailRegexConfigDescriptionString",
|
684
|
+
# pattern: "GuardrailRegexConfigPatternString", # required
|
685
|
+
# action: "BLOCK", # required, accepts BLOCK, ANONYMIZE
|
686
|
+
# },
|
687
|
+
# ],
|
688
|
+
# },
|
689
|
+
# blocked_input_messaging: "GuardrailBlockedMessaging", # required
|
690
|
+
# blocked_outputs_messaging: "GuardrailBlockedMessaging", # required
|
691
|
+
# kms_key_id: "KmsKeyId",
|
692
|
+
# tags: [
|
693
|
+
# {
|
694
|
+
# key: "TagKey", # required
|
695
|
+
# value: "TagValue", # required
|
696
|
+
# },
|
697
|
+
# ],
|
698
|
+
# client_request_token: "IdempotencyToken",
|
699
|
+
# })
|
700
|
+
#
|
701
|
+
# @example Response structure
|
702
|
+
#
|
703
|
+
# resp.guardrail_id #=> String
|
704
|
+
# resp.guardrail_arn #=> String
|
705
|
+
# resp.version #=> String
|
706
|
+
# resp.created_at #=> Time
|
707
|
+
#
|
708
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateGuardrail AWS API Documentation
|
709
|
+
#
|
710
|
+
# @overload create_guardrail(params = {})
|
711
|
+
# @param [Hash] params ({})
|
712
|
+
def create_guardrail(params = {}, options = {})
|
713
|
+
req = build_request(:create_guardrail, params)
|
714
|
+
req.send_request(options)
|
715
|
+
end
|
716
|
+
|
717
|
+
# Creates a version of the guardrail. Use this API to create a snapshot
|
718
|
+
# of the guardrail when you are satisfied with a configuration, or to
|
719
|
+
# compare the configuration with another version.
|
720
|
+
#
|
721
|
+
# @option params [required, String] :guardrail_identifier
|
722
|
+
# The unique identifier of the guardrail.
|
723
|
+
#
|
724
|
+
# @option params [String] :description
|
725
|
+
# A description of the guardrail version.
|
726
|
+
#
|
727
|
+
# @option params [String] :client_request_token
|
728
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
729
|
+
# completes no more than once. If this token matches a previous request,
|
730
|
+
# Amazon Bedrock ignores the request, but does not return an error. For
|
731
|
+
# more information, see [Ensuring idempotency][1] in the *Amazon S3 User
|
732
|
+
# Guide*.
|
733
|
+
#
|
734
|
+
# **A suitable default value is auto-generated.** You should normally
|
735
|
+
# not need to pass this option.**
|
736
|
+
#
|
737
|
+
#
|
738
|
+
#
|
739
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
|
740
|
+
#
|
741
|
+
# @return [Types::CreateGuardrailVersionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
742
|
+
#
|
743
|
+
# * {Types::CreateGuardrailVersionResponse#guardrail_id #guardrail_id} => String
|
744
|
+
# * {Types::CreateGuardrailVersionResponse#version #version} => String
|
745
|
+
#
|
746
|
+
# @example Request syntax with placeholder values
|
747
|
+
#
|
748
|
+
# resp = client.create_guardrail_version({
|
749
|
+
# guardrail_identifier: "GuardrailIdentifier", # required
|
750
|
+
# description: "GuardrailDescription",
|
751
|
+
# client_request_token: "IdempotencyToken",
|
752
|
+
# })
|
753
|
+
#
|
754
|
+
# @example Response structure
|
755
|
+
#
|
756
|
+
# resp.guardrail_id #=> String
|
757
|
+
# resp.version #=> String
|
758
|
+
#
|
759
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateGuardrailVersion AWS API Documentation
|
760
|
+
#
|
761
|
+
# @overload create_guardrail_version(params = {})
|
762
|
+
# @param [Hash] params ({})
|
763
|
+
def create_guardrail_version(params = {}, options = {})
|
764
|
+
req = build_request(:create_guardrail_version, params)
|
765
|
+
req.send_request(options)
|
766
|
+
end
|
767
|
+
|
391
768
|
# Creates a fine-tuning job to customize a base model.
|
392
769
|
#
|
393
770
|
# You specify the base foundation model and the location of the training
|
394
771
|
# data. After the model-customization job completes successfully, your
|
395
|
-
# custom model resource will be ready to use.
|
396
|
-
#
|
397
|
-
#
|
398
|
-
#
|
399
|
-
#
|
772
|
+
# custom model resource will be ready to use. Amazon Bedrock returns
|
773
|
+
# validation loss metrics and output generations after the job
|
774
|
+
# completes.
|
775
|
+
#
|
776
|
+
# For information on the format of training and validation data, see
|
777
|
+
# [Prepare the datasets][1].
|
400
778
|
#
|
401
779
|
# Model-customization jobs are asynchronous and the completion time
|
402
780
|
# depends on the base model and the training/validation data size. To
|
403
781
|
# monitor a job, use the `GetModelCustomizationJob` operation to
|
404
782
|
# retrieve the job status.
|
405
783
|
#
|
406
|
-
# For more information, see [Custom models][
|
407
|
-
# Guide.
|
784
|
+
# For more information, see [Custom models][2] in the Amazon Bedrock
|
785
|
+
# User Guide.
|
408
786
|
#
|
409
787
|
#
|
410
788
|
#
|
411
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/
|
789
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-prepare.html
|
790
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
|
412
791
|
#
|
413
792
|
# @option params [required, String] :job_name
|
414
|
-
#
|
793
|
+
# A name for the fine-tuning job.
|
415
794
|
#
|
416
795
|
# @option params [required, String] :custom_model_name
|
417
|
-
#
|
796
|
+
# A name for the resulting custom model.
|
418
797
|
#
|
419
798
|
# @option params [required, String] :role_arn
|
420
|
-
# The Amazon Resource Name (ARN) of an IAM role that Amazon
|
421
|
-
# assume to perform tasks on your behalf. For example,
|
422
|
-
# training, Amazon Bedrock needs your permission to read
|
423
|
-
# an S3 bucket, write model artifacts to an S3 bucket.
|
424
|
-
# to Amazon Bedrock, the caller of this API must have
|
425
|
-
# permission.
|
799
|
+
# The Amazon Resource Name (ARN) of an IAM service role that Amazon
|
800
|
+
# Bedrock can assume to perform tasks on your behalf. For example,
|
801
|
+
# during model training, Amazon Bedrock needs your permission to read
|
802
|
+
# input data from an S3 bucket, write model artifacts to an S3 bucket.
|
803
|
+
# To pass this role to Amazon Bedrock, the caller of this API must have
|
804
|
+
# the `iam:PassRole` permission.
|
426
805
|
#
|
427
806
|
# @option params [String] :client_request_token
|
428
|
-
#
|
429
|
-
#
|
807
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
808
|
+
# completes no more than one time. If this token matches a previous
|
809
|
+
# request, Amazon Bedrock ignores the request, but does not return an
|
810
|
+
# error. For more information, see [Ensuring idempotency][1].
|
430
811
|
#
|
431
812
|
# **A suitable default value is auto-generated.** You should normally
|
432
813
|
# not need to pass this option.**
|
433
814
|
#
|
815
|
+
#
|
816
|
+
#
|
817
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
|
818
|
+
#
|
434
819
|
# @option params [required, String] :base_model_identifier
|
435
820
|
# Name of the base model.
|
436
821
|
#
|
@@ -441,10 +826,10 @@ module Aws::Bedrock
|
|
441
826
|
# The custom model is encrypted at rest using this key.
|
442
827
|
#
|
443
828
|
# @option params [Array<Types::Tag>] :job_tags
|
444
|
-
#
|
829
|
+
# Tags to attach to the job.
|
445
830
|
#
|
446
831
|
# @option params [Array<Types::Tag>] :custom_model_tags
|
447
|
-
#
|
832
|
+
# Tags to attach to the resulting custom model.
|
448
833
|
#
|
449
834
|
# @option params [required, Types::TrainingDataConfig] :training_data_config
|
450
835
|
# Information about the training dataset.
|
@@ -456,7 +841,12 @@ module Aws::Bedrock
|
|
456
841
|
# S3 location for the output data.
|
457
842
|
#
|
458
843
|
# @option params [required, Hash<String,String>] :hyper_parameters
|
459
|
-
# Parameters related to tuning the model.
|
844
|
+
# Parameters related to tuning the model. For details on the format for
|
845
|
+
# different models, see [Custom model hyperparameters][1].
|
846
|
+
#
|
847
|
+
#
|
848
|
+
#
|
849
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models-hp.html
|
460
850
|
#
|
461
851
|
# @option params [Types::VpcConfig] :vpc_config
|
462
852
|
# VPC configuration (optional). Configuration parameters for the private
|
@@ -524,39 +914,79 @@ module Aws::Bedrock
|
|
524
914
|
req.send_request(options)
|
525
915
|
end
|
526
916
|
|
527
|
-
# Creates a
|
528
|
-
#
|
529
|
-
#
|
530
|
-
#
|
531
|
-
# User Guide.
|
917
|
+
# Creates dedicated throughput for a base or custom model with the model
|
918
|
+
# units and for the duration that you specify. For pricing details, see
|
919
|
+
# [Amazon Bedrock Pricing][1]. For more information, see [Provisioned
|
920
|
+
# Throughput][2] in the Amazon Bedrock User Guide.
|
532
921
|
#
|
533
922
|
#
|
534
923
|
#
|
535
|
-
# [1]:
|
924
|
+
# [1]: http://aws.amazon.com/bedrock/pricing/
|
925
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
|
536
926
|
#
|
537
927
|
# @option params [String] :client_request_token
|
538
|
-
#
|
539
|
-
#
|
540
|
-
# return an
|
928
|
+
# A unique, case-sensitive identifier to ensure that the API request
|
929
|
+
# completes no more than one time. If this token matches a previous
|
930
|
+
# request, Amazon Bedrock ignores the request, but does not return an
|
931
|
+
# error. For more information, see [Ensuring idempotency][1] in the
|
932
|
+
# Amazon S3 User Guide.
|
541
933
|
#
|
542
934
|
# **A suitable default value is auto-generated.** You should normally
|
543
935
|
# not need to pass this option.**
|
544
936
|
#
|
937
|
+
#
|
938
|
+
#
|
939
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
|
940
|
+
#
|
545
941
|
# @option params [required, Integer] :model_units
|
546
|
-
# Number of model units to allocate.
|
942
|
+
# Number of model units to allocate. A model unit delivers a specific
|
943
|
+
# throughput level for the specified model. The throughput level of a
|
944
|
+
# model unit specifies the total number of input and output tokens that
|
945
|
+
# it can process and generate within a span of one minute. By default,
|
946
|
+
# your account has no model units for purchasing Provisioned Throughputs
|
947
|
+
# with commitment. You must first visit the [Amazon Web Services support
|
948
|
+
# center][1] to request MUs.
|
949
|
+
#
|
950
|
+
# For model unit quotas, see [Provisioned Throughput quotas][2] in the
|
951
|
+
# Amazon Bedrock User Guide.
|
952
|
+
#
|
953
|
+
# For more information about what an MU specifies, contact your Amazon
|
954
|
+
# Web Services account manager.
|
955
|
+
#
|
956
|
+
#
|
957
|
+
#
|
958
|
+
# [1]: https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase
|
959
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html#prov-thru-quotas
|
547
960
|
#
|
548
961
|
# @option params [required, String] :provisioned_model_name
|
549
|
-
#
|
962
|
+
# The name for this Provisioned Throughput.
|
550
963
|
#
|
551
964
|
# @option params [required, String] :model_id
|
552
|
-
# Name or
|
553
|
-
#
|
965
|
+
# The Amazon Resource Name (ARN) or name of the model to associate with
|
966
|
+
# this Provisioned Throughput. For a list of models for which you can
|
967
|
+
# purchase Provisioned Throughput, see [Amazon Bedrock model IDs for
|
968
|
+
# purchasing Provisioned Throughput][1] in the Amazon Bedrock User
|
969
|
+
# Guide.
|
970
|
+
#
|
971
|
+
#
|
972
|
+
#
|
973
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#prov-throughput-models
|
554
974
|
#
|
555
975
|
# @option params [String] :commitment_duration
|
556
|
-
#
|
976
|
+
# The commitment duration requested for the Provisioned Throughput.
|
977
|
+
# Billing occurs hourly and is discounted for longer commitment terms.
|
978
|
+
# To request a no-commit Provisioned Throughput, omit this field.
|
979
|
+
#
|
980
|
+
# Custom models support all levels of commitment. To see which base
|
981
|
+
# models support no commitment, see [Supported regions and models for
|
982
|
+
# Provisioned Throughput][1] in the Amazon Bedrock User Guide
|
983
|
+
#
|
984
|
+
#
|
985
|
+
#
|
986
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/pt-supported.html
|
557
987
|
#
|
558
988
|
# @option params [Array<Types::Tag>] :tags
|
559
|
-
# Tags to associate with this
|
989
|
+
# Tags to associate with this Provisioned Throughput.
|
560
990
|
#
|
561
991
|
# @return [Types::CreateProvisionedModelThroughputResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
562
992
|
#
|
@@ -592,7 +1022,7 @@ module Aws::Bedrock
|
|
592
1022
|
end
|
593
1023
|
|
594
1024
|
# Deletes a custom model that you created earlier. For more information,
|
595
|
-
# see [Custom models][1] in the Bedrock User Guide.
|
1025
|
+
# see [Custom models][1] in the Amazon Bedrock User Guide.
|
596
1026
|
#
|
597
1027
|
#
|
598
1028
|
#
|
@@ -618,6 +1048,40 @@ module Aws::Bedrock
|
|
618
1048
|
req.send_request(options)
|
619
1049
|
end
|
620
1050
|
|
1051
|
+
# Deletes a guardrail.
|
1052
|
+
#
|
1053
|
+
# * To delete a guardrail, only specify the ARN of the guardrail in the
|
1054
|
+
# `guardrailIdentifier` field. If you delete a guardrail, all of its
|
1055
|
+
# versions will be deleted.
|
1056
|
+
#
|
1057
|
+
# * To delete a version of a guardrail, specify the ARN of the guardrail
|
1058
|
+
# in the `guardrailIdentifier` field and the version in the
|
1059
|
+
# `guardrailVersion` field.
|
1060
|
+
#
|
1061
|
+
# @option params [required, String] :guardrail_identifier
|
1062
|
+
# The unique identifier of the guardrail.
|
1063
|
+
#
|
1064
|
+
# @option params [String] :guardrail_version
|
1065
|
+
# The version of the guardrail.
|
1066
|
+
#
|
1067
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1068
|
+
#
|
1069
|
+
# @example Request syntax with placeholder values
|
1070
|
+
#
|
1071
|
+
# resp = client.delete_guardrail({
|
1072
|
+
# guardrail_identifier: "GuardrailIdentifier", # required
|
1073
|
+
# guardrail_version: "GuardrailNumericalVersion",
|
1074
|
+
# })
|
1075
|
+
#
|
1076
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/DeleteGuardrail AWS API Documentation
|
1077
|
+
#
|
1078
|
+
# @overload delete_guardrail(params = {})
|
1079
|
+
# @param [Hash] params ({})
|
1080
|
+
def delete_guardrail(params = {}, options = {})
|
1081
|
+
req = build_request(:delete_guardrail, params)
|
1082
|
+
req.send_request(options)
|
1083
|
+
end
|
1084
|
+
|
621
1085
|
# Delete the invocation logging.
|
622
1086
|
#
|
623
1087
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
@@ -631,15 +1095,16 @@ module Aws::Bedrock
|
|
631
1095
|
req.send_request(options)
|
632
1096
|
end
|
633
1097
|
|
634
|
-
# Deletes a
|
635
|
-
#
|
1098
|
+
# Deletes a Provisioned Throughput. You can't delete a Provisioned
|
1099
|
+
# Throughput before the commitment term is over. For more information,
|
1100
|
+
# see [Provisioned Throughput][1] in the Amazon Bedrock User Guide.
|
636
1101
|
#
|
637
1102
|
#
|
638
1103
|
#
|
639
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/
|
1104
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
|
640
1105
|
#
|
641
1106
|
# @option params [required, String] :provisioned_model_id
|
642
|
-
# The ARN or name of the
|
1107
|
+
# The Amazon Resource Name (ARN) or name of the Provisioned Throughput.
|
643
1108
|
#
|
644
1109
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
645
1110
|
#
|
@@ -660,14 +1125,14 @@ module Aws::Bedrock
|
|
660
1125
|
|
661
1126
|
# Get the properties associated with a Amazon Bedrock custom model that
|
662
1127
|
# you have created.For more information, see [Custom models][1] in the
|
663
|
-
# Bedrock User Guide.
|
1128
|
+
# Amazon Bedrock User Guide.
|
664
1129
|
#
|
665
1130
|
#
|
666
1131
|
#
|
667
1132
|
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
|
668
1133
|
#
|
669
1134
|
# @option params [required, String] :model_identifier
|
670
|
-
# Name or ARN of the custom model.
|
1135
|
+
# Name or Amazon Resource Name (ARN) of the custom model.
|
671
1136
|
#
|
672
1137
|
# @return [Types::GetCustomModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
673
1138
|
#
|
@@ -721,6 +1186,84 @@ module Aws::Bedrock
|
|
721
1186
|
req.send_request(options)
|
722
1187
|
end
|
723
1188
|
|
1189
|
+
# Retrieves the properties associated with a model evaluation job,
|
1190
|
+
# including the status of the job. For more information, see [Model
|
1191
|
+
# evaluations][1].
|
1192
|
+
#
|
1193
|
+
#
|
1194
|
+
#
|
1195
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/latest/userguide/model-evaluation.html
|
1196
|
+
#
|
1197
|
+
# @option params [required, String] :job_identifier
|
1198
|
+
# The Amazon Resource Name (ARN) of the model evaluation job.
|
1199
|
+
#
|
1200
|
+
# @return [Types::GetEvaluationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1201
|
+
#
|
1202
|
+
# * {Types::GetEvaluationJobResponse#job_name #job_name} => String
|
1203
|
+
# * {Types::GetEvaluationJobResponse#status #status} => String
|
1204
|
+
# * {Types::GetEvaluationJobResponse#job_arn #job_arn} => String
|
1205
|
+
# * {Types::GetEvaluationJobResponse#job_description #job_description} => String
|
1206
|
+
# * {Types::GetEvaluationJobResponse#role_arn #role_arn} => String
|
1207
|
+
# * {Types::GetEvaluationJobResponse#customer_encryption_key_id #customer_encryption_key_id} => String
|
1208
|
+
# * {Types::GetEvaluationJobResponse#job_type #job_type} => String
|
1209
|
+
# * {Types::GetEvaluationJobResponse#evaluation_config #evaluation_config} => Types::EvaluationConfig
|
1210
|
+
# * {Types::GetEvaluationJobResponse#inference_config #inference_config} => Types::EvaluationInferenceConfig
|
1211
|
+
# * {Types::GetEvaluationJobResponse#output_data_config #output_data_config} => Types::EvaluationOutputDataConfig
|
1212
|
+
# * {Types::GetEvaluationJobResponse#creation_time #creation_time} => Time
|
1213
|
+
# * {Types::GetEvaluationJobResponse#last_modified_time #last_modified_time} => Time
|
1214
|
+
# * {Types::GetEvaluationJobResponse#failure_messages #failure_messages} => Array<String>
|
1215
|
+
#
|
1216
|
+
# @example Request syntax with placeholder values
|
1217
|
+
#
|
1218
|
+
# resp = client.get_evaluation_job({
|
1219
|
+
# job_identifier: "EvaluationJobIdentifier", # required
|
1220
|
+
# })
|
1221
|
+
#
|
1222
|
+
# @example Response structure
|
1223
|
+
#
|
1224
|
+
# resp.job_name #=> String
|
1225
|
+
# resp.status #=> String, one of "InProgress", "Completed", "Failed", "Stopping", "Stopped"
|
1226
|
+
# resp.job_arn #=> String
|
1227
|
+
# resp.job_description #=> String
|
1228
|
+
# resp.role_arn #=> String
|
1229
|
+
# resp.customer_encryption_key_id #=> String
|
1230
|
+
# resp.job_type #=> String, one of "Human", "Automated"
|
1231
|
+
# resp.evaluation_config.automated.dataset_metric_configs #=> Array
|
1232
|
+
# resp.evaluation_config.automated.dataset_metric_configs[0].task_type #=> String, one of "Summarization", "Classification", "QuestionAndAnswer", "Generation", "Custom"
|
1233
|
+
# resp.evaluation_config.automated.dataset_metric_configs[0].dataset.name #=> String
|
1234
|
+
# resp.evaluation_config.automated.dataset_metric_configs[0].dataset.dataset_location.s3_uri #=> String
|
1235
|
+
# resp.evaluation_config.automated.dataset_metric_configs[0].metric_names #=> Array
|
1236
|
+
# resp.evaluation_config.automated.dataset_metric_configs[0].metric_names[0] #=> String
|
1237
|
+
# resp.evaluation_config.human.human_workflow_config.flow_definition_arn #=> String
|
1238
|
+
# resp.evaluation_config.human.human_workflow_config.instructions #=> String
|
1239
|
+
# resp.evaluation_config.human.custom_metrics #=> Array
|
1240
|
+
# resp.evaluation_config.human.custom_metrics[0].name #=> String
|
1241
|
+
# resp.evaluation_config.human.custom_metrics[0].description #=> String
|
1242
|
+
# resp.evaluation_config.human.custom_metrics[0].rating_method #=> String
|
1243
|
+
# resp.evaluation_config.human.dataset_metric_configs #=> Array
|
1244
|
+
# resp.evaluation_config.human.dataset_metric_configs[0].task_type #=> String, one of "Summarization", "Classification", "QuestionAndAnswer", "Generation", "Custom"
|
1245
|
+
# resp.evaluation_config.human.dataset_metric_configs[0].dataset.name #=> String
|
1246
|
+
# resp.evaluation_config.human.dataset_metric_configs[0].dataset.dataset_location.s3_uri #=> String
|
1247
|
+
# resp.evaluation_config.human.dataset_metric_configs[0].metric_names #=> Array
|
1248
|
+
# resp.evaluation_config.human.dataset_metric_configs[0].metric_names[0] #=> String
|
1249
|
+
# resp.inference_config.models #=> Array
|
1250
|
+
# resp.inference_config.models[0].bedrock_model.model_identifier #=> String
|
1251
|
+
# resp.inference_config.models[0].bedrock_model.inference_params #=> String
|
1252
|
+
# resp.output_data_config.s3_uri #=> String
|
1253
|
+
# resp.creation_time #=> Time
|
1254
|
+
# resp.last_modified_time #=> Time
|
1255
|
+
# resp.failure_messages #=> Array
|
1256
|
+
# resp.failure_messages[0] #=> String
|
1257
|
+
#
|
1258
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetEvaluationJob AWS API Documentation
|
1259
|
+
#
|
1260
|
+
# @overload get_evaluation_job(params = {})
|
1261
|
+
# @param [Hash] params ({})
|
1262
|
+
def get_evaluation_job(params = {}, options = {})
|
1263
|
+
req = build_request(:get_evaluation_job, params)
|
1264
|
+
req.send_request(options)
|
1265
|
+
end
|
1266
|
+
|
724
1267
|
# Get details about a Amazon Bedrock foundation model.
|
725
1268
|
#
|
726
1269
|
# @option params [required, String] :model_identifier
|
@@ -762,9 +1305,96 @@ module Aws::Bedrock
|
|
762
1305
|
req.send_request(options)
|
763
1306
|
end
|
764
1307
|
|
1308
|
+
# Gets details about a guardrail. If you don't specify a version, the
|
1309
|
+
# response returns details for the `DRAFT` version.
|
1310
|
+
#
|
1311
|
+
# @option params [required, String] :guardrail_identifier
|
1312
|
+
# The unique identifier of the guardrail for which to get details.
|
1313
|
+
#
|
1314
|
+
# @option params [String] :guardrail_version
|
1315
|
+
# The version of the guardrail for which to get details. If you don't
|
1316
|
+
# specify a version, the response returns details for the `DRAFT`
|
1317
|
+
# version.
|
1318
|
+
#
|
1319
|
+
# @return [Types::GetGuardrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1320
|
+
#
|
1321
|
+
# * {Types::GetGuardrailResponse#name #name} => String
|
1322
|
+
# * {Types::GetGuardrailResponse#description #description} => String
|
1323
|
+
# * {Types::GetGuardrailResponse#guardrail_id #guardrail_id} => String
|
1324
|
+
# * {Types::GetGuardrailResponse#guardrail_arn #guardrail_arn} => String
|
1325
|
+
# * {Types::GetGuardrailResponse#version #version} => String
|
1326
|
+
# * {Types::GetGuardrailResponse#status #status} => String
|
1327
|
+
# * {Types::GetGuardrailResponse#topic_policy #topic_policy} => Types::GuardrailTopicPolicy
|
1328
|
+
# * {Types::GetGuardrailResponse#content_policy #content_policy} => Types::GuardrailContentPolicy
|
1329
|
+
# * {Types::GetGuardrailResponse#word_policy #word_policy} => Types::GuardrailWordPolicy
|
1330
|
+
# * {Types::GetGuardrailResponse#sensitive_information_policy #sensitive_information_policy} => Types::GuardrailSensitiveInformationPolicy
|
1331
|
+
# * {Types::GetGuardrailResponse#created_at #created_at} => Time
|
1332
|
+
# * {Types::GetGuardrailResponse#updated_at #updated_at} => Time
|
1333
|
+
# * {Types::GetGuardrailResponse#status_reasons #status_reasons} => Array<String>
|
1334
|
+
# * {Types::GetGuardrailResponse#failure_recommendations #failure_recommendations} => Array<String>
|
1335
|
+
# * {Types::GetGuardrailResponse#blocked_input_messaging #blocked_input_messaging} => String
|
1336
|
+
# * {Types::GetGuardrailResponse#blocked_outputs_messaging #blocked_outputs_messaging} => String
|
1337
|
+
# * {Types::GetGuardrailResponse#kms_key_arn #kms_key_arn} => String
|
1338
|
+
#
|
1339
|
+
# @example Request syntax with placeholder values
|
1340
|
+
#
|
1341
|
+
# resp = client.get_guardrail({
|
1342
|
+
# guardrail_identifier: "GuardrailIdentifier", # required
|
1343
|
+
# guardrail_version: "GuardrailVersion",
|
1344
|
+
# })
|
1345
|
+
#
|
1346
|
+
# @example Response structure
|
1347
|
+
#
|
1348
|
+
# resp.name #=> String
|
1349
|
+
# resp.description #=> String
|
1350
|
+
# resp.guardrail_id #=> String
|
1351
|
+
# resp.guardrail_arn #=> String
|
1352
|
+
# resp.version #=> String
|
1353
|
+
# resp.status #=> String, one of "CREATING", "UPDATING", "VERSIONING", "READY", "FAILED", "DELETING"
|
1354
|
+
# resp.topic_policy.topics #=> Array
|
1355
|
+
# resp.topic_policy.topics[0].name #=> String
|
1356
|
+
# resp.topic_policy.topics[0].definition #=> String
|
1357
|
+
# resp.topic_policy.topics[0].examples #=> Array
|
1358
|
+
# resp.topic_policy.topics[0].examples[0] #=> String
|
1359
|
+
# resp.topic_policy.topics[0].type #=> String, one of "DENY"
|
1360
|
+
# resp.content_policy.filters #=> Array
|
1361
|
+
# resp.content_policy.filters[0].type #=> String, one of "SEXUAL", "VIOLENCE", "HATE", "INSULTS", "MISCONDUCT", "PROMPT_ATTACK"
|
1362
|
+
# resp.content_policy.filters[0].input_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
|
1363
|
+
# resp.content_policy.filters[0].output_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
|
1364
|
+
# resp.word_policy.words #=> Array
|
1365
|
+
# resp.word_policy.words[0].text #=> String
|
1366
|
+
# resp.word_policy.managed_word_lists #=> Array
|
1367
|
+
# resp.word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
|
1368
|
+
# resp.sensitive_information_policy.pii_entities #=> Array
|
1369
|
+
# resp.sensitive_information_policy.pii_entities[0].type #=> String, one of "ADDRESS", "AGE", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "CA_HEALTH_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "CREDIT_DEBIT_CARD_CVV", "CREDIT_DEBIT_CARD_EXPIRY", "CREDIT_DEBIT_CARD_NUMBER", "DRIVER_ID", "EMAIL", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "IP_ADDRESS", "LICENSE_PLATE", "MAC_ADDRESS", "NAME", "PASSWORD", "PHONE", "PIN", "SWIFT_CODE", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "UK_NATIONAL_INSURANCE_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "URL", "USERNAME", "US_BANK_ACCOUNT_NUMBER", "US_BANK_ROUTING_NUMBER", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "US_PASSPORT_NUMBER", "US_SOCIAL_SECURITY_NUMBER", "VEHICLE_IDENTIFICATION_NUMBER"
|
1370
|
+
# resp.sensitive_information_policy.pii_entities[0].action #=> String, one of "BLOCK", "ANONYMIZE"
|
1371
|
+
# resp.sensitive_information_policy.regexes #=> Array
|
1372
|
+
# resp.sensitive_information_policy.regexes[0].name #=> String
|
1373
|
+
# resp.sensitive_information_policy.regexes[0].description #=> String
|
1374
|
+
# resp.sensitive_information_policy.regexes[0].pattern #=> String
|
1375
|
+
# resp.sensitive_information_policy.regexes[0].action #=> String, one of "BLOCK", "ANONYMIZE"
|
1376
|
+
# resp.created_at #=> Time
|
1377
|
+
# resp.updated_at #=> Time
|
1378
|
+
# resp.status_reasons #=> Array
|
1379
|
+
# resp.status_reasons[0] #=> String
|
1380
|
+
# resp.failure_recommendations #=> Array
|
1381
|
+
# resp.failure_recommendations[0] #=> String
|
1382
|
+
# resp.blocked_input_messaging #=> String
|
1383
|
+
# resp.blocked_outputs_messaging #=> String
|
1384
|
+
# resp.kms_key_arn #=> String
|
1385
|
+
#
|
1386
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetGuardrail AWS API Documentation
|
1387
|
+
#
|
1388
|
+
# @overload get_guardrail(params = {})
|
1389
|
+
# @param [Hash] params ({})
|
1390
|
+
def get_guardrail(params = {}, options = {})
|
1391
|
+
req = build_request(:get_guardrail, params)
|
1392
|
+
req.send_request(options)
|
1393
|
+
end
|
1394
|
+
|
765
1395
|
# Retrieves the properties associated with a model-customization job,
|
766
1396
|
# including the status of the job. For more information, see [Custom
|
767
|
-
# models][1] in the Bedrock User Guide.
|
1397
|
+
# models][1] in the Amazon Bedrock User Guide.
|
768
1398
|
#
|
769
1399
|
#
|
770
1400
|
#
|
@@ -869,15 +1499,15 @@ module Aws::Bedrock
|
|
869
1499
|
req.send_request(options)
|
870
1500
|
end
|
871
1501
|
|
872
|
-
#
|
873
|
-
# [Provisioned
|
1502
|
+
# Returns details for a Provisioned Throughput. For more information,
|
1503
|
+
# see [Provisioned Throughput][1] in the Amazon Bedrock User Guide.
|
874
1504
|
#
|
875
1505
|
#
|
876
1506
|
#
|
877
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/
|
1507
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
|
878
1508
|
#
|
879
1509
|
# @option params [required, String] :provisioned_model_id
|
880
|
-
# The ARN or name of the
|
1510
|
+
# The Amazon Resource Name (ARN) or name of the Provisioned Throughput.
|
881
1511
|
#
|
882
1512
|
# @return [Types::GetProvisionedModelThroughputResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
883
1513
|
#
|
@@ -929,8 +1559,8 @@ module Aws::Bedrock
|
|
929
1559
|
# Returns a list of the custom models that you have created with the
|
930
1560
|
# `CreateModelCustomizationJob` operation.
|
931
1561
|
#
|
932
|
-
# For more information, see [Custom models][1] in the Bedrock
|
933
|
-
# Guide.
|
1562
|
+
# For more information, see [Custom models][1] in the Amazon Bedrock
|
1563
|
+
# User Guide.
|
934
1564
|
#
|
935
1565
|
#
|
936
1566
|
#
|
@@ -946,12 +1576,12 @@ module Aws::Bedrock
|
|
946
1576
|
# Return custom models only if the job name contains these characters.
|
947
1577
|
#
|
948
1578
|
# @option params [String] :base_model_arn_equals
|
949
|
-
# Return custom models only if the base model
|
950
|
-
# parameter.
|
1579
|
+
# Return custom models only if the base model Amazon Resource Name (ARN)
|
1580
|
+
# matches this parameter.
|
951
1581
|
#
|
952
1582
|
# @option params [String] :foundation_model_arn_equals
|
953
|
-
# Return custom models only if the foundation model
|
954
|
-
# parameter.
|
1583
|
+
# Return custom models only if the foundation model Amazon Resource Name
|
1584
|
+
# (ARN) matches this parameter.
|
955
1585
|
#
|
956
1586
|
# @option params [Integer] :max_results
|
957
1587
|
# Maximum number of results to return in the response.
|
@@ -1007,24 +1637,109 @@ module Aws::Bedrock
|
|
1007
1637
|
req.send_request(options)
|
1008
1638
|
end
|
1009
1639
|
|
1010
|
-
#
|
1011
|
-
#
|
1640
|
+
# Lists model evaluation jobs.
|
1641
|
+
#
|
1642
|
+
# @option params [Time,DateTime,Date,Integer,String] :creation_time_after
|
1643
|
+
# A filter that includes model evaluation jobs created after the time
|
1644
|
+
# specified.
|
1645
|
+
#
|
1646
|
+
# @option params [Time,DateTime,Date,Integer,String] :creation_time_before
|
1647
|
+
# A filter that includes model evaluation jobs created prior to the time
|
1648
|
+
# specified.
|
1649
|
+
#
|
1650
|
+
# @option params [String] :status_equals
|
1651
|
+
# Only return jobs where the status condition is met.
|
1652
|
+
#
|
1653
|
+
# @option params [String] :name_contains
|
1654
|
+
# Query parameter string for model evaluation job names.
|
1655
|
+
#
|
1656
|
+
# @option params [Integer] :max_results
|
1657
|
+
# The maximum number of results to return.
|
1658
|
+
#
|
1659
|
+
# @option params [String] :next_token
|
1660
|
+
# Continuation token from the previous response, for Amazon Bedrock to
|
1661
|
+
# list the next set of results.
|
1662
|
+
#
|
1663
|
+
# @option params [String] :sort_by
|
1664
|
+
# Allows you to sort model evaluation jobs by when they were created.
|
1665
|
+
#
|
1666
|
+
# @option params [String] :sort_order
|
1667
|
+
# How you want the order of jobs sorted.
|
1668
|
+
#
|
1669
|
+
# @return [Types::ListEvaluationJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1670
|
+
#
|
1671
|
+
# * {Types::ListEvaluationJobsResponse#next_token #next_token} => String
|
1672
|
+
# * {Types::ListEvaluationJobsResponse#job_summaries #job_summaries} => Array<Types::EvaluationSummary>
|
1673
|
+
#
|
1674
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1675
|
+
#
|
1676
|
+
# @example Request syntax with placeholder values
|
1677
|
+
#
|
1678
|
+
# resp = client.list_evaluation_jobs({
|
1679
|
+
# creation_time_after: Time.now,
|
1680
|
+
# creation_time_before: Time.now,
|
1681
|
+
# status_equals: "InProgress", # accepts InProgress, Completed, Failed, Stopping, Stopped
|
1682
|
+
# name_contains: "EvaluationJobName",
|
1683
|
+
# max_results: 1,
|
1684
|
+
# next_token: "PaginationToken",
|
1685
|
+
# sort_by: "CreationTime", # accepts CreationTime
|
1686
|
+
# sort_order: "Ascending", # accepts Ascending, Descending
|
1687
|
+
# })
|
1688
|
+
#
|
1689
|
+
# @example Response structure
|
1690
|
+
#
|
1691
|
+
# resp.next_token #=> String
|
1692
|
+
# resp.job_summaries #=> Array
|
1693
|
+
# resp.job_summaries[0].job_arn #=> String
|
1694
|
+
# resp.job_summaries[0].job_name #=> String
|
1695
|
+
# resp.job_summaries[0].status #=> String, one of "InProgress", "Completed", "Failed", "Stopping", "Stopped"
|
1696
|
+
# resp.job_summaries[0].creation_time #=> Time
|
1697
|
+
# resp.job_summaries[0].job_type #=> String, one of "Human", "Automated"
|
1698
|
+
# resp.job_summaries[0].evaluation_task_types #=> Array
|
1699
|
+
# resp.job_summaries[0].evaluation_task_types[0] #=> String, one of "Summarization", "Classification", "QuestionAndAnswer", "Generation", "Custom"
|
1700
|
+
# resp.job_summaries[0].model_identifiers #=> Array
|
1701
|
+
# resp.job_summaries[0].model_identifiers[0] #=> String
|
1702
|
+
#
|
1703
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListEvaluationJobs AWS API Documentation
|
1704
|
+
#
|
1705
|
+
# @overload list_evaluation_jobs(params = {})
|
1706
|
+
# @param [Hash] params ({})
|
1707
|
+
def list_evaluation_jobs(params = {}, options = {})
|
1708
|
+
req = build_request(:list_evaluation_jobs, params)
|
1709
|
+
req.send_request(options)
|
1710
|
+
end
|
1711
|
+
|
1712
|
+
# Lists Amazon Bedrock foundation models that you can use. You can
|
1713
|
+
# filter the results with the request parameters. For more information,
|
1714
|
+
# see [Foundation models][1] in the Amazon Bedrock User Guide.
|
1012
1715
|
#
|
1013
1716
|
#
|
1014
1717
|
#
|
1015
1718
|
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html
|
1016
1719
|
#
|
1017
1720
|
# @option params [String] :by_provider
|
1018
|
-
#
|
1721
|
+
# Return models belonging to the model provider that you specify.
|
1019
1722
|
#
|
1020
1723
|
# @option params [String] :by_customization_type
|
1021
|
-
#
|
1724
|
+
# Return models that support the customization type that you specify.
|
1725
|
+
# For more information, see [Custom models][1] in the Amazon Bedrock
|
1726
|
+
# User Guide.
|
1727
|
+
#
|
1728
|
+
#
|
1729
|
+
#
|
1730
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
|
1022
1731
|
#
|
1023
1732
|
# @option params [String] :by_output_modality
|
1024
|
-
#
|
1733
|
+
# Return models that support the output modality that you specify.
|
1025
1734
|
#
|
1026
1735
|
# @option params [String] :by_inference_type
|
1027
|
-
#
|
1736
|
+
# Return models that support the inference type that you specify. For
|
1737
|
+
# more information, see [Provisioned Throughput][1] in the Amazon
|
1738
|
+
# Bedrock User Guide.
|
1739
|
+
#
|
1740
|
+
#
|
1741
|
+
#
|
1742
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
|
1028
1743
|
#
|
1029
1744
|
# @return [Types::ListFoundationModelsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1030
1745
|
#
|
@@ -1066,11 +1781,69 @@ module Aws::Bedrock
|
|
1066
1781
|
req.send_request(options)
|
1067
1782
|
end
|
1068
1783
|
|
1784
|
+
# Lists details about all the guardrails in an account. To list the
|
1785
|
+
# `DRAFT` version of all your guardrails, don't specify the
|
1786
|
+
# `guardrailIdentifier` field. To list all versions of a guardrail,
|
1787
|
+
# specify the ARN of the guardrail in the `guardrailIdentifier` field.
|
1788
|
+
#
|
1789
|
+
# You can set the maximum number of results to return in a response in
|
1790
|
+
# the `maxResults` field. If there are more results than the number you
|
1791
|
+
# set, the response returns a `nextToken` that you can send in another
|
1792
|
+
# `ListGuardrails` request to see the next batch of results.
|
1793
|
+
#
|
1794
|
+
# @option params [String] :guardrail_identifier
|
1795
|
+
# The unique identifier of the guardrail.
|
1796
|
+
#
|
1797
|
+
# @option params [Integer] :max_results
|
1798
|
+
# The maximum number of results to return in the response.
|
1799
|
+
#
|
1800
|
+
# @option params [String] :next_token
|
1801
|
+
# If there are more results than were returned in the response, the
|
1802
|
+
# response returns a `nextToken` that you can send in another
|
1803
|
+
# `ListGuardrails` request to see the next batch of results.
|
1804
|
+
#
|
1805
|
+
# @return [Types::ListGuardrailsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1806
|
+
#
|
1807
|
+
# * {Types::ListGuardrailsResponse#guardrails #guardrails} => Array<Types::GuardrailSummary>
|
1808
|
+
# * {Types::ListGuardrailsResponse#next_token #next_token} => String
|
1809
|
+
#
|
1810
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1811
|
+
#
|
1812
|
+
# @example Request syntax with placeholder values
|
1813
|
+
#
|
1814
|
+
# resp = client.list_guardrails({
|
1815
|
+
# guardrail_identifier: "GuardrailIdentifier",
|
1816
|
+
# max_results: 1,
|
1817
|
+
# next_token: "PaginationToken",
|
1818
|
+
# })
|
1819
|
+
#
|
1820
|
+
# @example Response structure
|
1821
|
+
#
|
1822
|
+
# resp.guardrails #=> Array
|
1823
|
+
# resp.guardrails[0].id #=> String
|
1824
|
+
# resp.guardrails[0].arn #=> String
|
1825
|
+
# resp.guardrails[0].status #=> String, one of "CREATING", "UPDATING", "VERSIONING", "READY", "FAILED", "DELETING"
|
1826
|
+
# resp.guardrails[0].name #=> String
|
1827
|
+
# resp.guardrails[0].description #=> String
|
1828
|
+
# resp.guardrails[0].version #=> String
|
1829
|
+
# resp.guardrails[0].created_at #=> Time
|
1830
|
+
# resp.guardrails[0].updated_at #=> Time
|
1831
|
+
# resp.next_token #=> String
|
1832
|
+
#
|
1833
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListGuardrails AWS API Documentation
|
1834
|
+
#
|
1835
|
+
# @overload list_guardrails(params = {})
|
1836
|
+
# @param [Hash] params ({})
|
1837
|
+
def list_guardrails(params = {}, options = {})
|
1838
|
+
req = build_request(:list_guardrails, params)
|
1839
|
+
req.send_request(options)
|
1840
|
+
end
|
1841
|
+
|
1069
1842
|
# Returns a list of model customization jobs that you have submitted.
|
1070
1843
|
# You can filter the jobs to return based on one or more criteria.
|
1071
1844
|
#
|
1072
|
-
# For more information, see [Custom models][1] in the Bedrock
|
1073
|
-
# Guide.
|
1845
|
+
# For more information, see [Custom models][1] in the Amazon Bedrock
|
1846
|
+
# User Guide.
|
1074
1847
|
#
|
1075
1848
|
#
|
1076
1849
|
#
|
@@ -1146,40 +1919,49 @@ module Aws::Bedrock
|
|
1146
1919
|
req.send_request(options)
|
1147
1920
|
end
|
1148
1921
|
|
1149
|
-
#
|
1150
|
-
# [Provisioned
|
1922
|
+
# Lists the Provisioned Throughputs in the account. For more
|
1923
|
+
# information, see [Provisioned Throughput][1] in the Amazon Bedrock
|
1924
|
+
# User Guide.
|
1151
1925
|
#
|
1152
1926
|
#
|
1153
1927
|
#
|
1154
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/
|
1928
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
|
1155
1929
|
#
|
1156
1930
|
# @option params [Time,DateTime,Date,Integer,String] :creation_time_after
|
1157
|
-
#
|
1931
|
+
# A filter that returns Provisioned Throughputs created after the
|
1932
|
+
# specified time.
|
1158
1933
|
#
|
1159
1934
|
# @option params [Time,DateTime,Date,Integer,String] :creation_time_before
|
1160
|
-
#
|
1935
|
+
# A filter that returns Provisioned Throughputs created before the
|
1936
|
+
# specified time.
|
1161
1937
|
#
|
1162
1938
|
# @option params [String] :status_equals
|
1163
|
-
#
|
1164
|
-
#
|
1939
|
+
# A filter that returns Provisioned Throughputs if their statuses
|
1940
|
+
# matches the value that you specify.
|
1165
1941
|
#
|
1166
1942
|
# @option params [String] :model_arn_equals
|
1167
|
-
#
|
1168
|
-
# equal to
|
1943
|
+
# A filter that returns Provisioned Throughputs whose model Amazon
|
1944
|
+
# Resource Name (ARN) is equal to the value that you specify.
|
1169
1945
|
#
|
1170
1946
|
# @option params [String] :name_contains
|
1171
|
-
#
|
1172
|
-
#
|
1947
|
+
# A filter that returns Provisioned Throughputs if their name contains
|
1948
|
+
# the expression that you specify.
|
1173
1949
|
#
|
1174
1950
|
# @option params [Integer] :max_results
|
1175
|
-
# THe maximum number of results to return in the response.
|
1951
|
+
# THe maximum number of results to return in the response. If there are
|
1952
|
+
# more results than the number you specified, the response returns a
|
1953
|
+
# `nextToken` value. To see the next batch of results, send the
|
1954
|
+
# `nextToken` value in another list request.
|
1176
1955
|
#
|
1177
1956
|
# @option params [String] :next_token
|
1178
|
-
#
|
1179
|
-
#
|
1957
|
+
# If there are more results than the number you specified in the
|
1958
|
+
# `maxResults` field, the response returns a `nextToken` value. To see
|
1959
|
+
# the next batch of results, specify the `nextToken` value in this
|
1960
|
+
# field.
|
1180
1961
|
#
|
1181
1962
|
# @option params [String] :sort_by
|
1182
|
-
# The field to sort
|
1963
|
+
# The field by which to sort the returned list of Provisioned
|
1964
|
+
# Throughputs.
|
1183
1965
|
#
|
1184
1966
|
# @option params [String] :sort_order
|
1185
1967
|
# The sort order of the results.
|
@@ -1233,15 +2015,15 @@ module Aws::Bedrock
|
|
1233
2015
|
|
1234
2016
|
# List the tags associated with the specified resource.
|
1235
2017
|
#
|
1236
|
-
# For more information, see [Tagging resources][1] in the Bedrock
|
1237
|
-
# Guide.
|
2018
|
+
# For more information, see [Tagging resources][1] in the Amazon Bedrock
|
2019
|
+
# User Guide.
|
1238
2020
|
#
|
1239
2021
|
#
|
1240
2022
|
#
|
1241
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/
|
2023
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html
|
1242
2024
|
#
|
1243
2025
|
# @option params [required, String] :resource_arn
|
1244
|
-
# The ARN of the resource.
|
2026
|
+
# The Amazon Resource Name (ARN) of the resource.
|
1245
2027
|
#
|
1246
2028
|
# @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1247
2029
|
#
|
@@ -1306,8 +2088,30 @@ module Aws::Bedrock
|
|
1306
2088
|
req.send_request(options)
|
1307
2089
|
end
|
1308
2090
|
|
2091
|
+
# Stops an in progress model evaluation job.
|
2092
|
+
#
|
2093
|
+
# @option params [required, String] :job_identifier
|
2094
|
+
# The ARN of the model evaluation job you want to stop.
|
2095
|
+
#
|
2096
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2097
|
+
#
|
2098
|
+
# @example Request syntax with placeholder values
|
2099
|
+
#
|
2100
|
+
# resp = client.stop_evaluation_job({
|
2101
|
+
# job_identifier: "EvaluationJobIdentifier", # required
|
2102
|
+
# })
|
2103
|
+
#
|
2104
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/StopEvaluationJob AWS API Documentation
|
2105
|
+
#
|
2106
|
+
# @overload stop_evaluation_job(params = {})
|
2107
|
+
# @param [Hash] params ({})
|
2108
|
+
def stop_evaluation_job(params = {}, options = {})
|
2109
|
+
req = build_request(:stop_evaluation_job, params)
|
2110
|
+
req.send_request(options)
|
2111
|
+
end
|
2112
|
+
|
1309
2113
|
# Stops an active model customization job. For more information, see
|
1310
|
-
# [Custom models][1] in the Bedrock User Guide.
|
2114
|
+
# [Custom models][1] in the Amazon Bedrock User Guide.
|
1311
2115
|
#
|
1312
2116
|
#
|
1313
2117
|
#
|
@@ -1334,14 +2138,14 @@ module Aws::Bedrock
|
|
1334
2138
|
end
|
1335
2139
|
|
1336
2140
|
# Associate tags with a resource. For more information, see [Tagging
|
1337
|
-
# resources][1] in the Bedrock User Guide.
|
2141
|
+
# resources][1] in the Amazon Bedrock User Guide.
|
1338
2142
|
#
|
1339
2143
|
#
|
1340
2144
|
#
|
1341
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/
|
2145
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html
|
1342
2146
|
#
|
1343
2147
|
# @option params [required, String] :resource_arn
|
1344
|
-
# The ARN of the resource to tag.
|
2148
|
+
# The Amazon Resource Name (ARN) of the resource to tag.
|
1345
2149
|
#
|
1346
2150
|
# @option params [required, Array<Types::Tag>] :tags
|
1347
2151
|
# Tags to associate with the resource.
|
@@ -1370,14 +2174,14 @@ module Aws::Bedrock
|
|
1370
2174
|
end
|
1371
2175
|
|
1372
2176
|
# Remove one or more tags from a resource. For more information, see
|
1373
|
-
# [Tagging resources][1] in the Bedrock User Guide.
|
2177
|
+
# [Tagging resources][1] in the Amazon Bedrock User Guide.
|
1374
2178
|
#
|
1375
2179
|
#
|
1376
2180
|
#
|
1377
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/
|
2181
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html
|
1378
2182
|
#
|
1379
2183
|
# @option params [required, String] :resource_arn
|
1380
|
-
# The ARN of the resource to untag.
|
2184
|
+
# The Amazon Resource Name (ARN) of the resource to untag.
|
1381
2185
|
#
|
1382
2186
|
# @option params [required, Array<String>] :tag_keys
|
1383
2187
|
# Tag keys of the tags to remove from the resource.
|
@@ -1400,22 +2204,190 @@ module Aws::Bedrock
|
|
1400
2204
|
req.send_request(options)
|
1401
2205
|
end
|
1402
2206
|
|
1403
|
-
#
|
1404
|
-
#
|
2207
|
+
# Updates a guardrail with the values you specify.
|
2208
|
+
#
|
2209
|
+
# * Specify a `name` and optional `description`.
|
2210
|
+
#
|
2211
|
+
# * Specify messages for when the guardrail successfully blocks a prompt
|
2212
|
+
# or a model response in the `blockedInputMessaging` and
|
2213
|
+
# `blockedOutputsMessaging` fields.
|
2214
|
+
#
|
2215
|
+
# * Specify topics for the guardrail to deny in the `topicPolicyConfig`
|
2216
|
+
# object. Each [GuardrailTopicConfig][1] object in the `topicsConfig`
|
2217
|
+
# list pertains to one topic.
|
2218
|
+
#
|
2219
|
+
# * Give a `name` and `description` so that the guardrail can properly
|
2220
|
+
# identify the topic.
|
2221
|
+
#
|
2222
|
+
# * Specify `DENY` in the `type` field.
|
2223
|
+
#
|
2224
|
+
# * (Optional) Provide up to five prompts that you would categorize as
|
2225
|
+
# belonging to the topic in the `examples` list.
|
2226
|
+
#
|
2227
|
+
# * Specify filter strengths for the harmful categories defined in
|
2228
|
+
# Amazon Bedrock in the `contentPolicyConfig` object. Each
|
2229
|
+
# [GuardrailContentFilterConfig][2] object in the `filtersConfig` list
|
2230
|
+
# pertains to a harmful category. For more information, see [Content
|
2231
|
+
# filters][3]. For more information about the fields in a content
|
2232
|
+
# filter, see [GuardrailContentFilterConfig][2].
|
2233
|
+
#
|
2234
|
+
# * Specify the category in the `type` field.
|
2235
|
+
#
|
2236
|
+
# * Specify the strength of the filter for prompts in the
|
2237
|
+
# `inputStrength` field and for model responses in the `strength`
|
2238
|
+
# field of the [GuardrailContentFilterConfig][2].
|
2239
|
+
#
|
2240
|
+
# * (Optional) For security, include the ARN of a KMS key in the
|
2241
|
+
# `kmsKeyId` field.
|
2242
|
+
#
|
2243
|
+
# * (Optional) Attach any tags to the guardrail in the `tags` object.
|
2244
|
+
# For more information, see [Tag resources][4].
|
2245
|
+
#
|
2246
|
+
#
|
2247
|
+
#
|
2248
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailTopicConfig.html
|
2249
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GuardrailContentFilterConfig.html
|
2250
|
+
# [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-filters
|
2251
|
+
# [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging
|
2252
|
+
#
|
2253
|
+
# @option params [required, String] :guardrail_identifier
|
2254
|
+
# The unique identifier of the guardrail
|
2255
|
+
#
|
2256
|
+
# @option params [required, String] :name
|
2257
|
+
# A name for the guardrail.
|
2258
|
+
#
|
2259
|
+
# @option params [String] :description
|
2260
|
+
# A description of the guardrail.
|
2261
|
+
#
|
2262
|
+
# @option params [Types::GuardrailTopicPolicyConfig] :topic_policy_config
|
2263
|
+
# The topic policy to configure for the guardrail.
|
2264
|
+
#
|
2265
|
+
# @option params [Types::GuardrailContentPolicyConfig] :content_policy_config
|
2266
|
+
# The content policy to configure for the guardrail.
|
2267
|
+
#
|
2268
|
+
# @option params [Types::GuardrailWordPolicyConfig] :word_policy_config
|
2269
|
+
# The word policy to configure for the guardrail.
|
2270
|
+
#
|
2271
|
+
# @option params [Types::GuardrailSensitiveInformationPolicyConfig] :sensitive_information_policy_config
|
2272
|
+
# The sensitive information policy to configure for the guardrail.
|
2273
|
+
#
|
2274
|
+
# @option params [required, String] :blocked_input_messaging
|
2275
|
+
# The message to return when the guardrail blocks a prompt.
|
2276
|
+
#
|
2277
|
+
# @option params [required, String] :blocked_outputs_messaging
|
2278
|
+
# The message to return when the guardrail blocks a model response.
|
2279
|
+
#
|
2280
|
+
# @option params [String] :kms_key_id
|
2281
|
+
# The ARN of the KMS key with which to encrypt the guardrail.
|
2282
|
+
#
|
2283
|
+
# @return [Types::UpdateGuardrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2284
|
+
#
|
2285
|
+
# * {Types::UpdateGuardrailResponse#guardrail_id #guardrail_id} => String
|
2286
|
+
# * {Types::UpdateGuardrailResponse#guardrail_arn #guardrail_arn} => String
|
2287
|
+
# * {Types::UpdateGuardrailResponse#version #version} => String
|
2288
|
+
# * {Types::UpdateGuardrailResponse#updated_at #updated_at} => Time
|
2289
|
+
#
|
2290
|
+
# @example Request syntax with placeholder values
|
2291
|
+
#
|
2292
|
+
# resp = client.update_guardrail({
|
2293
|
+
# guardrail_identifier: "GuardrailIdentifier", # required
|
2294
|
+
# name: "GuardrailName", # required
|
2295
|
+
# description: "GuardrailDescription",
|
2296
|
+
# topic_policy_config: {
|
2297
|
+
# topics_config: [ # required
|
2298
|
+
# {
|
2299
|
+
# name: "GuardrailTopicName", # required
|
2300
|
+
# definition: "GuardrailTopicDefinition", # required
|
2301
|
+
# examples: ["GuardrailTopicExample"],
|
2302
|
+
# type: "DENY", # required, accepts DENY
|
2303
|
+
# },
|
2304
|
+
# ],
|
2305
|
+
# },
|
2306
|
+
# content_policy_config: {
|
2307
|
+
# filters_config: [ # required
|
2308
|
+
# {
|
2309
|
+
# type: "SEXUAL", # required, accepts SEXUAL, VIOLENCE, HATE, INSULTS, MISCONDUCT, PROMPT_ATTACK
|
2310
|
+
# input_strength: "NONE", # required, accepts NONE, LOW, MEDIUM, HIGH
|
2311
|
+
# output_strength: "NONE", # required, accepts NONE, LOW, MEDIUM, HIGH
|
2312
|
+
# },
|
2313
|
+
# ],
|
2314
|
+
# },
|
2315
|
+
# word_policy_config: {
|
2316
|
+
# words_config: [
|
2317
|
+
# {
|
2318
|
+
# text: "GuardrailWordConfigTextString", # required
|
2319
|
+
# },
|
2320
|
+
# ],
|
2321
|
+
# managed_word_lists_config: [
|
2322
|
+
# {
|
2323
|
+
# type: "PROFANITY", # required, accepts PROFANITY
|
2324
|
+
# },
|
2325
|
+
# ],
|
2326
|
+
# },
|
2327
|
+
# sensitive_information_policy_config: {
|
2328
|
+
# pii_entities_config: [
|
2329
|
+
# {
|
2330
|
+
# type: "ADDRESS", # required, accepts ADDRESS, AGE, AWS_ACCESS_KEY, AWS_SECRET_KEY, CA_HEALTH_NUMBER, CA_SOCIAL_INSURANCE_NUMBER, CREDIT_DEBIT_CARD_CVV, CREDIT_DEBIT_CARD_EXPIRY, CREDIT_DEBIT_CARD_NUMBER, DRIVER_ID, EMAIL, INTERNATIONAL_BANK_ACCOUNT_NUMBER, IP_ADDRESS, LICENSE_PLATE, MAC_ADDRESS, NAME, PASSWORD, PHONE, PIN, SWIFT_CODE, UK_NATIONAL_HEALTH_SERVICE_NUMBER, UK_NATIONAL_INSURANCE_NUMBER, UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER, URL, USERNAME, US_BANK_ACCOUNT_NUMBER, US_BANK_ROUTING_NUMBER, US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER, US_PASSPORT_NUMBER, US_SOCIAL_SECURITY_NUMBER, VEHICLE_IDENTIFICATION_NUMBER
|
2331
|
+
# action: "BLOCK", # required, accepts BLOCK, ANONYMIZE
|
2332
|
+
# },
|
2333
|
+
# ],
|
2334
|
+
# regexes_config: [
|
2335
|
+
# {
|
2336
|
+
# name: "GuardrailRegexConfigNameString", # required
|
2337
|
+
# description: "GuardrailRegexConfigDescriptionString",
|
2338
|
+
# pattern: "GuardrailRegexConfigPatternString", # required
|
2339
|
+
# action: "BLOCK", # required, accepts BLOCK, ANONYMIZE
|
2340
|
+
# },
|
2341
|
+
# ],
|
2342
|
+
# },
|
2343
|
+
# blocked_input_messaging: "GuardrailBlockedMessaging", # required
|
2344
|
+
# blocked_outputs_messaging: "GuardrailBlockedMessaging", # required
|
2345
|
+
# kms_key_id: "KmsKeyId",
|
2346
|
+
# })
|
2347
|
+
#
|
2348
|
+
# @example Response structure
|
2349
|
+
#
|
2350
|
+
# resp.guardrail_id #=> String
|
2351
|
+
# resp.guardrail_arn #=> String
|
2352
|
+
# resp.version #=> String
|
2353
|
+
# resp.updated_at #=> Time
|
2354
|
+
#
|
2355
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/UpdateGuardrail AWS API Documentation
|
2356
|
+
#
|
2357
|
+
# @overload update_guardrail(params = {})
|
2358
|
+
# @param [Hash] params ({})
|
2359
|
+
def update_guardrail(params = {}, options = {})
|
2360
|
+
req = build_request(:update_guardrail, params)
|
2361
|
+
req.send_request(options)
|
2362
|
+
end
|
2363
|
+
|
2364
|
+
# Updates the name or associated model for a Provisioned Throughput. For
|
2365
|
+
# more information, see [Provisioned Throughput][1] in the Amazon
|
2366
|
+
# Bedrock User Guide.
|
1405
2367
|
#
|
1406
2368
|
#
|
1407
2369
|
#
|
1408
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/
|
2370
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
|
1409
2371
|
#
|
1410
2372
|
# @option params [required, String] :provisioned_model_id
|
1411
|
-
# The ARN or name of the
|
2373
|
+
# The Amazon Resource Name (ARN) or name of the Provisioned Throughput
|
2374
|
+
# to update.
|
1412
2375
|
#
|
1413
2376
|
# @option params [String] :desired_provisioned_model_name
|
1414
|
-
# The new name for this
|
2377
|
+
# The new name for this Provisioned Throughput.
|
1415
2378
|
#
|
1416
2379
|
# @option params [String] :desired_model_id
|
1417
|
-
# The ARN of the new model to associate with this
|
1418
|
-
#
|
2380
|
+
# The Amazon Resource Name (ARN) of the new model to associate with this
|
2381
|
+
# Provisioned Throughput. You can't specify this field if this
|
2382
|
+
# Provisioned Throughput is associated with a base model.
|
2383
|
+
#
|
2384
|
+
# If this Provisioned Throughput is associated with a custom model, you
|
2385
|
+
# can specify one of the following options:
|
2386
|
+
#
|
2387
|
+
# * The base model from which the custom model was customized.
|
2388
|
+
#
|
2389
|
+
# * Another custom model that was customized from the same base model as
|
2390
|
+
# the custom model.
|
1419
2391
|
#
|
1420
2392
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1421
2393
|
#
|
@@ -1449,7 +2421,7 @@ module Aws::Bedrock
|
|
1449
2421
|
params: params,
|
1450
2422
|
config: config)
|
1451
2423
|
context[:gem_name] = 'aws-sdk-bedrock'
|
1452
|
-
context[:gem_version] = '1.
|
2424
|
+
context[:gem_version] = '1.5.0'
|
1453
2425
|
Seahorse::Client::Request.new(handlers, context)
|
1454
2426
|
end
|
1455
2427
|
|