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.
data/sig/types.rbs CHANGED
@@ -13,6 +13,11 @@ module Aws::Bedrock
13
13
  SENSITIVE: []
14
14
  end
15
15
 
16
+ class AutomatedEvaluationConfig
17
+ attr_accessor dataset_metric_configs: ::Array[Types::EvaluationDatasetMetricConfig]
18
+ SENSITIVE: []
19
+ end
20
+
16
21
  class CloudWatchConfig
17
22
  attr_accessor log_group_name: ::String
18
23
  attr_accessor role_arn: ::String
@@ -25,6 +30,60 @@ module Aws::Bedrock
25
30
  SENSITIVE: []
26
31
  end
27
32
 
33
+ class CreateEvaluationJobRequest
34
+ attr_accessor job_name: ::String
35
+ attr_accessor job_description: ::String
36
+ attr_accessor client_request_token: ::String
37
+ attr_accessor role_arn: ::String
38
+ attr_accessor customer_encryption_key_id: ::String
39
+ attr_accessor job_tags: ::Array[Types::Tag]
40
+ attr_accessor evaluation_config: Types::EvaluationConfig
41
+ attr_accessor inference_config: Types::EvaluationInferenceConfig
42
+ attr_accessor output_data_config: Types::EvaluationOutputDataConfig
43
+ SENSITIVE: [:job_description]
44
+ end
45
+
46
+ class CreateEvaluationJobResponse
47
+ attr_accessor job_arn: ::String
48
+ SENSITIVE: []
49
+ end
50
+
51
+ class CreateGuardrailRequest
52
+ attr_accessor name: ::String
53
+ attr_accessor description: ::String
54
+ attr_accessor topic_policy_config: Types::GuardrailTopicPolicyConfig
55
+ attr_accessor content_policy_config: Types::GuardrailContentPolicyConfig
56
+ attr_accessor word_policy_config: Types::GuardrailWordPolicyConfig
57
+ attr_accessor sensitive_information_policy_config: Types::GuardrailSensitiveInformationPolicyConfig
58
+ attr_accessor blocked_input_messaging: ::String
59
+ attr_accessor blocked_outputs_messaging: ::String
60
+ attr_accessor kms_key_id: ::String
61
+ attr_accessor tags: ::Array[Types::Tag]
62
+ attr_accessor client_request_token: ::String
63
+ SENSITIVE: [:name, :description, :blocked_input_messaging, :blocked_outputs_messaging]
64
+ end
65
+
66
+ class CreateGuardrailResponse
67
+ attr_accessor guardrail_id: ::String
68
+ attr_accessor guardrail_arn: ::String
69
+ attr_accessor version: ::String
70
+ attr_accessor created_at: ::Time
71
+ SENSITIVE: []
72
+ end
73
+
74
+ class CreateGuardrailVersionRequest
75
+ attr_accessor guardrail_identifier: ::String
76
+ attr_accessor description: ::String
77
+ attr_accessor client_request_token: ::String
78
+ SENSITIVE: [:description]
79
+ end
80
+
81
+ class CreateGuardrailVersionResponse
82
+ attr_accessor guardrail_id: ::String
83
+ attr_accessor version: ::String
84
+ SENSITIVE: []
85
+ end
86
+
28
87
  class CreateModelCustomizationJobRequest
29
88
  attr_accessor job_name: ::String
30
89
  attr_accessor custom_model_name: ::String
@@ -81,6 +140,15 @@ module Aws::Bedrock
81
140
  class DeleteCustomModelResponse < Aws::EmptyStructure
82
141
  end
83
142
 
143
+ class DeleteGuardrailRequest
144
+ attr_accessor guardrail_identifier: ::String
145
+ attr_accessor guardrail_version: ::String
146
+ SENSITIVE: []
147
+ end
148
+
149
+ class DeleteGuardrailResponse < Aws::EmptyStructure
150
+ end
151
+
84
152
  class DeleteModelInvocationLoggingConfigurationRequest < Aws::EmptyStructure
85
153
  end
86
154
 
@@ -95,6 +163,88 @@ module Aws::Bedrock
95
163
  class DeleteProvisionedModelThroughputResponse < Aws::EmptyStructure
96
164
  end
97
165
 
166
+ class EvaluationBedrockModel
167
+ attr_accessor model_identifier: ::String
168
+ attr_accessor inference_params: ::String
169
+ SENSITIVE: [:inference_params]
170
+ end
171
+
172
+ class EvaluationConfig
173
+ attr_accessor automated: Types::AutomatedEvaluationConfig
174
+ attr_accessor human: Types::HumanEvaluationConfig
175
+ attr_accessor unknown: untyped
176
+ SENSITIVE: []
177
+
178
+ class Automated < EvaluationConfig
179
+ end
180
+ class Human < EvaluationConfig
181
+ end
182
+ class Unknown < EvaluationConfig
183
+ end
184
+ end
185
+
186
+ class EvaluationDataset
187
+ attr_accessor name: ::String
188
+ attr_accessor dataset_location: Types::EvaluationDatasetLocation
189
+ SENSITIVE: [:name]
190
+ end
191
+
192
+ class EvaluationDatasetLocation
193
+ attr_accessor s3_uri: ::String
194
+ attr_accessor unknown: untyped
195
+ SENSITIVE: []
196
+
197
+ class S3Uri < EvaluationDatasetLocation
198
+ end
199
+ class Unknown < EvaluationDatasetLocation
200
+ end
201
+ end
202
+
203
+ class EvaluationDatasetMetricConfig
204
+ attr_accessor task_type: ("Summarization" | "Classification" | "QuestionAndAnswer" | "Generation" | "Custom")
205
+ attr_accessor dataset: Types::EvaluationDataset
206
+ attr_accessor metric_names: ::Array[::String]
207
+ SENSITIVE: []
208
+ end
209
+
210
+ class EvaluationInferenceConfig
211
+ attr_accessor models: ::Array[Types::EvaluationModelConfig]
212
+ attr_accessor unknown: untyped
213
+ SENSITIVE: []
214
+
215
+ class Models < EvaluationInferenceConfig
216
+ end
217
+ class Unknown < EvaluationInferenceConfig
218
+ end
219
+ end
220
+
221
+ class EvaluationModelConfig
222
+ attr_accessor bedrock_model: Types::EvaluationBedrockModel
223
+ attr_accessor unknown: untyped
224
+ SENSITIVE: []
225
+
226
+ class BedrockModel < EvaluationModelConfig
227
+ end
228
+ class Unknown < EvaluationModelConfig
229
+ end
230
+ end
231
+
232
+ class EvaluationOutputDataConfig
233
+ attr_accessor s3_uri: ::String
234
+ SENSITIVE: []
235
+ end
236
+
237
+ class EvaluationSummary
238
+ attr_accessor job_arn: ::String
239
+ attr_accessor job_name: ::String
240
+ attr_accessor status: ("InProgress" | "Completed" | "Failed" | "Stopping" | "Stopped")
241
+ attr_accessor creation_time: ::Time
242
+ attr_accessor job_type: ("Human" | "Automated")
243
+ attr_accessor evaluation_task_types: ::Array[("Summarization" | "Classification" | "QuestionAndAnswer" | "Generation" | "Custom")]
244
+ attr_accessor model_identifiers: ::Array[::String]
245
+ SENSITIVE: []
246
+ end
247
+
98
248
  class FoundationModelDetails
99
249
  attr_accessor model_arn: ::String
100
250
  attr_accessor model_id: ::String
@@ -151,6 +301,28 @@ module Aws::Bedrock
151
301
  SENSITIVE: []
152
302
  end
153
303
 
304
+ class GetEvaluationJobRequest
305
+ attr_accessor job_identifier: ::String
306
+ SENSITIVE: [:job_identifier]
307
+ end
308
+
309
+ class GetEvaluationJobResponse
310
+ attr_accessor job_name: ::String
311
+ attr_accessor status: ("InProgress" | "Completed" | "Failed" | "Stopping" | "Stopped")
312
+ attr_accessor job_arn: ::String
313
+ attr_accessor job_description: ::String
314
+ attr_accessor role_arn: ::String
315
+ attr_accessor customer_encryption_key_id: ::String
316
+ attr_accessor job_type: ("Human" | "Automated")
317
+ attr_accessor evaluation_config: Types::EvaluationConfig
318
+ attr_accessor inference_config: Types::EvaluationInferenceConfig
319
+ attr_accessor output_data_config: Types::EvaluationOutputDataConfig
320
+ attr_accessor creation_time: ::Time
321
+ attr_accessor last_modified_time: ::Time
322
+ attr_accessor failure_messages: ::Array[::String]
323
+ SENSITIVE: [:job_description]
324
+ end
325
+
154
326
  class GetFoundationModelRequest
155
327
  attr_accessor model_identifier: ::String
156
328
  SENSITIVE: []
@@ -161,6 +333,33 @@ module Aws::Bedrock
161
333
  SENSITIVE: []
162
334
  end
163
335
 
336
+ class GetGuardrailRequest
337
+ attr_accessor guardrail_identifier: ::String
338
+ attr_accessor guardrail_version: ::String
339
+ SENSITIVE: []
340
+ end
341
+
342
+ class GetGuardrailResponse
343
+ attr_accessor name: ::String
344
+ attr_accessor description: ::String
345
+ attr_accessor guardrail_id: ::String
346
+ attr_accessor guardrail_arn: ::String
347
+ attr_accessor version: ::String
348
+ attr_accessor status: ("CREATING" | "UPDATING" | "VERSIONING" | "READY" | "FAILED" | "DELETING")
349
+ attr_accessor topic_policy: Types::GuardrailTopicPolicy
350
+ attr_accessor content_policy: Types::GuardrailContentPolicy
351
+ attr_accessor word_policy: Types::GuardrailWordPolicy
352
+ attr_accessor sensitive_information_policy: Types::GuardrailSensitiveInformationPolicy
353
+ attr_accessor created_at: ::Time
354
+ attr_accessor updated_at: ::Time
355
+ attr_accessor status_reasons: ::Array[::String]
356
+ attr_accessor failure_recommendations: ::Array[::String]
357
+ attr_accessor blocked_input_messaging: ::String
358
+ attr_accessor blocked_outputs_messaging: ::String
359
+ attr_accessor kms_key_arn: ::String
360
+ SENSITIVE: [:name, :description, :blocked_input_messaging, :blocked_outputs_messaging]
361
+ end
362
+
164
363
  class GetModelCustomizationJobRequest
165
364
  attr_accessor job_identifier: ::String
166
365
  SENSITIVE: []
@@ -221,6 +420,160 @@ module Aws::Bedrock
221
420
  SENSITIVE: []
222
421
  end
223
422
 
423
+ class GuardrailContentFilter
424
+ attr_accessor type: ("SEXUAL" | "VIOLENCE" | "HATE" | "INSULTS" | "MISCONDUCT" | "PROMPT_ATTACK")
425
+ attr_accessor input_strength: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
426
+ attr_accessor output_strength: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
427
+ SENSITIVE: []
428
+ end
429
+
430
+ class GuardrailContentFilterConfig
431
+ attr_accessor type: ("SEXUAL" | "VIOLENCE" | "HATE" | "INSULTS" | "MISCONDUCT" | "PROMPT_ATTACK")
432
+ attr_accessor input_strength: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
433
+ attr_accessor output_strength: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
434
+ SENSITIVE: []
435
+ end
436
+
437
+ class GuardrailContentPolicy
438
+ attr_accessor filters: ::Array[Types::GuardrailContentFilter]
439
+ SENSITIVE: []
440
+ end
441
+
442
+ class GuardrailContentPolicyConfig
443
+ attr_accessor filters_config: ::Array[Types::GuardrailContentFilterConfig]
444
+ SENSITIVE: []
445
+ end
446
+
447
+ class GuardrailManagedWords
448
+ attr_accessor type: ("PROFANITY")
449
+ SENSITIVE: []
450
+ end
451
+
452
+ class GuardrailManagedWordsConfig
453
+ attr_accessor type: ("PROFANITY")
454
+ SENSITIVE: []
455
+ end
456
+
457
+ class GuardrailPiiEntity
458
+ attr_accessor type: ("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")
459
+ attr_accessor action: ("BLOCK" | "ANONYMIZE")
460
+ SENSITIVE: []
461
+ end
462
+
463
+ class GuardrailPiiEntityConfig
464
+ attr_accessor type: ("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")
465
+ attr_accessor action: ("BLOCK" | "ANONYMIZE")
466
+ SENSITIVE: []
467
+ end
468
+
469
+ class GuardrailRegex
470
+ attr_accessor name: ::String
471
+ attr_accessor description: ::String
472
+ attr_accessor pattern: ::String
473
+ attr_accessor action: ("BLOCK" | "ANONYMIZE")
474
+ SENSITIVE: []
475
+ end
476
+
477
+ class GuardrailRegexConfig
478
+ attr_accessor name: ::String
479
+ attr_accessor description: ::String
480
+ attr_accessor pattern: ::String
481
+ attr_accessor action: ("BLOCK" | "ANONYMIZE")
482
+ SENSITIVE: []
483
+ end
484
+
485
+ class GuardrailSensitiveInformationPolicy
486
+ attr_accessor pii_entities: ::Array[Types::GuardrailPiiEntity]
487
+ attr_accessor regexes: ::Array[Types::GuardrailRegex]
488
+ SENSITIVE: []
489
+ end
490
+
491
+ class GuardrailSensitiveInformationPolicyConfig
492
+ attr_accessor pii_entities_config: ::Array[Types::GuardrailPiiEntityConfig]
493
+ attr_accessor regexes_config: ::Array[Types::GuardrailRegexConfig]
494
+ SENSITIVE: []
495
+ end
496
+
497
+ class GuardrailSummary
498
+ attr_accessor id: ::String
499
+ attr_accessor arn: ::String
500
+ attr_accessor status: ("CREATING" | "UPDATING" | "VERSIONING" | "READY" | "FAILED" | "DELETING")
501
+ attr_accessor name: ::String
502
+ attr_accessor description: ::String
503
+ attr_accessor version: ::String
504
+ attr_accessor created_at: ::Time
505
+ attr_accessor updated_at: ::Time
506
+ SENSITIVE: [:name, :description]
507
+ end
508
+
509
+ class GuardrailTopic
510
+ attr_accessor name: ::String
511
+ attr_accessor definition: ::String
512
+ attr_accessor examples: ::Array[::String]
513
+ attr_accessor type: ("DENY")
514
+ SENSITIVE: [:name, :definition]
515
+ end
516
+
517
+ class GuardrailTopicConfig
518
+ attr_accessor name: ::String
519
+ attr_accessor definition: ::String
520
+ attr_accessor examples: ::Array[::String]
521
+ attr_accessor type: ("DENY")
522
+ SENSITIVE: [:name, :definition]
523
+ end
524
+
525
+ class GuardrailTopicPolicy
526
+ attr_accessor topics: ::Array[Types::GuardrailTopic]
527
+ SENSITIVE: []
528
+ end
529
+
530
+ class GuardrailTopicPolicyConfig
531
+ attr_accessor topics_config: ::Array[Types::GuardrailTopicConfig]
532
+ SENSITIVE: []
533
+ end
534
+
535
+ class GuardrailWord
536
+ attr_accessor text: ::String
537
+ SENSITIVE: []
538
+ end
539
+
540
+ class GuardrailWordConfig
541
+ attr_accessor text: ::String
542
+ SENSITIVE: []
543
+ end
544
+
545
+ class GuardrailWordPolicy
546
+ attr_accessor words: ::Array[Types::GuardrailWord]
547
+ attr_accessor managed_word_lists: ::Array[Types::GuardrailManagedWords]
548
+ SENSITIVE: []
549
+ end
550
+
551
+ class GuardrailWordPolicyConfig
552
+ attr_accessor words_config: ::Array[Types::GuardrailWordConfig]
553
+ attr_accessor managed_word_lists_config: ::Array[Types::GuardrailManagedWordsConfig]
554
+ SENSITIVE: []
555
+ end
556
+
557
+ class HumanEvaluationConfig
558
+ attr_accessor human_workflow_config: Types::HumanWorkflowConfig
559
+ attr_accessor custom_metrics: ::Array[Types::HumanEvaluationCustomMetric]
560
+ attr_accessor dataset_metric_configs: ::Array[Types::EvaluationDatasetMetricConfig]
561
+ SENSITIVE: []
562
+ end
563
+
564
+ class HumanEvaluationCustomMetric
565
+ attr_accessor name: ::String
566
+ attr_accessor description: ::String
567
+ attr_accessor rating_method: ::String
568
+ SENSITIVE: [:name, :description]
569
+ end
570
+
571
+ class HumanWorkflowConfig
572
+ attr_accessor flow_definition_arn: ::String
573
+ attr_accessor instructions: ::String
574
+ SENSITIVE: [:instructions]
575
+ end
576
+
224
577
  class InternalServerException
225
578
  attr_accessor message: ::String
226
579
  SENSITIVE: []
@@ -245,6 +598,24 @@ module Aws::Bedrock
245
598
  SENSITIVE: []
246
599
  end
247
600
 
601
+ class ListEvaluationJobsRequest
602
+ attr_accessor creation_time_after: ::Time
603
+ attr_accessor creation_time_before: ::Time
604
+ attr_accessor status_equals: ("InProgress" | "Completed" | "Failed" | "Stopping" | "Stopped")
605
+ attr_accessor name_contains: ::String
606
+ attr_accessor max_results: ::Integer
607
+ attr_accessor next_token: ::String
608
+ attr_accessor sort_by: ("CreationTime")
609
+ attr_accessor sort_order: ("Ascending" | "Descending")
610
+ SENSITIVE: []
611
+ end
612
+
613
+ class ListEvaluationJobsResponse
614
+ attr_accessor next_token: ::String
615
+ attr_accessor job_summaries: ::Array[Types::EvaluationSummary]
616
+ SENSITIVE: []
617
+ end
618
+
248
619
  class ListFoundationModelsRequest
249
620
  attr_accessor by_provider: ::String
250
621
  attr_accessor by_customization_type: ("FINE_TUNING" | "CONTINUED_PRE_TRAINING")
@@ -258,6 +629,19 @@ module Aws::Bedrock
258
629
  SENSITIVE: []
259
630
  end
260
631
 
632
+ class ListGuardrailsRequest
633
+ attr_accessor guardrail_identifier: ::String
634
+ attr_accessor max_results: ::Integer
635
+ attr_accessor next_token: ::String
636
+ SENSITIVE: []
637
+ end
638
+
639
+ class ListGuardrailsResponse
640
+ attr_accessor guardrails: ::Array[Types::GuardrailSummary]
641
+ attr_accessor next_token: ::String
642
+ SENSITIVE: []
643
+ end
644
+
261
645
  class ListModelCustomizationJobsRequest
262
646
  attr_accessor creation_time_after: ::Time
263
647
  attr_accessor creation_time_before: ::Time
@@ -373,6 +757,14 @@ module Aws::Bedrock
373
757
  SENSITIVE: []
374
758
  end
375
759
 
760
+ class StopEvaluationJobRequest
761
+ attr_accessor job_identifier: ::String
762
+ SENSITIVE: [:job_identifier]
763
+ end
764
+
765
+ class StopEvaluationJobResponse < Aws::EmptyStructure
766
+ end
767
+
376
768
  class StopModelCustomizationJobRequest
377
769
  attr_accessor job_identifier: ::String
378
770
  SENSITIVE: []
@@ -426,6 +818,28 @@ module Aws::Bedrock
426
818
  class UntagResourceResponse < Aws::EmptyStructure
427
819
  end
428
820
 
821
+ class UpdateGuardrailRequest
822
+ attr_accessor guardrail_identifier: ::String
823
+ attr_accessor name: ::String
824
+ attr_accessor description: ::String
825
+ attr_accessor topic_policy_config: Types::GuardrailTopicPolicyConfig
826
+ attr_accessor content_policy_config: Types::GuardrailContentPolicyConfig
827
+ attr_accessor word_policy_config: Types::GuardrailWordPolicyConfig
828
+ attr_accessor sensitive_information_policy_config: Types::GuardrailSensitiveInformationPolicyConfig
829
+ attr_accessor blocked_input_messaging: ::String
830
+ attr_accessor blocked_outputs_messaging: ::String
831
+ attr_accessor kms_key_id: ::String
832
+ SENSITIVE: [:name, :description, :blocked_input_messaging, :blocked_outputs_messaging]
833
+ end
834
+
835
+ class UpdateGuardrailResponse
836
+ attr_accessor guardrail_id: ::String
837
+ attr_accessor guardrail_arn: ::String
838
+ attr_accessor version: ::String
839
+ attr_accessor updated_at: ::Time
840
+ SENSITIVE: []
841
+ end
842
+
429
843
  class UpdateProvisionedModelThroughputRequest
430
844
  attr_accessor provisioned_model_id: ::String
431
845
  attr_accessor desired_provisioned_model_name: ::String
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-26 00:00:00.000000000 Z
11
+ date: 2024-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core