createPackage method
Creates a package and storage location in an Amazon S3 access point.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ValidationException.
Parameter packageName :
A name for the package.
Parameter tags :
Tags for the package.
Implementation
Future<CreatePackageResponse> createPackage({
required String packageName,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'PackageName': packageName,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/packages',
exceptionFnMap: _exceptionFns,
);
return CreatePackageResponse.fromJson(response);
}