updateNode method

Future<UpdateNodeResponse> updateNode({
  1. required String clusterId,
  2. required String nodeId,
  3. String? name,
  4. NodeRole? role,
  5. List<SdiSourceMappingUpdateRequest>? sdiSourceMappings,
})

Change the settings for a Node.

May throw BadGatewayException. May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw GatewayTimeoutException. May throw InternalServerErrorException. May throw TooManyRequestsException.

Parameter clusterId : The ID of the cluster

Parameter nodeId : The ID of the node.

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

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

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

Implementation

Future<UpdateNodeResponse> updateNode({
  required String clusterId,
  required String nodeId,
  String? name,
  NodeRole? role,
  List<SdiSourceMappingUpdateRequest>? sdiSourceMappings,
}) async {
  final $payload = <String, dynamic>{
    if (name != null) 'name': name,
    if (role != null) 'role': role.value,
    if (sdiSourceMappings != null) 'sdiSourceMappings': sdiSourceMappings,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/prod/clusters/${Uri.encodeComponent(clusterId)}/nodes/${Uri.encodeComponent(nodeId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateNodeResponse.fromJson(response);
}