Skip to content

Commit

Permalink
CLI examples for ds-data, ecr-public
Browse files Browse the repository at this point in the history
  • Loading branch information
elysahall committed Nov 19, 2024
1 parent cc622a3 commit 8244e42
Show file tree
Hide file tree
Showing 27 changed files with 1,066 additions and 0 deletions.
12 changes: 12 additions & 0 deletions awscli/examples/ds-data/add-group-member.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**To add a group member to a directory**

The following ``add-group-member`` example adds the specified user to the specified group in the specified directory. ::

aws ds-data add-group-member \
--directory-id d-1234567890 \
--group-name 'sales' \
--member-name 'john.doe'

This command produces no output.

For more information, see `Adding or removing AWS Managed Microsoft AD members to groups and groups to groups <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_add_remove_user_group.html>`__ in the *AWS Directory Service Administration Guide*.
17 changes: 17 additions & 0 deletions awscli/examples/ds-data/create-group.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**To create a group for a directory**

The following ``create-group`` example creates a group in the specified directory. ::

aws ds-data create-group \
--directory-id d-1234567890 \
--sam-account-name 'sales'

Output::

{
"DirectoryId": "d-9067f3da7a",
"SAMAccountName": "sales",
"SID": "S-1-2-34-5567891234-5678912345-67891234567-8912"
}

For more information, see `Creating an AWS Managed Microsoft AD group <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_create_group.html>`__ in the *AWS Directory Service Administration Guide*.
17 changes: 17 additions & 0 deletions awscli/examples/ds-data/create-user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**To create a user**

The following ``create-user`` example creates a user in the specified directory. ::

aws ds-data create-user \
--directory-id d-1234567890 \
--sam-account-name 'john.doe'

Output::

{
"DirectoryId": "d-1234567890",
"SAMAccountName": "john.doe",
"SID": "S-1-2-34-5567891234-5678912345-67891234567-8912"
}

For more information, see `Creating an AWS Managed Microsoft AD user <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_create_user.html>`__ in the *AWS Directory Service Administration Guide*.
11 changes: 11 additions & 0 deletions awscli/examples/ds-data/delete-group.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**To delete a group**

The following ``delete-group`` example deletes the specified group from the specified directory. ::

aws ds-data delete-group \
--directory-id d-1234567890 \
--sam-account-name 'sales'

This command produces no output.

For more information, see `Deleting an AWS Managed Microsoft AD group <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_delete_group.html>`__ in the *AWS Directory Service Administration Guide*.
11 changes: 11 additions & 0 deletions awscli/examples/ds-data/delete-user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**To delete a user**

The following ``delete-user`` example deletes the specified user from the specified directory. ::

aws ds-data delete-user \
--directory-id d-1234567890 \
--sam-account-name 'john.doe'

This command produces no output.

For more information, see `Deleting an AWS Managed Microsoft AD user <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_delete_user.html>`__ in the *AWS Directory Service Administration Guide*.
21 changes: 21 additions & 0 deletions awscli/examples/ds-data/describe-group.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**To list details of a group**

The following ``describe-group`` example gets information for the specified group in the specified directory. ::

aws ds-data describe-group \
--directory-id d-1234567890 \
--sam-account-name 'sales'

Output::

{
"DirectoryId": "d-1234567890",
"DistinguishedName": "CN=sales,OU=Users,OU=CORP,DC=corp,DC=example,DC=com",
"GroupScope": "Global",
"GroupType": "Security",
"Realm": "corp.example.com",
"SAMAccountName": "sales",
"SID": "S-1-2-34-5567891234-5678912345-67891234567-8912"
}

For more information, see `Viewing and updating an AWS Managed Microsoft AD group's details <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_view_update_group.html>`__ in the *AWS Directory Service Administration Guide*.
21 changes: 21 additions & 0 deletions awscli/examples/ds-data/describe-user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**To list information for a user**

The following ``describe-user`` example gets information for the specified user in the specified directory. ::

aws ds-data describe-user command-name \
--directory-id d-1234567890 \
--sam-account-name 'john.doe'

Output::

{
"DirectoryId": "d-1234567890",
"DistinguishedName": "CN=john.doe,OU=Users,OU=CORP,DC=corp,DC=example,DC=com",
"Enabled": false,
"Realm": "corp.example.com",
"SAMAccountName": "john.doe",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4567",
"UserPrincipalName": "[email protected]"
}

For more information, see `Viewing and updating an AWS Managed Microsoft AD user <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_view_update_user.html>`__ in the *AWS Directory Service Administration Guide*.
10 changes: 10 additions & 0 deletions awscli/examples/ds-data/disable-directory-data-access.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**To disable Directory Service Data API for a directory**

The following ``disable-directory-data-access`` example disables the Directory Service Data API for the specified directory. ::

aws ds disable-directory-data-access \
--directory-id d-1234567890

This command produces no output.

For more information, see `Enabling or disabling user and group management or AWS Directory Service Data <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_users_groups_mgmt_enable_disable.html>`__ in the *AWS Directory Service Administration Guide*.
11 changes: 11 additions & 0 deletions awscli/examples/ds-data/disable-user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**To disable a user**

The following ``disable-user`` example disables the specified user in the specified directory. ::

aws ds-data disable-user \
--directory-id d-1234567890 \
--sam-account-name 'john.doe'

This command produces no output.

For more information, see `Disabling an AWS Managed Microsoft AD user <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_disable_user.html>`__ in the *AWS Directory Service Administration Guide*.
10 changes: 10 additions & 0 deletions awscli/examples/ds-data/enable-directory-data-access.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**To enable Directory Service Data API for a directory**

The following ``enable-directory-data-access`` example enables the Directory Service Data API for the specified directory. ::

aws ds enable-directory-data-access \
--directory-id d-1234567890

This command produces no output.

For more information, see `Enabling or disabling user and group management or AWS Directory Service Data <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_users_groups_mgmt_enable_disable.html>`__ in the *AWS Directory Service Administration Guide*.
29 changes: 29 additions & 0 deletions awscli/examples/ds-data/list-group-members.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
**To list a directory's group members**

The following ``list-group-members`` example lists the group members for the specified group in the specified directory. ::

aws ds-data list-group-members \
--directory-id d-1234567890 \
--sam-account-name 'sales'

Output::

{
"Members": [
{
"MemberType": "USER",
"SAMAccountName": "Jane Doe",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4568"
},
{
"MemberType": "USER",
"SAMAccountName": "John Doe",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4569"
}
],
"DirectoryId": "d-1234567890",
"MemberRealm": "corp.example.com",
"Realm": "corp.example.com"
}

For more information, see `Viewing and updating an AWS Managed Microsoft AD group's details <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_view_update_group.html>`__ in the *AWS Directory Service Administration Guide*.
25 changes: 25 additions & 0 deletions awscli/examples/ds-data/list-groups-for-member.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**To list a directory's group membership**

The following ``list-groups-for-member`` example lists group membership for the specified user in the specified directory. ::

aws ds-data list-groups-for-member \
--directory-id d-1234567890 \
--sam-account-name 'john.doe'

Output::

{
"Groups": [
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Domain Users",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4567"
}
],
"DirectoryId": "d-1234567890",
"MemberRealm": "corp.example.com",
"Realm": "corp.example.com"
}

For more information, see `Viewing and updating an AWS Managed Microsoft AD user <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_view_update_user.html>`__ in the *AWS Directory Service Administration Guide*.
Loading

0 comments on commit 8244e42

Please sign in to comment.