Skip to content

update_sol_network_package async

update_sol_network_package(
    nsd_info_id: NsdInfoId,
    nsd_operational_state: NsdOperationalState,
    *,
    config_overrides: Optional[AsynctnbClientConfig] = None,
) -> UpdateSolNetworkPackageOutput

Updates the operational state 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.

A network service descriptor is a .yaml file in a network package that uses the TOSCA standard to describe the network functions you want to deploy and the Amazon Web Services infrastructure you want to deploy the network functions on.

Parameters:

  • nsd_info_id (NsdInfoId) –

    ID of the network service descriptor in the network package.

  • nsd_operational_state (NsdOperationalState) –

    Operational state of the network service descriptor in the network package.

Raises:

Examples:

Enable a network package's Operational State

>>> await client.update_sol_network_package(nsd_info_id='np-0d5b823eb5c2a9241', nsd_operational_state='ENABLED')
Disable a network package's Operational State
>>> await client.update_sol_network_package(nsd_info_id='np-0d5b823eb5c2a9241', nsd_operational_state='DISABLED')
Source code in docs_src/capo_tnb/_services/async_tnb.py
async def update_sol_network_package(
    self,
    nsd_info_id: "capo_tnb.types.nsd_info_id.NsdInfoId",
    nsd_operational_state: "capo_tnb.types.nsd_operational_state.NsdOperationalState",
    *,
    config_overrides: Optional[AsynctnbClientConfig] = None,
) -> (
    "capo_tnb.types.update_sol_network_package_output.UpdateSolNetworkPackageOutput"
):
    """<p>Updates the operational state 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> <p>A network service descriptor is a .yaml file in a network package that uses the TOSCA standard to describe the network functions you want to deploy and the Amazon Web Services infrastructure you want to deploy the network functions on.</p>

    Args:
        nsd_info_id: <p>ID of the network service descriptor in the network package.</p>
        nsd_operational_state: <p>Operational state of the network service descriptor in 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:
        Enable a network package's Operational State

        >>> await client.update_sol_network_package(nsd_info_id='np-0d5b823eb5c2a9241', nsd_operational_state='ENABLED')
        Disable a network package's Operational State

        >>> await client.update_sol_network_package(nsd_info_id='np-0d5b823eb5c2a9241', nsd_operational_state='DISABLED')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_tnb.types.update_sol_network_package_input.UpdateSolNetworkPackageInput]",
    ) -> AsyncOperationResponse[
        "capo_tnb.types.update_sol_network_package_output.UpdateSolNetworkPackageOutput"
    ]:
        import capo_tnb._operations.tnb.update_sol_network_package

        (
            output,
            http_response,
        ) = await capo_tnb._operations.tnb.update_sol_network_package.async_update_sol_network_package(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSolNetworkPackage")
    )
    input_: capo_tnb.types.update_sol_network_package_input.UpdateSolNetworkPackageInput = {
        "nsd_info_id": nsd_info_id,
        "nsd_operational_state": nsd_operational_state,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output