Skip to content

get_sol_network_package_content

get_sol_network_package_content(
    nsd_info_id: NsdInfoId,
    accept: PackageContentType,
    *,
    config_overrides: Optional[tnbClientConfig] = None,
) -> GetSolNetworkPackageContentOutput

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

Parameters:

  • nsd_info_id (NsdInfoId) –

    ID of the network service descriptor in the network package.

  • accept (PackageContentType) –

    The format of the package you want to download from the network package.

Raises:

Examples:

Get a network package Content

>>> client.get_sol_network_package_content(accept='application/zip', nsd_info_id='np-0d5b823eb5c2a9241')
Source code in docs_src/capo_tnb/_services/tnb.py
def get_sol_network_package_content(
    self,
    nsd_info_id: "capo_tnb.types.nsd_info_id.NsdInfoId",
    accept: "capo_tnb.types.package_content_type.PackageContentType",
    *,
    config_overrides: Optional[tnbClientConfig] = None,
) -> "capo_tnb.types.get_sol_network_package_content_output.GetSolNetworkPackageContentOutput":
    """<p>Gets the contents of a network package.</p> <p>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.</p>

    Args:
        nsd_info_id: <p>ID of the network service descriptor in the network package.</p>
        accept: <p>The format of the package you want to download from the network package.</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:
        Get a network package Content

        >>> client.get_sol_network_package_content(accept='application/zip', nsd_info_id='np-0d5b823eb5c2a9241')
    """

    def _handler(
        req: "OperationRequest[capo_tnb.types.get_sol_network_package_content_input.GetSolNetworkPackageContentInput]",
    ) -> OperationResponse[
        "capo_tnb.types.get_sol_network_package_content_output.GetSolNetworkPackageContentOutput"
    ]:
        import capo_tnb._operations.tnb.get_sol_network_package_content

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSolNetworkPackageContent")
    )
    input_: capo_tnb.types.get_sol_network_package_content_input.GetSolNetworkPackageContentInput = {
        "nsd_info_id": nsd_info_id,
        "accept": accept,
    }

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