Usage: btp [OPTIONS] ACTION [GROUP/OBJECT] [PARAMS]--help option, i.e. btp --help:Actions for accounts/available-environment
list Get all available environments for a subaccount
get Get details about an available environment for a subaccount
Actions for accounts/directory
get Get details about a directory and its contents
create Create a directory
update Update a directory
delete Delete a directory
enable Change the set of enabled features for a directory
Actions for accounts/subaccount
list List all subaccounts in a global account
get Get details about a subaccount
create Create a subaccount
update Update a subaccount
delete Delete a subaccount
move Move a subaccount
subscribe Subscribe to an application from a subaccount
unsubscribe Unsubscribe an application from a subaccount
Actions for security/app
list List all apps
get Get details about a specific app
...get, list, update, etc) and GROUP/OBJECT (accounts/directory, security/app, etc) can be seen quite nicely here.btp to make suggestions, based on what you've typed in so far (which could be nothing at all).login and target. Turning on autocompletion is achieved with another of these general actions.btp enable autocomplete bashThe btp CLI supports autocompletion for different shells: Bash, Zsh and PowerShell. The shell you're running in your SAP Business Application Studio dev space is Bash; this is why you need to specify bash as a parameter.This will install the autocomplete plugin script for bash
to /home/user/.config/btp/autocomplete/scripts.
Do you want to continue? [no]>yes
Which RCFile should be used for the installation?
1: /home/user/.bash_profile
2: /home/user/.bashrc
3: /home/user/.profile
4: Custom
Enter option>2
Autocomplete script for bash has been installed
to /home/user/.config/btp/autocomplete/scripts.
You must start a new terminal session to activate the installed script.
Tips:
Use the TAB key to complete commands and provide valid command actions, options, and parameters.
Use the TAB key to cycle through the suggestion lists and the ENTER key to select.
OKautocomplete/ within the configuration directory we specified for the btp CLI; this keeps everything nicely together/home/user/.bashrc as that is the file we've been using to maintain and customise our shell environmentHave you ever wondered why the.bashrcfile name ends inrcand what it means? Did you spot the reference toRCFilein the output? Let me know in the comments.
.config/btp/autocomplete/ needs to be activated when the shell session starts; if you look into your .bashrc file now, you'll see a new line has been appended, right after the two we recently added. The line looks like this (with some whitespace added for readability):SAP_BTP_CLI_AUTOCOMPLETE="/home/user/.config/btp/autocomplete/scripts/sapbtpcli-autocomplete.plugin.sh" \
&& source $SAP_BTP_CLI_AUTOCOMPLETE \
&& bind 'set show-all-if-ambiguous on' \
&& bind 'set show-mode-in-prompt on'readline options:show-all-if-ambiguous will list possible matches immediatelyshow-mode-in-prompt adds a little indicator to the prompt to show the editing mode (we'll see this shortly)readline is Bash's command-line editing interface..bashrc re-sourced, and you're ready. Note that the shell prompt now has an @ symbol at the front:@user: user $show-mode-in-prompt; personally, I don't like this so I remove that last bind statement from my .bashrc. You can do the same, or leave it as it is.btp (including a space, so that the shell won't try to autocomplete the "btp" command itself), and then hit the Tab key; you should see something like this:@user: user $ btp <tab>
add enable register unassign update
assign get remove unregister
create list share unshare
delete move subscribe unsubscribebtp understands.l <tab>:@user: user $ btp l<tab>list and hit <tab> once more, and you should see the objects, by group, which can be listed:@user: user $ btp list
accounts/assigned-entitlements security/role
accounts/available-environment security/role-collection
accounts/available-region security/user
accounts/custom-property services/binding
accounts/entitlement services/broker
accounts/environment-instance services/instance
accounts/resource-provider services/offering
accounts/subaccount services/plan
accounts/subscription services/platform
security/appNote that you haven't pressed Enter yet, at all.
target in SAP Tech Bytes: btp CLI - logging in). So continue on the same line with a<tab>e<tab> which will narrow things down to the accounts group and the objects beginning with e:@user: user $ btp list
accounts/entitlement accounts/environment-instancet (note that the autocomplete has autocompleted as far as it can by adding an n) to disambiguate entitlement from environment-instance, and then hit <tab> one more time to autocomplete to what we're looking for:@user: user $ btp list accounts/entitlement
Showing entitlements for subaccount b8a33bf9-b155-4736-aadf-582dae8fd65a:
service name service plan quota
customer-order-sourcing-app-trial dev 1
saas-registry application 1
APPLICATION_RUNTIME MEMORY 4
alm-ts lite 1
sapappstudiotrial trial 1
business-rules lite 1
transport standard 1
personal-data-manager-service standard 1
portal standard 100
...

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 36 | |
| 33 | |
| 29 | |
| 27 | |
| 26 | |
| 26 | |
| 25 | |
| 24 | |
| 23 | |
| 23 |