describeApplicationAssociations method
Describes the associations between the application and the specified associated resources.
May throw AccessDeniedException.
May throw InvalidParameterValuesException.
May throw OperationNotSupportedException.
May throw ResourceNotFoundException.
Parameter applicationId :
The identifier of the specified application.
Parameter associatedResourceTypes :
The resource type of the associated resources.
Parameter maxResults :
The maximum number of associations to return.
Parameter nextToken :
If you received a NextToken from a previous call that was
paginated, provide this token to receive the next set of results.
Implementation
Future<DescribeApplicationAssociationsResult>
describeApplicationAssociations({
required String applicationId,
required List<ApplicationAssociatedResourceType> associatedResourceTypes,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
25,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkspacesService.DescribeApplicationAssociations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ApplicationId': applicationId,
'AssociatedResourceTypes':
associatedResourceTypes.map((e) => e.value).toList(),
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeApplicationAssociationsResult.fromJson(jsonResponse.body);
}