getResourceCollection method

Future<GetResourceCollectionResponse> getResourceCollection({
  1. required ResourceCollectionType resourceCollectionType,
  2. String? nextToken,
})

Returns lists Amazon Web Services resources that are of the specified resource collection type. The two types of Amazon Web Services resource collections supported are Amazon Web Services CloudFormation stacks and Amazon Web Services resources that contain the same Amazon Web Services tag. DevOps Guru can be configured to analyze the Amazon Web Services resources that are defined in the stacks or that are tagged using the same tag key. You can specify up to 500 Amazon Web Services CloudFormation stacks.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceCollectionType : The type of Amazon Web Services resource collections to return. The one valid value is CLOUD_FORMATION for Amazon Web Services CloudFormation stacks.

Parameter nextToken : The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Implementation

Future<GetResourceCollectionResponse> getResourceCollection({
  required ResourceCollectionType resourceCollectionType,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/resource-collections/${Uri.encodeComponent(resourceCollectionType.value)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetResourceCollectionResponse.fromJson(response);
}