describeSharedResources method

Future<DescribeSharedResourcesResponse> describeSharedResources({
  1. required String brokerId,
  2. int? maxResults,
  3. String? nextToken,
})

Returns the resources shared to a broker.

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException.

Parameter brokerId : The unique ID that Amazon MQ generates for the broker.

Parameter maxResults : The maximum number of resources that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.

Parameter nextToken : The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.

Implementation

Future<DescribeSharedResourcesResponse> describeSharedResources({
  required String brokerId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v1/brokers/${Uri.encodeComponent(brokerId)}/shared-resources',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeSharedResourcesResponse.fromJson(response);
}