getResourceShares method
Retrieves details about the resource shares that you own or that are shared with you.
May throw InvalidNextTokenException.
May throw InvalidParameterException.
May throw MalformedArnException.
May throw ServerInternalException.
May throw ServiceUnavailableException.
May throw UnknownResourceException.
Parameter resourceOwner :
Specifies that you want to retrieve details of only those resource shares
that match the following:
-
SELF– resource shares that your account shares with other accounts -
OTHER-ACCOUNTS– resource shares that other accounts share with your account
Parameter maxResults :
Specifies the total number of results that you want included on each page
of the response. If you do not include this parameter, it defaults to a
value that is specific to the operation. If additional items exist beyond
the number you specify, the NextToken response element is
returned with a value (not null). Include the specified value as the
NextToken request parameter in the next call to the operation
to get the next part of the results. Note that the service might return
fewer results than the maximum even when there are more results available.
You should check NextToken after every operation to ensure
that you receive all of the results.
Parameter name :
Specifies the name of an individual resource share that you want to
retrieve details about.
Parameter nextToken :
Specifies that you want to receive the next page of results. Valid only if
you received a NextToken response in the previous request. If
you did, it indicates that more output is available. Set this parameter to
the value provided by the previous call's NextToken response
to request the next page of results.
Parameter permissionArn :
Specifies that you want to retrieve details of only those resource shares
that use the managed permission with this Amazon
Resource Name (ARN).
Parameter permissionVersion :
Specifies that you want to retrieve details for only those resource shares
that use the specified version of the managed permission.
Parameter resourceShareArns :
Specifies the Amazon
Resource Names (ARNs) of individual resource shares that you want
information about.
Parameter resourceShareStatus :
Specifies that you want to retrieve details of only those resource shares
that have this status.
Parameter tagFilters :
Specifies that you want to retrieve details of only those resource shares
that match the specified tag keys and values.
Implementation
Future<GetResourceSharesResponse> getResourceShares({
required ResourceOwner resourceOwner,
int? maxResults,
String? name,
String? nextToken,
String? permissionArn,
int? permissionVersion,
List<String>? resourceShareArns,
ResourceShareStatus? resourceShareStatus,
List<TagFilter>? tagFilters,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
500,
);
final $payload = <String, dynamic>{
'resourceOwner': resourceOwner.value,
if (maxResults != null) 'maxResults': maxResults,
if (name != null) 'name': name,
if (nextToken != null) 'nextToken': nextToken,
if (permissionArn != null) 'permissionArn': permissionArn,
if (permissionVersion != null) 'permissionVersion': permissionVersion,
if (resourceShareArns != null) 'resourceShareArns': resourceShareArns,
if (resourceShareStatus != null)
'resourceShareStatus': resourceShareStatus.value,
if (tagFilters != null) 'tagFilters': tagFilters,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/getresourceshares',
exceptionFnMap: _exceptionFns,
);
return GetResourceSharesResponse.fromJson(response);
}