-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI examples for ds-data, ecr-public
- Loading branch information
Showing
27 changed files
with
1,066 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*. |
Oops, something went wrong.