putSolNetworkPackageContent method

Future<PutSolNetworkPackageContentOutput> putSolNetworkPackageContent({
  1. required Uint8List file,
  2. required String nsdInfoId,
  3. PackageContentType? contentType,
})

Uploads the contents of a network package.

A network package is a .zip file in CSAR (Cloud Service Archive) format defines the function packages you want to deploy and the Amazon Web Services infrastructure you want to deploy them on.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter file : Network package file.

Parameter nsdInfoId : Network service descriptor info ID.

Parameter contentType : Network package content type.

Implementation

Future<PutSolNetworkPackageContentOutput> putSolNetworkPackageContent({
  required Uint8List file,
  required String nsdInfoId,
  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/nsd/v1/ns_descriptors/${Uri.encodeComponent(nsdInfoId)}/nsd_content',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return PutSolNetworkPackageContentOutput.fromJson(response);
}