listResources method
Lists the resources that you added to a resource shares or the resources that are shared with you.
May throw InvalidResourceTypeException. 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 nextToken
:
The token for the next page of results.
Parameter principal
:
The principal.
Parameter resourceArns
:
The Amazon Resource Names (ARN) of the resources.
Parameter resourceShareArns
:
The Amazon Resource Names (ARN) of the resource shares.
Parameter resourceType
:
The resource type.
Valid values: codebuild:Project
|
codebuild:ReportGroup
| ec2:CapacityReservation
| ec2:DedicatedHost
| ec2:Subnet
|
ec2:TrafficMirrorTarget
| ec2:TransitGateway
|
imagebuilder:Component
| imagebuilder:Image
|
imagebuilder:ImageRecipe
|
license-manager:LicenseConfiguration
I
resource-groups:Group
| rds:Cluster
|
route53resolver:ResolverRule
Implementation
Future<ListResourcesResponse> listResources({
required ResourceOwner resourceOwner,
int? maxResults,
String? nextToken,
String? principal,
List<String>? resourceArns,
List<String>? resourceShareArns,
String? resourceType,
}) async {
ArgumentError.checkNotNull(resourceOwner, 'resourceOwner');
_s.validateNumRange(
'maxResults',
maxResults,
1,
500,
);
final $payload = <String, dynamic>{
'resourceOwner': resourceOwner.toValue(),
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (principal != null) 'principal': principal,
if (resourceArns != null) 'resourceArns': resourceArns,
if (resourceShareArns != null) 'resourceShareArns': resourceShareArns,
if (resourceType != null) 'resourceType': resourceType,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/listresources',
exceptionFnMap: _exceptionFns,
);
return ListResourcesResponse.fromJson(response);
}