Skip to content

validate_sol_function_package_content

validate_sol_function_package_content(
    vnf_pkg_id: VnfPkgId,
    file: SensitiveBlob,
    *,
    config_overrides: Optional[tnbClientConfig] = None,
    content_type: Optional[PackageContentType] = None,
) -> ValidateSolFunctionPackageContentOutput

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.

Parameters:

Raises:

Examples:

Validate a Function Package content

>>> client.validate_sol_function_package_content(vnf_pkg_id='fp-07aa863e53460a2a6', content_type='application/zip', file='UEsDBBQAAAAAAPqLiVMAAAAAAAAAAAAAAAAMACAAZnJlZTVnYy1hbWYvVVQNAAcIrrJhBK')
Source code in docs_src/capo_tnb/_services/tnb.py
def validate_sol_function_package_content(
    self,
    vnf_pkg_id: "capo_tnb.types.vnf_pkg_id.VnfPkgId",
    file: "capo_tnb.types.sensitive_blob.SensitiveBlob",
    *,
    config_overrides: Optional[tnbClientConfig] = None,
    content_type: Optional[
        "capo_tnb.types.package_content_type.PackageContentType"
    ] = None,
) -> "capo_tnb.types.validate_sol_function_package_content_output.ValidateSolFunctionPackageContentOutput":
    """<p>Validates function package content. This can be used as a dry run before uploading function package content with <a href="https://docs.aws.amazon.com/tnb/latest/APIReference/API_PutSolFunctionPackageContent.html">PutSolFunctionPackageContent</a>.</p> <p>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.</p>

    Args:
        vnf_pkg_id: <p>Function package ID.</p>
        content_type: <p>Function package content type.</p>
        file: <p>Function package file.</p>

    Raises:
        capo_tnb.errors.access_denied_exception.AccessDeniedException: <p>Insufficient permissions to make request.</p>
        capo_tnb.errors.internal_server_exception.InternalServerException: <p>Unexpected error occurred. Problem on the server.</p>
        capo_tnb.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource that doesn't exist.</p>
        capo_tnb.errors.throttling_exception.ThrottlingException: <p>Exception caused by throttling.</p>
        capo_tnb.errors.validation_exception.ValidationException: <p>Unable to process the request because the client provided input failed to satisfy request constraints.</p>
        capo_tnb.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Validate a Function Package content

        >>> client.validate_sol_function_package_content(vnf_pkg_id='fp-07aa863e53460a2a6', content_type='application/zip', file='UEsDBBQAAAAAAPqLiVMAAAAAAAAAAAAAAAAMACAAZnJlZTVnYy1hbWYvVVQNAAcIrrJhBK')
    """

    def _handler(
        req: "OperationRequest[capo_tnb.types.validate_sol_function_package_content_input.ValidateSolFunctionPackageContentInput]",
    ) -> OperationResponse[
        "capo_tnb.types.validate_sol_function_package_content_output.ValidateSolFunctionPackageContentOutput"
    ]:
        import capo_tnb._operations.tnb.validate_sol_function_package_content

        output, http_response = (
            capo_tnb._operations.tnb.validate_sol_function_package_content.validate_sol_function_package_content(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_tnb.types.validate_sol_function_package_content_input.ValidateSolFunctionPackageContentInput",
    ) -> dict[str, Any]:
        import capo_tnb.types.validate_sol_function_package_content_input

        return capo_tnb.types.validate_sol_function_package_content_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ValidateSolFunctionPackageContent", redact_input=_redact_input
        ),
    )
    input_: capo_tnb.types.validate_sol_function_package_content_input.ValidateSolFunctionPackageContentInput = {
        "vnf_pkg_id": vnf_pkg_id,
        "file": file,
    }
    if content_type is not None:
        input_["content_type"] = content_type

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output