describeImageAssociations method
Describes the associations between the applications and the specified image.
May throw AccessDeniedException.
May throw InvalidParameterValuesException.
May throw OperationNotSupportedException.
May throw ResourceNotFoundException.
Parameter associatedResourceTypes :
The resource types of the associated resource.
Parameter imageId :
The identifier of the image.
Implementation
Future<DescribeImageAssociationsResult> describeImageAssociations({
required List<ImageAssociatedResourceType> associatedResourceTypes,
required String imageId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkspacesService.DescribeImageAssociations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AssociatedResourceTypes':
associatedResourceTypes.map((e) => e.value).toList(),
'ImageId': imageId,
},
);
return DescribeImageAssociationsResult.fromJson(jsonResponse.body);
}