Skip to content

create_sol_network_package

create_sol_network_package(
    *, config_overrides: Optional[tnbClientConfig] = None, tags: Optional[TagMap] = None
) -> CreateSolNetworkPackageOutput

Creates 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. For more information, see Network instances in the Amazon Web Services Telco Network Builder User Guide.

A network package consists of a network service descriptor (NSD) file (required) and any additional files (optional), such as scripts specific to your needs. For example, if you have multiple function packages in your network package, you can use the NSD to define which network functions should run in certain VPCs, subnets, or EKS clusters.

This request creates an empty network package container with an ID. Once you create a network package, you can upload the network package content using PutSolNetworkPackageContent.

Parameters:

  • tags (Optional[TagMap], default: None ) –

    A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs.

Raises:

Examples:

Create a Sol network package

>>> client.create_sol_network_package(tags={'Name': 'Resource'})
Source code in docs_src/capo_tnb/_services/tnb.py
def create_sol_network_package(
    self,
    *,
    config_overrides: Optional[tnbClientConfig] = None,
    tags: Optional["capo_tnb.types.tag_map.TagMap"] = None,
) -> (
    "capo_tnb.types.create_sol_network_package_output.CreateSolNetworkPackageOutput"
):
    """<p>Creates 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. For more information, see <a href="https://docs.aws.amazon.com/tnb/latest/ug/network-instances.html">Network instances</a> in the <i>Amazon Web Services Telco Network Builder User Guide</i>. </p> <p>A network package consists of a network service descriptor (NSD) file (required) and any additional files (optional), such as scripts specific to your needs. For example, if you have multiple function packages in your network package, you can use the NSD to define which network functions should run in certain VPCs, subnets, or EKS clusters.</p> <p>This request creates an empty network package container with an ID. Once you create a network package, you can upload the network package content using <a href="https://docs.aws.amazon.com/tnb/latest/APIReference/API_PutSolNetworkPackageContent.html">PutSolNetworkPackageContent</a>.</p>

    Args:
        tags: <p>A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Service quotas have been exceeded.</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:
        Create a Sol network package

        >>> client.create_sol_network_package(tags={'Name': 'Resource'})
    """

    def _handler(
        req: "OperationRequest[capo_tnb.types.create_sol_network_package_input.CreateSolNetworkPackageInput]",
    ) -> OperationResponse[
        "capo_tnb.types.create_sol_network_package_output.CreateSolNetworkPackageOutput"
    ]:
        import capo_tnb._operations.tnb.create_sol_network_package

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

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

        return capo_tnb.types.create_sol_network_package_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_tnb.types.create_sol_network_package_output.CreateSolNetworkPackageOutput",
    ) -> dict[str, Any]:
        import capo_tnb.types.create_sol_network_package_output

        return capo_tnb.types.create_sol_network_package_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateSolNetworkPackage",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_tnb.types.create_sol_network_package_input.CreateSolNetworkPackageInput = {}
    if tags is not None:
        input_["tags"] = tags

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