Skip to content

Commit a4b303a

Browse files
4.1.710
1 parent f2b9c82 commit a4b303a

13 files changed

+1016
-825
lines changed

Include/sdk/_sdk-versions.json

Lines changed: 806 additions & 806 deletions
Large diffs are not rendered by default.

changelogs/CHANGELOG.2024.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
### 4.1.709 (2024-12-02 06:19Z)
1+
### 4.1.710 (2024-12-03 08:01Z)
2+
* AWS Tools for PowerShell now use AWS .NET SDK 3.7.938.0 and leverage its new features and improvements. Please find a description of the changes at https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.ALL.md.
3+
* Amazon Bedrock Runtime
4+
* Modified cmdlet Invoke-BDRRConverse: added parameter PerformanceConfig_Latency.
5+
* Modified cmdlet Invoke-BDRRConverseStream: added parameter PerformanceConfig_Latency.
6+
* Modified cmdlet Invoke-BDRRModel: added parameter PerformanceConfigLatency.
7+
* Modified cmdlet Invoke-BDRRModelWithResponseStream: added parameter PerformanceConfigLatency.
8+
9+
### 4.1.709 (2024-12-02 06:19Z)
210
* AWS Tools for PowerShell now use AWS .NET SDK 3.7.937.0 and leverage its new features and improvements. Please find a description of the changes at https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.ALL.md.
311
* Amazon Agents for Amazon Bedrock
412
* Added cmdlet Add-AABKnowledgeBaseDocument leveraging the IngestKnowledgeBaseDocuments service API.

changelogs/CHANGELOG.ALL.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
### 4.1.709 (2024-12-02 06:19Z)
1+
### 4.1.710 (2024-12-03 08:01Z)
2+
* AWS Tools for PowerShell now use AWS .NET SDK 3.7.938.0 and leverage its new features and improvements. Please find a description of the changes at https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.ALL.md.
3+
* Amazon Bedrock Runtime
4+
* Modified cmdlet Invoke-BDRRConverse: added parameter PerformanceConfig_Latency.
5+
* Modified cmdlet Invoke-BDRRConverseStream: added parameter PerformanceConfig_Latency.
6+
* Modified cmdlet Invoke-BDRRModel: added parameter PerformanceConfigLatency.
7+
* Modified cmdlet Invoke-BDRRModelWithResponseStream: added parameter PerformanceConfigLatency.
8+
9+
### 4.1.709 (2024-12-02 06:19Z)
210
* AWS Tools for PowerShell now use AWS .NET SDK 3.7.937.0 and leverage its new features and improvements. Please find a description of the changes at https://github.com/aws/aws-sdk-net/blob/main/changelogs/SDK.CHANGELOG.ALL.md.
311
* Amazon Agents for Amazon Bedrock
412
* Added cmdlet Add-AABKnowledgeBaseDocument leveraging the IngestKnowledgeBaseDocuments service API.

modules/AWSPowerShell/AWSPowerShellCompleters.psm1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7362,6 +7362,18 @@ $BDRR_Completers = {
73627362
break
73637363
}
73647364

7365+
# Amazon.BedrockRuntime.PerformanceConfigLatency
7366+
{
7367+
($_ -eq "Invoke-BDRRConverse/PerformanceConfig_Latency") -Or
7368+
($_ -eq "Invoke-BDRRConverseStream/PerformanceConfig_Latency") -Or
7369+
($_ -eq "Invoke-BDRRModel/PerformanceConfigLatency") -Or
7370+
($_ -eq "Invoke-BDRRModelWithResponseStream/PerformanceConfigLatency")
7371+
}
7372+
{
7373+
$v = "optimized","standard"
7374+
break
7375+
}
7376+
73657377
# Amazon.BedrockRuntime.Trace
73667378
{
73677379
($_ -eq "Invoke-BDRRModel/Trace") -Or
@@ -7383,6 +7395,8 @@ $BDRR_Completers = {
73837395
$BDRR_map = @{
73847396
"GuardrailConfig_StreamProcessingMode"=@("Invoke-BDRRConverseStream")
73857397
"GuardrailConfig_Trace"=@("Invoke-BDRRConverse","Invoke-BDRRConverseStream")
7398+
"PerformanceConfig_Latency"=@("Invoke-BDRRConverse","Invoke-BDRRConverseStream")
7399+
"PerformanceConfigLatency"=@("Invoke-BDRRModel","Invoke-BDRRModelWithResponseStream")
73867400
"Source"=@("Invoke-BDRRGuardrail")
73877401
"Trace"=@("Invoke-BDRRModel","Invoke-BDRRModelWithResponseStream")
73887402
}
@@ -63497,7 +63511,7 @@ $S3C_Completers = {
6349763511
# Amazon.S3Control.S3ChecksumAlgorithm
6349863512
"New-S3CJob/S3PutObjectCopy_ChecksumAlgorithm"
6349963513
{
63500-
$v = "CRC32","CRC32C","SHA1","SHA256"
63514+
$v = "CRC32","CRC32C","CRC64NVME","SHA1","SHA256"
6350163515
break
6350263516
}
6350363517

modules/AWSPowerShell/Cmdlets/BedrockRuntime/AWS.Tools.BedrockRuntime.Completers.psm1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ $BDRR_Completers = {
104104
break
105105
}
106106

107+
# Amazon.BedrockRuntime.PerformanceConfigLatency
108+
{
109+
($_ -eq "Invoke-BDRRConverse/PerformanceConfig_Latency") -Or
110+
($_ -eq "Invoke-BDRRConverseStream/PerformanceConfig_Latency") -Or
111+
($_ -eq "Invoke-BDRRModel/PerformanceConfigLatency") -Or
112+
($_ -eq "Invoke-BDRRModelWithResponseStream/PerformanceConfigLatency")
113+
}
114+
{
115+
$v = "optimized","standard"
116+
break
117+
}
118+
107119
# Amazon.BedrockRuntime.Trace
108120
{
109121
($_ -eq "Invoke-BDRRModel/Trace") -Or
@@ -125,6 +137,8 @@ $BDRR_Completers = {
125137
$BDRR_map = @{
126138
"GuardrailConfig_StreamProcessingMode"=@("Invoke-BDRRConverseStream")
127139
"GuardrailConfig_Trace"=@("Invoke-BDRRConverse","Invoke-BDRRConverseStream")
140+
"PerformanceConfig_Latency"=@("Invoke-BDRRConverse","Invoke-BDRRConverseStream")
141+
"PerformanceConfigLatency"=@("Invoke-BDRRModel","Invoke-BDRRModelWithResponseStream")
128142
"Source"=@("Invoke-BDRRGuardrail")
129143
"Trace"=@("Invoke-BDRRModel","Invoke-BDRRModelWithResponseStream")
130144
}

modules/AWSPowerShell/Cmdlets/BedrockRuntime/Basic/Invoke-BDRRConverse-Cmdlet.cs

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ namespace Amazon.PowerShell.Cmdlets.BDRR
5959
///
6060
/// </para><para>
6161
/// This operation requires permission for the <c>bedrock:InvokeModel</c> action.
62+
/// </para><important><para>
63+
/// To deny all inference access to resources that you specify in the modelId field, you
64+
/// need to deny access to the <c>bedrock:InvokeModel</c> and <c>bedrock:InvokeModelWithResponseStream</c>
65+
/// actions. Doing this also denies access to the resource through the base inference
66+
/// actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a>
67+
/// and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>).
68+
/// For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny
69+
/// access for inference on specific models</a>.
70+
/// </para></important><para>
71+
/// For troubleshooting some of the common errors you might encounter when using the <c>Converse</c>
72+
/// API, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting
73+
/// Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide
6274
/// </para>
6375
/// </summary>
6476
[Cmdlet("Invoke", "BDRRConverse", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)]
@@ -148,6 +160,17 @@ public partial class InvokeBDRRConverseCmdlet : AmazonBedrockRuntimeClientCmdlet
148160
public System.String GuardrailConfig_GuardrailVersion { get; set; }
149161
#endregion
150162

163+
#region Parameter PerformanceConfig_Latency
164+
/// <summary>
165+
/// <para>
166+
/// <para>To use a latency-optimized version of the model, set to <c>optimized</c>.</para>
167+
/// </para>
168+
/// </summary>
169+
[System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)]
170+
[AWSConstantClassSource("Amazon.BedrockRuntime.PerformanceConfigLatency")]
171+
public Amazon.BedrockRuntime.PerformanceConfigLatency PerformanceConfig_Latency { get; set; }
172+
#endregion
173+
151174
#region Parameter InferenceConfig_MaxToken
152175
/// <summary>
153176
/// <para>
@@ -185,8 +208,8 @@ public partial class InvokeBDRRConverseCmdlet : AmazonBedrockRuntimeClientCmdlet
185208
/// more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run
186209
/// inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</para></li><li><para>If you use a custom model, first purchase Provisioned Throughput for it. Then specify
187210
/// the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use
188-
/// a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</para></li><li><para>To include a prompt that was defined in Prompt management, specify the ARN of the
189-
/// prompt version to use.</para></li></ul><para>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported
211+
/// a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</para></li><li><para>To include a prompt that was defined in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html">Prompt
212+
/// management</a>, specify the ARN of the prompt version to use.</para></li></ul><para>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported
190213
/// models</a>.</para>
191214
/// </para>
192215
/// </summary>
@@ -387,6 +410,7 @@ protected override void ProcessRecord()
387410
WriteWarning("You are passing $null as a value for parameter ModelId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
388411
}
389412
#endif
413+
context.PerformanceConfig_Latency = this.PerformanceConfig_Latency;
390414
if (this.PromptVariable != null)
391415
{
392416
context.PromptVariable = new Dictionary<System.String, Amazon.BedrockRuntime.Model.PromptVariableValues>(StringComparer.Ordinal);
@@ -526,6 +550,25 @@ public object Execute(ExecutorContext context)
526550
{
527551
request.ModelId = cmdletContext.ModelId;
528552
}
553+
554+
// populate PerformanceConfig
555+
var requestPerformanceConfigIsNull = true;
556+
request.PerformanceConfig = new Amazon.BedrockRuntime.Model.PerformanceConfiguration();
557+
Amazon.BedrockRuntime.PerformanceConfigLatency requestPerformanceConfig_performanceConfig_Latency = null;
558+
if (cmdletContext.PerformanceConfig_Latency != null)
559+
{
560+
requestPerformanceConfig_performanceConfig_Latency = cmdletContext.PerformanceConfig_Latency;
561+
}
562+
if (requestPerformanceConfig_performanceConfig_Latency != null)
563+
{
564+
request.PerformanceConfig.Latency = requestPerformanceConfig_performanceConfig_Latency;
565+
requestPerformanceConfigIsNull = false;
566+
}
567+
// determine if request.PerformanceConfig should be set to null
568+
if (requestPerformanceConfigIsNull)
569+
{
570+
request.PerformanceConfig = null;
571+
}
529572
if (cmdletContext.PromptVariable != null)
530573
{
531574
request.PromptVariables = cmdletContext.PromptVariable;
@@ -685,6 +728,7 @@ internal partial class CmdletContext : ExecutorContext
685728
public System.Single? InferenceConfig_TopP { get; set; }
686729
public List<Amazon.BedrockRuntime.Model.Message> Message { get; set; }
687730
public System.String ModelId { get; set; }
731+
public Amazon.BedrockRuntime.PerformanceConfigLatency PerformanceConfig_Latency { get; set; }
688732
public Dictionary<System.String, Amazon.BedrockRuntime.Model.PromptVariableValues> PromptVariable { get; set; }
689733
public List<Amazon.BedrockRuntime.Model.SystemContentBlock> System { get; set; }
690734
public Amazon.BedrockRuntime.Model.AnyToolChoice ToolChoice_Any { get; set; }

modules/AWSPowerShell/Cmdlets/BedrockRuntime/Basic/Invoke-BDRRConverseStream-Cmdlet.cs

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ namespace Amazon.PowerShell.Cmdlets.BDRR
6666
/// </para><para>
6767
/// This operation requires permission for the <c>bedrock:InvokeModelWithResponseStream</c>
6868
/// action.
69+
/// </para><important><para>
70+
/// To deny all inference access to resources that you specify in the modelId field, you
71+
/// need to deny access to the <c>bedrock:InvokeModel</c> and <c>bedrock:InvokeModelWithResponseStream</c>
72+
/// actions. Doing this also denies access to the resource through the base inference
73+
/// actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a>
74+
/// and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>).
75+
/// For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny
76+
/// access for inference on specific models</a>.
77+
/// </para></important><para>
78+
/// For troubleshooting some of the common errors you might encounter when using the <c>ConverseStream</c>
79+
/// API, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting
80+
/// Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide
6981
/// </para>
7082
/// </summary>
7183
[Cmdlet("Invoke", "BDRRConverseStream", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)]
@@ -156,6 +168,17 @@ public partial class InvokeBDRRConverseStreamCmdlet : AmazonBedrockRuntimeClient
156168
public System.String GuardrailConfig_GuardrailVersion { get; set; }
157169
#endregion
158170

171+
#region Parameter PerformanceConfig_Latency
172+
/// <summary>
173+
/// <para>
174+
/// <para>To use a latency-optimized version of the model, set to <c>optimized</c>.</para>
175+
/// </para>
176+
/// </summary>
177+
[System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)]
178+
[AWSConstantClassSource("Amazon.BedrockRuntime.PerformanceConfigLatency")]
179+
public Amazon.BedrockRuntime.PerformanceConfigLatency PerformanceConfig_Latency { get; set; }
180+
#endregion
181+
159182
#region Parameter InferenceConfig_MaxToken
160183
/// <summary>
161184
/// <para>
@@ -193,8 +216,8 @@ public partial class InvokeBDRRConverseStreamCmdlet : AmazonBedrockRuntimeClient
193216
/// more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run
194217
/// inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</para></li><li><para>If you use a custom model, first purchase Provisioned Throughput for it. Then specify
195218
/// the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use
196-
/// a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</para></li><li><para>To include a prompt that was defined in Prompt management, specify the ARN of the
197-
/// prompt version to use.</para></li></ul><para>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported
219+
/// a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</para></li><li><para>To include a prompt that was defined in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html">Prompt
220+
/// management</a>, specify the ARN of the prompt version to use.</para></li></ul><para>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported
198221
/// models</a>.</para>
199222
/// </para>
200223
/// </summary>
@@ -408,6 +431,7 @@ protected override void ProcessRecord()
408431
WriteWarning("You are passing $null as a value for parameter ModelId which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.");
409432
}
410433
#endif
434+
context.PerformanceConfig_Latency = this.PerformanceConfig_Latency;
411435
if (this.PromptVariable != null)
412436
{
413437
context.PromptVariable = new Dictionary<System.String, Amazon.BedrockRuntime.Model.PromptVariableValues>(StringComparer.Ordinal);
@@ -557,6 +581,25 @@ public object Execute(ExecutorContext context)
557581
{
558582
request.ModelId = cmdletContext.ModelId;
559583
}
584+
585+
// populate PerformanceConfig
586+
var requestPerformanceConfigIsNull = true;
587+
request.PerformanceConfig = new Amazon.BedrockRuntime.Model.PerformanceConfiguration();
588+
Amazon.BedrockRuntime.PerformanceConfigLatency requestPerformanceConfig_performanceConfig_Latency = null;
589+
if (cmdletContext.PerformanceConfig_Latency != null)
590+
{
591+
requestPerformanceConfig_performanceConfig_Latency = cmdletContext.PerformanceConfig_Latency;
592+
}
593+
if (requestPerformanceConfig_performanceConfig_Latency != null)
594+
{
595+
request.PerformanceConfig.Latency = requestPerformanceConfig_performanceConfig_Latency;
596+
requestPerformanceConfigIsNull = false;
597+
}
598+
// determine if request.PerformanceConfig should be set to null
599+
if (requestPerformanceConfigIsNull)
600+
{
601+
request.PerformanceConfig = null;
602+
}
560603
if (cmdletContext.PromptVariable != null)
561604
{
562605
request.PromptVariables = cmdletContext.PromptVariable;
@@ -717,6 +760,7 @@ internal partial class CmdletContext : ExecutorContext
717760
public System.Single? InferenceConfig_TopP { get; set; }
718761
public List<Amazon.BedrockRuntime.Model.Message> Message { get; set; }
719762
public System.String ModelId { get; set; }
763+
public Amazon.BedrockRuntime.PerformanceConfigLatency PerformanceConfig_Latency { get; set; }
720764
public Dictionary<System.String, Amazon.BedrockRuntime.Model.PromptVariableValues> PromptVariable { get; set; }
721765
public List<Amazon.BedrockRuntime.Model.SystemContentBlock> System { get; set; }
722766
public Amazon.BedrockRuntime.Model.AnyToolChoice ToolChoice_Any { get; set; }

0 commit comments

Comments
 (0)