getImageSetMetadata method

Future<GetImageSetMetadataResponse> getImageSetMetadata({
  1. required String datastoreId,
  2. required String imageSetId,
  3. String? versionId,
})

Get metadata attributes for an image set.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter datastoreId : The data store identifier.

Parameter imageSetId : The image set identifier.

Parameter versionId : The image set version identifier.

Implementation

Future<GetImageSetMetadataResponse> getImageSetMetadata({
  required String datastoreId,
  required String imageSetId,
  String? versionId,
}) async {
  final $query = <String, List<String>>{
    if (versionId != null) 'version': [versionId],
  };
  final response = await _protocol.sendRaw(
    payload: null,
    method: 'POST',
    requestUri:
        '/datastore/${Uri.encodeComponent(datastoreId)}/imageSet/${Uri.encodeComponent(imageSetId)}/getImageSetMetadata',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetImageSetMetadataResponse(
    imageSetMetadataBlob: await response.stream.toBytes(),
    contentEncoding:
        _s.extractHeaderStringValue(response.headers, 'Content-Encoding'),
    contentType:
        _s.extractHeaderStringValue(response.headers, 'Content-Type'),
  );
}