Skip to content

update_node async

update_node(
    cluster_id: __string,
    node_id: __string,
    *,
    config_overrides: Optional[AsyncMediaLiveClientConfig] = None,
    name: Optional[__string] = None,
    role: Optional[NodeRole] = None,
    sdi_source_mappings: Optional[SdiSourceMappingsUpdateRequest] = None,
) -> UpdateNodeResponse

Change the settings for a Node.

Parameters:

  • cluster_id (__string) –

    The ID of the cluster

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

    Include this parameter only if you want to change the current name of the Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.

  • node_id (__string) –

    The ID of the node.

  • role (Optional[NodeRole], default: None ) –

    The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.

  • sdi_source_mappings (Optional[SdiSourceMappingsUpdateRequest], default: None ) –

    The mappings of a SDI capture card port to a logical SDI data stream

Raises:

Source code in docs_src/capo_medialive/_services/async_media_live.py
async def update_node(
    self,
    cluster_id: "capo_medialive.types.__string.__string",
    node_id: "capo_medialive.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaLiveClientConfig] = None,
    name: Optional["capo_medialive.types.__string.__string"] = None,
    role: Optional["capo_medialive.types.node_role.NodeRole"] = None,
    sdi_source_mappings: Optional[
        "capo_medialive.types.sdi_source_mappings_update_request.SdiSourceMappingsUpdateRequest"
    ] = None,
) -> "capo_medialive.types.update_node_response.UpdateNodeResponse":
    """Change the settings for a Node.

    Args:
        cluster_id: The ID of the cluster
        name: Include this parameter only if you want to change the current name of the Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
        node_id: The ID of the node.
        role: The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
        sdi_source_mappings: The mappings of a SDI capture card port to a logical SDI data stream

    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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_medialive.types.update_node_request.UpdateNodeRequest]",
    ) -> AsyncOperationResponse[
        "capo_medialive.types.update_node_response.UpdateNodeResponse"
    ]:
        import capo_medialive._operations.media_live.update_node

        (
            output,
            http_response,
        ) = await capo_medialive._operations.media_live.update_node.async_update_node(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateNode")
    )
    input_: capo_medialive.types.update_node_request.UpdateNodeRequest = {
        "cluster_id": cluster_id,
        "node_id": node_id,
    }
    if name is not None:
        input_["name"] = name
    if role is not None:
        input_["role"] = role
    if sdi_source_mappings is not None:
        input_["sdi_source_mappings"] = sdi_source_mappings

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