Skip to content

Commit 742ce89

Browse files
authored
DOCSP-21630 Consistent Syntax Examples: S-W (#1491)
* DOCSP-21630 Consistent Syntax Examples: S-W * internal review feedback * addressing additional internal review feedback
1 parent c5f8541 commit 742ce89

23 files changed

+997
-933
lines changed

source/reference/command/serverStatus.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ The command has the following syntax:
3232

3333
.. code-block:: javascript
3434

35-
db.runCommand( { serverStatus: 1 } )
35+
db.runCommand(
36+
{
37+
serverStatus: 1
38+
}
39+
)
3640

3741
The value (i.e. ``1`` above) does not affect the operation of the
3842
command. The ``db.serverStatus()`` command returns a large amount of

source/reference/command/setAllowMigrations.txt

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,55 +21,59 @@ Definition
2121
from committing, and excludes the collection from new balancer
2222
rounds.
2323

24-
The command has the following syntax:
24+
Syntax
25+
------
2526

26-
.. code-block:: javascript
27+
The command has the following syntax:
2728

28-
db.adminCommand( {
29-
setAllowMigrations: "<db>.<collection>",
30-
allowMigrations: <true|false>
31-
} )
32-
33-
The command takes the following parameters:
34-
35-
.. list-table::
36-
:header-rows: 1
37-
:widths: 20 20 60
38-
39-
* - Field
40-
- Type
41-
- Description
42-
43-
* - :ref:`setAllowMigrations <setAllowMigrations-cmd-coll>`
44-
45-
- ``string``
46-
47-
- .. _setAllowMigrations-cmd-coll:
48-
49-
The collection to modify.
50-
51-
* - :ref:`allowMigrations <setAllowMigrations-cmd-flag>`
52-
53-
- ``boolean``
54-
55-
- .. _setAllowMigrations-cmd-flag:
56-
57-
If ``false``:
58-
59-
- MongoDB prevents new :ref:`automatic migrations
60-
<sharding-chunk-migration-automatic>` on the collection
61-
- in-flight :ref:`manual migrations
62-
<sharding-chunk-migration-manual>` will not be committed
63-
- the collection will be excluded from new balancer rounds
64-
65-
If ``true``:
66-
67-
- MongoDB allows new :ref:`automatic migrations
68-
<sharding-chunk-migration-automatic>` on the collection
69-
- in-flight :ref:`manual migrations
70-
<sharding-chunk-migration-manual>` will be committed
71-
- the collection will be included in new balancer rounds
29+
.. code-block:: javascript
7230

31+
db.adminCommand(
32+
{
33+
setAllowMigrations: "<db>.<collection>",
34+
allowMigrations: <true|false>
35+
}
36+
)
37+
38+
Command Fields
39+
--------------
40+
41+
The command takes the following parameters:
42+
43+
.. list-table::
44+
:header-rows: 1
45+
:widths: 20 20 60
46+
47+
* - Field
48+
- Type
49+
- Description
50+
51+
* - :ref:`setAllowMigrations <setAllowMigrations-cmd-coll>`
52+
- ``string``
53+
- .. _setAllowMigrations-cmd-coll:
54+
55+
The collection to modify.
56+
57+
* - :ref:`allowMigrations <setAllowMigrations-cmd-flag>`
58+
- ``boolean``
59+
- .. _setAllowMigrations-cmd-flag:
60+
61+
If ``false``:
62+
63+
- MongoDB prevents new :ref:`automatic migrations
64+
<sharding-chunk-migration-automatic>` on the collection
65+
- in-flight :ref:`manual migrations
66+
<sharding-chunk-migration-manual>` will not be committed
67+
- the collection will be excluded from new balancer rounds
68+
69+
If ``true``:
70+
71+
- MongoDB allows new :ref:`automatic migrations
72+
<sharding-chunk-migration-automatic>` on the collection
73+
- in-flight :ref:`manual migrations
74+
<sharding-chunk-migration-manual>` will be committed
75+
- the collection will be included in new balancer rounds
76+
7377
Behavior
7478
--------
7579

source/reference/command/setAuditConfig.txt

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,51 @@ Definition
2020
:dbcommand:`setAuditConfig` is an administrative command that
2121
sets new audit configurations for :binary:`~bin.mongod` and
2222
:binary:`~bin.mongos` server instances at runtime.
23+
24+
Use the :method:`db.adminCommand( { command } )<db.adminCommand()>`
25+
method to run :dbcommand:`setAuditConfig` against the ``admin``
26+
database.
2327

24-
The command syntax is:
28+
Syntax
29+
------
2530

26-
.. code-block:: javascript
31+
The command has the following syntax:
2732

28-
{ setAuditConfig: 1, filter: <Filter Document>, auditAuthorizationSuccess: <Boolean> }
29-
30-
:dbcommand:`setAuditConfig` has the following fields:
31-
32-
.. list-table::
33-
:header-rows: 1
34-
:widths: 20 20 80
35-
36-
* - Field
37-
- Type
38-
- Description
39-
40-
* - ``setAuditConfig``
41-
- integer
42-
- Run :dbcommand:`setAuditConfig`
43-
44-
* - ``filter``
45-
- document
46-
- An :doc:`audit filter </tutorial/configure-audit-filters>`
33+
.. code-block:: javascript
4734

48-
* - ``auditAuthorizationSuccess``
49-
- boolean
50-
- Log all, or only failed access authorizations
35+
db.adminCommand(
36+
{
37+
setAuditConfig: 1,
38+
filter: <Filter Document>,
39+
auditAuthorizationSuccess: <Boolean>
40+
}
41+
)
5142

52-
Use the
53-
:method:`db.adminCommand( { command } )<db.adminCommand()>` method
54-
to run :dbcommand:`setAuditConfig` against the ``admin`` database.
43+
Command Fields
44+
--------------
45+
46+
The command has the following fields:
47+
48+
.. list-table::
49+
:header-rows: 1
50+
:widths: 20 20 80
51+
52+
* - Field
53+
- Type
54+
- Description
55+
56+
* - ``setAuditConfig``
57+
- integer
58+
- Run :dbcommand:`setAuditConfig`
59+
60+
* - ``filter``
61+
- document
62+
- An :doc:`audit filter </tutorial/configure-audit-filters>`
63+
64+
* - ``auditAuthorizationSuccess``
65+
- boolean
66+
- Log all, or only failed access authorizations
67+
5568

5669
Behavior
5770
--------

source/reference/command/setClusterParameter.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ Syntax
2929

3030
.. code-block:: javascript
3131

32-
db.adminCommand( { setClusterParameter: { <parameter>: <value> } } )
32+
db.adminCommand(
33+
{
34+
setClusterParameter: { <parameter>: <value> }
35+
}
36+
)
3337

3438
For the available cluster parameters, including examples, see
35-
:ref:`<cluster-parameters>`.
39+
:ref:`cluster-parameters`.
3640

3741
Behavior
3842
--------

0 commit comments

Comments
 (0)