describeWorkspaceImagePermissions method
Describes the permissions that the owner of an image has granted to other AWS accounts for an image.
May throw ResourceNotFoundException. May throw AccessDeniedException. May throw InvalidParameterValuesException.
Parameter imageId
:
The identifier of the image.
Parameter maxResults
:
The maximum number of items 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<DescribeWorkspaceImagePermissionsResult>
describeWorkspaceImagePermissions({
required String imageId,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(imageId, 'imageId');
_s.validateNumRange(
'maxResults',
maxResults,
1,
25,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
2048,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkspacesService.DescribeWorkspaceImagePermissions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ImageId': imageId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeWorkspaceImagePermissionsResult.fromJson(jsonResponse.body);
}