Updating a Configuration File

Function

You can use this command to update some configurations in the .obsutilconfig configuration file.

Command Line Structure

  • In Windows
    • Updating configurations in interactive mode
      obsutil config [-interactive] [-crr] [-config=xxx]
    • Directly updating configurations
      obsutil config [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx] [-crr] [-config=xxx]
  • In Linux or macOS
    • Updating configurations in interactive mode
      ./obsutil config [-interactive] [-crr] [-config=xxx]
    • Directly updating configurations
      ./obsutil config [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx] [-crr] [-config=xxx]
  • Note: You can use the -i, -k, and -e options to configure user information for authentication. You can run the history command in the Linux or other OS to query the parameter values. Exercise caution when performing this operation.

Examples

  • Take the Windows OS as an example. Run the obsutil config -interactive command to set the access keys and endpoint of OBS.
    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!

Parameter Description

Parameter

Optional or Mandatory

Description

interactive

Optional (additional parameter)

Updates configurations in interactive mode.

NOTICE:

You are advised to configure AK and SK in interactive mode for security purpose.

e

Optional (additional parameter)

endpoint or endpointCrr in the configuration file

i

Optional (additional parameter)

ak or akCrr in the configuration file

k

Optional (additional parameter)

sk or skCrr in the configuration file

t

Optional (additional parameter)

token or tokenCrr in the configuration file

crr

Optional (additional parameter)

Updates the configurations related to client-side cross-region replication in the configuration file.

NOTE:

If this parameter is set, upgraded fields in the configuration file corresponding to parameters e, i, k, and t are respectively changed to endpointCrr, akCrr, skCrr, and tokenCrr.

config

Optional (additional parameter)

User-defined configuration file for executing a command. For details about parameters that can be configured, see Parameter Description.