Skip to main content

Update

Replace a file in the Object Store.

The command replaces the content of a stored file, or stores it when the name is new. The same content changes nothing (Changed: false).

osapi client file update [flags]

Examples​

osapi client file update --name app.conf --file /tmp/app.conf

Permission​

It needs the file:write permission. osapi token roles get --name <role> shows what a role grants.

Flags​

FlagDescriptionDefault
--content-typeHow the file should be treated during deploy. raw writes bytes as-is; template renders with Go text/template and agent facts (raw, template)raw
--filePath to the local file with the file content (required)
--nameThe name of the file in the Object Store (required)

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file/etc/osapi/osapi.yaml
--urlURL the client will connect tohttp://0.0.0.0:8080

Output tells how the result is printed, and what --json gives.