..
.. SPDX-License-Identifier: Apache-2.0
..

:github_url: https://github.com/IBM-Blockchain/ansible-collection/edit/main/plugins/modules/ordering_service_info.py


ordering_service_info -- Get information about a Hyperledger Fabric ordering service
====================================================================================

.. contents::
   :local:
   :depth: 1


Synopsis
--------

Get information about a Hyperledger Fabric ordering service by using the IBM Blockchain Platform.

This module works with the IBM Blockchain Platform managed service running in IBM Cloud, or the IBM Blockchain Platform software running in a Red Hat OpenShift or Kubernetes cluster.






Parameters
----------

  api_endpoint
    The URL for the IBM Blockchain Platform console.

    | **Type**: str

  api_authtype
    ``ibmcloud`` - Authenticate to the IBM Blockchain Platform console using IBM Cloud authentication. You must provide a valid API key using *api_key*.

    ``basic`` - Authenticate to the IBM Blockchain Platform console using basic authentication. You must provide both a valid API key using *api_key* and API secret using *api_secret*.

    | **Type**: str

  api_key
    The API key for the IBM Blockchain Platform console.

    | **Type**: str

  api_secret
    The API secret for the IBM Blockchain Platform console.

    Only required when *api_authtype* is ``basic``.

    | **Type**: str

  api_timeout
    The timeout, in seconds, to use when interacting with the IBM Blockchain Platform console.

    | **Type**: int
    | **Default value**: ``60``

  api_token_endpoint
    The IBM Cloud IAM token endpoint to use when using IBM Cloud authentication.

    Only required when *api_authtype* is ``ibmcloud``, and you are using IBM internal staging servers for testing.

    | **Type**: str
    | **Default value**: ``https://iam.cloud.ibm.com/identity/token``

  name
    The name of the ordering service.


  wait_timeout
    The timeout, in seconds, to wait until the ordering service is available.

    | **Type**: int
    | **Default value**: ``60``








Examples
--------

.. code-block:: yaml+jinja

    
    - name: Get the ordering service
      ibm.blockchain_platform.ordering_service_info:
        api_endpoint: https://ibp-console.example.org:32000
        api_authtype: basic
        api_key: xxxxxxxx
        api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        name: Ordering Service



Return Values
-------------

  exists
    True if the ordering service exists, false otherwise.

    | **Type**: boolean

  ordering_service
    The ordering service, as a list of ordering service nodes.

    | **Returned**: if ordering service exists
    | **Type**: list
    | **Elements**: dict

    name
      The name of the ordering service node.

      | **Type**: str
      | **Sample**: ``Ordering Service_1``

    api_url
      The URL for the API of the ordering service node.

      | **Type**: str
      | **Sample**: ``grpcs://orderingservice1-api.example.org:32000``

    operations_url
      The URL for the operations service of the ordering service node.

      | **Type**: str
      | **Sample**: ``https://orderingservice1-operations.example.org:32000``

    grpcwp_url
      The URL for the gRPC web proxy of the ordering service node.

      | **Type**: str
      | **Sample**: ``https://orderingservice1-grpcwebproxy.example.org:32000``

    msp_id
      The MSP ID of the ordering service node.

      | **Type**: str
      | **Sample**: ``OrdererOrgMSP``

    pem
      The TLS certificate chain for the ordering service node.

      The TLS certificate chain is returned as a base64 encoded PEM.

      | **Type**: str
      | **Sample**: ``LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...``

    tls_ca_root_cert
      The TLS certificate chain for the ordering service node.

      The TLS certificate chain is returned as a base64 encoded PEM.

      | **Type**: str
      | **Sample**: ``LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...``

    tls_cert
      The TLS certificate for the ordering service node.

      The TLS certificate is returned as a base64 encoded PEM.

      | **Type**: str
      | **Sample**: ``LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...``

    location
      The location of the ordering service node.

      | **Type**: str
      | **Sample**: ``ibmcloud``

    system_channel_id
      The name of the system channel for the ordering service node.

      | **Type**: str
      | **Sample**: ``testchainid``

    client_tls_cert
      The client TLS certificate for the ordering service node.

      The client TLS certificate is returned as a base64 encoded PEM.

      | **Type**: str
      | **Sample**: ``LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...``

    server_tls_cert
      The server TLS certificate for the ordering service node.

      The server TLS certificate is returned as a base64 encoded PEM.

      | **Type**: str
      | **Sample**: ``LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...``

    cluster_id
      The unique ID of the ordering service cluster.

      | **Type**: str
      | **Sample**: ``abcdefgh``

    cluster_name
      The name of the ordering service cluster.

      | **Type**: str
      | **Sample**: ``Ordering Service``

    consenter_proposal_fin
      True if the ordering service node has been added to the consenter set of the system channel, false otherwise. Ordering service nodes that have not been added to the consenter set of the system channel are not ready for use.

      | **Type**: boolean
      | **Sample**: ``True``



