listSubPackageGroups method
Returns a list of direct children of the specified package group.
For information package group hierarchy, see Package group definition syntax and matching behavior in the CodeArtifact User Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domain :
The name of the domain which contains the package group from which to list
sub package groups.
Parameter packageGroup :
The pattern of the package group from which to list sub package groups.
Parameter domainOwner :
The 12-digit account number of the Amazon Web Services account that owns
the domain. It does not include dashes or spaces.
Parameter maxResults :
The maximum number of results to return per page.
Parameter nextToken :
The token for the next set of results. Use the value returned in the
previous response in the next request to retrieve the next set of results.
Implementation
Future<ListSubPackageGroupsResult> listSubPackageGroups({
required String domain,
required String packageGroup,
String? domainOwner,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
'domain': [domain],
'package-group': [packageGroup],
if (domainOwner != null) 'domain-owner': [domainOwner],
if (maxResults != null) 'max-results': [maxResults.toString()],
if (nextToken != null) 'next-token': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'POST',
requestUri: '/v1/package-groups/sub-groups',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListSubPackageGroupsResult.fromJson(response);
}