AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-01-10 · Documentation low

File: code-library/latest/ug/ecs_code_examples.md

Summary

Removed .NET code example for listing Amazon ECS clusters

Security assessment

This is a straightforward removal of introductory sample code. No security advisories, vulnerability disclosures, or security feature documentation were modified. The deletion doesn't relate to any known security issues.

Diff

diff --git a/code-library/latest/ug/ecs_code_examples.md b/code-library/latest/ug/ecs_code_examples.md
index 142f258a0..de8f08151 100644
--- a//code-library/latest/ug/ecs_code_examples.md
+++ b//code-library/latest/ug/ecs_code_examples.md
@@ -28,83 +27,0 @@ _Scenarios_ are code examples that show you how to accomplish specific tasks by
-**Get started**
-
-The following code example shows how to get started using Amazon ECS.
-
-.NET
-    
-
-**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/ECS#code-examples). 
-    
-    
-    using Amazon.ECS;
-    using Amazon.ECS.Model;
-    using Microsoft.Extensions.DependencyInjection;
-    using Microsoft.Extensions.Hosting;
-    using Microsoft.Extensions.Logging;
-    using Microsoft.Extensions.Logging.Console;
-    using Microsoft.Extensions.Logging.Debug;
-    
-    namespace ECSActions;
-    
-    /// <summary>
-    /// A class that introduces the Amazon ECS Client by listing the
-    /// cluster ARNs for the account.
-    /// </summary>
-    public class HelloECS
-    {
-        static async System.Threading.Tasks.Task Main(string[] args)
-        {
-            // Use the AWS .NET Core Setup package to set up dependency injection for the Amazon ECS client.
-            // Use your AWS profile name, or leave it blank to use the default profile.
-            using var host = Host.CreateDefaultBuilder(args)
-                .ConfigureLogging(logging =>
-                    logging.AddFilter("System", LogLevel.Debug)
-                        .AddFilter<DebugLoggerProvider>("Microsoft", LogLevel.Information)
-                        .AddFilter<ConsoleLoggerProvider>("Microsoft", LogLevel.Trace))
-                .ConfigureServices((_, services) =>
-                    services.AddAWSService<IAmazonECS>()
-                )
-                .Build();
-    
-            var amazonECSClient = host.Services.GetRequiredService<IAmazonECS>();
-    
-            Console.WriteLine($"Hello Amazon ECS! Following are some cluster ARNS available in the your account");
-            Console.WriteLine();
-    
-            var clusters = new List<string>();
-    
-            var clustersPaginator = amazonECSClient.Paginators.ListClusters(new ListClustersRequest());
-    
-            await foreach (var response in clustersPaginator.Responses)
-            {
-                clusters.AddRange(response.ClusterArns);
-            }
-    
-            if (clusters.Count > 0)
-            {
-                clusters.ForEach(cluster =>
-                {
-                    Console.WriteLine($"\tARN: {cluster}");
-                    Console.WriteLine($"Cluster Name: {cluster.Split("/").Last()}");
-                    Console.WriteLine();
-                });
-            }
-            else
-            {
-                Console.WriteLine("No clusters were found.");
-            }
-    
-        }
-    }
-    
-    
-
-  * For API details, see [ListClusters](https://docs.aws.amazon.com/goto/DotNetSDKV4/ecs-2014-11-13/ListClusters) in _AWS SDK for .NET API Reference_. 
-
-
-
-