listComponents method
This API lists the components of an entity.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter entityId :
The ID for the entity whose metadata (component/properties) is returned by
the operation.
Parameter workspaceId :
The workspace ID.
Parameter componentPath :
This string specifies the path to the composite component, starting from
the top-level component.
Parameter maxResults :
The maximum number of results returned at one time. The default is 25.
Parameter nextToken :
The string that specifies the next page of results.
Implementation
Future<ListComponentsResponse> listComponents({
required String entityId,
required String workspaceId,
String? componentPath,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
200,
);
final $payload = <String, dynamic>{
if (componentPath != null) 'componentPath': componentPath,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceId)}/entities/${Uri.encodeComponent(entityId)}/components-list',
exceptionFnMap: _exceptionFns,
);
return ListComponentsResponse.fromJson(response);
}