This documentation is for Version 1 of the Amazon CLI only. For documentation related to Version 2 of the Amazon CLI, see the Version 2 User Guide.
Amazon CloudSearch examples using Amazon CLI
The following code examples show you how to perform actions and implement common scenarios by using the Amazon Command Line Interface with Amazon CloudSearch.
Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.
Each example includes a link to the complete source code, where you can find instructions on how to set up and run the code in context.
Topics
Actions
The following code example shows how to use upload-documents
.
- Amazon CLI
-
The following
upload-documents
command uploads a batch of JSON documents to an Amazon CloudSearch domain:aws cloudsearchdomain upload-documents --endpoint-url
https://doc-my-domain.us-west-1.cloudsearch.amazonaws.com
--content-typeapplication/json
--documentsdocument-batch.json
Output:
{ "status": "success", "adds": 5000, "deletes": 0 }
-
For API details, see UploadDocuments
in Amazon CLI Command Reference.
-