Updating a Configuration File
Function
You can update items in the .obsutilconfig file, including the endpoint, AK, SK, and token.
Configuration Parameters describes parameters in the .obsutilconfig file.
Command Line Structure
- In Windows
- Updating settings in interactive mode
obsutil config [-interactive] [-crr] [-config=xxx]
- Directly updating settings
obsutil config [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx] [-crr] [-config=xxx]
- Updating settings in interactive mode
- In Linux or macOS
- Updating settings in interactive mode
./obsutil config [-interactive] [-crr] [-config=xxx]
- Directly updating settings
./obsutil config [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx] [-crr] [-config=xxx]
- Updating settings in interactive mode
- After you use -i, -k, and -e to configure user authentication, the history command in Linux or other OSs can query the configured values.
Examples
- Take Windows as an example. Run the obsutil config -interactive command to update the access keys and OBS endpoint in the default configuration file.
obsutil config -interactive Please input your ak: xxxxxxxxxxxxxxxxxxxxxxxxx Please input your sk: xxxxxxxxxxxxxxxxxxxxxxxxx Please input your endpoint: xxxxxxxxxxxxxxxxxxxxxxxxx Please input your token: xxxxxxxxxxxxxxxxxxxxxxxxx Config file url: C:\Users\tools\.obsutilconfig Update config file successfully!
- Take Linux as an example. Run the ./obsutil config -interactive command to update the access keys and OBS endpoint in the default configuration file.
./obsutil config -interactive Please input your ak: xxxxxxxxxxxxxxxxxxxxxxxxx Please input your sk: xxxxxxxxxxxxxxxxxxxxxxxxx Please input your endpoint: xxxxxxxxxxxxxxxxxxxxxxxxx Please input your token: xxxxxxxxxxxxxxxxxxxxxxxxx Config file url: /root/.obsutilconfig Update config file successfully!
Parameter Description
Parameter |
Optional or Mandatory |
Description |
---|---|---|
interactive |
Optional (additional parameter) |
Updates settings in interactive mode.
NOTICE:
For security purposes, you are advised to use the interactive mode to configure the AK and SK. |
e |
Optional (additional parameter) |
Changes the value of endpoint or endpointCrr. For details, see Configuration Parameters. |
i |
Optional (additional parameter) |
Changes the value of ak or akCrr. For details, see Configuration Parameters. |
k |
Optional (additional parameter) |
Changes the value of sk or skCrr. For details, see Configuration Parameters. |
t |
Optional (additional parameter) |
Changes the value of token or tokenCrr. For details, see Configuration Parameters. |
crr |
Optional (additional parameter) |
Updates the settings of client-side cross-region replication.
NOTE:
If this parameter is not specified, endpoint, ak, sk, and token will be updated by the e, i, k, and t parameters. If this parameter is specified, endpointCrr, akCrr, skCrr, and tokenCrr will be updated by the e, i, k, and t parameters. |
config |
Optional (additional parameter) |
User-defined configuration file for executing the current command. To learn the parameters that can be configured in this file, see Configuration Parameters. By specifying this parameter and a path, you can update parameters in the user-defined configuration file. Otherwise, parameters in the default configuration file will be updated. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot