aws-sdk-bedrockruntime 1.71.0 → 1.72.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d921b47acca94d9951cd91cdeef9723e09f3430c4b58e949ae29ce16beab02c0
4
- data.tar.gz: 8759178f8b225b655c3fb892b0918e9c4cb5d905d7d138e8771e63fff7a1121e
3
+ metadata.gz: 301bb5aa68305df5bc9e951a0ed54fb5b93bb5fe0e4a7019125276c33ab399d5
4
+ data.tar.gz: 84bedbd592678e39f2ad442c83a3816108c6cc9505de0328af5951135d7fde00
5
5
  SHA512:
6
- metadata.gz: abb320924257441dce34d26e0455f424144080ce923fd0415211b862fa6dab64b9c1a7f664cdd62fe96aa4203a643e26e8d3b1086a270a9ee67292c44acb3e62
7
- data.tar.gz: 66a58aa04a468810651cfe032f46e5cfc70902f43dbe3643ed330ffa05f2a4e75427f4fc6759ac02b0e88cac974094775890c87da9824402b45bb607d0ae4488
6
+ metadata.gz: 26686c725ac9f5f0360f32a26504909aa8c74f48e1a0744c8d521621e952a5d4863832706ac47a067862d8f1603da277b6ee4e1a9bc52ff17368e4be956fc77e
7
+ data.tar.gz: 7107117ecb4207154e038099bc89f1bd64df9529ddd4e27433f1e9e64a6ffca1cf967105da2e3b2e4ff980e6e9bbf7fe8be83f8328d8966425a721f9e4b893b4
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.72.0 (2026-01-20)
5
+ ------------------
6
+
7
+ * Feature - Added support for extended prompt caching with one hour TTL.
8
+
4
9
  1.71.0 (2026-01-16)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.71.0
1
+ 1.72.0
@@ -621,7 +621,7 @@ module Aws::BedrockRuntime
621
621
  tracer: tracer
622
622
  )
623
623
  context[:gem_name] = 'aws-sdk-bedrockruntime'
624
- context[:gem_version] = '1.71.0'
624
+ context[:gem_version] = '1.72.0'
625
625
  Seahorse::Client::Request.new(handlers, context)
626
626
  end
627
627
 
@@ -1091,6 +1091,7 @@ module Aws::BedrockRuntime
1091
1091
  # },
1092
1092
  # cache_point: {
1093
1093
  # type: "default", # required, accepts default
1094
+ # ttl: "5m", # accepts 5m, 1h
1094
1095
  # },
1095
1096
  # reasoning_content: {
1096
1097
  # reasoning_text: {
@@ -1176,6 +1177,7 @@ module Aws::BedrockRuntime
1176
1177
  # },
1177
1178
  # cache_point: {
1178
1179
  # type: "default", # required, accepts default
1180
+ # ttl: "5m", # accepts 5m, 1h
1179
1181
  # },
1180
1182
  # },
1181
1183
  # ],
@@ -1201,6 +1203,7 @@ module Aws::BedrockRuntime
1201
1203
  # },
1202
1204
  # cache_point: {
1203
1205
  # type: "default", # required, accepts default
1206
+ # ttl: "5m", # accepts 5m, 1h
1204
1207
  # },
1205
1208
  # },
1206
1209
  # ],
@@ -1305,6 +1308,7 @@ module Aws::BedrockRuntime
1305
1308
  # resp.output.message.content[0].guard_content.image.format #=> String, one of "png", "jpeg"
1306
1309
  # resp.output.message.content[0].guard_content.image.source.bytes #=> String
1307
1310
  # resp.output.message.content[0].cache_point.type #=> String, one of "default"
1311
+ # resp.output.message.content[0].cache_point.ttl #=> String, one of "5m", "1h"
1308
1312
  # resp.output.message.content[0].reasoning_content.reasoning_text.text #=> String
1309
1313
  # resp.output.message.content[0].reasoning_content.reasoning_text.signature #=> String
1310
1314
  # resp.output.message.content[0].reasoning_content.redacted_content #=> String
@@ -1340,6 +1344,9 @@ module Aws::BedrockRuntime
1340
1344
  # resp.usage.total_tokens #=> Integer
1341
1345
  # resp.usage.cache_read_input_tokens #=> Integer
1342
1346
  # resp.usage.cache_write_input_tokens #=> Integer
1347
+ # resp.usage.cache_details #=> Array
1348
+ # resp.usage.cache_details[0].ttl #=> String, one of "5m", "1h"
1349
+ # resp.usage.cache_details[0].input_tokens #=> Integer
1343
1350
  # resp.metrics.latency_ms #=> Integer
1344
1351
  # resp.trace.guardrail.model_output #=> Array
1345
1352
  # resp.trace.guardrail.model_output[0] #=> String
@@ -2216,6 +2223,7 @@ module Aws::BedrockRuntime
2216
2223
  # },
2217
2224
  # cache_point: {
2218
2225
  # type: "default", # required, accepts default
2226
+ # ttl: "5m", # accepts 5m, 1h
2219
2227
  # },
2220
2228
  # reasoning_content: {
2221
2229
  # reasoning_text: {
@@ -2301,6 +2309,7 @@ module Aws::BedrockRuntime
2301
2309
  # },
2302
2310
  # cache_point: {
2303
2311
  # type: "default", # required, accepts default
2312
+ # ttl: "5m", # accepts 5m, 1h
2304
2313
  # },
2305
2314
  # },
2306
2315
  # ],
@@ -2326,6 +2335,7 @@ module Aws::BedrockRuntime
2326
2335
  # },
2327
2336
  # cache_point: {
2328
2337
  # type: "default", # required, accepts default
2338
+ # ttl: "5m", # accepts 5m, 1h
2329
2339
  # },
2330
2340
  # },
2331
2341
  # ],
@@ -2427,6 +2437,9 @@ module Aws::BedrockRuntime
2427
2437
  # event.usage.total_tokens #=> Integer
2428
2438
  # event.usage.cache_read_input_tokens #=> Integer
2429
2439
  # event.usage.cache_write_input_tokens #=> Integer
2440
+ # event.usage.cache_details #=> Array
2441
+ # event.usage.cache_details[0].ttl #=> String, one of "5m", "1h"
2442
+ # event.usage.cache_details[0].input_tokens #=> Integer
2430
2443
  # event.metrics.latency_ms #=> Integer
2431
2444
  # event.trace.guardrail.model_output #=> Array
2432
2445
  # event.trace.guardrail.model_output[0] #=> String
@@ -3031,6 +3044,7 @@ module Aws::BedrockRuntime
3031
3044
  # },
3032
3045
  # cache_point: {
3033
3046
  # type: "default", # required, accepts default
3047
+ # ttl: "5m", # accepts 5m, 1h
3034
3048
  # },
3035
3049
  # reasoning_content: {
3036
3050
  # reasoning_text: {
@@ -3116,6 +3130,7 @@ module Aws::BedrockRuntime
3116
3130
  # },
3117
3131
  # cache_point: {
3118
3132
  # type: "default", # required, accepts default
3133
+ # ttl: "5m", # accepts 5m, 1h
3119
3134
  # },
3120
3135
  # },
3121
3136
  # ],
@@ -3135,6 +3150,7 @@ module Aws::BedrockRuntime
3135
3150
  # },
3136
3151
  # cache_point: {
3137
3152
  # type: "default", # required, accepts default
3153
+ # ttl: "5m", # accepts 5m, 1h
3138
3154
  # },
3139
3155
  # },
3140
3156
  # ],
@@ -3877,7 +3893,7 @@ module Aws::BedrockRuntime
3877
3893
  tracer: tracer
3878
3894
  )
3879
3895
  context[:gem_name] = 'aws-sdk-bedrockruntime'
3880
- context[:gem_version] = '1.71.0'
3896
+ context[:gem_version] = '1.72.0'
3881
3897
  Seahorse::Client::Request.new(handlers, context)
3882
3898
  end
3883
3899
 
@@ -40,8 +40,12 @@ module Aws::BedrockRuntime
40
40
  Blob = Shapes::BlobShape.new(name: 'Blob')
41
41
  Body = Shapes::BlobShape.new(name: 'Body')
42
42
  Boolean = Shapes::BooleanShape.new(name: 'Boolean')
43
+ CacheDetail = Shapes::StructureShape.new(name: 'CacheDetail')
44
+ CacheDetailInputTokensInteger = Shapes::IntegerShape.new(name: 'CacheDetailInputTokensInteger')
45
+ CacheDetailsList = Shapes::ListShape.new(name: 'CacheDetailsList')
43
46
  CachePointBlock = Shapes::StructureShape.new(name: 'CachePointBlock')
44
47
  CachePointType = Shapes::StringShape.new(name: 'CachePointType')
48
+ CacheTTL = Shapes::StringShape.new(name: 'CacheTTL')
45
49
  Citation = Shapes::StructureShape.new(name: 'Citation')
46
50
  CitationGeneratedContent = Shapes::UnionShape.new(name: 'CitationGeneratedContent')
47
51
  CitationGeneratedContentList = Shapes::ListShape.new(name: 'CitationGeneratedContentList')
@@ -421,7 +425,14 @@ module Aws::BedrockRuntime
421
425
  BidirectionalOutputPayloadPart.add_member(:bytes, Shapes::ShapeRef.new(shape: PartBody, location_name: "bytes"))
422
426
  BidirectionalOutputPayloadPart.struct_class = Types::BidirectionalOutputPayloadPart
423
427
 
428
+ CacheDetail.add_member(:ttl, Shapes::ShapeRef.new(shape: CacheTTL, required: true, location_name: "ttl"))
429
+ CacheDetail.add_member(:input_tokens, Shapes::ShapeRef.new(shape: CacheDetailInputTokensInteger, required: true, location_name: "inputTokens"))
430
+ CacheDetail.struct_class = Types::CacheDetail
431
+
432
+ CacheDetailsList.member = Shapes::ShapeRef.new(shape: CacheDetail)
433
+
424
434
  CachePointBlock.add_member(:type, Shapes::ShapeRef.new(shape: CachePointType, required: true, location_name: "type"))
435
+ CachePointBlock.add_member(:ttl, Shapes::ShapeRef.new(shape: CacheTTL, location_name: "ttl"))
425
436
  CachePointBlock.struct_class = Types::CachePointBlock
426
437
 
427
438
  Citation.add_member(:title, Shapes::ShapeRef.new(shape: String, location_name: "title"))
@@ -1275,6 +1286,7 @@ module Aws::BedrockRuntime
1275
1286
  TokenUsage.add_member(:total_tokens, Shapes::ShapeRef.new(shape: TokenUsageTotalTokensInteger, required: true, location_name: "totalTokens"))
1276
1287
  TokenUsage.add_member(:cache_read_input_tokens, Shapes::ShapeRef.new(shape: TokenUsageCacheReadInputTokensInteger, location_name: "cacheReadInputTokens"))
1277
1288
  TokenUsage.add_member(:cache_write_input_tokens, Shapes::ShapeRef.new(shape: TokenUsageCacheWriteInputTokensInteger, location_name: "cacheWriteInputTokens"))
1289
+ TokenUsage.add_member(:cache_details, Shapes::ShapeRef.new(shape: CacheDetailsList, location_name: "cacheDetails"))
1278
1290
  TokenUsage.struct_class = Types::TokenUsage
1279
1291
 
1280
1292
  Tool.add_member(:tool_spec, Shapes::ShapeRef.new(shape: ToolSpecification, location_name: "toolSpec"))
@@ -372,6 +372,26 @@ module Aws::BedrockRuntime
372
372
  include Aws::Structure
373
373
  end
374
374
 
375
+ # Cache creation metrics for a specific TTL duration
376
+ #
377
+ # @!attribute [rw] ttl
378
+ # TTL duration for these cached tokens
379
+ # @return [String]
380
+ #
381
+ # @!attribute [rw] input_tokens
382
+ # Number of tokens written to cache with this TTL (cache creation
383
+ # tokens)
384
+ # @return [Integer]
385
+ #
386
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/CacheDetail AWS API Documentation
387
+ #
388
+ class CacheDetail < Struct.new(
389
+ :ttl,
390
+ :input_tokens)
391
+ SENSITIVE = []
392
+ include Aws::Structure
393
+ end
394
+
375
395
  # Defines a section of content to be cached for reuse in subsequent API
376
396
  # calls.
377
397
  #
@@ -379,10 +399,17 @@ module Aws::BedrockRuntime
379
399
  # Specifies the type of cache point within the CachePointBlock.
380
400
  # @return [String]
381
401
  #
402
+ # @!attribute [rw] ttl
403
+ # Optional TTL duration for cache entries. When specified, enables
404
+ # extended TTL caching with the specified duration. When omitted, uses
405
+ # `type` value for caching behavior.
406
+ # @return [String]
407
+ #
382
408
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/CachePointBlock AWS API Documentation
383
409
  #
384
410
  class CachePointBlock < Struct.new(
385
- :type)
411
+ :type,
412
+ :ttl)
386
413
  SENSITIVE = []
387
414
  include Aws::Structure
388
415
  end
@@ -4304,6 +4331,11 @@ module Aws::BedrockRuntime
4304
4331
  # The number of input tokens written to the cache for the request.
4305
4332
  # @return [Integer]
4306
4333
  #
4334
+ # @!attribute [rw] cache_details
4335
+ # Detailed breakdown of cache writes by TTL. Empty if no cache
4336
+ # creation occurred. Sorted by TTL duration (1h before 5m).
4337
+ # @return [Array<Types::CacheDetail>]
4338
+ #
4307
4339
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/TokenUsage AWS API Documentation
4308
4340
  #
4309
4341
  class TokenUsage < Struct.new(
@@ -4311,7 +4343,8 @@ module Aws::BedrockRuntime
4311
4343
  :output_tokens,
4312
4344
  :total_tokens,
4313
4345
  :cache_read_input_tokens,
4314
- :cache_write_input_tokens)
4346
+ :cache_write_input_tokens,
4347
+ :cache_details)
4315
4348
  SENSITIVE = []
4316
4349
  include Aws::Structure
4317
4350
  end
@@ -73,7 +73,7 @@ module Aws::BedrockRuntime
73
73
  autoload :AsyncClient, 'aws-sdk-bedrockruntime/async_client'
74
74
  autoload :EventStreams, 'aws-sdk-bedrockruntime/event_streams'
75
75
 
76
- GEM_VERSION = '1.71.0'
76
+ GEM_VERSION = '1.72.0'
77
77
 
78
78
  end
79
79
 
data/sig/client.rbs CHANGED
@@ -278,7 +278,8 @@ module Aws
278
278
  }?
279
279
  }?,
280
280
  cache_point: {
281
- type: ("default")
281
+ type: ("default"),
282
+ ttl: ("5m" | "1h")?
282
283
  }?,
283
284
  reasoning_content: {
284
285
  reasoning_text: {
@@ -363,7 +364,8 @@ module Aws
363
364
  }?
364
365
  }?,
365
366
  cache_point: {
366
- type: ("default")
367
+ type: ("default"),
368
+ ttl: ("5m" | "1h")?
367
369
  }?
368
370
  },
369
371
  ],
@@ -388,7 +390,8 @@ module Aws
388
390
  name: ::String
389
391
  }?,
390
392
  cache_point: {
391
- type: ("default")
393
+ type: ("default"),
394
+ ttl: ("5m" | "1h")?
392
395
  }?
393
396
  },
394
397
  ],
@@ -581,7 +584,8 @@ module Aws
581
584
  }?
582
585
  }?,
583
586
  cache_point: {
584
- type: ("default")
587
+ type: ("default"),
588
+ ttl: ("5m" | "1h")?
585
589
  }?,
586
590
  reasoning_content: {
587
591
  reasoning_text: {
@@ -666,7 +670,8 @@ module Aws
666
670
  }?
667
671
  }?,
668
672
  cache_point: {
669
- type: ("default")
673
+ type: ("default"),
674
+ ttl: ("5m" | "1h")?
670
675
  }?
671
676
  },
672
677
  ],
@@ -691,7 +696,8 @@ module Aws
691
696
  name: ::String
692
697
  }?,
693
698
  cache_point: {
694
- type: ("default")
699
+ type: ("default"),
700
+ ttl: ("5m" | "1h")?
695
701
  }?
696
702
  },
697
703
  ],
@@ -890,7 +896,8 @@ module Aws
890
896
  }?
891
897
  }?,
892
898
  cache_point: {
893
- type: ("default")
899
+ type: ("default"),
900
+ ttl: ("5m" | "1h")?
894
901
  }?,
895
902
  reasoning_content: {
896
903
  reasoning_text: {
@@ -975,7 +982,8 @@ module Aws
975
982
  }?
976
983
  }?,
977
984
  cache_point: {
978
- type: ("default")
985
+ type: ("default"),
986
+ ttl: ("5m" | "1h")?
979
987
  }?
980
988
  },
981
989
  ]?,
@@ -994,7 +1002,8 @@ module Aws
994
1002
  name: ::String
995
1003
  }?,
996
1004
  cache_point: {
997
- type: ("default")
1005
+ type: ("default"),
1006
+ ttl: ("5m" | "1h")?
998
1007
  }?
999
1008
  },
1000
1009
  ],
data/sig/types.rbs CHANGED
@@ -111,8 +111,15 @@ module Aws::BedrockRuntime
111
111
  SENSITIVE: [:bytes]
112
112
  end
113
113
 
114
+ class CacheDetail
115
+ attr_accessor ttl: ("5m" | "1h")
116
+ attr_accessor input_tokens: ::Integer
117
+ SENSITIVE: []
118
+ end
119
+
114
120
  class CachePointBlock
115
121
  attr_accessor type: ("default")
122
+ attr_accessor ttl: ("5m" | "1h")
116
123
  SENSITIVE: []
117
124
  end
118
125
 
@@ -1206,6 +1213,7 @@ module Aws::BedrockRuntime
1206
1213
  attr_accessor total_tokens: ::Integer
1207
1214
  attr_accessor cache_read_input_tokens: ::Integer
1208
1215
  attr_accessor cache_write_input_tokens: ::Integer
1216
+ attr_accessor cache_details: ::Array[Types::CacheDetail]
1209
1217
  SENSITIVE: []
1210
1218
  end
1211
1219
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.71.0
4
+ version: 1.72.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services