describeImages method
Retrieves a list that describes one or more specified images, if the image names or image ARNs are provided. Otherwise, all images in the account are described.
May throw InvalidParameterCombinationException. May throw ResourceNotFoundException.
Parameter arns
:
The ARNs of the public, private, and shared images to describe.
Parameter maxResults
:
The maximum size of each page of results.
Parameter names
:
The names of the public or private images to describe.
Parameter nextToken
:
The pagination token to use to retrieve the next page of results for this
operation. If this value is null, it retrieves the first page.
Parameter type
:
The type of image (public, private, or shared) to describe.
Implementation
Future<DescribeImagesResult> describeImages({
List<String>? arns,
int? maxResults,
List<String>? names,
String? nextToken,
VisibilityType? type,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
25,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'PhotonAdminProxyService.DescribeImages'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (arns != null) 'Arns': arns,
if (maxResults != null) 'MaxResults': maxResults,
if (names != null) 'Names': names,
if (nextToken != null) 'NextToken': nextToken,
if (type != null) 'Type': type.toValue(),
},
);
return DescribeImagesResult.fromJson(jsonResponse.body);
}