getResourceShares method

Future<GetResourceSharesResponse> getResourceShares({
  1. required ResourceOwner resourceOwner,
  2. int? maxResults,
  3. String? name,
  4. String? nextToken,
  5. List<String>? resourceShareArns,
  6. ResourceShareStatus? resourceShareStatus,
  7. List<TagFilter>? tagFilters,
})

Gets the resource shares that you own or the resource shares that are shared with you.

May throw UnknownResourceException. May throw MalformedArnException. May throw InvalidNextTokenException. May throw InvalidParameterException. May throw ServerInternalException. May throw ServiceUnavailableException.

Parameter resourceOwner : The type of owner.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Parameter name : The name of the resource share.

Parameter nextToken : The token for the next page of results.

Parameter resourceShareArns : The Amazon Resource Names (ARN) of the resource shares.

Parameter resourceShareStatus : The status of the resource share.

Parameter tagFilters : One or more tag filters.

Implementation

Future<GetResourceSharesResponse> getResourceShares({
  required ResourceOwner resourceOwner,
  int? maxResults,
  String? name,
  String? nextToken,
  List<String>? resourceShareArns,
  ResourceShareStatus? resourceShareStatus,
  List<TagFilter>? tagFilters,
}) async {
  ArgumentError.checkNotNull(resourceOwner, 'resourceOwner');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final $payload = <String, dynamic>{
    'resourceOwner': resourceOwner.toValue(),
    if (maxResults != null) 'maxResults': maxResults,
    if (name != null) 'name': name,
    if (nextToken != null) 'nextToken': nextToken,
    if (resourceShareArns != null) 'resourceShareArns': resourceShareArns,
    if (resourceShareStatus != null)
      'resourceShareStatus': resourceShareStatus.toValue(),
    if (tagFilters != null) 'tagFilters': tagFilters,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/getresourceshares',
    exceptionFnMap: _exceptionFns,
  );
  return GetResourceSharesResponse.fromJson(response);
}