sap.sap_operations.btp_subaccounts_info module – Fetches information about SAP BTP subaccounts

Note

This module is part of the sap.sap_operations collection.

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install sap.sap_operations. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: sap.sap_operations.btp_subaccounts_info.

New in sap.sap_operations 1.27.0

Synopsis

  • It uses the BTP Accounts Service API to retrieve the information.

  • This action plugin is using SAP BTP API, see <api.sap.com> for more details.

  • This is ansible action plugin, this means it will run on ansible controller, not on managed node.

  • This module fetches information about SAP Business Technology Platform (BTP) subaccounts.

  • This plugin does not support running with python 2. It requires python 3.6 or higher.

Note

This module has a corresponding action plugin.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.6

  • requests

  • oauth2_client

Parameters

Parameter

Comments

api_endpoint

string / required

API endpoint to use. For example https://api.cf.eu10.hana.ondemand.com

authorize_service_url

string / required

URL of the authorization service.

client_id

string / required

Client ID to use for authentication.

client_secret

string / required

Client secret to use for authentication.

entitled_services_only

boolean

Whether to return only subaccounts that are entitled to use services.

Choices:

  • false ← (default)

  • true

include_auto_managed_plans

boolean

Whether to include subaccounts with auto-managed plans in the results.

Choices:

  • false ← (default)

  • true

login

string / required

Login to use for authentication. This is usually an email address.

password

string / required

Password to use for authentication.

token_service_url

string / required

URL of the token service.

Notes

Note

  • This module is community supported

  • Module interface (parameters, output) expected to be stable but not guaranteed

  • Module planned to be released on Ansible Automation Hub after collecting some feedback

  • There is no guarantee that this module will be officially supported by Red Hat

  • This is ansible action plugin, not module

  • Meaning this plugin will be always executed on ansible controller.

See Also

See also

SAP BTP API Accounts service API

SAP BTP API Accounts service API

Administration and operations section for SAP BTP on help.sap.com

Administration and operations section for SAP BTP on help.sap.com

Examples

---
- name: Fetch BTP subaccounts information
  sap.sap_operations.btp_subaccounts_info:
    include_auto_managed_plans: true
    entitled_services_only: false

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

btp_subaccounts_info

list / elements=dictionary

A list of subaccounts with their details.

Returned: success

betaEnabled

boolean

Indicates if the beta features are enabled for the subaccount.

Returned: success

contentAutomationState

string

The state of content automation, if applicable.

Returned: if exists

contentAutomationStateDetails

string

Detailed information about the content automation state, if applicable.

Returned: if exists

createdBy

string

The identifier of the user who created the subaccount, if available.

Returned: if exists

createdDate

integer

The creation date of the subaccount in milliseconds since epoch.

Returned: success

description

string

A description of the subaccount.

Returned: success

displayName

string

The display name of the subaccount.

Returned: success

globalAccountGUID

string

The GUID of the global account to which the subaccount belongs.

Returned: success

guid

string

The unique identifier of the subaccount.

Returned: success

modifiedDate

integer

The last modification date of the subaccount in milliseconds since epoch.

Returned: success

parentGUID

string

The GUID of the parent entity of the subaccount.

Returned: success

parentType

string

The type of the parent entity (e.g., ROOT).

Returned: success

region

string

The region where the subaccount is located.

Returned: success

state

string

The current state of the subaccount (e.g., OK).

Returned: success

stateMessage

string

A message providing more details about the state of the subaccount.

Returned: success

subdomain

string

The subdomain assigned to the subaccount.

Returned: success

technicalName

string

The technical name of the subaccount.

Returned: success

usedForProduction

string

Indicates if the subaccount is used for production purposes.

Returned: success

Sample: "USED_FOR_PRODUCTION"

Authors

  • Kirill Satarin (@kksat)