bm alias import
Syntax
The bm alias import command imports an alias configuration from a JSON document.
You can use bm alias export to create the necessary JSON for import.
The following command imports an alias configuration from a JSON document:
bm alias import newalias ./credentials.json
Use bm alias list newalias to confirm the import succeeded.
The bm alias import command has the following syntax:
bm [GLOBALFLAGS] alias import ALIAS PATH|STDIN
Brackets
[]indicate optional parameters.Parameters sharing a line are mutually dependent.
Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
- PATH
- Required
The full path to the JSON object representing the alias configuration to import.
Mutually exclusive with the
STDINparameter.
- STDIN
- Required
Directs the command to use the Standard Input (STDIN) as the source of the JSON object for import.
Mutually exclusive with the
PATHparameter.
Global Flags
This command supports any of the global flags.
Behavior
JSON Format
The JSON object must have the following format:
{
"url" : "https://hostname:port",
"accessKey": "<STRING>",
"secretKey": "<STRING>",
"api": "s3v4",
"path": "auto"
}
You can use the bm alias export command to export an existing alias from the local host configuration.
Alternatively, you can manually extract the necessary JSOn fields from the bm configuration file.
Examples
Import an Alias Using Standard Input
The following example imports a custom alias for the play.min.io sandbox. You can modify this example to use user credentials you have already created or validated as existing on the sandbox:
echo '
{
"url": "https://play.min.io",
"accessKey": "buckitadmin",
"secretKey": "buckitadmin",
"api": "s3v4",
"path": "auto"
}' | bm alias import play-buckitadmin
S3 Compatibility
The bm commandline tool is built for compatibility with the AWS S3 API and is tested with Buckit and AWS S3 for expected functionality and behavior.
Buckit provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While bm commands may work as documented, any such usage is at your own risk.