Skip to content

update_sol_network_instance

update_sol_network_instance(
    ns_instance_id: NsInstanceId,
    update_type: UpdateSolNetworkType,
    *,
    config_overrides: Optional[tnbClientConfig] = None,
    modify_vnf_info_data: Optional[UpdateSolNetworkModify] = None,
    update_ns: Optional[UpdateSolNetworkServiceData] = None,
    tags: Optional[TagMap] = None,
) -> UpdateSolNetworkInstanceOutput

Update a network instance.

A network instance is a single network created in Amazon Web Services TNB that can be deployed and on which life-cycle operations (like terminate, update, and delete) can be performed.

Choose the updateType parameter to target the necessary update of the network instance.

Parameters:

  • ns_instance_id (NsInstanceId) –

    ID of the network instance.

  • update_type (UpdateSolNetworkType) –

    The type of update.

    • Use the MODIFY_VNF_INFORMATION update type, to update a specific network function configuration, in the network instance.

    • Use the UPDATE_NS update type, to update the network instance to a new network service descriptor.

  • modify_vnf_info_data (Optional[UpdateSolNetworkModify], default: None ) –

    Identifies the network function information parameters and/or the configurable properties of the network function to be modified.

    Include this property only if the update type is MODIFY_VNF_INFORMATION.

  • update_ns (Optional[UpdateSolNetworkServiceData], default: None ) –

    Identifies the network service descriptor and the configurable properties of the descriptor, to be used for the update.

    Include this property only if the update type is UPDATE_NS.

  • 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. When you use this API, the tags are only applied to the network operation that is created. These tags are not applied to the network instance. Use tags to search and filter your resources or track your Amazon Web Services costs.

Raises:

Examples:

Update a Sol Network Instance

>>> client.update_sol_network_instance(ns_instance_id='ni-0d5b823eb5c2a9241', update_type='MODIFY_VNF_INFORMATION', modify_vnf_info_data={'vnfInstanceId': 'fi-0d5b823eb5c2a9241', 'vnfConfigurableProperties': {'pcf.port': '8080', 'pcf.pods': '10'}}, tags={'Name': 'Resource'})
Update a Sol Network Instance
>>> client.update_sol_network_instance(ns_instance_id='ni-0d5b823eb5c2a9241', update_type='UPDATE_NS', update_ns={'nsdInfoId': 'np-0d5b823eb5c2a9241', 'additionalParamsForNs': {'cidr_block': '10.0.0.0/16', 'availability_zone': 'us-west-2a'}}, tags={'Name': 'Resource'})
Source code in docs_src/capo_tnb/_services/tnb.py
def update_sol_network_instance(
    self,
    ns_instance_id: "capo_tnb.types.ns_instance_id.NsInstanceId",
    update_type: "capo_tnb.types.update_sol_network_type.UpdateSolNetworkType",
    *,
    config_overrides: Optional[tnbClientConfig] = None,
    modify_vnf_info_data: Optional[
        "capo_tnb.types.update_sol_network_modify.UpdateSolNetworkModify"
    ] = None,
    update_ns: Optional[
        "capo_tnb.types.update_sol_network_service_data.UpdateSolNetworkServiceData"
    ] = None,
    tags: Optional["capo_tnb.types.tag_map.TagMap"] = None,
) -> "capo_tnb.types.update_sol_network_instance_output.UpdateSolNetworkInstanceOutput":
    """<p>Update a network instance.</p> <p>A network instance is a single network created in Amazon Web Services TNB that can be deployed and on which life-cycle operations (like terminate, update, and delete) can be performed.</p> <p>Choose the <i>updateType</i> parameter to target the necessary update of the network instance.</p>

    Args:
        ns_instance_id: <p>ID of the network instance.</p>
        update_type: <p>The type of update.</p> <ul> <li> <p>Use the <code>MODIFY_VNF_INFORMATION</code> update type, to update a specific network function configuration, in the network instance.</p> </li> <li> <p>Use the <code>UPDATE_NS</code> update type, to update the network instance to a new network service descriptor.</p> </li> </ul>
        modify_vnf_info_data: <p>Identifies the network function information parameters and/or the configurable properties of the network function to be modified.</p> <p>Include this property only if the update type is <code>MODIFY_VNF_INFORMATION</code>.</p>
        update_ns: <p>Identifies the network service descriptor and the configurable properties of the descriptor, to be used for the update.</p> <p>Include this property only if the update type is <code>UPDATE_NS</code>.</p>
        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. When you use this API, the tags are only applied to the network operation that is created. These tags are not applied to the network instance. 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.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource that doesn't exist.</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:
        Update a Sol Network Instance

        >>> client.update_sol_network_instance(ns_instance_id='ni-0d5b823eb5c2a9241', update_type='MODIFY_VNF_INFORMATION', modify_vnf_info_data={'vnfInstanceId': 'fi-0d5b823eb5c2a9241', 'vnfConfigurableProperties': {'pcf.port': '8080', 'pcf.pods': '10'}}, tags={'Name': 'Resource'})
        Update a Sol Network Instance

        >>> client.update_sol_network_instance(ns_instance_id='ni-0d5b823eb5c2a9241', update_type='UPDATE_NS', update_ns={'nsdInfoId': 'np-0d5b823eb5c2a9241', 'additionalParamsForNs': {'cidr_block': '10.0.0.0/16', 'availability_zone': 'us-west-2a'}}, tags={'Name': 'Resource'})
    """

    def _handler(
        req: "OperationRequest[capo_tnb.types.update_sol_network_instance_input.UpdateSolNetworkInstanceInput]",
    ) -> OperationResponse[
        "capo_tnb.types.update_sol_network_instance_output.UpdateSolNetworkInstanceOutput"
    ]:
        import capo_tnb._operations.tnb.update_sol_network_instance

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

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

        return capo_tnb.types.update_sol_network_instance_input.redact_sensitive(
            input_
        )

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

        return capo_tnb.types.update_sol_network_instance_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateSolNetworkInstance",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_tnb.types.update_sol_network_instance_input.UpdateSolNetworkInstanceInput = {
        "ns_instance_id": ns_instance_id,
        "update_type": update_type,
    }
    if modify_vnf_info_data is not None:
        input_["modify_vnf_info_data"] = modify_vnf_info_data
    if update_ns is not None:
        input_["update_ns"] = update_ns
    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