Use SQL to query your SAP BTP account details.
- Get started →
- Documentation: Table definitions & examples
- Get involved: Issues
Download and install the latest SAP BTP plugin:
steampipe plugin install btp
Configure your credentials and config file.
Configure your account details in ~/.steampipe/config/btp.spc
:
connection "btp" {
plugin = "ajmaradiaga/btp"
#########
# CIS #
#########
# You will need to create a service key for the Cloud Management Service. You can get the instructions on how to get an access token for the SAP Cloud Management Service APIs here: https://help.sap.com/docs/btp/sap-business-technology-platform/getting-access-token-for-sap-cloud-management-service-apis.
# URL of the Accounts Service. Required.
# This can also be set via the `BTP_CIS_ACCOUNTS_SERVICE_URL` environment variable.
cis_accounts_service_url = "https://accounts-service.cfapps.[region].hana.ondemand.com"
# URL of the Entitlements Service. Required.
# This can also be set via the `BTP_CIS_ENTITLEMENTS_SERVICE_URL` environment variable.
cis_entitlements_service_url = "https://entitlements-service.cfapps.[region].hana.ondemand.com"
# Access token to communicate with the Cloud Management Service APIs. Required.
# This can also be set via the `BTP_CIS_ACCESS_TOKEN` environment variable.
cis_access_token = "eyJhbGciOiDBNsO0JxFoAaodkDJ3Pmk7cFEsEr5ml5BwNWEafrEjy8Hsxt2mVACpD8B4AIPpRuMoGE71qXGoPcW0vCugceTwN4C3xM8qYmH7D"
}
Or through environment variables:
export BTP_CIS_ACCOUNTS_SERVICE_URL=https://accounts-service.cfapps.eu10.hana.ondemand.com
export BTP_CIS_ENTITLEMENTS_SERVICE_URL=https://entitlements-service.cfapps.eu10.hana.ondemand.com
export BTP_CIS_ACCESS_TOKEN=eyJhbGciOiDBNsO0JxFoAaodkDJ3Pmk7cFEsEr5ml5BwNWEafrEjy8Hsxt2mVACpD8B4AIPpRuMoGE71qXGoPcW0vCugceTwN4C3xM8qYmH7DLQ
Run steampipe:
steampipe query
List your SAP BTP Global account details:
select
guid,
display_name,
created_date,
modified_date
from
btp.btp_accounts_global_account;
+--------------------------------------+-----------------------+---------------+---------------+
| guid | display_name | created_date | modified_date |
+--------------------------------------+-----------------------+---------------+---------------+
| 010788v8-7s64-1801-6680-l6g2253646b2 | My BTP global account | 1638221010619 | 1693587625761 |
+--------------------------------------+-----------------------+---------------+---------------+
Prerequisites:
Clone:
git clone https://github.com/ajmaradiaga/steampipe-plugin-btp.git
cd steampipe-plugin-btp
Build, which automatically installs the new version to your ~/.steampipe/plugins
directory:
make
Configure the plugin:
cp config/* ~/.steampipe/config
vi ~/.steampipe/config/btp.spc
Try it!
steampipe query
> .inspect btp
Further reading:
Please see the contribution guidelines and our code of conduct. All contributions are subject to the Apache 2.0 open source license.
help wanted
issues: