Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #49

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,28 @@ show debug information (HTTP info, and json send to the api)
oapi-cli --verbose ReadVms
```

For complex argument, you can store argument in file using `--file`:
```bash
echo -n false > false.txt
./oapi-cli ReadVms --DryRun --file false.txt
```
Here `-DryRun` argument will be "false", as it is what is inside false.txt.


For CreatePolicy, you should use `--jsonstr-file`.

As CreatePolicy require Document to be a string contaning a jsons, if you want to pass the policy directly to oapi-cli, `--Document` argument should look like this:
```
"Document": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}"
```

With `--jsonstr-file`, you can simply create a json containing your policy, and pass it to oapi-cli:

```bash
CreatePolicy --PolicyName please --Document --jsonstr-file ./policy.json
```


*Note that with osc-cli, you need to add `api`, here, as we only support outscale api, this is remove*

# Autocompletion
Expand Down
Loading