|
| 1 | +.. _mcli-atlas-security-ldap-get-cmd: |
| 2 | + |
| 3 | +================================ |
| 4 | +mongocli atlas security ldap get |
| 5 | +================================ |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 1 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +The ``security ldap get`` command returns the current |ldap| over |
| 16 | +|tls|/|ssl| configuration details for an |service| project. You |
| 17 | +can also retrieve the configuration details using the :atlas:`API |
| 18 | +</reference/api/ldaps-configuration-get-current/>`. |
| 19 | + |
| 20 | +.. _mcli-atlas-security-ldap-get-syntax: |
| 21 | + |
| 22 | +Syntax |
| 23 | +------ |
| 24 | + |
| 25 | +.. code-block:: shell |
| 26 | + |
| 27 | + mongocli atlas security ldap get |
| 28 | + [ --output|-o <output-format> ] |
| 29 | + [ --profile|-P <name-of-profile> ] |
| 30 | + [ --projectId <id-of-project> ] |
| 31 | + |
| 32 | +.. include:: /includes/fact-command-line-help.rst |
| 33 | + |
| 34 | +.. _mcli-atlas-security-ldap-get-options: |
| 35 | + |
| 36 | +Options |
| 37 | +------- |
| 38 | + |
| 39 | +.. list-table:: |
| 40 | + :header-rows: 1 |
| 41 | + :widths: 25 10 55 10 |
| 42 | + |
| 43 | + * - Option |
| 44 | + - Type |
| 45 | + - Description |
| 46 | + - Required? |
| 47 | + |
| 48 | + * - ``--output``, ``-o`` |
| 49 | + - string |
| 50 | + - .. include:: /includes/extracts/fact-basic-options-output.rst |
| 51 | + - no |
| 52 | + |
| 53 | + * - ``--profile``, ``-P`` |
| 54 | + - string |
| 55 | + - Name of the profile to use for accessing the |service| |
| 56 | + project. If omitted, uses the {+default-profile+}. |
| 57 | + - no |
| 58 | + |
| 59 | + * - ``--projectId`` |
| 60 | + - string |
| 61 | + - Unique identifier of the |service| project. |
| 62 | + - yes |
| 63 | + |
| 64 | +.. _mcli-atlas-security-ldap-get-output: |
| 65 | + |
| 66 | +Output |
| 67 | +------ |
| 68 | + |
| 69 | +If the command succeeds, it returns the following output in the default |
| 70 | +format. If the command returns errors, see |
| 71 | +:ref:`Troubleshooting <mcli-troubleshooting>` for recommended solutions. |
| 72 | + |
| 73 | +.. code-block:: sh |
| 74 | + :copyable: false |
| 75 | + |
| 76 | + HOSTNAME PORT AUTHENTICATION AUTHORIZATION |
| 77 | + <LDAP-server-hostname> <port-number> true|false true|false |
| 78 | + |
| 79 | +The default output contains a subset of the fields returned by this |
| 80 | +command. For the complete list of |json| fields returned by the command, |
| 81 | +see the :atlas:`API reference |
| 82 | +</reference/api/ldaps-configuration-get-current/#response-elements>`. |
| 83 | + |
| 84 | +.. _mcli-atlas-security-ldap-get-egs: |
| 85 | + |
| 86 | +Example |
| 87 | +------- |
| 88 | + |
| 89 | +The following example uses the ``mongocli atlas security ldap get`` |
| 90 | +command to get the current |ldap| configuration details for the |
| 91 | +|service| project specified using the {+default-profile+}. |
| 92 | + |
| 93 | +.. tabs:: |
| 94 | + |
| 95 | + .. tab:: Default Output |
| 96 | + :tabid: default |
| 97 | + |
| 98 | + .. code-block:: shell |
| 99 | + |
| 100 | + mongocli atlas security ldap get |
| 101 | + |
| 102 | + The previous command prints the following to the terminal: |
| 103 | + |
| 104 | + .. code-block:: shell |
| 105 | + :copyable: false |
| 106 | + |
| 107 | + HOSTNAME PORT AUTHENTICATION AUTHORIZATION |
| 108 | + atlas-ldaps-01.ldap.myteam.com 636 true true |
| 109 | + |
| 110 | + .. tab:: JSON Output |
| 111 | + :tabid: json |
| 112 | + |
| 113 | + .. code-block:: shell |
| 114 | + |
| 115 | + mongocli atlas security ldap get |
| 116 | + |
| 117 | + The previous command prints the following fields to the terminal: |
| 118 | + |
| 119 | + .. code-block:: shell |
| 120 | + :copyable: false |
| 121 | + |
| 122 | + { |
| 123 | + "ldap": { |
| 124 | + "authenticationEnabled": true, |
| 125 | + "authorizationEnabled": true, |
| 126 | + "hostname": "atlas-ldaps-01.ldap.myteam.com", |
| 127 | + "port": 636, |
| 128 | + "bindUsername": "CN=Administrator,CN=Users,DC=atlas-ldaps-01,DC=myteam,DC=com" |
| 129 | + } |
| 130 | + } |
0 commit comments