Returns group information for the specified directory.
This operation supports pagination with the use of the NextToken
request and response parameters. If more results are available, the ListGroups.NextToken
member contains a token that you pass in the next call to ListGroups
. This retrieves the next set of items.
You can also specify a maximum number of return results with the MaxResults
parameter.
See also: AWS API Documentation
list-groups
is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the --no-paginate
argument.
When using --output text
and the --query
argument on a paginated response, the --query
argument must extract data from the results of the following query expressions: Groups
list-groups
--directory-id <value>
[--realm <value>]
[--cli-input-json | --cli-input-yaml]
[--starting-token <value>]
[--page-size <value>]
[--max-items <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
--directory-id
(string)
The identifier (ID) of the directory that’s associated with the group.
--realm
(string)
The domain name associated with the directory.
Note
This parameter is optional, so you can return groups outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD groups are returned.
This value is case insensitive.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--starting-token
(string)
A token to specify where to start paginating. This is the
NextToken
from a previously truncated response.For usage examples, see Pagination in the AWS Command Line Interface User Guide .
--page-size
(integer)
The size of each page to get in the AWS service call. This does not affect the number of items returned in the command’s output. Setting a smaller page size results in more calls to the AWS service, retrieving fewer items in each call. This can help prevent the AWS service calls from timing out.
For usage examples, see Pagination in the AWS Command Line Interface User Guide .
--max-items
(integer)
The total number of items to return in the command’s output. If the total number of items available is more than the value specified, a
NextToken
is provided in the command’s output. To resume pagination, provide theNextToken
value in thestarting-token
argument of a subsequent command. Do not use theNextToken
response element directly outside of the AWS CLI.For usage examples, see Pagination in the AWS Command Line Interface User Guide .
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
--debug
(boolean)
Turn on debug logging.
--endpoint-url
(string)
Override command’s default URL with the given URL.
--no-verify-ssl
(boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate
(boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output
(string)
The formatting style for command output.
--query
(string)
A JMESPath query to use in filtering the response data.
--profile
(string)
Use a specific profile from your credential file.
--region
(string)
The region to use. Overrides config/env settings.
--version
(string)
Display the version of this tool.
--color
(string)
Turn on/off color output.
--no-sign-request
(boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle
(string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout
(int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout
(int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--cli-binary-format
(string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb://
will always be treated as binary and use the file contents directly regardless of the cli-binary-format
setting. When using file://
the file contents will need to properly formatted for the configured cli-binary-format
.
--no-cli-pager
(boolean)
Disable cli pager for output.
--cli-auto-prompt
(boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt
(boolean)
Disable automatically prompt for CLI input parameters.
To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.
Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .
To list a directory’s groups
The following list-groups
example lists groups in the specified directory.
aws ds-data list-groups \
--directory-id d-1234567890
Output:
{
"Groups": [
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Administrators",
"SID": "S-1-2-33-441"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Users",
"SID": "S-1-2-33-442"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Guests",
"SID": "S-1-2-33-443"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Print Operators",
"SID": "S-1-2-33-444"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Backup Operators",
"SID": "S-1-2-33-445"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Replicator",
"SID": "S-1-2-33-446"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Remote Desktop Users",
"SID": "S-1-2-33-447"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Network Configuration Operators",
"SID": "S-1-2-33-448"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Performance Monitor Users",
"SID": "S-1-2-33-449"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Performance Log Users",
"SID": "S-1-2-33-450"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Distributed COM Users",
"SID": "S-1-2-33-451"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "IIS_IUSRS",
"SID": "S-1-2-33-452"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Cryptographic Operators",
"SID": "S-1-2-33-453"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Event Log Readers",
"SID": "S-1-2-33-454"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Certificate Service DCOM Access",
"SID": "S-1-2-33-456"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "RDS Remote Access Servers",
"SID": "S-1-2-33-457"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "RDS Endpoint Servers",
"SID": "S-1-2-33-458"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "RDS Management Servers",
"SID": "S-1-2-33-459"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Hyper-V Administrators",
"SID": "S-1-2-33-460"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Access Control Assistance Operators",
"SID": "S-1-2-33-461"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Remote Management Users",
"SID": "S-1-2-33-462"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Storage Replica Administrators",
"SID": "S-1-2-33-463"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Domain Computers",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-789"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Domain Controllers",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-790"
},
{
"GroupScope": "Universal",
"GroupType": "Security",
"SAMAccountName": "Schema Admins",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-791"
},
{
"GroupScope": "Universal",
"GroupType": "Security",
"SAMAccountName": "Enterprise Admins",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-792"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "Cert Publishers",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-793"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Domain Admins",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-794"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Domain Users",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-795"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Domain Guests",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-796"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Group Policy Creator Owners",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-797"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "RAS and IAS Servers",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-798"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Server Operators",
"SID": "S-1-2-33-464"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Account Operators",
"SID": "S-1-2-33-465"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Pre-Windows 2000 Compatible Access",
"SID": "S-1-2-33-466"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Incoming Forest Trust Builders",
"SID": "S-1-2-33-467"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Windows Authorization Access Group",
"SID": "S-1-2-33-468"
},
{
"GroupScope": "BuiltinLocal",
"GroupType": "Security",
"SAMAccountName": "Terminal Server License Servers",
"SID": "S-1-2-33-469"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "Allowed RODC Password Replication Group",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-798"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "Denied RODC Password Replication Group",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-799"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Read-only Domain Controllers",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-800"
},
{
"GroupScope": "Universal",
"GroupType": "Security",
"SAMAccountName": "Enterprise Read-only Domain Controllers",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-801"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Cloneable Domain Controllers",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-802"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Protected Users",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-803"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Key Admins",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-804"
},
{
"GroupScope": "Universal",
"GroupType": "Security",
"SAMAccountName": "Enterprise Key Admins",
"SID": "S-1-2-34-56789123456-7891012345-6789123486-805"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "DnsAdmins",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4567"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "DnsUpdateProxy",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4568"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "Admins",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4569"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWSAdministrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4570"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Object Management Service Accounts",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4571"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Private CA Connector for AD Delegated Group",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4572"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Application and Service Delegated Group",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4573"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4574"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated FSx Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4575"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Account Operators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4576"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Active Directory Based Activation Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4577"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Allowed to Authenticate Objects",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4578"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Allowed to Authenticate to Domain Controllers",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4579"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Deleted Object Lifetime Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4580"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Distributed File System Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4581"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Dynamic Host Configuration Protocol Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4582"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Enterprise Certificate Authority Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4583"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Fine Grained Password Policy Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4584"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Group Policy Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4585"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Managed Service Account Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4586"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Read Foreign Security Principals",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4587"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Remote Access Service Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4588"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Replicate Directory Changes Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4588"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Sites and Services Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4589"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated System Management Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4590"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Terminal Server Licensing Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4591"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated User Principal Name Suffix Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4592"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Add Workstations To Domain Users",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4593"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Domain Name System Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4594"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Kerberos Delegation Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4595"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated Server Administrators",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4596"
},
{
"GroupScope": "DomainLocal",
"GroupType": "Security",
"SAMAccountName": "AWS Delegated MS-NPRC Non-Compliant Devices",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4597"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Remote Access",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4598"
},
{
"GroupScope": "Global",
"GroupType": "Security",
"SAMAccountName": "Accounting",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4599"
},
{
"GroupScope": "Global",
"GroupType": "Distribution",
"SAMAccountName": "sales",
"SID": "S-1-2-34-5678901234-5678901234-5678910123-4567"
}
],
"DirectoryId": "d-1234567890",
"Realm": "corp.example.com"
}
For more information, see Viewing and updating an AWS Managed Microsoft AD group’s details in the AWS Directory Service Administration Guide.
DirectoryId -> (string)
The identifier (ID) of the directory that’s associated with the group.
Groups -> (list)
The group information that the request returns.
(structure)
A structure containing a subset of fields of a group object from a directory.
GroupScope -> (string)
The scope of the AD group. For details, see Active Directory security groups .GroupType -> (string)
The AD group type. For details, see Active Directory security group type .SAMAccountName -> (string)
The name of the group.SID -> (string)
The unique security identifier (SID) of the group.
NextToken -> (string)
An encoded paging token for paginated calls that can be passed back to retrieve the next page.
Realm -> (string)
The domain name associated with the group.