putRepositoryCatalogData method
Creates or updates the catalog data for a repository in a public registry.
May throw InvalidParameterException.
May throw RepositoryNotFoundException.
May throw ServerException.
May throw UnsupportedCommandException.
Parameter catalogData :
An object containing the catalog data for a repository. This data is
publicly visible in the Amazon ECR Public Gallery.
Parameter repositoryName :
The name of the repository to create or update the catalog data for.
Parameter registryId :
The Amazon Web Services account ID that's associated with the public
registry the repository is in. If you do not specify a registry, the
default public registry is assumed.
Implementation
Future<PutRepositoryCatalogDataResponse> putRepositoryCatalogData({
required RepositoryCatalogDataInput catalogData,
required String repositoryName,
String? registryId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SpencerFrontendService.PutRepositoryCatalogData'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'catalogData': catalogData,
'repositoryName': repositoryName,
if (registryId != null) 'registryId': registryId,
},
);
return PutRepositoryCatalogDataResponse.fromJson(jsonResponse.body);
}