Skip to content

update_network

update_network(
    network_id: __string,
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    ip_pools: Optional[__listOfIpPoolUpdateRequest] = None,
    name: Optional[__string] = None,
    routes: Optional[__listOfRouteUpdateRequest] = None,
) -> UpdateNetworkResponse

Change the settings for a Network.

Parameters:

  • ip_pools (Optional[__listOfIpPoolUpdateRequest], default: None ) –

    Include this parameter only if you want to change the pool of IP addresses in the network. An array of IpPoolCreateRequests that identify a collection of IP addresses in this network that you want to reserve for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPoolUpdateRequest specifies one CIDR block.

  • name (Optional[__string], default: None ) –

    Include this parameter only if you want to change the name of the Network. Specify a name that is unique in the AWS account. Names are case-sensitive.

  • network_id (__string) –

    The ID of the network

  • routes (Optional[__listOfRouteUpdateRequest], default: None ) –

    Include this parameter only if you want to change or add routes in the Network. An array of Routes that MediaLive Anywhere needs to know about in order to route encoding traffic.

Raises:

Source code in docs_src/capo_medialive/_services/media_live.py
def update_network(
    self,
    network_id: "capo_medialive.types.__string.__string",
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    ip_pools: Optional[
        "capo_medialive.types.__list_of_ip_pool_update_request.__listOfIpPoolUpdateRequest"
    ] = None,
    name: Optional["capo_medialive.types.__string.__string"] = None,
    routes: Optional[
        "capo_medialive.types.__list_of_route_update_request.__listOfRouteUpdateRequest"
    ] = None,
) -> "capo_medialive.types.update_network_response.UpdateNetworkResponse":
    """Change the settings for a Network.

    Args:
        ip_pools: Include this parameter only if you want to change the pool of IP addresses in the network. An array of IpPoolCreateRequests that identify a collection of IP addresses in this network that you want to reserve for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPoolUpdateRequest specifies one CIDR block.
        name: Include this parameter only if you want to change the name of the Network. Specify a name that is unique in the AWS account. Names are case-sensitive.
        network_id: The ID of the network
        routes: Include this parameter only if you want to change or add routes in the Network. An array of Routes that MediaLive Anywhere needs to know about in order to route encoding traffic.

    Raises:
        capo_medialive.errors.bad_gateway_exception.BadGatewayException: Placeholder documentation for BadGatewayException
        capo_medialive.errors.bad_request_exception.BadRequestException: Placeholder documentation for BadRequestException
        capo_medialive.errors.conflict_exception.ConflictException: Placeholder documentation for ConflictException
        capo_medialive.errors.forbidden_exception.ForbiddenException: Placeholder documentation for ForbiddenException
        capo_medialive.errors.gateway_timeout_exception.GatewayTimeoutException: Placeholder documentation for GatewayTimeoutException
        capo_medialive.errors.internal_server_error_exception.InternalServerErrorException: Placeholder documentation for InternalServerErrorException
        capo_medialive.errors.too_many_requests_exception.TooManyRequestsException: Placeholder documentation for TooManyRequestsException
        capo_medialive.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_medialive.types.update_network_request.UpdateNetworkRequest]",
    ) -> OperationResponse[
        "capo_medialive.types.update_network_response.UpdateNetworkResponse"
    ]:
        import capo_medialive._operations.media_live.update_network

        output, http_response = (
            capo_medialive._operations.media_live.update_network.update_network(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateNetwork")
    )
    input_: capo_medialive.types.update_network_request.UpdateNetworkRequest = {
        "network_id": network_id
    }
    if ip_pools is not None:
        input_["ip_pools"] = ip_pools
    if name is not None:
        input_["name"] = name
    if routes is not None:
        input_["routes"] = routes

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