graphiant.naas.graphiant_data_exchange_info module – Query Graphiant Data Exchange services, customers, and health information

Note

This module is part of the graphiant.naas collection (version 26.3.0).

You might already have this collection installed if you are using the ansible package. 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 graphiant.naas. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: graphiant.naas.graphiant_data_exchange_info.

New in graphiant.naas 25.12.0

Synopsis

  • This module provides query capabilities for Graphiant Data Exchange information.

  • Returns summary information about Data Exchange services and customers.

  • Provides service health monitoring information for matched customers.

  • All operations return read-only information and never modify the system.

Requirements

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

  • python >= 3.7

  • graphiant-sdk >= 26.3.0

  • tabulate

Parameters

Parameter

Comments

access_token

string

Bearer token for API authentication (for example, from graphiant login, which opens a browser for sign-in (SSO or non-SSO) and retrieves the token).

If not passed as a module argument, the collection reads GRAPHIANT_ACCESS_TOKEN (set after graphiant login when you source ~/.graphiant/env.sh).

When a bearer token is present (module argument or environment), it takes precedence over username and password.

If no valid token is available, the module authenticates with username and password when both are supplied.

detailed_logs

boolean

Enable detailed logging output for troubleshooting and monitoring.

When enabled, provides comprehensive logs of all query operations.

Logs are captured and included in the msg return value for display using ansible.builtin.debug module.

Choices:

  • false ← (default)

  • true

host

aliases: base_url

string / required

Graphiant portal host URL for API connectivity.

Example: “https://api.graphiant.com

is_provider

boolean

Whether to get provider view for service health monitoring.

When false, returns health from consumer/customer perspective.

When true, returns health from service provider perspective.

Only applicable to service_health query.

Choices:

  • false ← (default)

  • true

password

string

Graphiant portal password for authentication.

Required for password-based login when no valid bearer token is available from access_token or GRAPHIANT_ACCESS_TOKEN.

query

string / required

The specific information to query.

services_summary: Get summary of all Data Exchange services with tabulated output.

Returns service details including IDs, names, status, role, and matched customers count.

customers_summary: Get summary of all Data Exchange customers with tabulated output.

Returns customer details including IDs, names, type, status, and matched services count.

service_health: Get service health monitoring information for all matched customers.

Returns tabulated health status including overall health, producer prefix health, and customer prefix health.

Supports both consumer and provider views.

Choices:

  • "services_summary"

  • "customers_summary"

  • "service_health"

service_name

string

Service name for health monitoring operations.

Required for service_health query.

Must be an existing Data Exchange service name.

username

string

Graphiant portal username for authentication.

Required for password-based login when no valid bearer token is available from access_token or GRAPHIANT_ACCESS_TOKEN.

Attributes

Attribute

Support

Description

check_mode

Support: full

Supports check mode (always read-only).

Notes

Note

  • This is a read-only module that queries information only.

  • All operations return tabulated output for easy reading.

  • For service health operations, supports both consumer and provider views.

See Also

See also

graphiant.naas.graphiant_data_exchange

Manage Data Exchange services, customers, matches, and invitations

Examples

- name: Get Data Exchange services summary
  graphiant.naas.graphiant_data_exchange_info:
    query: services_summary
    host: "{{ graphiant_host }}"
    username: "{{ graphiant_username }}"
    password: "{{ graphiant_password }}"
  register: services_summary

- name: Display services summary
  ansible.builtin.debug:
    msg: "{{ services_summary.msg }}"

- name: Get Data Exchange customers summary
  graphiant.naas.graphiant_data_exchange_info:
    query: customers_summary
    host: "{{ graphiant_host }}"
    username: "{{ graphiant_username }}"
    password: "{{ graphiant_password }}"
  register: customers_summary

- name: Display customers summary
  ansible.builtin.debug:
    msg: "{{ customers_summary.msg }}"

- name: Get service health (consumer view)
  graphiant.naas.graphiant_data_exchange_info:
    query: service_health
    service_name: "de-service-1"
    is_provider: false
    host: "{{ graphiant_host }}"
    username: "{{ graphiant_username }}"
    password: "{{ graphiant_password }}"
    detailed_logs: true
  register: service_health

- name: Display service health
  ansible.builtin.debug:
    msg: "{{ service_health.msg }}"

- name: Get service health (provider view)
  graphiant.naas.graphiant_data_exchange_info:
    query: service_health
    service_name: "de-service-1"
    is_provider: true
    host: "{{ graphiant_host }}"
    username: "{{ graphiant_username }}"
    password: "{{ graphiant_password }}"
    detailed_logs: true
  register: service_health_provider

- name: Display service health (provider view)
  ansible.builtin.debug:
    msg: "{{ service_health_provider.msg }}"

Return Values

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

Key

Description

msg

string

Result message from the query operation, including detailed logs when detailed_logs is enabled.

For summary operations, includes tabulated output for easy reading.

For health operations, includes tabulated health status for all matched customers.

Returned: always

Sample: "Data Exchange Services Summary:\n+------------------+----------------------------------+--------+------+-------------------+\n| Service Name     | Service ID                       | Status | Role | Matched Customers |\n+==================+==================================+========+======+===================+\n| de-service-1     | 12345678-1234-1234-1234-12345678 | Active | Both | 2                 |\n+------------------+----------------------------------+--------+------+-------------------+\n"

query

string

The query that was performed.

One of services_summary, customers_summary, or service_health.

Returned: always

Sample: "services_summary"

result_data

dictionary

Result data from the query operation, including structured data for summary and health operations.

For summary operations, contains service/customer details with IDs, names, status, and counts.

For health operations, contains health metrics for all matched customers.

Returned: always

Sample: {"services": [{"matched_customers_count": 2, "role": "Both", "service_id": "12345678-1234-1234-1234-12345678", "service_name": "de-service-1", "status": "Active"}]}

Authors

  • Graphiant Team (@graphiant)