Creates a function package.
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. For more information, see Function packages in the Amazon Web Services Telco Network Builder User Guide.
Creating a function package is the first step for creating a network in AWS TNB. This request creates an empty container with an ID. The next step is to upload the actual CSAR zip file into that empty container. To upload function package content, see PutSolFunctionPackageContent.
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 function package
>>> client.create_sol_function_package(tags={'Name': 'Resource'})
Source code in docs_src/capo_tnb/_services/tnb.py
| def create_sol_function_package(
self,
*,
config_overrides: Optional[tnbClientConfig] = None,
tags: Optional["capo_tnb.types.tag_map.TagMap"] = None,
) -> "capo_tnb.types.create_sol_function_package_output.CreateSolFunctionPackageOutput":
"""<p>Creates a function package.</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. For more information, see <a href="https://docs.aws.amazon.com/tnb/latest/ug/function-packages.html">Function packages</a> in the <i>Amazon Web Services Telco Network Builder User Guide</i>. </p> <p>Creating a function package is the first step for creating a network in AWS TNB. This request creates an empty container with an ID. The next step is to upload the actual CSAR zip file into that empty container. To upload function package content, see <a href="https://docs.aws.amazon.com/tnb/latest/APIReference/API_PutSolFunctionPackageContent.html">PutSolFunctionPackageContent</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 function package
>>> client.create_sol_function_package(tags={'Name': 'Resource'})
"""
def _handler(
req: "OperationRequest[capo_tnb.types.create_sol_function_package_input.CreateSolFunctionPackageInput]",
) -> OperationResponse[
"capo_tnb.types.create_sol_function_package_output.CreateSolFunctionPackageOutput"
]:
import capo_tnb._operations.tnb.create_sol_function_package
output, http_response = (
capo_tnb._operations.tnb.create_sol_function_package.create_sol_function_package(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_tnb.types.create_sol_function_package_input.CreateSolFunctionPackageInput",
) -> dict[str, Any]:
import capo_tnb.types.create_sol_function_package_input
return capo_tnb.types.create_sol_function_package_input.redact_sensitive(
input_
)
def _redact_output(
output: "capo_tnb.types.create_sol_function_package_output.CreateSolFunctionPackageOutput",
) -> dict[str, Any]:
import capo_tnb.types.create_sol_function_package_output
return capo_tnb.types.create_sol_function_package_output.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"CreateSolFunctionPackage",
redact_input=_redact_input,
redact_output=_redact_output,
),
)
input_: capo_tnb.types.create_sol_function_package_input.CreateSolFunctionPackageInput = {}
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
|