appliance-cli edit¶
Edit an API resource
Synopsis¶
Conveniently edit a specific API resource. This is a combination of an
invocation to appliance-cli get
and appliance-cli put
on the endpoint.
You can either use interactive mode or pass modifications with CLI shorthand syntax as arguments.
To launch the interactive mode, you will need to
pass the -i
flag. You will need to have either the VISUAL
or EDITOR
environment variables set, which configures the editor of your choice. E.g.,
to configure VSCode, you can set the VISUAL
environment variable:
export VISUAL="code --wait"
To configure vim, you can set the EDITOR
environment variable:
export EDITOR="vim"
To configure nano, you can set the EDITOR
environment variable:
export EDITOR="nano"
The available API resources are generated based on the release version of the
appliance. To discover the available endpoints, have a look at the --help
out.
You can also use tab completion, or refer to the appliance management API
specification to discover them.
Tip
To enable tab completion, refer to appliance-cli completion
You can pass parameters with help of the CLI shorthand. Have a look at
the basic usage section of the
appliance-cli --help
, or refer to the official documentation.
You can filter the output to narrow down the information that is relevant to
you. Also have a look at the basic usage section
of the appliance-cli --help
, or refer to the CLI shorthand querying syntax
Authentication¶
Your setup may require authentication. If you receive an unauthorized response code (401/403), it indicates that the authentication configuration is missing or faulty. Please follow these steps to set it up correctly:
Run
appliance-cli context configure <name>
to add a new configuration, or amend an existing configuration.Ensure the correct base address is set.
Setup authentication credentials, if necessary (
http-basic
,auth2
)
If you have multiple profiles in an appliance context, make sure you have
selected the correct one. The appliance-cli
uses default
unless specified
otherwise. You can override this by passing the --profile
flag.
`
appliance-cli edit <resource> [arguments] [flags]
Examples¶
appliance-cli edit -i config
appliance-cli edit config 'config.management.hostname: host1.site1.org'
Options¶
--ca-cert string Set trusted CA certificate
--context string Select the appliance context
--edit-format string Format to edit [json, yaml] (default "json")
-f, --filter string Filter response using CLI shorthand (default "body")
--format string Output format [auto, json, yaml, table] (default "auto")
--header strings Add custom header(s)
-h, --help help for edit
--insecure Disable SSL verification
-i, --interactive Open an interactive editor
--no-cache Disable HTTP cache (default true)
--no-paginate Disable auto-pagination
--profile string Select authentication profile (default "default")
--query strings Add custom query parameter(s)
--raw Output response in raw format
--retry int Number of retries on HTTP failure (408,425,429,500,502,503,504) (default 2)
--timeout duration Timeout for HTTP requests
-v, --verbose Enable verbose log output
-y, --yes Disable prompt (answer yes automatically)
SEE ALSO¶
appliance-cli - Manage your Anapaya appliance