AWS code-library documentation change
Summary
Removed all code examples and implementation details for the 'Get started' section demonstrating how to list SQS queues across multiple programming languages (.NET, C++, Go, Java, JavaScript, Kotlin, Swift).
Security assessment
The change removes general usage examples without any security context. There's no evidence of vulnerabilities being addressed, security flaws in the examples, or references to security incidents. The removed content was standard API usage documentation for listing queues.
Diff
diff --git a/code-library/latest/ug/sqs_code_examples.md b/code-library/latest/ug/sqs_code_examples.md index 6ce3b93f9..d3dacfa37 100644 --- a//code-library/latest/ug/sqs_code_examples.md +++ b//code-library/latest/ug/sqs_code_examples.md @@ -28,500 +27,0 @@ _Scenarios_ are code examples that show you how to accomplish specific tasks by -**Get started** - -The following code examples show how to get started using Amazon SQS. - -.NET - - -**SDK for .NET** - - -###### 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/dotnetv3/cross-service/TopicsAndQueues#code-examples). - - - using Amazon.SQS; - using Amazon.SQS.Model; - - namespace SQSActions; - - public static class HelloSQS - { - static async Task Main(string[] args) - { - var sqsClient = new AmazonSQSClient(); - - Console.WriteLine($"Hello Amazon SQS! Following are some of your queues:"); - Console.WriteLine(); - - // You can use await and any of the async methods to get a response. - // Let's get the first five queues. - var response = await sqsClient.ListQueuesAsync( - new ListQueuesRequest() - { - MaxResults = 5 - }); - - foreach (var queue in response.QueueUrls) - { - Console.WriteLine($"\tQueue Url: {queue}"); - Console.WriteLine(); - } - } - } - - - - * For API details, see [ListQueues](https://docs.aws.amazon.com/goto/DotNetSDKV3/sqs-2012-11-05/ListQueues) in _AWS SDK for .NET API Reference_. - - - - -C++ - - -**SDK for C++** - - -###### 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/cpp/example_code/sqs/hello_sqs#code-examples). - -Code for the CMakeLists.txt CMake file. - - - # Set the minimum required version of CMake for this project. - cmake_minimum_required(VERSION 3.13) - - # Set the AWS service components used by this project. - set(SERVICE_COMPONENTS sqs) - - # Set this project's name. - project("hello_sqs") - - # Set the C++ standard to use to build this target. - # At least C++ 11 is required for the AWS SDK for C++. - set(CMAKE_CXX_STANDARD 11) - - # Use the MSVC variable to determine if this is a Windows build. - set(WINDOWS_BUILD ${MSVC}) - - if (WINDOWS_BUILD) # Set the location where CMake can find the installed libraries for the AWS SDK. - string(REPLACE ";" "/aws-cpp-sdk-all;" SYSTEM_MODULE_PATH "${CMAKE_SYSTEM_PREFIX_PATH}/aws-cpp-sdk-all") - list(APPEND CMAKE_PREFIX_PATH ${SYSTEM_MODULE_PATH}) - endif () - - # Find the AWS SDK for C++ package. - find_package(AWSSDK REQUIRED COMPONENTS ${SERVICE_COMPONENTS}) - - if(WINDOWS_BUILD AND AWSSDK_INSTALL_AS_SHARED_LIBS) - # Copy relevant AWS SDK for C++ libraries into the current binary directory for running and debugging. - - # set(BIN_SUB_DIR "/Debug") # If you are building from the command line you may need to uncomment this - # and set the proper subdirectory to the executables' location. - - AWSSDK_CPY_DYN_LIBS(SERVICE_COMPONENTS "" ${CMAKE_CURRENT_BINARY_DIR}${BIN_SUB_DIR}) - endif() - - add_executable(${PROJECT_NAME} - hello_sqs.cpp) - - target_link_libraries(${PROJECT_NAME} - ${AWSSDK_LINK_LIBRARIES}) - - - -Code for the hello_sqs.cpp source file. - - - #include <aws/core/Aws.h> - #include <aws/sqs/SQSClient.h> - #include <aws/sqs/model/ListQueuesRequest.h> - #include <iostream> - - /* - * A "Hello SQS" starter application that initializes an Amazon Simple Queue Service - * (Amazon SQS) client and lists the SQS queues in the current account. - * - * main function - * - * Usage: 'hello_sqs' - * - */ - - int main(int argc, char **argv) { - Aws::SDKOptions options; - // Optionally change the log level for debugging. - // options.loggingOptions.logLevel = Utils::Logging::LogLevel::Debug; - Aws::InitAPI(options); // Should only be called once. - { - Aws::Client::ClientConfiguration clientConfig; - // Optional: Set to the AWS Region (overrides config file). - // clientConfig.region = "us-east-1"; - - Aws::SQS::SQSClient sqsClient(clientConfig); - - Aws::Vector<Aws::String> allQueueUrls; - Aws::String nextToken; // Next token is used to handle a paginated response. - do { - Aws::SQS::Model::ListQueuesRequest request; - - Aws::SQS::Model::ListQueuesOutcome outcome = sqsClient.ListQueues(request); - - if (outcome.IsSuccess()) { - const Aws::Vector<Aws::String> &pageOfQueueUrls = outcome.GetResult().GetQueueUrls(); - if (!pageOfQueueUrls.empty()) { - allQueueUrls.insert(allQueueUrls.cend(), pageOfQueueUrls.cbegin(), - pageOfQueueUrls.cend()); - } - } - else { - std::cerr << "Error with SQS::ListQueues. " - << outcome.GetError().GetMessage() - << std::endl; - break; - } - nextToken = outcome.GetResult().GetNextToken(); - } while (!nextToken.empty()); - - - std::cout << "Hello Amazon SQS! You have " << allQueueUrls.size() << " queue" - << (allQueueUrls.size() == 1 ? "" : "s") << " in your account." - << std::endl; - - if (!allQueueUrls.empty()) { - std::cout << "Here are your queue URLs." << std::endl; - for (const Aws::String &queueUrl: allQueueUrls) { - std::cout << " * " << queueUrl << std::endl; - } - } - } - - Aws::ShutdownAPI(options); // Should only be called once. - return 0; - } - - - - * For API details, see [ListQueues](https://docs.aws.amazon.com/goto/SdkForCpp/sqs-2012-11-05/ListQueues) in _AWS SDK for C++ API Reference_. - - - - -Go - - -**SDK for Go V2** - - -###### 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/gov2/sqs#code-examples). - - - package main