searchGroups
inline suspend fun DirectoryServiceDataClient.searchGroups(crossinline block: SearchGroupsRequest.Builder.() -> Unit): SearchGroupsResponse
Searches the specified directory for a group. You can find groups that match the SearchString
parameter with the value of their attributes included in the SearchString
parameter.
This operation supports pagination with the use of the NextToken
request and response parameters. If more results are available, the SearchGroups.NextToken
member contains a token that you pass in the next call to SearchGroups
. This retrieves the next set of items.
You can also specify a maximum number of return results with the MaxResults
parameter.
Samples
fun main() {
//sampleStart
// The following command searches the examplecorp. com domain for groups with the GroupType security.
val resp = directoryServiceDataClient.searchGroups {
directoryId = "d-12233abcde"
maxResults = 123
nextToken = "123456"
realm = "examplecorp.com"
searchAttributes = listOf<String>(
"GroupScope"
)
searchString = "Security"
}
//sampleEnd
}