validateSolNetworkPackageContent method

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

Validates network package content. This can be used as a dry run before uploading network package content with PutSolNetworkPackageContent.

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 file.

Parameter contentType : Network package content type.

Implementation

Future<ValidateSolNetworkPackageContentOutput>
    validateSolNetworkPackageContent({
  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/validate',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return ValidateSolNetworkPackageContentOutput.fromJson(response);
}