AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2025-10-10 · Documentation low

File: code-library/latest/ug/csharp_4_bedrock-runtime_code_examples.md

Summary

Removed all documentation and code examples related to Amazon Titan Text model integration

Security assessment

The changes remove references to Amazon Titan Text model but show no evidence of addressing security vulnerabilities. This appears to be routine documentation maintenance rather than security-related updates. No security advisories, vulnerability fixes, or security feature additions are mentioned in the removed content.

Diff

diff --git a/code-library/latest/ug/csharp_4_bedrock-runtime_code_examples.md b/code-library/latest/ug/csharp_4_bedrock-runtime_code_examples.md
index f7c749f00..b6584c3cd 100644
--- a//code-library/latest/ug/csharp_4_bedrock-runtime_code_examples.md
+++ b//code-library/latest/ug/csharp_4_bedrock-runtime_code_examples.md
@@ -5 +5 @@
-Amazon Titan TextAnthropic ClaudeCohere CommandMeta LlamaMistral AI
+Anthropic ClaudeCohere CommandMeta LlamaMistral AI
@@ -17,2 +16,0 @@ Each example includes a link to the complete source code, where you can find ins
-  * Amazon Titan Text
-
@@ -30,229 +27,0 @@ Each example includes a link to the complete source code, where you can find ins
-## Amazon Titan Text
-
-The following code example shows how to send a text message to Amazon Titan Text, using Bedrock's Converse API.
-
-**SDK for .NET (v4)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv4/Bedrock-runtime#code-examples). 
-
-Send a text message to Amazon Titan Text, using Bedrock's Converse API.
-    
-    
-    // Use the Converse API to send a text message to Amazon Titan Text.
-    
-    using System;
-    using System.Collections.Generic;
-    using Amazon;
-    using Amazon.BedrockRuntime;
-    using Amazon.BedrockRuntime.Model;
-    
-    // Create a Bedrock Runtime client in the AWS Region you want to use.
-    var client = new AmazonBedrockRuntimeClient(RegionEndpoint.USEast1);
-    
-    // Set the model ID, e.g., Titan Text Premier.
-    var modelId = "amazon.titan-text-premier-v1:0";
-    
-    // Define the user message.
-    var userMessage = "Describe the purpose of a 'hello world' program in one line.";
-    
-    // Create a request with the model ID, the user message, and an inference configuration.
-    var request = new ConverseRequest
-    {
-        ModelId = modelId,
-        Messages = new List<Message>
-        {
-            new Message
-            {
-                Role = ConversationRole.User,
-                Content = new List<ContentBlock> { new ContentBlock { Text = userMessage } }
-            }
-        },
-        InferenceConfig = new InferenceConfiguration()
-        {
-            MaxTokens = 512,
-            Temperature = 0.5F,
-            TopP = 0.9F
-        }
-    };
-    
-    try
-    {
-        // Send the request to the Bedrock Runtime and wait for the result.
-        var response = await client.ConverseAsync(request);
-    
-        // Extract and print the response text.
-        string responseText = response?.Output?.Message?.Content?[0]?.Text ?? "";
-        Console.WriteLine(responseText);
-    }
-    catch (AmazonBedrockRuntimeException e)
-    {
-        Console.WriteLine($"ERROR: Can't invoke '{modelId}'. Reason: {e.Message}");
-        throw;
-    }
-    
-    
-    
-
-  * For API details, see [Converse](https://docs.aws.amazon.com/goto/DotNetSDKV4/bedrock-runtime-2023-09-30/Converse) in _AWS SDK for .NET API Reference_. 
-
-
-
-
-The following code example shows how to send a text message to Amazon Titan Text, using Bedrock's Converse API and process the response stream in real-time.
-
-**SDK for .NET (v4)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv4/Bedrock-runtime#code-examples). 
-
-Send a text message to Amazon Titan Text, using Bedrock's Converse API and process the response stream in real-time.
-    
-    
-    // Use the Converse API to send a text message to Amazon Titan Text
-    // and print the response stream.
-    
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using Amazon;
-    using Amazon.BedrockRuntime;
-    using Amazon.BedrockRuntime.Model;
-    
-    // Create a Bedrock Runtime client in the AWS Region you want to use.
-    var client = new AmazonBedrockRuntimeClient(RegionEndpoint.USEast1);
-    
-    // Set the model ID, e.g., Titan Text Premier.
-    var modelId = "amazon.titan-text-premier-v1:0";
-    
-    // Define the user message.
-    var userMessage = "Describe the purpose of a 'hello world' program in one line.";
-    
-    // Create a request with the model ID, the user message, and an inference configuration.
-    var request = new ConverseStreamRequest
-    {
-        ModelId = modelId,
-        Messages = new List<Message>
-        {
-            new Message
-            {
-                Role = ConversationRole.User,
-                Content = new List<ContentBlock> { new ContentBlock { Text = userMessage } }
-            }
-        },
-        InferenceConfig = new InferenceConfiguration()
-        {
-            MaxTokens = 512,
-            Temperature = 0.5F,
-            TopP = 0.9F
-        }
-    };
-    
-    try
-    {
-        // Send the request to the Bedrock Runtime and wait for the result.
-        var response = await client.ConverseStreamAsync(request);
-    
-        // Extract and print the streamed response text in real-time.
-        foreach (var chunk in response.Stream.AsEnumerable())
-        {
-            if (chunk is ContentBlockDeltaEvent)
-            {
-                Console.Write((chunk as ContentBlockDeltaEvent).Delta.Text);
-            }
-        }
-    }
-    catch (AmazonBedrockRuntimeException e)
-    {
-        Console.WriteLine($"ERROR: Can't invoke '{modelId}'. Reason: {e.Message}");
-        throw;
-    }
-    
-    
-    
-
-  * For API details, see [ConverseStream](https://docs.aws.amazon.com/goto/DotNetSDKV4/bedrock-runtime-2023-09-30/ConverseStream) in _AWS SDK for .NET API Reference_. 
-
-
-
-
-The following code example shows how to send a text message to Amazon Titan Text, using the Invoke Model API.
-
-**SDK for .NET (v4)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv4/Bedrock-runtime#code-examples). 
-
-Use the Invoke Model API to send a text message.
-    
-    
-    // Use the native inference API to send a text message to Amazon Titan Text.
-    
-    using System;
-    using System.IO;
-    using System.Text.Json;
-    using System.Text.Json.Nodes;
-    using Amazon;
-    using Amazon.BedrockRuntime;
-    using Amazon.BedrockRuntime.Model;
-    
-    // Create a Bedrock Runtime client in the AWS Region you want to use.
-    var client = new AmazonBedrockRuntimeClient(RegionEndpoint.USEast1);
-    
-    // Set the model ID, e.g., Titan Text Premier.
-    var modelId = "amazon.titan-text-premier-v1:0";
-    
-    // Define the user message.
-    var userMessage = "Describe the purpose of a 'hello world' program in one line.";
-    
-    //Format the request payload using the model's native structure.
-    var nativeRequest = JsonSerializer.Serialize(new
-    {
-        inputText = userMessage,
-        textGenerationConfig = new