Where does outfile
field in the output structure of in a BinaryFile retrieving API come from ?
#6960
-
BackgroundWe utilized aws cli add-model, imported the json spec and configure to enable the cli commands, all works perfectly QuestionIn one API we built, the output of the API is trying to return a binary file, like return a zip archive or a text file like API Gateway get-export I noticed that when I try to invoke the command with help to see the information, I see
However, I did not define any attribute in my output structure to have this variable name. Can I get some instructions how and why the for example, changed it to
and by default create a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The outfile argument is going to be a positional argument representing the name of the file to save the binary payload from your operation. So for example, you would run:
and it would save the content of the payload to the file path/to/payload-content. This argument is added automatically to any CLI command where the API operation has an output that is a streaming blob. In terms of customizing it, the team would prefer to keep what is automatically added to stay consistent with other service APIs whose outputs are streaming blobs. |
Beta Was this translation helpful? Give feedback.
The outfile argument is going to be a positional argument representing the name of the file to save the binary payload from your operation.
So for example, you would run:
aws awesome-service awesome-function path/to/payload-content
and it would save the content of the payload to the file path/to/payload-content.
This argument is added automatically to any CLI command where the API operation has an output that is a streaming blob. In terms of customizing it, the team would prefer to keep what is automatically added to stay consistent with other service APIs whose outputs are streaming blobs.