createRegistry method
Creates a registry.
May throw BadRequestException. May throw InternalServerErrorException. May throw UnauthorizedException. May throw ForbiddenException. May throw ServiceUnavailableException. May throw ConflictException.
Parameter registryName
:
The name of the registry.
Parameter description
:
A description of the registry to be created.
Parameter tags
:
Tags to associate with the registry.
Implementation
Future<CreateRegistryResponse> createRegistry({
required String registryName,
String? description,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(registryName, 'registryName');
_s.validateStringLength(
'description',
description,
0,
256,
);
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/registries/name/${Uri.encodeComponent(registryName)}',
exceptionFnMap: _exceptionFns,
);
return CreateRegistryResponse.fromJson(response);
}