putSolFunctionPackageContent method

Future<PutSolFunctionPackageContentOutput> putSolFunctionPackageContent({
  1. required Uint8List file,
  2. required String vnfPkgId,
  3. PackageContentType? contentType,
})

Uploads the contents of a function package.

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<PutSolFunctionPackageContentOutput> putSolFunctionPackageContent({
  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',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return PutSolFunctionPackageContentOutput.fromJson(response);
}