validateSolFunctionPackageContent method
Validates function package content. This can be used as a dry run before uploading function package content with PutSolFunctionPackageContent.
A function package is a .zip file in CSAR (Cloud Service Archive) format that contains a network function (an ETSI standard telecommunication application) and function package descriptor that uses the TOSCA standard to describe how the network functions should run on your network.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter file :
Function package file.
Parameter vnfPkgId :
Function package ID.
Parameter contentType :
Function package content type.
Implementation
Future<ValidateSolFunctionPackageContentOutput>
validateSolFunctionPackageContent({
required Uint8List file,
required String vnfPkgId,
PackageContentType? contentType,
}) async {
final headers = <String, String>{
if (contentType != null) 'Content-Type': contentType.value,
};
final response = await _protocol.send(
payload: file,
method: 'PUT',
requestUri:
'/sol/vnfpkgm/v1/vnf_packages/${Uri.encodeComponent(vnfPkgId)}/package_content/validate',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return ValidateSolFunctionPackageContentOutput.fromJson(response);
}