steampipe plugin install ajmaradiaga/btp

Table: btp_accounts_subaccount

Get the details of subaccounts in the SAP BTP global account.

Examples

List all subaccounts in root

select
guid,
display_name,
parent_guid,
parent_type,
subdomain,
custom_properties
from
btp_accounts_subaccount;

List all subaccounts in a directory

select
display_name,
region,
subdomain,
beta_enabled
from
btp_accounts_subaccount
where
parent_guid = '00643708-5865-4e15-a0b4-d276c3877502'
order by
region,
display_name;

List all directories

select
distinct parent_guid,
parent_type
from
btp_accounts_subaccount
where
parent_type = 'PROJECT';

Count subaccounts by region

select
region,
count(1)
from
btp_accounts_subaccount
group by
region
order by
count desc;

Subaccount details with datacenter information

select
sa.guid subaccount_guid,
sa.display_name subaccount_name,
sa.subdomain subaccount_subdomain,
dc.name dc_name,
dc.display_name as dc_location,
sa.region,
environment,
dc.iaas_provider,
supports_trial,
saas_registry_service_url,
domain,
geo_access
from
btp_accounts_subaccount sa
join btp_entitlements_datacenter dc on sa.region = dc.region
order by
region,
subaccount_name;

Schema for btp_accounts_subaccount

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
beta_enabledbooleanWhether the subaccount can use beta services and applications.
created_bytextDetails of the user that created the subaccount.
created_datebigintThe date the subaccount was created. Dates and times are in UTC format.
custom_propertiesjsonbThe custom properties of the subaccount.
descriptiontextA description of the subaccount for customer-facing UIs.
display_nametextA descriptive name of the subaccount for customer-facing UIs.
global_account_guidtextThe unique ID of the subaccount's global account.
guidtext=Unique ID of the subaccount.
modified_datebigintThe date the subaccount was last modified. Dates and times are in UTC format.
parent_featuresjsonbThe parent features of the subaccount.
parent_guidtextThe GUID of the subaccount's parent entity. If the subaccount is located directly in the global account (not in a directory), then this is the GUID of the global account.
parent_typetextThe type of the subaccount's parent entity.
regiontextThe region in which the subaccount was created.
statetextThe current state of the subaccount.
state_messagetextInformation about the state of the subaccount.
subdomaintextThe subdomain that becomes part of the path used to access the authorization tenant of the subaccount. Must be unique within the defined region. Use only letters (a-z), digits (0-9), and hyphens (not at the start or end). Maximum length is 63 characters. Cannot be changed after the subaccount has been created.
technical_nametextThe technical name of the subaccount. Refers to: (1) the platform-based account name for Neo subaccounts, or (2) the account identifier (tenant ID) in XSUAA for multi-environment subaccounts.
used_for_productiontextWhether the subaccount is used for production purposes. This flag can help your cloud operator to take appropriate action when handling incidents that are related to mission-critical accounts in production systems. Do not apply for subaccounts that are used for non-production purposes, such as development, testing, and demos. Applying this setting this does not modify the subaccount. * <b>UNSET:</b> Global account or subaccount admin has not set the production-relevancy flag. Default value. * <b>NOT_USED_FOR_PRODUCTION:</b> Subaccount is not used for production purposes. * <b>USED_FOR_PRODUCTION:</b> Subaccount is used for production purposes.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- btp

You can pass the configuration to the command with the --config argument:

steampipe_export_btp --config '<your_config>' btp_accounts_subaccount